How to determine which JPEG is closer to the original image and has more information?

You can't really distinguish from this data. Of course, one might expect the larger file to contain a little more information, but the other could be badly encoded. Utilities like ImageMagick & # 39; s identify It can tell you the "quality" JPEG (and chroma subsampling) settings, but you can still see a new encoding that caused some data loss.

If you have both images, you can:

  • convert both to PNG
  • re-encode the PNG to JPG with the same settings for all

The larger file will now correspond to the initial image with more "information" (but, strictly speaking, this could add noise).

Determine if a program fails due to the inability to open a port for another reason

An executable closes immediately and silently. I know for sure that I should be trying to open a port. How can I determine if it does not (that is, control really reaches the attempt but the attempt fails)? Special difficulty: no strace!

dnd 5e – How do I determine Shadow Dragon & # 39; s Breath Save DC?

From the Shadow Dragon's template, it would appear that the Shadow Breath has the same damage and save as the original dragon's breath weapon, since no change in the template is indicated:

New action: Grim breath. Any breath weapon that inflicts damage that the dragon possesses deals necrotic damage instead of its original damage type. A humanoid reduced to 0 hit points for this damage dies, and an undead shadow rises from its corpse and acts immediately after the dragon in the count of initiatives. The shadow is under the dragon's control.

However, analyzing the provided example of applying the template to a Young Red Dragon (whose Breath Weapon has a DC of 17), the Young Red Shadow Dragon has a Shadow Breath with DC 18.

Am I missing something? If the DC remained at 17, would it lead to a different CR? In that case, what comes first: the CR or the DC?

Given a SharePoint site collection URL, how can you determine if it is SharePoint Online or SharePoint On-Prem?

I would like to be able to determine if the URL of a SharePoint web application is an online instance of SharePoint or not.

Previously, I used to think that I could verify if a sharepoint web application URL had the form https://{tenantname}.sharepoint.com to see if it was a sharepoint online instance URL.

But now I have seen Office 365 online sharepoint URL that looks like https://prefix.mycompany.com.

Is there a simple way to verify a URL for online sharepoint versus sharepoint in prem?

I'd rather not have to add a "SharePoint Online" checkbox in my user interface.

Visual FoxPro – How to determine the end of the string in VFP 9?

The end of the chain can be marked as a separate null terminator symbol.

How do I determine that the current symbol is the end of the string?

Now I use some chain function calls.
But I guess it can be done more easily.

