What are the hooks in WordPress theme development?

Question: I wanna know, what are the hooks in wp themes, like before_header_hook, after_header_hook?
What are the uses and benefits of these hooks in theme development?
Comment: To be clear, are you asking in general why hooks exist and how they work? Or are you specifically asking about `before_header_hook` hook? There are many hooks in WordPress and it's unclear if you're looking for an explanation of what hooks are or if you're specifically asking about these 2 hooks.
Answer: WordPress is a whole package of different code components working together to provide a functional Content Management System. WordPress Core, Plugins, and Themes are all part of this package. Since some of these components update separately you do not want to edit the code directly, otherwise your changes will be overwritten whenever these components update. Thus, WordPress implemented a system of Hooks.

Action hooks allow you to inject functionality into a specific point of runtime. You can create your own plugin or theme with these action hooks so that they do not get overwritten whenever a component updates. For example, plugins_loaded is an action hook that runs after all plugins have been loaded during runtime. If you wanted to run specific functionality after all the plugins have been loaded during a page request you could say:
function example_plugins_loaded_callback() {

    // Print a message then stop page request load.
    print( 'All plugins have been loaded successfully!' );
    exit();

}
add_action( 'plugins_loaded', 'example_plugins_loaded_callback' );

Once all plugins are loaded the above message gets printed to the screen and the page request stops loading additional files. This is a simple example usage but that's the gist of how action hooks work. You could call an API or write to the database at this point if you wanted to.
Without Action Hooks, if you wanted to print the above you would need edit the wp-settings.php file directly which would eventually be overwritten whenever WordPress updates. This would break whatever functionality you would need in place when the plugins_loaded hook runs.

Filter Hooks allow you to modify specific values generated by functions. Unlike action hooks they expect a returned value. A good example for this is the filter hook the_title which allows you to modify the_title() and get_the_title() values before they're printed to the screen. You can view the code directly by viewing the function on trac. The function and callback is similar to action hooks:
function example_the_title_callback() {

    return 'Example Title';

}
add_filter( 'the_title', 'example_the_title_callback' );

Using the above filter hook, anywhere that the_title() is called will now print Example Title instead.

Hooks also come with priorities and number of args. You will need to look up each hook to figure out what args are passed to the hook but it goes like this:
add_filter(
    'the_title',                    // Hook Name
    'example_the_title_callback',   // Callback Function Name
    10,                             // Priority
    2                               // Number of arguments
);

Hook Name - Not every function has available hooks. You will need to look this up on a per-need basis using the Developer Docs.
Callback Function - The name of the function you want to trigger.
Priority - When you want the hook to run. Hooks can have multiple functions attached to them, some may not be yours ( plugins or themes ). Lower priority will run before higher priority hooks.
Number of Arguments - The arguments passed to the callback function.

Hooks that pass more than 1 argument need to be told to give your callback function those arguments. the_title hook passes $title and $post_id. If we want to use the $post_id argument we need to tell the add_filter() function to pass those to our callback function:
/**
 * One Argument Hook
 */
function example_the_title_callback( $title ) {

    /**
     * - By default we always get 1 argument if possible.
     * - We do not have access to $post_id at this point.
     */
    $new_title = $title . '!!!';

    return $new_title;
}
add_filter( 'the_title', 'example_the_title_callback' );

/**
 * Two Arguments Hook
 */
function example_the_title_callback( $title, $post_id ) {

    /**
     * Since we specified 2 arguments, we receive the 2 arguments that the hook provides
     */
    $post = get_post( $post_id );
    $new_title = $title . ' - ' . $post->ID;

    return $new_title;
}
add_filter( 'the_title', 'example_the_title_callback', 10, 2 );

Again, you'll need into the Developer Docs to see what arguments the hook passes.

Finally, you as a theme or plugin developer can add in your own custom hooks which will allow other developers to add any or modify specific functionality.
Let's say you've written a plugin that wraps the Post Title on the frontend in  HTML tags for specific styling. You can add a hook to allow other developers to add custom  classes to your span like so:
/**
 * My super cool plugin
 * Add HTML span tags around titles
 * Our plugin CSS can style them cool later
 */
function supercool_title( $title ) {

    // Allow theme developers or plugin developers to add classes to our span tag.
    $classes = apply_filters(
        'supercool_title_classes',      // Our custom filter name
        array(),                        // Array of classes to pass to the filter, empty in this scenario
    );

    // Filters always return
    return sprintf( '%s', esc_attr( implode( ' ', $classes ) ), $title );

}
add_filter( 'the_title', 'supercool_title' );

As a theme developer I can use that plugins hook to add in my own classes if I wanted to.
/**
 * Theme Devloper modifies plugin functionality
 * Adds specific class to the super cool plugin title wrapper
 */
function my_theme_supercool_title_classes( $classe ) {

    $classes[] = 'special-title';
    return $classes;

}
add_filter( 'supercool_title_classes', 'my_theme_supercool_title_classes' );

// Output
Post Title

You could do the same thing with action hooks when creating your theme or plugin. WooCommerce utilizes a lot of action hooks in their templating system allowing other plugins and specific themes to add in output. Something like:
do_action( 'before_header_hook' ); // A custom action hook created by the developer.

Simply allows you, if you want to, to inject specific code at that point. Maybe an Analytics script or an entire HTML wrapper for a utility nav that the theme previously didn't support. The possibilities are endless!
Answer: Whenever you want to do something or customize something in WordPress, then there is very likely a hook you can use.
The "do" hook is called an "action." Wherever an action is defined, you can execute your own code. Here are some examples:

send an email to the author once a post is published;
load a custom script file in the footer of the page;
add instructions above the login form.

A hook is a place in WordPress's code that can get functions added to it. When you create a hook, you give yourself and other developers the opportunity to add in additional functionality at that location.
Hooked functions are custom PHP functions that we can "hook into" WordPress, at the locations specified by its hooks.


Are there any LDAP search queries which could be used in a way akin to malicious SQL Injection?

Question: I know the "search" query bit of what I have asked may preclude any crud operations on AD.  But opening up the question a bit. If on a website for example, I am taking input from a text box to search for users, I would hazard a guess that I am potentially leaving myself open to some kind of malicious activity, if I don't try and curtail it. What do I need to look out for?
For example, anyone who is a bit LDAP savvy might be able to enter a command which might cause a long running process taking up vital resources (consider someone with a bit of a grudge spinning up loads of requests with a really nutty search filter). Notwithstanding my ability to limit to a prescribed OU,  limiting the scope a little I'm sure there is still loopholes here, potentially?
Comment: Injection weaknesses can occur in any system where data can be misinterpreted as commands.
Answer: Just like any application interface that accepts user input, there's a potential for an attacker to supply malicious inputs that the application may not expect. It is always best to perform strong white-list validation to ensure user input matches known/expected values. There are other cases where a more robust defense may be required.
If you are taking user input, and putting directly into an LDAP query, you'll want to defend against inclusion of unforeseen LDAP meta-characters. If an attacker is successful in modifying LDAP statements, it is a vulnerability known as LDAP Injection.
The following articles do a good job explaining what is LDAP Injection, and how you can defend against it:
https://www.owasp.org/index.php/LDAP_injection
http://projects.webappsec.org/w/page/13246947/LDAP%20Injection
Keep in mind user input can be ANYTHING from the client side, not just application POST/GET parameters. Things like HTTP (or other protocol)headers, are just as vulnerable. If an attacker is able to intercept the data before it is transmitted to the application, then it should be considered "tainted" and proper defenses should be applied to make sure it does not contain malicious input.


How to decrease satellite's orbital radius?

Question: According to the equation $v²=GM/r$ to decrease the orbital radius of a satellite currently in orbit, you'd want to increase its speed. However intuitively this doesn't make sense to me, surely if you decreased the speed (e.g. by ejecting a mass in the direction of movement) the resultant force would cause the satellite's path to curve inwards? Please someone explain this to me. I'd like to know the practical way of decreasing the orbit and the intuition behind why it works.
Comment: See https://en.wikipedia.org/wiki/Hohmann_transfer_orbit
Comment: See also https://physics.stackexchange.com/questions/507053/escape-velocity-and-orbital-velocity-confusion
Comment: See my answer on https://physics.stackexchange.com/q/480904/
Comment: Have you estimated how much energy and angular momentum you need to shed to decrease the radius from and to your circular orbits? The WP article in @PM_2Ring 's comment does that, effectively.
Answer: Suppose a satellite is in a circular orbit at some altitude $h$ and is supposed to change its orbit to a circular orbit of $h-\Delta h$, where $\Delta h$ is positive. The orbital velocity will necessarily increase.
This seems paradoxical, but to accomplish this, this spacecraft has to reduce its orbital velocity, and then reduce it again half of an orbit later. The first reduction in orbital velocity results in an elliptical orbit with apogee at the original circular altitude and perigee at some lower altitude, dictated by how much the satellite reduced its orbital velocity.
The satellite will reach perigee half of an orbit after the initial burn. At this point, its orbital velocity will be greater than that of a satellite orbiting circularly at that altitude. This means the satellite in question has to once again fire its thrusters to reduce its orbital velocity, only to find that its orbital velocity has increased compared to the original orbital velocity.


Need help identifying grass type

Question: My yard has been overrun with clover and dandelions. Looking for help identifying the type of grass I have and help controlling the weeds
https://i.stack.imgur.com/sPFE6.jpg
Answer: I'm afraid that your photo is inadequate for identifying your lawn grass; typically, it's only really possible to get a good lawn grass ID from personal inspection. I've found this site, which contains close-ups of the various types of lawn grass (both warm-season and cool-season) and good information about each type. It is missing one characteristic for identification - blade tip. This is commonly missed because lawnmowers, of course, cut off the tips of the grass blades. I recommend that you review the site and then examine your lawn carefully to try to match your grasses (because your lawn probably contains a mix of types) to the site.
Comment: Generally broad leaf weed killers do not hurt any grass so the grass type does not affect the choice of weed killer.
Comment: @blacksmith37 = The question is entitled "Need help identifying grass type", which is why I posted what I posted.

Need help identifying grass type


What is the smallest observable structure in the universe?

Question: I've been wondering about the Planck length recently, but it is not observable. What is the smallest actually observable structure in the universe?
Comment: The smallest observed scales are given by the highest particle energies measured, so far, which would be in the 1e20eV range, far below the Planck scale. The latter is a very questionable concept, anyway, because as long as relativity holds the effective interaction energy in a collision event is observer dependent, i.e. one observer would see the Planck scale probed, while another would not. Both can, of course, not be true at the same time, so if relativity is a fundamental symmetry that hold on all scales, there is no such thing as a "smallest structure".
Comment: are photons observable enough?
Comment: You might get some answers here, scroll down a little to detailed list under sub-atomic.   http://en.wikipedia.org/wiki/Orders_of_magnitude_%28length%29#Subatomic   It's Wiki, so I can't swear by it's accuracy.
Answer:
What is the smallest actually observable structure in the universe?

The smallest structure that I have seen is the electron cloud around an atom.
Comment: Broken link?$ $
Comment: @jinawee The link is repaired.
Answer: It depends on what you mean by observable. The smallest confirmed particle is the electron neutrino. Observation/measurement is another discussion in itself.
Answer: Your question comes with an extra difficulty: the meaning of distances and sizes at the quantum level.
From the current understanding of particle physics, all particles are point-like and hence volumeless. Of course this is an interpretation of the theory and this statement would require the experiments to probe arbitrarily small distances, which does not happen.
Insofar the shortest distances probed are around $10^{-16}$ cm, while the LHC is expected to achieve $10^{-17}$ cm. But these distances do not immediately correspond to structures.
If we refer to smallest structures to volume occupying entities in nature, then the smallest known will have to be mesons (quark and anti-quark pair, like the pion $\pi$), whose volume and shape is still a matter of research, but you can take an upper bound to be of order of the size of the nucleus of Hydrogen (a proton): $10^{-12}$ cm.
References:
https://www.ias.edu/articles/large-hadron-collider
http://en.wikipedia.org/wiki/Orders_of_magnitude_(length)#1E-15


University Searching of Apartmenrs

Question: In the state of California, landlords cannot enter their tenants room except under a small subset of reasons. Would a University (excluding campus police) renting rooms to students be able to search the rooms or would this violate California Civil Code 1954.
Answer: You have two questions here. A search by the government must be reasonable, under the 4th Amendment, meaning that a warrant is required or exigent circumstances must exist. Simple entering (without searching) is governed by Civil Code 1954. The law governing residential rentals is not explicit, because a a dormitory might be considered not to be a "residential dwelling unit". Some states explicitly exclude university dormitories, but that seems not to be the case in CA. There are some specific exclusions where dormitories are excluded (such as 1946.2 regarding termination), so the lack of an exclusion for dormitories can't follow from an assumption that a dormitory is not a residential dwelling unit. Clearly, a normal apartment that happens to be owned by the university and is rented out to students (as exist in many universities) clearly is an ordinary rental. So it seems that a dormitory is not legally exempted from 1954: they can only enter with permission or in specific circumstances.
Comment: At least in the UK, "dormitory" generally means a communal bedroom shared by several people of the same sex. Is that the meaning it has here, or is the word specially defined by CA rental law?

University Searching of Apartmenrs


Android: using requestSingleUpdate or replace it

Question: i'm working on app, which must get latitude and longitude. in my case requestLocationUpdates (String provider, long minTime, float minDistance, LocationListener listener) is not in option. why? because i must get location just when user do something that location is needed (let's say he hits button). and i need location exactly on the time, when button is hit. in requestLocationUpdates, we can set minTime-if i set this let's say on 30000 the location at the "button hit time" won't be as good as i want. of the same reason minDistance is also not as good as i want. if i understant function requestLocationUpdates correct-when minTime and minDistance are set to 0, location is updating all the time. please correct me if i'm wrong. app is for company that i'm working at and that app will be used through the day and night. so if app will check for location updates all the time, battery would be often empty. thst's why i need location just at the time, that button is hit. i found requestSingleUpdate function. but i can't use it in eclipse =( like it doesn't exists.
is there some other way to do this or am i missing something?
Answer: The requestSingleLocation method new for API level 9.  If you are targeting an earlier API level, this method will not be available to you.
One of the problems with obtaining location information is that it can take time to get a fix.  This is more of a problem with the GPS location provider than the network provider.  If you are only using the network provider, then there may not much of a delay with getting the location information when the user clicks the button (I say this knowing nothing about what your app does with the data, or what type of user experience you are trying to provide).
Something else you can try is the PASSIVE_PROVIDER.  It allows you to get location updates that were requested from other apps.  This will mean that you have to request the ACCESS_FINE_LOCATION permission however.  You may also need to leave something running to receive the location updates (likely a service or a BroadCastReceiver).  The BroadcastReceiver approach should not use that much additional battery life since it only runs when the Intent is received along with the PASSIVE_PROVIDER only getting locations when some other app requested them anyways.
The other sticky point with the PASSIVE_PROVIDER is that you should eventually call removeUpdates.  Where and when to call this really depends on how your app is structured and how you handle the user exiting the app.
Comment: For the sake of completeness, PASSIVER_PROVIDER requires API level 8.
Answer: You can use getLastKnownLocation method, but it can be out-of-date. requestLocationUpdates is asynchronous because gps needs to "warm-up" to find new location.
requestSingleUpdate method is available since api level 9, but you can implements it's using requestLocationUpdates and disabling updates after first callback to LocationListener.
Comment: i can't use getLastKnownLocation of 2 reasons: 1. it can be out-of-date as you said.
2. not all devices will have allowed gps (i must use network provider). so when device rebots, location will be null when i call getLastKnownLocation.
how can i disable update?
Comment: this technique is explained here http://android-developers.blogspot.co.uk/2011/06/deep-dive-into-location.html


Error in starting puppetmaster while upgrade

Question: I am trying to upgrade my system (Linux mint 17):

$ sudo apt-get upgrade

And this is the output, (I have tried this more than once so I am copy+pasting the latest output)

Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
    facter libqt5gui5 linux-generic linux-headers-generic linux-image-generic
    mintupdate python-pip
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up puppetmaster (3.8.1-1puppetlabs1) ...

Starting puppet master

could not change to group "pe-puppet"
Could not change to user pe-puppet: Invalid user: pe-puppet
invoke-rc.d: initscript puppetmaster, action "start" failed.
dpkg: error processing package puppetmaster (--configure):
  subprocess installed post-installation script returned error exit status 74
Errors were encountered while processing:
   puppetmaster
E: Sub-process /usr/bin/dpkg returned an error code (1)

What is the issue with puppetmaster?
Answer: Could not change to user pe-puppet: Invalid user: pe-puppet

This means your system does not have the user (and group) pe-puppet.
You can create the user and group and it should work fine.
sudo useradd -U pe-puppet


Benefits of cross-platform development?

Question: Are there benefits to developing an application on two or more different platforms?  Does using a different compiler on even the same platform have benefits?
Answer: Yes, especially if you plan to distribute your code for multiple platforms.
But even if you don't cross platform development is a form of futureproofing; if it runs on multiple (diverse) platforms today, it's more likely to run on future platforms than something that was tuned, tweeked, and specialized to work on a version 7.8.3 clean install of vendor X's Q-series boxes (patch level 1452) and nothing else.
Answer: There seems to be a benefit in finding and simply preventing bugs with a different compiler and a different OS.  Different CPUs can pin down endian issues early.  There is the pain at the GUI level if you want to stay native at that level.
Comment: I routinely compile on Linux, OpenBSD and Darwin. I also routinely compile on Intel, AMD64 and Sparc64. Even if the customer base is all on one platform it's still worthwhile for the bugs found and assumptions uncovered.
Answer: Short answer: Yes.
Short of cloning a disk, it is almost impossible to make two systems exactly alike, so you are going to end up running on "different platforms" whether you meant to or not. By specifically confronting and solving the "what if system A doesn't do things like B?" problem head on you are much more likely to find those key assumptions your code makes.
That said, I would say you should get a good chunk of your base code working on system A, and then take a day (or a week or ...) and get it running on system B. It can be very educational.
My education came back in the 80's when I ported a source level C debugger to over 100 flavors of U*NX. Gack!
Answer:
Are there benefits to developing an application on two or more different platforms?

If this is production software, the obvious reason is the lure of a larger client base. Your product's appeal is magnified the moment the client hears that you support multiple platforms. Remember, most enterprises do not use a single OS or even a single version of the OS. It is fairly typical to find a section using Windows, another Mac and a smaller version some flavor of Linux.
It is also seen that customizing a product for a single platform is often far more tedious than to have it run on multi-platform. The law of diminishing returns kicks in even before you know.
Of course, all of this makes little sense, if you are doing customization work for an existing product for the client's proprietary hardware. But even then, keep an eye out for the entire range of hardware your client has in his repertoire -- you never know when he might ask for it.

Does using a different compiler on even the same platform have benefits?

Yes, again. Different compilers implement different extensions. See to it that you are not dependent on a particular version of a particular compiler.
Further, there may be a bug or two in the compiler itself. Using multiple compilers helps sort these out.
I have further seen bits of a (cross-platform) product using two different compilers -- one was to used in those modules where floating point manipulation required a very high level of accuracy. (Been a while I've heard anyone else do that, but ...)
Answer: I've ported a large C++ program, originally Win32, to Linux. It wasn't very difficult. Mostly dealing with compiler incompatibilities, because the MS C++ compiler at the time was non-compliant in various ways. I expect that problem has mostly gone now (until C++0x features start gradually appearing). Also writing a simple platform abstraction library to centralize the platform-specific code in one place. It depends to what extent you are dependent on services from the OS that would be hard to mimic on a new platform.
You don't have to build portability in from the ground up. That's why "porting" is often described as an activity you can perform in one shot after an initial release on your most important platform. You don't have to do it continuously from the very start. Purely for economic reasons, if you can avoid doing work that may never pay off, obviously you should. The cost of porting later on, when really necessary, turns out to be not that bad.
Answer: Mostly, there is an existing platform where the application is written for (individual software). But you adress more developers (both platforms), if you decide to provide an independent language.
Also products (standard software) for SMEs can be sold better if they run on different platforms! You can gain access to both markets, WIN&LINUX! (and MacOSx and so on...)
Big companies mostly buy hardware which is supported/certified by the product vendor only to deploy the specified product.
Answer: If you develop on multiple platforms at the same time you get the advantage of being able to use different tools.  For example I once had a memory overwrite (I still swear I didn't need the +1 for the null byte!) that cause "free" to crash.  I brought the code up to speed on Windows and found the overwrite in about 1 minute with Rational Purify... it had taken me a week under Linux of chasing it (valgrind might have found it... but I didn't know about it at the time).
Different compilers on the same or different platforms is, to me, a must as each compiler will report different things, and sometimes the report from one compiler about an error will be gibberish but the other compiler makes it very clear.
Using things like multiple databases while developing means you are much less likely to tie yourself to a particular database which means you can swap out the database if there is a reason to do so.  If you want to integrate something that uses Oracle into a existing infrastructure that uses SQL Server for example it can really suck - much better if the Oracle or SQL Server pieces can be moved to the other system (I know of some places that have 3 different databases for their financial systems... ick).
In general, always developing for two or three things means that the odds of you finding mistakes is better, and the odds of the system being more flexible is better.
On the other hand all of that can take time and effort that, at the immediate time, is seen as an unneeded expense.
Answer: Some platforms have really dreadful development tools. I once worked in an IB where rather than use Sun's ghastly toolset, peole developed code in VC++ and then ported to Solaris.

Benefits of cross-platform development?


Magento 2 Admin Front controller reached 100 router match iterations

Question: Magento is relentless and notorious for error like this one I got on admin and with not an accurate fix for it.
Is there anyone here came across this issue and why this happen out of the blue.
Answer: There may be three reason for this:
1) CMS Module Disabled
the CMS module handles 404 not found requests which is the fallback router. So, no router may be found if this module is disabled.  Just enable the CMS module and check if the issue is solved
2) Cache is Corrupted:
 In this case, the list of routers never gets loaded because it loads from cache and the corrupted cache does not contain this data. As a result, fully flushing the Magento cache will resolve thi issue. You can also delete /var/cache folder to remove cache corruption