*the string's end
IF ISBLANK(SUBSTR(str, pos, 1) == .T.  AND CHR(32) != SUBSTR(str, pos,  1)
    RETURN .T.
ENDIF

data leak: determine what a company is looking for in Google

Let's say a fictitious company, AwSemCo, discovers that a published "CVE0day" vulnerability affects its systems and immediately begins to investigate it. They go to the web in search of a solution, what to look for forensic if they have already been beaten, etc. As AwSemCo employees are looking for everything about CVE0day, their search activity would leave signs in searches that AwSemCo could be vulnerable to the issue.

Is it possible for someone outside the search giants to determine what AwSemCo people are looking for on Google? If so, is this a viable source for the recognition and / or collection of information?

Optics: determine the effective aperture size by f-stop / sensor size / focal length / CoC size

Is it possible to calculate the effective opening size using the following parameters?

  • f-stop
  • sensor size
  • focal length of the lens
  • confusion circle size

If yes, what is the equation?

If not, what are the additional parameters needed to calculate the opening size?

centos – Tools to determine which Apache directive is forcing redirects

Is there any tool to debug Apache directives that tells me which line caused a given redirect?

Reason: I have an ALB on AWS. I created a healthCheck.php page in all instances, but when it does, the result is always 301, which means that all instances are marked as & # 39; Unhealthy & # 39 ;. I could put a 301 as a success, but I don't know if my server is really down or not. Verifying with curl in the same VPC, that is the case:

curl http://192.0.2.56/healthCheck.php



301 Moved Permanently

Moved Permanently

The document has moved here.

So I looked at my Apache configuration file and couldn't see anything. It has not been touched on the standard CentOS 7 configuration, with lots of virtual hosts below.

As a super fast test, I set up another ALB in exactly the same way, I took out an official CentOS 7 AMI server, I tried it and it is not redirected to www. So, I compared the two outputs. There is literally no difference in the main files, except virtual hosts. I've spent a lot of time looking for what it could be. Any ideas> Tools I can use to track each step until the final answer was generated?

The servers that get this 301 redirect are all from port 80, with the ALB removing HTTPS. LAMP with PHP-FPM. Is it because my virtual hosts are all *: 80?

Apache configuration minus virtual hosts:

#
# This is the main Apache HTTP server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See  for detailed information.
# In particular, see 
# 
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do.  They're here only as hints or reminders.  If you are unsure
# consult the online docs. You have been warned.  
#
# Configuration and logfile names: If the filenames you specify for many
# of the server's control files begin with "/" (or "drive:/" for Win32), the
# server will use that explicit path.  If the filenames do *not* begin
# with "/", the value of ServerRoot is prepended -- so 'log/access_log'
# with ServerRoot set to '/www' will be interpreted by the
# server as '/www/log/access_log', where as '/log/access_log' will be
# interpreted as '/log/access_log'.

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# Do not add a slash at the end of the directory path.  If you point
# ServerRoot at a non-local disk, be sure to specify a local disk on the
# Mutex directive, if file-based mutexes are used.  If you wish to share the
# same ServerRoot for multiple httpd daemons, you will need to change at
# least PidFile.
#
ServerRoot "/etc/httpd"

#
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the 
# directive.
#
# Change this to Listen on specific IP addresses as shown below to 
# prevent Apache from glomming onto all bound IP addresses.
#
#Listen 12.34.56.78:80
Listen 80

#
# Dynamic Shared Object (DSO) Support
#
# To be able to use the functionality of a module which was built as a DSO you
# have to place corresponding `LoadModule' lines at this location so the
# directives contained in it are actually available _before_ they are used.
# Statically compiled modules (those listed by `httpd -l') do not need
# to be loaded here.
#
# Example:
# LoadModule foo_module modules/mod_foo.so
#
Include conf.modules.d/*.conf

#
# If you wish httpd to run as a different user or group, you must run
# httpd as root initially and it will switch.  
#
# User/Group: The name (or #number) of the user/group to run httpd as.
# It is usually good practice to create a dedicated user and group for
# running httpd, as with most system services.
#
User apache
Group apache

# 'Main' server configuration
#
# The directives in this section set up the values used by the 'main'
# server, which responds to any requests that aren't handled by a
#  definition.  These values also provide defaults for
# any  containers you may define later in the file.
#
# All of these directives may appear inside  containers,
# in which case these default settings will be overridden for the
# virtual host being defined.
#

#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
ServerAdmin root@localhost

#
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
#ServerName www.example.com:80

#
# Deny access to the entirety of your server's filesystem. You must
# explicitly permit access to web content directories in other 
#  blocks below.
#

    AllowOverride none
    Require all denied


#
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/var/www/html"

#
# Relax access to content within /var/www.
#

    AllowOverride None
    # Allow open access:
    Require all granted


# Further relax access to the default document root:

    #
    # Possible values for the Options directive are "None", "All",
    # or any combination of:
    #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
    #
    # Note that "MultiViews" must be named *explicitly* --- "Options All"
    # doesn't give it to you.
    #
    # The Options directive is both complicated and important.  Please see
    # http://httpd.apache.org/docs/2.4/mod/core.html#options
    # for more information.
    #
    Options Indexes FollowSymLinks

    #
    # AllowOverride controls what directives may be placed in .htaccess files.
    # It can be "All", "None", or any combination of the keywords:
    #   Options FileInfo AuthConfig Limit
    #
    AllowOverride None

    #
    # Controls who can get stuff from this server.
    #
    Require all granted


#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#

    DirectoryIndex index.html


#
# The following lines prevent .htaccess and .htpasswd files from being 
# viewed by Web clients. 
#

    Require all denied


#
# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a 
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a 
# container, that host's errors will be logged there and not here.
#
ErrorLog "logs/error_log"

#
# LogLevel: Control the number of messages logged to the error_log.
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
#
LogLevel warn


    #
    # The following directives define some format nicknames for use with
    # a CustomLog directive (see below).
    #
    LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i"" combined
    LogFormat "%h %l %u %t "%r" %>s %b" common

    
      # You need to enable mod_logio.c to use %I and %O
      LogFormat "%h %l %u %t "%r" %>s %b "%{Referer}i" "%{User-Agent}i" %I %O" combinedio
    

    #
    # The location and format of the access logfile (Common Logfile Format).
    # If you do not define any access logfiles within a 
    # container, they will be logged here.  Contrariwise, if you *do*
    # define per- access logfiles, transactions will be
    # logged therein and *not* in this file.
    #
    #CustomLog "logs/access_log" common

    #
    # If you prefer a logfile with access, agent, and referer information
    # (Combined Logfile Format) you can use the following directive.
    #
    CustomLog "logs/access_log" combined



    #
    # Redirect: Allows you to tell clients about documents that used to 
    # exist in your server's namespace, but do not anymore. The client 
    # will make a new request for the document at its new location.
    # Example:
    # Redirect permanent /foo http://www.example.com/bar

    #
    # Alias: Maps web paths into filesystem paths and is used to
    # access content that does not live under the DocumentRoot.
    # Example:
    # Alias /webpath /full/filesystem/path
    #
    # If you include a trailing / on /webpath then the server will
    # require it to be present in the URL.  You will also likely
    # need to provide a  section to allow access to
    # the filesystem path.

    #
    # ScriptAlias: This controls which directories contain server scripts. 
    # ScriptAliases are essentially the same as Aliases, except that
    # documents in the target directory are treated as applications and
    # run by the server when requested rather than as documents sent to the
    # client.  The same rules about trailing "/" apply to ScriptAlias
    # directives as to Alias.
    #
    ScriptAlias /cgi-bin/ "/var/www/cgi-bin/"



#
# "/var/www/cgi-bin" should be changed to whatever your ScriptAliased
# CGI directory exists, if you have that configured.
#

    AllowOverride None
    Options None
    Require all granted



    #
    # TypesConfig points to the file containing the list of mappings from
    # filename extension to MIME-type.
    #
    TypesConfig /etc/mime.types

    #
    # AddType allows you to add to or override the MIME configuration
    # file specified in TypesConfig for specific file types.
    #
    #AddType application/x-gzip .tgz
    #
    # AddEncoding allows you to have certain browsers uncompress
    # information on the fly. Note: Not all browsers support this.
    #
    #AddEncoding x-compress .Z
    #AddEncoding x-gzip .gz .tgz
    #
    # If the AddEncoding directives above are commented-out, then you
    # probably should define those extensions to indicate media types:
    #
    AddType application/x-compress .Z
    AddType application/x-gzip .gz .tgz

    #
    # AddHandler allows you to map certain file extensions to "handlers":
    # actions unrelated to filetype. These can be either built into the server
    # or added with the Action directive (see below)
    #
    # To use CGI scripts outside of ScriptAliased directories:
    # (You will also need to add "ExecCGI" to the "Options" directive.)
    #
    #AddHandler cgi-script .cgi

    # For type maps (negotiated resources):
    #AddHandler type-map var

    #
    # Filters allow you to process content before it is sent to the client.
    #
    # To parse .shtml files for server-side includes (SSI):
    # (You will also need to add "Includes" to the "Options" directive.)
    #
    AddType text/html .shtml
    AddOutputFilter INCLUDES .shtml


#
# Specify a default charset for all content served; this enables
# interpretation of all content as UTF-8 by default.  To use the 
# default browser choice (ISO-8859-1), or to allow the META tags
# in HTML content to override this choice, comment out this
# directive:
#
AddDefaultCharset UTF-8


    #
    # The mod_mime_magic module allows the server to use various hints from the
    # contents of the file itself to determine its type.  The MIMEMagicFile
    # directive tells the module where the hint definitions are located.
    #
    MIMEMagicFile conf/magic


#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
#ErrorDocument 404 /missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#

#
# EnableMMAP and EnableSendfile: On systems that support it, 
# memory-mapping or the sendfile syscall may be used to deliver
# files.  This usually improves server performance, but must
# be turned off when serving from networked-mounted 
# filesystems or if support for these functions is otherwise
# broken on your system.
# Defaults if commented: EnableMMAP On, EnableSendfile Off
#
#EnableMMAP off
EnableSendfile on

# Supplemental configuration
#
# Load config files in the "/etc/httpd/conf.d" directory, if any.
IncludeOptional conf.d/*.conf

RemoteIPHeader X-Forwarded-For


ServerName site1.org
ServerAlias www.site1.org
DocumentRoot /var/www/html//public_html
DirectoryIndex index.php
CustomLog logs/access_log common
ErrorLog logs/error_log
/public_html">
AllowOverride All
Require all granted
Options -Indexes


air travel: how to determine what I should eat on a flight with passengers with nut allergies

I recently returned from a trip to Florida on British Airways. On both flights there was an announcement that some passengers had a severe nut allergy, so we were told not to eat foods that contain nuts. I know that small traces of nuts on surfaces can be a problem, and I have read reports of traces in the air that cause reactions. For the purpose of this question, suppose this is really the case, the air crew has instructed me and I want to comply with the letter and spirit of the request.

My usual practice for a transatlantic flight is to buy a small snack to consume if I don't like the meals provided. I often also bring a "Snickers" or "Payday", both with peanuts, and in the latter case those nuts are outside the snack.

Therefore, playing it safe, I keep the Snickers and Payday in my bag, I am complying, without nuts.

But the sandwich? Sometimes you see ads like

This product is prepared in a kitchen where nuts are used. May contain traces of nuts.

Suppose I want to do the right thing, how do I determine whether to open the sandwich? My instinct is that a simple ham sandwich on white bread simply may not be a problem, but am I right? So, ask the flight crew? They know? Do you have training?

I see from this article that the problem is quite complicated. My proposed course of action is to make sure not to bring sandwiches that explicitly contain nuts (for example, cashew chicken wrap), but feel free to eat anything whose ingredient label does not specify nuts.

SQL Server: is there any reasonable way to determine what executed a query?

I have an S3 SQL Server database in Azure and I have a problem with a specific query generated by the Entity Framework and how often it runs.

As the numbers show below, I get 160K + executions per hour, and this number is unexpected (for the time periods illustrated, I would have expected less than 10K executions per hour).

enter the description of the image here

The number of executions also does not correlate with the number of requests to the API methods that issue this query (they were called approximately 50 times in the corresponding period).

So, my question is: using Azure analysis, is there any way to track the query to determine who / what made the call? Can I get an IP address in some way? This is clearly a code problem, is there any useful way to determine where the calls come from?