3) Check that your Magento installation knows the default no-route url. Navigate to System > Configurations > Web > Default Pages and locate the input field for Default No-Route URL. Make sure that this value is set properly to the default value of cms/index/noRoute.
Comment: Thank you for you reply.
I have done the lot you name it.
Cleared static folder not .htaccess .
clear all var/generation file. however I gto tired of trying to find a fix I created new fresh installation then after installation I replace with the original database , and guess what everything is fine  and the other installation added the new fresh db and it seem fine, it's very bad bug.


Do items despawn in minecraft servers?

Question: I am running a Minecraft 1.16.1 server with spigot and bukkit, I wanted to know if items despawn in minecraft servers, if they do, how much time is there, can you change it or stop it. Also if there is a way to find the coords of the last death of a player in a Minecraft server.
Comment: Does this answer your question? [Can item despawn rate be changed in minecraft?](https://gaming.stackexchange.com/questions/244284/can-item-despawn-rate-be-changed-in-minecraft)
Answer: Yes, the same rules apply as to single-player: items in entity-processing loaded chunks (be it within load distance from a player, spawn chunks, or permaloaded by portals or /forceload) despawn after 5 minutes. Items in unloaded and lazy chunks have their despawn timer frozen.
The significant, if obvious differences are that player's client render distance doesn't affect the player chunk-loading radius - the view-distance property in server.properties does. The server (and all its associated timers) doesn't pause when a player goes to inventory or esc menu (duh), and spawn chunks don't unload when no-one's playing.
Spigot has item-despawn-rate property in spigot.yml where the despawn time is given in gameticks, 6000 (5 mins) by default.

Do items despawn in minecraft servers?


Perfect Hash Function: How does it cope with lookups outside the set of keys?

Question: I'm currently looking at perfect hash functions. One thing I miss from the texts I've read so far is, how they cope when attempting to look up with a key that is outside of the set from which the perfect hash was generated from.
Comment: They don't. It's an invalid input.
Comment: @YuvalFilmus: Is there a way to determine just from the PHF itself if a key is invalid? Or somehow map any value outside the set of keys to a nil value?
Comment: Depends on the implementation. It may return the image of another key in the domain. If the PHF is not minimal, it may also return a value that doesn't have to a preimage in the set. Some implementations detect foreign keys with a given probability (as bloom filters do) and return a special value.
Comment: @Piezoid: I already had the idea of prepending a bloom filter in front of the lookup to filter out all keys that are not in the set of the PHF keys.
Answer: Given a set of keys, a "perfect" hash function is one that gives a different hash for each key. As soon as you try to apply it to a key outside that set, it is quite likely not "perfect" anymore.
Let's say you are writing a compiler, and you found a"perfect" hash function that maps each reserved identifier of your programming language to a different hash code. And I give you a word that is not one of the reserved words of the language. If you apply your "perfect" hash function then the hash code is either not the hash code of a reserved word (you need to check for that case), or it may be the hash code of a reserved word ( you need to check for that as well). The advantage is that at most one check is needed.


Family visitor visa refused, should I apply for dependent visa?

Question: My husband got a working visa (TIER 2 (INTRA-COMPANY TRANSFER) VISA
TYPE: SHORT-TERM STAFF MIGRANT, UP TO 1 YEAR) upto april. So I applied for a family visitor visa (in September) for six months. I was rejected stating the reason tht I have no accommodation details, and there is no proof that I would return. Now we are thinking to go for dependent visa, is our decision correct or what am I to do?
Comment: if you got a reply stating what went wrong, why not making sure these details are addressed (i.e. provide accommodation details and proof of return)?
Answer: If your husband has a valid T2 ICT visa and both of you are NOT from North Korea, you may be able to qualify for a dependent visa depending upon your circumstances.
The most rigorous requirement is the financial hurdle, which will be to show a clear balance of GBP 1,575 (this covers the primary and one dependent).
Because you have a prior refusal you'll need to think up an explanation of what happened. Usually you can just copy it from your refusal letter. But in all events it should make clear how the circumstances have changed.
To proceed, apply on-line at the same site you used for your visitor application.
There is a guidance brochure at https://www.gov.uk/tier-2-intracompany-transfer-worker-visa/family-members
Comment: To add to this correct answer, the earlier family visitor visa wasn't applicable. The [official website](https://www.gov.uk/family-visit-visa/eligibility) clearly states for an FVV that the family member should be British or **settled** in the UK, which wasn't the case here. I'm sure the refusal letter must have mentioned this point. Anyway, this question should be migrated to expats SE.
Answer: You could reapply your family visitor visa and provide the necessary documents to support your application. Your husband's finance (income, outgoing, saving etc. using at least the last few months bank statements as proof and make sure the money is able to cover the expenses of your staying with your husband without working), accommodation (a letter from his current landlord, stating that you are allowed to stay in the same accommodation). To prove that you will return you have to show that you have a "strong tie" with your home country: your children(if any), family, property, job etc.


Hillshade transparent for plain areas

Question: Normally, when you use a hillshade as a layover in ArcGIS, you set the transparency at 80% or so (in the Layer Properties, display settings). As a result, the underlying layers, for example land use, will display with a grey haze, even the plain areas. How do I get a Hillshade where plain areas (middle grey tones) will display as transparent?
Comment: I don't have a specific procedure for Arc, so I won't post an answer, but you can try creating a slope raster, then using the raster calculator to set zero-slope regions of your hillshade to whatever the nodata or alpha colour is.
Comment: what do you mean by 'plain areas'?
Comment: Areas without relief. So no hillshade needed.
Comment: So you want those areas with no relief to be totally transparent? Basically, are you saying that you want the relief blended with the other data better?
Comment: Yes, that is what I am looking for. I have a lot of flat area in the map, that does not need to display the hillshade overlay.
Comment: Does this help?
esri.com/news/arcwatch/0312/learn-a-new-method-for-displaying-hillshades-and-elevation-tints.html
Answer: Arc doesn't handle transparency very well, mostly in that it doesn't offer different 'modes' (like blend, overlay, etc.). If you want true transparency it must be done as an alpha channel or background/nodata as Rob suggests in his comment. You may need to tinker with the hillshade image to clean up areas that aren't quite the background color to avoid jagged edges as in my quick example below.
Also note that because you won't have uniform cover of that 'washed out' effect on the underlying colors, you may inadvertently highlight areas of the map with brighter colors; it just depends on your data, color selections, and layer ordering.
This example shows an RGB rendered jpg, but both RGB and Stretched renderers have the same options to set a background value and choose what, if any, color to display it and nodata as on the layer properties. You'll note I've also set the transparency for the image to 50% per the tab Tangnar's answer shows.
Answer: Try playing around with the contrast and brightness options in display settings. These can be helpful for what you are looking for. In your symbology for the shaded relief, you can change your stretch type to min/max. I also prefer to put the other data (like land cover) on top of the hillshade, and set the transparency for it.
For even more control over this type of thing, QGIS has Blend Modes, like a graphics program. Many cartographers also do this work in photoshop or similar.
But for doing this in Arc, try the above.
Comment: Thank you for your answer. However, I have already tried the suggested options for brightness and contrast, but it does not solve the problem of changing the underlying colors.

Hillshade transparent for plain areas


set ssh key and cannot log in

Question: I placed my public key, I believe, on my server account (I do not have root) in .ssh/authorized_keys2.  Now where it used to ask me for my password it just says "Connection closed."  I cannot log in.  Ideas?
Comment: Do you have another account or client ip that you can try?  It sounds like permissions for your user or your IP address has been removed. (see the /etc/ssh/sshd_config, if possible)
Answer: Usually the filename .ssh/authorized_keys (without 2) should also do nowadays. Additionally check that the authorized_keys file is not world- or group-readable, neither the .ssh dir should be.
Logging in with ssh -vvv could give you some more clues. But most times I encounter this it's just due to wrong permissions.
Edit: Try to login without even utilitizing the key by temporary moving your private key away... Maybe something went just terribly wrong when you pasted the public key to the server.
Answer: Sounds like a permissions problem. Chances are that the ssh server is unable to read .ssh/authorized_keys2 and crashing out when it tries to do that. Do what hurikhan said and do a ssh -vvv to get some verbose errors and trace at which point the connection is broken.
Comment: This was my first thought as well upon reading the question. SSH is very particular about the permissions and ownership of the .ssh directory itself and the authorized keys files (.authorized_keys & .authorized_keys2).
Answer: To ensure that the permissions are set correctly, run the following command:
chmod -R go-rwx /home/john/.ssh

(remove rwx privileges from group and other)

set ssh key and cannot log in


InDesign GREP code for find words between a full stop (.) and a colon (:)

Question: What is the GREP code for finding all words between a full stop (.) and a colon (:) and then selecting those words and the colon (but not the fullstop)? For example: '. Tone:' or '. Final result:') in a body of copy. Thanks.
Answer: You need a positive look-behind
(?<= ... )

And a positive look-ahead
(?= ... )

\. Dots need to be backslashed. /s for the space. \w for letters and numbers. ? for optional characters. And * to catch multiples.
(?<=\.\s?)\w*(?=:)

I recommend regex101.com to help create and lookup regex syntax.
Answer: If the period . might also be preceded by a word, as per your example, "somthing. Tone:" you might try this:
(?<=[a-z.]\s)[\w\s]+:

"Tone:" will be selected if your string looks like ". Tone:"; and
"some other thing Tone:"will be selected if your string is "something. some other thing Tone:"


Is it illegal to sign a contract deliberately under a made-up name?

Question: First off, the name will be completely made up, maybe using a random name generator, so this shouldn't be impersonation. What would happen if the person breaks the contract, or that everything went fine except that the company found out about the fake name afterwards?
Comment: Was there a meeting of the minds and consideration?
Comment: @GeorgeWhite Those will determine whether there is a valid contract, but they won't determine whether the use of the pseudonym is illegal.
Comment: It was a question to better understand the overall picture.
Comment: If you take property and violate the contract, chances are you are commiting fraud. If you had just violated the contract using your own name, it would have been a civil case only, but if you use a false name, it will constitute that you intended to never respect the contract to begin with, which amounts to fraud.
Answer: Why does the name matter?
Today, I entered into a contract to buy petrol and, later, beer and a Caesar salad. In neither case did I exchange names with the other party.
If you entered into a contract under a false name with the intent to avoid your responsibilities then that would be fraud. But then, so would doing so under your real name.
Comment: Writers and journalists sign contracts under pen names **a lot**, especially if they live in oppressive regimes.
Comment: While entering a contract without intention of engaging the responsibilities in your part is fraud, using a false name is an obvious evidence of so, while using your real name you could still use a pretext of engaging a bonna fide contract, which would make it harder to proof fraud.
Answer:
Is it illegal to sign a contract deliberately under a made-up name?

Generally speaking, no. The few (if any) exceptional contexts where this might be illegal depend on the nature of that contract or the statutory framework at issue.
Signing a contract is merely a party's attestation that he is committing to a set of terms and conditions knowingly and willfully. The drawback of allowing a counterparty to make up an arbitrary signature is a difficulty --and in some scenarios an impossibility-- to prove that the contract is binding to that counterparty. Failure to prove that would defeat claims of that counterparty's breach of contract.
In the case of mutual performance of a contract, company's awareness of the party's fake name is inconsequential unless the company's obligations elsewhere require it to handle a reliable identifier of the party. Rescinding the contract would be disproportionate, especially where the party is open to fix the discrepancy, and a finding of illegality is even unlikelier.
Comment: But if I gave you a false name and that's why you can't sue me for breach of contract (because you don't know who I am), that would then be fraud on my side.
Comment: @gnasher729 The plaintiff would pursue alternative claims, including breach of contract, fraud, quantum meruit, etc. if the defendant breached the contract. The plaintiff is only precluded from *double recovery*, meaning that he is entitled to relief pursuant to just one of the claims where he prevailed. Even under contract law, a defendant's use of a false name/signature would be unavailing if the plaintiff can prove that the defendant is the one who entered the contract.
Answer: england-and-wales
In general, no, unless doing so amounts to fraud. Note that in practice it often will amount to fraud. Whether it does or not will depend on your intention at the time that you used the pseudonym.
Fraud by false representation
Section 2 of the Fraud Act 2006 provides:

(1) A person is in breach of this section if he — (a) dishonestly
makes a false representation, and (b) intends, by making the
representation — (i) to make a gain for himself or another, or (ii) to
cause loss to another or to expose another to a risk of loss.
(2) A representation is false if — (a) it is untrue or misleading, and
(b) the person making it knows that it is, or might be, untrue or
misleading.

It's important to note that intention is determined according to the objective test i.e. what a reasonable person would think the intention was as opposed to what was actually in the mind of the alleged offender.
So, if you write a pseudonym on the contract but inform the other party of this fact together with your primary name then this is unlikely to amount to fraud. On the other hand, if you fail to inform the other party, then depending on the circumstances a reasonable person might easily think your intention was to cause a gain / loss e.g. by obstructing the other party from pursuing you in the courts for a breach of contract, by avoiding revealing information to a lender on a credit search, etc.
Note also that there is no such thing as an authoritative record of what your name is. You are in fact free to change your name at any time, as many times as you like. If you really want to, you can have a different name for each hour of the day. The important thing is that you comply with your legal obligations (e.g. to inform the DVLA when your details change) and that you do not commit fraud (by using your various names as a way to make a gain or cause a loss to another).
Fraud by failing to disclose information
This is similar to fraud by false representation except in this case you are failing to disclose information which the law requires you to disclose. Section 3 provides:

A person is in breach of this section if he — (a) dishonestly fails to
disclose to another person information which he is under a legal duty
to disclose, and (b) intends, by failing to disclose the information —
(i) to make a gain for himself or another, or (ii) to cause loss to
another or to expose another to a risk of loss.

This is often applicable when dealing with bureaucratic processes where the law requires you to provide your name as part of an application form (which may itself incorporate some form of contract). A non-contractual example can be found at Section 170(2) of the Road Traffic Act 1988 which provides that in the event of certain types of accidents:

(2) The driver of the mechanically propelled vehicle must stop and, if
required to do so by any person having reasonable grounds for so
requiring, give his name and address and also the name and address of
the owner and the identification marks of the vehicle.

If you give a pseudonym, intending to make it harder for the other person to pursue you for an insurance claim, that could amount to fraud.
Another example is Sections 1200, 1201, and 1202 of the Companies Act 2006, which require you to disclose your name on various documents (e.g. business letters) if you are carrying on business as an individual.

What would happen if the person breaks the contract, or that
everything went fine except that the company found out about the fake
name afterwards

Both of these are irrelevant. It doesn't matter whether you actually gain or the other person actually suffers a loss. What matters is whether you intended that to be the case.
Note also that the Act includes the scenario where the intention is merely to expose the other party to a risk of loss. For example, a mortgage contract may ultimately conclude with all payments made on time, but if your use of a pseudonym prevented the lender from discovering your past defaults, you've exposed them to a risk. If that was your intention since the start, the offence may be triggered.


What would bat houses look like?

Question: In This Question we discussed how likely bats are to become sapient. Lets assume that they could. They would weigh at most 150 lbs and would look much like flying foxes. Assuming they could evolve sapience, how different would their medieval architecture look like.
Comment: Well there are a few things you need to consider. Humans are relatively the same, but they ended up building all different kinds of houses and building worldwide based on things like religion, wealth, available resources and of course labor strength/size. There would be no sure way of knowing. Most likely, if they still had the ability to fly they would be devoid of stairs and may just have open floors in the middle or ever climbing walls. Otherwise more details are needed. This cannot be accurately answered in one way.
Comment: The novel _Learning the World_ by Ken MacLeod actually features alien space bats as some of the main protagonists. It features a chapter where a pair of space-bat protagonists fly to an ancient ruin where previous (medieval) generations had lived.
Comment: I am now curious as to how aircraft would be designed by such a species, which brings me to my question - can I ask said question, or are you planning on asking?
Comment: Don't forget *Neptune's Brood* by Charles Stross.  Post-humans adaped their form for 0-g living and humorously ended up looking like bats.
Answer: Architecture doesn't solely depend on intellect and sapience.

The structure of manus (hand) plays the most important role in constructing something once the plans have been laid out. On the paper and in my mind, I could draw a hundred amazing architectural designs which wouldn't be possible for medieval people to build simply because they did not have the technology. How much complexity of design can your bats' hands handle? How much can their wrists turn? The shoulders? The length of their arms? How much are they hindered due to the attachment of skin membrane to their arms?
Another extremely relevant thing is the available raw materials your bats have in their surroundings. Do they have any glue? What is the shape and size of the water stones in their region? Can they manipulate wood with their hands (see above point)? Ropes? If they don't have glue available, how else are they going to keep things together? I hope you aren't expecting them to use nails and hammers ... What is their environment like? Are they living in jungles or caves?
What are their requirements for the buildings? Are they going to build residences hanging upside down from ceilings or upright on the floor? The resulting colony would heavily depend on what they want to make after they have decided what they can make.
Comment: I think you'll find that they build using their *feet*, which were adapted to grasping. Like a parrot, the ability to perch was harmonious with the ability to pick up and manipulate small objects.
Comment: The limitations pointed out in the answer about arms apply to their legs too. With a further hindrance that if they use their arms, they can build while hanging upside down from a ceiling, while if using their legs to build, they would have to hang on with their arms or lay down on their backs, both of which would be weird and uncomfortable.
Comment: https://upload.wikimedia.org/wikipedia/commons/thumb/2/20/Horniman_fruit_bat_skin_skeleton.jpg/1920px-Horniman_fruit_bat_skin_skeleton.jpg   The fingers are used to form the wings, so they are not available for *fingers*. The lower limbs are adapted for grasping.
Comment: And ... you can see the last phalanx with the claw, free from the membrane. The hand can move and the movement would be more restricted by the _structure_ of the shoulder and the wrist, than due to the membrane. The fingers can still be spread and collected despite being webbed together.

What would bat houses look like?


attempted relative import in non-package error in mavlink

Question: I've already looked through the forums, but I haven't found an answer that is mavlink specific.
I am currently writing script in python, and I want to use a python module of mavlink.
The documentation for mavlink tells me to run mavgenerate.py from my mavlink folder. When I run this script, a gui appears asking for my xml files, a specified output directory, and what language I want my headers in. mavgenerate.py works when I choose to make headers for C, but it gives me the error: "attempted relative import in non-package" when I try to choose python.
my xml files is located at:
C:\Python27\mavlink\message_definitions\v1.0
and I have my python module output directory as:
C:\Python27\mavlink\pymavlink\include
below is a screenshot of my error.

can anyone tell me what I'm doing wrong?
Comment: what happens if you move your working directories out of c:\Python27 ?
Answer: This is quite an old  question but i have just encountered with this problem. Solution that i have applied is: in mavgenerate.py replace following lines
sys.path.append(os.path.join('pymavlink','generator'))
from mavgen import *

with
from pymavlink.generator.mavgen import *

I dont know the exact reason of the problem but from
this thread i assume problem lies with python's interpretation of directories as packages.
I have used python 2.7. Tried though to do with python 3.4 but didn't had chance there.


Question with too much proven working code, what to do?

Question: This question runs through the OP's entire script, explaining the process of how all the results gathered right up to the last step where they want to know how to collapse results, which is a much more simple problem (likely even a dupe), but how should it handled given that it's not wrong so much as unnecessary?
Comment: @Tanner disregard the +4, it's a crappy question. OP says "Now I try to explain every line of code, so you can see if there's some mistake" - that's so far removed from useful that I downvoted the question because of it. OP writes a ton of useless code and their general approach to solving the problem is rather bad or at least totally unpythonic (which is somewhat expected of someone new to programming) - explaining all the tiny "mistakes" would be far too broad. The best approach to solve this would be to just rewrite the code, so explaining the bad code doesn't help anybody.
Comment: If the user really does want someone to comb through his or her script for additional feedback, it would be helpful to point him or her to CodeReview.SE.
Comment: He's a new user to the site, English is not his native language and he made a great effort to express himself for his question, and people bombarded him with downvotes? Times like this make me hate SO.
Comment: Not to mention the question morphs into a new and different one at the end.
Comment: I am surprised there aren't more close votes on that question.  There's nothing minimal about it.
Comment: @Tanner What I felt was a problem is that it's so long that it makes it harder to parse and understand, even though the actual issue is small and relatively easily answered. This both makes it harder to answer, since you wade through unnecessary info, and then if other users come across is later, they might get confused trying to understand the question.
Comment: This is always a hard problem, as it's hard to know exactly the right balance between too little code to demonstrate the problem and too much code that isn't relevant. It gets easier with experience, and I agree the questioner put *way* too much code even for someone who is new to the site, but it is still a hard problem in general.
Comment: Engineering principle :- implement the necessary and sufficient, then stop The second is KISS:- keep it simple and stupid
Answer: I'd leave a comment for the OP explaining that they've put too much code into their post, if it looks like they're still responding to comments. You can close it as a duplicate if you find one, otherwise you can use this close reason:

Questions seeking debugging help ("why isn't this code working?") must
  include the desired behavior, a specific problem or error and the
  shortest code necessary to reproduce it in the question itself.

I don't think editing a question to remove a huge chunk of content, even if it really isn't needed, is going to go over well with reviewers. The OP is likely to roll something like that back and complain as well.
Comment: If there really is a good core question being obscured by miles of needless code, by all means edit it. Sadly you're probably right that you're at high risk of rejection from many reviewers, who will just innappropriately slap the 'radical change' rejection reason, but many will recognise that you're removing noise and approve the edit, especially if you use the edit summary to explain your actions. Whether such an edit is worthwhile in *this* case, I dunno; I didn't care enough to read the huge question.


Can one invest in a Jewish-controlled company which performs work on Shabbas?

Question: Is a Jew permitted to invest in shares of a company if the company performs work on shabbas and a non-orthodox Jew started the company and is a major shareholder yet owns less than 50% of the shares of the company but still has more than 50% of the voting rights to override/block any takeover of that company?
Comment: relevant: https://judaism.stackexchange.com/a/23235/11501
Comment: Can you provide or link to something to provide some background as to what the problems could be? I.e., why you think there is any problem investing in a company owned by a non-Shomer Shabbat Jew (even if he owned 100% of shares)?
Comment: https://www.jewishvirtuallibrary.org/halakhot-of-investing-in-the-stock-market...The primary owner and primary management being jewish is talked about at the bottom at B. SHABBAT. Is the primary owner considered someone who owns less than 50% of the company and still has the majority voting rights to prevent a takeover? What if the Jew is recognized as the 'owner' despite owning less than 50% of shares and the voting ability to override takeover?
Comment: It also states "If the management is primarily Jewish, severe problems arise, since it is still prohibited to have a Jew work on Shabbat even on his own initiative" So could management be considered just the primary owner as well if decisions might be made by him on shabbas?
Comment: Voted to close as this is asking for psak halacha.
Comment: @code613 THE ANSWER TO YOUR QUESTION IS [HERE](http://www.besr.org/library/stocks5.html)
Comment: @RibbisRabbiAndMore Read briefly through the article you linked to. (Part 5 of the shiur) At the very end, the author states that if one of the company owners is actually Jewish, that complicates the issue very much and makes most of what he wrote there not applicable. He says he will take that subject up in the next installment (Part 6). I didn't see the issue addressed in part 6, but at the very end, the author leaves a disclaimer saying not to rely upon the info in his lectures for anything more than being a source to know what to ask your Rav. He then concludes by saying to CYLOR.
Answer: This is a good and difficult question that needs some introduction to those less familiar with the relevant laws. Skip to the line break below if you don't want the intro.
A preview of the answer is that there is no issue to invest in such a company as a minority investor is not in a controlling position - therefore the workers are not working for the investor. See below for rationale.

The background is that a Jew is permitted to own a non-controlling amount of shares in a Gentile-owned company which operates on Shabbat.
R Yosef Kushner, the author of Commerce and Shabbos writes p. 324

This is because the Jewish minority shareholder is not in a position
to decide the operating schedule of the business and the controlling
partners are running the business on Shabbos by their own choice.

For a Jew to be the controlling partner or sole owner of a company that remains in operation on Shabbos, a number of requirements need to be met

the day to day managing and running of the company is delegated to a non-Jewish CEO ("baal melacha")
the Jew doesn't require the non-Jewish CEO to keep the business operating on Shabbos, rather he allows him to run the business as he
sees fit
the non-Jewish CEO receives a small percentage of the company profits in addition to his salary
it is common knowledge that the Jew is not involved in the daily running of the business and is simply a financial backer in the
company

For example the Orthodox financier Moshe Reichman once purchased an oil company which had to operate on Shabbat and asked R Shlomo Miller what to do, who in turned asked R Moshe Feinstein. Since the CEO/baal melacha was non-Jewish, RMF said there was no issue (heard from R Kushner at 24'40'' on this podcast).

Now I assume your question is on a company like facebook where the founder owns a minority of the shares but a controlling amount of them (57.9% as of September 3, 2020 according to Investopedia) and where both CEO and Deputy CEO are identifying as Jews.
Such a company does not meet the criteria above. Leaving aside whether the controlling stakeholder can work there halachically, another Jew might be prevented from buying shares in that company as he would become a partner of the Jewish controlling owner and be responsible for e.g., hilul Shabbat if the company has to operate 7/7.
I didn't find explicit differences in halacha between controlling shareholder and majority shareholder. A controlling shareholder can sell the company, change its strategy, direct its activities just as much as a majority shareholder. Even more so when he is also the CEO.
Now outside of Israel, it can be presumed that a majority of people working on Shabbat in such a company are non-Jews (since the majority of people outside Israel are non-Jews). Also in such a large company, the CEO doesn't directly direct work. So if there are Jews working on Shabbat, it is statistically likely that the managers ordering them to do so are non-Jews.
As such it is possible that one could apply the rulings of R Moshe Feinstein (Igrot Moshe Even HaEzer I:7) and R Yitzchak Weiss (Minchat Yitzchak III:1) who both permitted holding even the majority of shares of a company which is open on Shabbat as long as only non-Jews work on Shabbat (as reported here).
Also, and likely to be the most convincing, R Doniel Neustadt writes that

Most contemporary poskim rule that buying stock shares is not
considered to be aiding and abetting Shabbos desecrators as there is
no shortage of investors who are ready and able to buy shares. Anyone
who buys shares does so for his own investment purposes and not for
the purpose of financing the company.

Finally I asked your question to R Yosef Kushner who wrote the above book. He responded (and agreed to be quoted)

[There is no issue] to invest in that company as the investor is still
not in a controlling position, so the workers are not working for the
investor, and in terms of לפני עור (lifnei iver), that the
investor is helping facilitate a transgression, that would not be an
issue since they could easily run the company without the investors
money.

The above are obviously only considerations to bring up before asking the question to a qualified rav.
Comment: Good and thorough examples presented.  I am curious to see what are his views on this.
Comment: @code613 he did respond now - see last section of my answer
Comment: Would there be an issue change if say the CEO non-orthodox Jew actually did own a majority of shares of the company?
Comment: That would still not be an issue for the minority investor. R Chaim Kohn from [BusinessHalacha](http://www.businesshalacha.com/en/about) said that buying shares is not correlated with the real activity of a company. As a proof, the value of shares moves at all times. For him, buying shares is **not** becoming a partner in a company and is always allowed. See also first yellow box in my answer. Of course the issue is different for the CEO/majority shareowner himself


How to put a transparent image over a div without affecting the layout of the page?

Question: How do I put a transparent png image over a DIV without it affect anything else in the HTML document? I would do position absolute because it takes it out of the "normal flow of the document" but I have the whole website centered using "margin-left: auto;" and "margin-right: auto;"
Comment: margin: 0 auto; is shorter version of "margin-left: auto;" and "margin-right: auto;"
Answer: if you apply position: relative to the div you want to cover then position: absolute on the image will be calculated relative to the covered div rather than the whole page, if it is a child element. i.e.

your content...

div#tobecovered{
    position: relative;
}
div#tobecovered img.cover{
    position: absolute;
    /* position in top left of #tobecovered */
    top: 0; /* top of #tobecovered */
    left: 0; /* left of #tobecovered */
}

Answer: Other solution is to use after like this:
.image:after{
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    background: url(https://i.imgur.com/DDdKwlk.png) no-repeat 0 0;
    background-size: cover;
}

:)
Answer: I would say float is a good way to do this by not block other things , with absolute , some thing will hide under it or show above it base on the z-index.
This is a good tutorial on css positioning , take a look , you might found what you looking for
Answer: I think position:absolute is more appropriate for normal usages as it follows the scroll.
Answer: Here's how it works. The example shows a transparent image absolutely positioned over another image, creating a mask.
Check working example at http://jsfiddle.net/39VG9/1/
Comment: Not only is this answer wrong, but you didn't even explain what you did and it's all in the jsfiddle
Answer: You be able to use this css in a class_name in React js (in html is class="class_name") to show a div as a pop up (bring up) or send back.

...

.class_name{
position: absolute;
/**Put div hide*/
/**z-index: -9;*//

/**Put as pop up*/
/**z-index: 9;*//
}


$\operatorname{MaxSpec}(A)$ closed

Question: If $A$ is an arbitrary commutative ring, is $\operatorname{MaxSpec}(A)$ closed as a subset of $\operatorname{Spec}(A)$?
I wanted to think of a counterexample, but so far without success. I tried to consider generic points, but if $\operatorname{MaxSpec}$ is a proper subset of $\operatorname{Spec}$, then it cannot contain one, so this approach won't work.
Comment: Dear Steffi, How many rings can you write down in which MaxSpec$(A)$ *is* a closed subset of Spec$(A)$?  Regards,
Answer: $$\mathbb Z$$ ${}$ ${}$ ${}$ ${}$ ${}$ ${}$ ${}$ ${}$ ${}$ ${}$
Comment: This is a plagiarism of [this famous answer](http://math.stackexchange.com/a/74383/660) of Didier Piau. --- See [this Google Plus search](https://plus.google.com/u/0/s/%22Construct%20a%20function%20which%20is%20continuous%20in%22).
Answer: If the maximal spectrum is a closed subset, then there is an ideal $I\subseteq A$ such that the maximal ideals of $A$ are precisely the prime ideals which contain $I$. Can you use this observation to construct an example of an $A$ where this does not hold?
(An easy way to make use of this is to look for a ring such that the intersection of the maximal ideals is zero—that is, with trivial Jacobson radical—so that the choice of $I$ is thereby severly limited)
Comment: Thanks for both answers, but I can only choose one :-) I thought of k[X] where k is algebraically closed. This is a Jacobson ring and hence the Jacobson radical equals the nilradical which is zero because k[X] is an integral domain. Then $I$ must be the zero ideal which is generic. I think that "k is algebraically closed" can be dropped so that I don't have to use the Nullstellensatz. Thanks!!
Comment: I don't have to assume that k is algebraically closed at all, even if I'm using the Nullstellensatz. Thanks again

$\operatorname{MaxSpec}(A)$ closed


Is Ipad 2 enough for Iphone/Ipad apps debugging?

Question: I want to start programming for iOS-devices. I have mac mini and IPad 2. My question is: "Is IPad 2 enough  for developing and debugging apps for IPhone and IPad"? Or I need to bye IPhone for debug IPhone apps? Of course I mean only apps without special IPhone features (like call, sms,  etc.)
Answer: I'd say it depends.
If you're going to develop easy standard UI based app for iPad only, then iPad 2 is enough. If you're going to develop games or apps which need a lot of resources (e.g. drawing app) then I'd advise you to have both - iPad and iPad 2. E.g. I test my iPad only app on both iPad and iPad 2 as their performance is totally different. Also I left iOS 4 on iPad just in case, to have one device with iOS < 5.0
Regarding developing for iPhone using iPad... I wouldn't recommend that. As people mentioned hardware is different, some API (e.g. for sending SMS) is missing on iPad.
So, if you're serious about your app - spend few hundred bucks for several devices.
Good luck!
Answer: Software needs to be thoroughly tested on its platform before it is released regardless of the hardware and OS used.  Therefore if you are developing for Windows you need to test it on computers that have all the versions you wish to support.  Same goes for Macintosh, Android, LINUX, and iOS.  Otherwise you run a big risk.
That being said iPad and iPhones do not have exactly the same operating systems although they are very close in many respects.  The iOS simulator is very impressive but it can mislead the developer because it has far more memory and computing power depending on the development machine since it is running on a desktop of laptop.
Therefore I would recommend that you have both if you wish to release software for both.
Comment: In addition to that: iPad, iPad 2 and iPhone x.y may have all the same iOS version, but all of them have different facilities. When it works ok in the simulator, it may reveal surprises on the device. So the application should say, what device and what iOS-versions it supports, and it should be tested in deep before releasing it.
Answer: You should at least invest in an iPhone 3G[S], or an iPod Touch 3rd gen. The hardware is not the same than an iPad2, and if your program is computing-intensive, you'll notice a real difference.


Explaining why styling should not be done directly in HTML

Question: I recently noticed that <marquee> has been deprecated from html according to this site. From this answer on Stack Overflow, the marquee replacement is made from CSS. The explanation given to the change is that html is about document structure, and that layout and animation and styling etc. should be done from CSS.
This got me thinking:
Would explicitly teaching the difference between setting the style attribute of an html tag, and doing it through CSS useful for increasing the students' understanding of the joining of CSS and HTML?
To narrow it down, I'm looking for examples or explanations of how teaching it explicitly might make it easier for the students to style their webpages. Preferably an explanation.
By "explicitly teaching" what I mean is actually devoting a lesson with the title of "Styling through .CSS", or something similar.
Some context, if it is needed:
The students learn basic web designing: HTML, JavaScript (very basic), JSP and SQL. They learn these for 1 year and at the end of the year they should have a website (for which they receive grades). I am wondering if a lesson entirely about CSS might eventually lead to better looking websites.
Comment: The core problem here is that you're assuming that styling should not be done directly in HTML, and that using CSS is better. Neither of those things is true.
Comment: This site shows the power of keeping css separate. http://www.csszengarden.com - Same structure, different css stylesheet.
Comment: @Puppy well, part of the question is whether I should teach it separatly. If I don't,  then they won't use stylesheets. But do you think any website anywhere actually hardcodes all it's css in html? **Every** `div` has a mountain of code in its `style` attribute?
Comment: @DavidSpence nice. I'll definitely use that
Comment: @ItamarG3 Sure, why not? You can just call a function that makes a div with the code in and then just do that three times.
Comment: @Puppy and how, exactly, would I syle a div *without some form of CSS?*
Comment: @ItamarG3: There's a handy-dandy style attribute you can use.
Comment: @Puppy you're right but that's doesn't mean that saying styling shouldn't be done directly in HTML is not true. Give me one profesional website that has all its styling inline.
Comment: I build such a website at work.
Comment: @Puppy But... but... but your website uses a stylesheet for most of the styling (in fact you have 6 stylesheets; talk about separate css file, you have separate css file**s**). Moreover, some of the `style` attributes (which belong to things with `id`s and are identical) that are generated by functions I suppose, are empty.
Comment: But the website that you're looking at is a squatter who yoinked the domain after I allowed it to lapse. It's certainly not my work, personal or professional.
Answer: I like the idea of producing a few style sheets, and having the pupils apply them to their HTML. They can then see the power of having separate style sheets.
Start with a style sheet that you made. Use the new grid layout, have some college styling. But at first get them only creating the html.
They can then start editing the style sheets. They will see that the power of one small change can change every heading, or every paragraph.
I have also in the past, written a HTML file that had a set of buttons at the bottom. These buttons would trigger a different CSS file to be loaded. It was some very simple JavaScript.
To answer should they be kept separate
Keeping style and content separate, is recommended by W3 and many others. It implements separation of concerns and single responsibility. Both very important patterns in software design.
Even better: keep layout, style, structure, and content separate.
One css for layout, another for style, then a template for structure (I use moustache), pull the content from a database, to create json, and programmatically combine it with the template (use a template library). [this section is now about my teaching, but what I do for my websites.]
To answer should you devote a lesson to separate CSS files.
Yes. If it is important to keep these separate, which it is, then you should teach pupils to keep them separate. Save time by not teaching them to mix it in with the HTML (This will save time twice, as you won't have to un-teach it).

I have only done this with one or two people (not a class).
Comment: I agree that un-teaching is an especially wasteful use of everyone's time. It is best to catch misconceptions before bad habits are built and reinforced.
Comment: @tim, this is just a load **optimisation**. Conceptuality it should still remain separate. However Google is saying put it in the same file. They are not saying that you should style each bit separately. They are saying take what could be in a css file and add it to the
Comment: Instead of giving the students a variety of style sheets that affect their code, I would try the opposite approach.  After teaching them inline styles in HTML, give them a page that relies on a CSS document for its style and ask them to make their own stylesheet for it (using the same techniques they learned from using inline HTML - just a matter of labeling the styles and putting them together in one place).  Then everyone in class can compare their style sheets on a common test subject (the one you provided) and see the possibilities.
Comment: That second paragraph sounds especially useful. But that doesn't answer whether I should really devote a lesson for teaching how and why one should write a css stylesheet, instead of inline html `style` attributes.
Comment: Added a partial answer to If and why to devote a lesson to it.
Comment: Google says you should include above the fold css in the html file
Comment: @richard yes, hence my careful wording there!
Comment: What I do with my crummy little framework plugin I run over WordPress: provide a little API for myself to either dump CSS into a
Comment: @Darren that's an interesting suggestion.
Comment: @Darren I agree, though not sure about doing it the wrong way first. Could you put this into an answer, with some more detail.
Comment: @richard I'm not sure what you mean by "the wrong way first".  I don't see there being any "right" or "wrong" ways, just different levels of organization depending on what's needed.  For a one off style on a single element I don't see anything wrong with putting the style in the tag itself, if there isn't already a stylesheet assigned that should cover it.  In any case, I'm not making that an answer because I don't have an answer for your original question.  It was just a suggestion based on my own experience with HTML and CSS over the years.
Answer: If you only want to build a page that is simple and ad-hoc and will never change in the future and will only ever be seen on one kind of device, then, sure, build the styling directly into html. It is the same when you write a program that will only be run once on one device to get an answer, after which the program becomes obsolete. There is, then, no reason to code carefully. "Quick and dirty" works for such things.
However things do change, and web pages are viewed on devices with varying screen sizes, even color models. And they may be viewed in future on devices that don't yet exist.
So, if you want to build sites that are important and lasting and that must be maintained in the future, use CSS. You probably wouldn't write an important C program all in main, but would at least, factor out the things that must be the same but are reused. In simple C programming we factor out functions for this. In html we factor out styling. At a deeper level, the server side also factors out much of the data, etc. This lets things that are supposed to be the same, stay the same, and lets us modify one level of design independently from other levels.
This isn't exactly the same thing, but look at the underlying code of Google's front page. I don't know what they use to put that together and maintain it, but I doubt that it is just a text editor. Note that their front page, though incredibly simple in layout, changes frequently.
Note to the Instructor When you get ready to grade the student's work, view it on various devices, with different screen resolutions. I don't, however, suggest that you also make them provide per-device css.
For that matter, view some of the StackExchange pages on a desktop vs a phone. And for a shocker, look at both the source and stylesheets of some of the pages.
Comment: The comparison with functions is good. I presume the sin in question is directly supplying style attributes in source HTML. If so, it could be compared to taking the body of a method and just sticking that where you were going to call the method. Counterproductive in the extreme.
Answer: To make them really understand what you can do with CSS alone - with only substituting another CSS file - take them to the CSS Zen Garden. With exactly the same HTML for each page, and only the .css file replaced, you get absurdly wild pages. From serene small nothingness to 3D-scrolling cubes...
Then explain to them that the skillset needed to make the HTML, vs. the skillset for (especially extreme like those) CSS is vastly different, and that the HTML functions as the information carrier only.
A further goodie would be to install a screen reader (for the blind) - there are ones with limited free use - to show them how the same HTML "looks" when spoken aloud.
Also point out that those tools for the visually impaired are able to for example extract link texts and so on from the HTML if it is well structured, and this also makes it possible to navigate a page with keyboard only - which can be useful if one is so inclined, even if the eyesight is fine.
Finally, point out that a page with good separation of content and styling has a higher chance to work on portable devices - the key word being responsive design, where the content can freely flow into any resolution as needed.
Answer:
To narrow it down, I'm looking for examples or explanations of how teaching it explicitly might make it easier for the students to style their webpages. Preferably an explanation.

As richard says, the pupils can see how one simple edit of the style can change every element.
As an example, you could let your pupils 'feel' the benefit of separation of the style from the html. Which means, give them an exercise, where they need to style some elements (e.g. color the element background) the  in their html.
Then let them change each element to another color. The lesson would be to let them understand that this task can be much less time-consuming if you separate the style from the html. You could then demonstrate how to change one line in the css, which changes all the elements background color.
Comment: Sure. That is up to the requirements where the webpage should be displayed (mobile/desktop).
But the question as far as I understood it,  was how to explain why and how there is a need for a separation of HTML and CSS.
Comment: HI thehayro! Welcome to [cseducators.se]!
Answer: Well ask yourself: Why do we separate anything in any form of code?
In almost every single programming/scripting language there is separation and delegation. We do this to make sure that we are more easily able to keep track of all the code and are able to more easily identify issues (that will inevitably sprout because no programmer is infallible)
So I think that a dedicated lesson on CSS is a good idea, because it helps them understand what is responsible for which. It helps them understand that if all the HTML is correct when looking at the source, but all the makeup is still jumbled, that they need to look to the CSS.
On top of that, CSS is large, flexible and can do a lot more than just putting a nice border around things. To show the class what it can do, and how complex it can get, will drive the point further home how it's unwise to blend the HTML and CSS too deeply.
In the end, separation of CSS from HTML (or any code for that matter) is a development atticate; its not about the creation functioning (better) its about the developer having more and easier control over their creation.
Maybe on that note you want to try and make the class check each others work, it'll help them see how it's important to have clean delegated code when you work in a team.
Comment: you raise some very interesting points. Thanks! and welcome to [cseducators.se]
Answer: A slightly different way of looking at it might be to introduce DRY code (Don't Repeat Yourself).
By using CSS to do the styling, you know that by simply adding a class to a HTML element, the styling should take hold.  If you had to manually add it all, then when you need to change one part, you need to change many, many more.
To steal an idea of illustration from W3 Schools, if you wanted, say, paragraphs to have different background colours, you could do it this way:

Paragraph 1

Paragraph 2

Paragraph 3

Paragraph 4

But, if I want to change the order so it's 2,4,3,1 but keep the colouring, I then have to change all of the styles built in to each tag.  If that's across multiple pages, then the work load can be come huge.
If I did it in CSS, I can do the following:
p:nth-child(odd) {
    background: red;
}

p:nth-child(even) {
    background: blue;
}

Now it no longer cares what the content is, I can order them how I like and the styling still works.  Lots of effort changed.  Ignoring the ordering, if I wanted to change them to more sensible colours so they are easily readable, I change the value in CSS once, and it's applied to each matching DOM item.
Beyond that (as CSS can be embedded in HTML in the head tag), splitting it out into a file and including that means I don't have to repeat my (now more sensible) CSS into various files, down into folder structures for each page I have.  I include the CSS file in the header and the styles take effect.  Now if I need to make changes to the colours or add additional styles, I get the same benefits of not needing to duplicate which I had from not using inline styles.
Another benefit from having a separate file, away from the split responsibilities, is performance.  Browsers are pretty good at caching files, so if it has to download a single (ideally minified) CSS file for the site once which it can then reapply, it's one less thing for it to download for other pages.  Performance should always be a consideration for people, especially with the increase in mobile browsing.  If a web page has a lot of CSS in it then the source is, naturally, large.  This takes longer to download and/or become usable, which may put people off it the wait becomes unacceptable to them.
Answer:
Would explicitly teaching the difference between setting the style attribute of an html tag, and doing it through CSS useful for increasing the students' understanding of the joining of CSS and HTML?
To narrow it down, I'm looking for examples or explanations of how teaching it explicitly might make it easier for the students to style their webpages. Preferably an explanation.

Show them why having separate CSS files makes their lives easier.
Step 1: Give students an assignment where they create an HTML page with a bunch of elements that use the style attribute for inline styling. Have something like 10 buttons with the same background color, 10 paragraphs with the same alignment, etc.
Step 2: Now have them change those styles. Have them change the background color on the buttons and the alignment on the paragraphs. The point is to show them how painful this manual process is.
Step 3: Now introduce the concept of css classes and separating CSS into its own section or its own file. Have them modify their HTML to use this approach instead of inline styles.
Step 4: Now have them change the styles again. This is a 2-line change instead of a 20-line change. This assignment will be much less tedious than the previous one.
This approach will motivate students where they live and show them the real-life benefits of separating your CSS styles from your HTML content. Then you can introduce some of the other benefits that the other answers discuss.
Comment: Instead of site wide display changes that affect all clients (which you can do with careful search/replace) I'd instead focus on providing different views for different clients dynamically - print view, high contrast (for vision disability), screen reader compatible,  etc.
Answer: We teach that there are three layers to a web page:  structure, appearance, and behavior.  Structure is determined by the DOM, which is created with well-formed HTML5 markup.  When we learn about HTML, we immediately begin drawing the document tree, so we can understand how elements on a page relate to each other.
Appearance is determined by CSS, which accesses the DOM to format and style the page.  This is kept in a separate file so that it can be shared by a related group of pages.  HTML handles ad hoc situations using id or class.  Using these makes maintaining pages easier, since the style for items bearing these attributes is made in one place in a CSS file.
The third layer is behavior, which should appear in a JavaScript file.  JavaScript never needs to appear on a page, save for calling functions from event-handling code. Even this can be attached in a JS file.  Make sure your students know about load events and onload early, so they can delay the calling of code until page elements exist.
If you install Node, you can run tests of JS code at the command line, and develop test suites for the functions you have created.
Separating the three layers keeps things neat and maximizes re-use of code.
Answer: Make a project in which the result is TWO completely different views of the same document, eg a version that looks great on a big monitor and another that looks great on an iPhone.
Using not a static webpage but computer-generated, updateable documents will drive the point home even more, since embedding style information in the document generator will make it visibly more complex - the only options to mess with style will be either changing the document generator with all the hassle involved or the stylesheet which is exactly what you intended. Even better: Assign two groups in separate corners of the room to do the document generating and the stylesheet parts - and regulate how specifications are communicated between the two.
Comment: Oh, and I'm meddling in the discussion as not a teacher but an IT professional - what I described is why things are done in practice just like the theory you want to teach says :)
Comment: This is incredible. Wow.
Comment: Well, make it credible then.
Comment: It's incredible becase it solves a problem with circumstances that I can't disclose (school stuff), but it doesn't **exactly** address the question...
Answer: It seems that many answers here are not addressing the point of inheritance on styling, as this should also be taught. The basic rule is what's read last will be applied.
the first to load is usually the external sheet in the head of the document.
A style sheet linked in the head of the document will be over ridden by styles placed inline in the html body, and those in turn will also be overridden by styles placed directly on the DOM element. The !important tag can be used to alter this behaviour also.
Most will put all their css into its own file because it's easier to maintain and won't require as much work when updated/changed.
EDIT: Just to clarify a bit further, it is only the specific styles that match in the classes that will clash/override each other, if the one inline adds a style to underline text, that is not in the class in the external sheet for example it will just add that extra styling. The classes do not directly replace each other but merge into each other.
Comment: Wow. Welcome to [cseducators.se]. This is really something I had not considered. I'd love it if you could add some examples or description that show that. (I **can** write them myself, but I'm more interested in seeing what you can think of). This really is an interesting answer :)
Comment: Unrelated: why don't you take our [tour]? I'm sure you'd find it interesting.
Comment: I got it slightly wrong, its external style sheet first, then document styles and then on the element, my brain is never 100% on a monday morning. :)
Comment: forgive and forget ;). You can edit your answer. There's an `edit` button\link directly under your answer. While you're at it, would you like to add some example to demonstrate what your answer is addressing? It'd really make it into a much better answer :D
Comment: Unfortunately i do not have time right now. I just wanted to mention inheritance of css, as it is important aspect of css.
Comment: Allright, if you have the time, then I do recommend reading the [tour].
Answer: There are lots of good answers here.  One point I haven't seen made yet is that content and design are often created by separate people or teams, and so having each defined with its own tools and language allows for the necessary separate workflows.
I would use an analogy. Automotive engineers don't choose car colors. Screenwriters don't generally do costume design.
Comment: Actually it is worse than that. At some large companies with an important web presence, there is a standards team sitting above both the content and layout teams. If the layout is one pixel off of the standard, you do it over. One pixel.
Comment: Wow. I hadn't thought of that. Would you mind expanding a bit on how I can explain this in a separate lesson about using CSS stylesheets?
Comment: I would use an analogy. Automotive engineers don't choose car colors.  Screenwriters don't generally do costume design.
Comment: I see. Maybe you should include such analogies in your answer by editing the answer.
Answer: An important reason why inline styles are bad is code readability, plain and simple. In this case, an example should be enough to prove your point:

    The Title
    This is a super great article

Compared to:

    The Title
    This is a super great article

In addition to this example, without using classes and ids you make the DOM much harder to manipulate using javascript and you make it impossible to use pseudo-elements and some of the really nice CSS selectors such as :nth-child() and :first-child, to name a few.
Answer: I would completely disagree - styling should be done directly in HTML.
The primary problem is that styling is not even remotely independent of the HTML structure. Simply writing the styles in a physically separate file does not change this. A good example is mobile device support. In theory, you could make a mobile CSS file. But in reality, you probably need a completely separate UI design to produce a good experience on a mobile device, and then a separate HTML structure to support this, and then a separate set of styles. "Make the button the same but a bit smaller" only works for the smallest pieces.
Producing the correct UI involves producing the HTML structure that supports the styles you need. Since the two are in fact intimately coupled, having them be colocated just makes things easy to understand and all in one place.
Moreover, since you are presumably generating your HTML through code, there is no problem with generating HTML with duplicated styles, since your code generator can spit out styles all day long.
Having raw CSS is tremendously problematic as the styles are completely random and at global scope, and difficult to re-use. You make a class name under the hope that nobody else used it. You nest your own classes inside that element to try to solve this problem a bit but now you can't re-use these classes in other places as they're not in the right DOM structure. Then you find out that some random dude in some completely separate part of your page used your class without notifying you and now you've broken it by changing your styles. And good luck getting type checking, IDE support, etc. It's also difficult to create e.g. parameterised classes, or globally apply replacements, e.g. display: flex with display: flex and display: -webkit-flex for iOS.
The correct way to deal with styles is to deal with them as with any other code- encapsulate them in some functions.
Comment: While I do not agree with everything you say. I do see your point. Especially the last line (I think you should expand on this). Show us how you think it should be done.  Even if we don't 100% agree, we could learn something.
Comment: Hi Puppy, welcome to [cseducators.se]! If you'd like to meet another puppy, you can say hi to [Buffy](https://cseducators.stackexchange.com/users/1293/buffy), who's a bulldog, in [chat](https://chat.stackexchange.com/rooms/59174/the-classroom). This is an interesting answer, thanks for sharing your perspective here!
Comment: @Puppy Is that so?
Comment: It's definitely so
Comment: It seems like your problems are with your teams: Too many people on the project, and not enough communication. I agree that you should generate it. CSS does style and layout, keep them seperate; HTML does content and structure. The structure should be done with templates, and the content should me pulled form the database. The two combined with a program.


700D how to blink on over-exposure?

Question: How can I blink pixels that are over-exposured, on my brand new Canon 700D? I just can't find the setting for this.
Answer: On the top of page 272 in the manual for the 700D it says:

When the shooting information is displayed, any overexposed areas of
  the image will blink. To obtain more image detail in the overexposed
  areas, set the exposure compensation to a negative amount and shoot
  again.

Meaning switch to the shooting information display, by pressing INFO and you'll get the highlight alert.
Comment: no!!! Info button will not show the highlights. This should be explicite enabled from menu as I explain in my answer
Comment: It is on page 272. But that does not help me because I cannot make it blink :-( even when shooting information is displayed. I just took a totally over-exposed image, pressed [preview] button and then [Info] button two times. Histogram and shooing information IS displayed, but pixels are NOT BLINKING.
Comment: @nagylzs, you should enable it from the menu
Comment: Yes, but where? I cannot find it in the menu. The term "highlight alert" appears only on page 272 of the manual. It does not say where to turn it off/on.
Comment: @nagylzs I think Romeo is using a Canon 70D or alike. That camera has that option. If I'm not mistaken the menu of the 700D lacks that entry. For all I know the alert should be shown when shooting information is displayed.
Comment: @Hugo, you are right, i use 70D and there this is a option. As I read from the manual you are correct, for 700d this should be visible via pressing info button in preview mode :)
Answer: On the Canon 700D/Rebel T5i, it is not possible to see the "Highlight Alert Blinks" in a full screen preview mode.
The User has to set the display to one of the histogram Modes where the histogram is displayed on the right and a small thumbnail preview with the flashing Highlights Alert is displayed on the left.
If you click through quickly, you can miss it.
On the 70D, you enable the Highlight Alert in the 2nd playback menu and get a full screen display when previewing.

700D how to blink on over-exposure?


Sites where I can ask academia-industry transfer questions

Question: I know that this question is not be related to this site, but I just want to know the names of the sites where I can ask questions about academia-industry transfer. Questions like "example of companies using differential geometry and machine learning" is not fit for this site, for example. So I'd appreciate the names of the sites where I can ask them. Thank you!
Comment: That being said, I see two issues with your concrete question: 1) It is actually not about academia, but about subjects treated in academia. As such, it is unrelated to this site, and rather related to sites dealing with the topics you mention. 2) An "example of companies" is rather unspecific, and you should probably specified the intended purpose of the question. For instance, is the purpose finding out whether any such companies exist anywhere on the world? Is that actually interesting for the community to know?
Comment: I'm voting to close this question as off-topic because this question belongs on another site in the Stack Exchange network.
Answer: Depending on what you want to ask, it may be appropriate on this site, Workplace.SE, or not on any StackExchange site.

If you are looking for information about specific companies, that will not be appropriate on either site:  "make me a list" questions are generally a poor fit for the SE format.
If you are looking for information about scientific careers in industry, it is likely to be appropriate for this site (e.g. this question)
If you are looking for information about the non-scientific aspects of industry, then Workplace.SE is the place to go.
Comment: @BCLC Well, I've answered the part that I know how to answer, about which types of academia-industry transfer questions are good for SE.  For the rest, I leave that to others, if they have any good suggestions.
Comment: '"make me a list" questions are generally a poor fit for the SE format.' --> I think OP acknowledges this and is asking for alternatives to SE