What are the visual differences between the ATR42 and the ATR72?

Question: I tried to find the visual differences between the ATR42 and the ATR72. I downloaded some images from Google but I can't find any. Would you help me?
Comment: Isn't the fuselage length not different enough between the two?
Answer: By Julien.scavini (Own work) [CC BY-SA 3.0], via Wikimedia Commons
The ATR72 is quite a bit longer than the ATR42, and has several more windows to allow for more passengers.
According to Wikipedia:

The ATR 72 was developed from the ATR 42 in order to increase the maximum seating capacity (from 48 to 78) by stretching the fuselage by 4.5 metres (15 ft), increasing the wingspan, adding more powerful engines, and increasing fuel capacity by approximately 10 percent.

So it's longer, and has larger wingspan. The stronger engines and larger fuel tanks can't be seen from the outside.
Comment: Could you add a couple of pictures? It would really help to make the point about the fuselage and windows clearer.
Comment: TL;DR Count the windows behind the wing; it's about 3 for ATR42 and 7 for ATR72.
Answer: There are a lot of technical differences between the two aircrafts. In addition to fuselage length and wing span, like ATR 72 has three cameras in forward cargo area and near cockpit door + its display screens inside cockpit, antennas outside the fugelage are different, ATR 72 navigation lights are LEDs, where as ATR 42 nav lights are normal bulbs. Similarly the cabin lights of 72 are all LEDs. The flap position indicators are different, The quantity of emergency equipment are different. The most important of all, The both aircraft have the same identical engine. ATR 72 has long fuselage but in most of the countries, it is not flown with full capacity in mountainous territories as its engine power not suitable for high rate of climb with full capacity load so no use of large fuselage.
Comment: The question asked for "visual" differences. Things like cameras in the cargo bay, cockpit displays and interior lighting really aren't "visual"/"plane spotter" differences. [Edit]ing out those items would improve this answer.


Automatic kerberos ticket initialization on login

Question: I'm using ksshaskpass to add my password protected keys into ssh-agent upon logging into KDE, is there something similar for kerberos?
Answer: I would look into using pam-krb5.
On Debian and Ubuntu, it should be apt-get install libpam-krb5.
The PAM configuration would look something like:
auth required pam_unix.so
auth optional pam_krb5.so try_first_pass

or
auth required pam_unix.so
auth optional pam_krb5.so use_first_pass

in /etc/pam.d/common-auth.
It takes the password you used to authenticate locally, e.g. the password in /etc/shadow, and then tries to use the same one as your Kerberos password.
If your Kerberos password is the same as your system password, you don't need to type it again.
If your Kerberos password is different from your system password, what happens depends on whether you used try_first_pass or use_first_pass:

try_first_pass will ask you for your Kerberos password
use_first_pass won't ask you, but you'll have to run kinit yourself later

Note that this probably makes ksshaskpass redundant too, because you can also have:
auth required pam_unix.so
auth optional pam_ssh.so try_first_pass
auth optional pam_krb5.so try_first_pass

On Debian and Ubuntu, that requires installing libpam-ssh.
Comment: How would this work if my kerberos username is different from the local username? E.g. `gert` versus `gertvdijk`.
Comment: Yeah I know about this, but I would like some solution that works with different passwords.
Comment: @Let_Me_Be: Can you elaborate?  `try_first_pass` or no option should work in that case.
Comment: It would be great to have kinit using a keyring, does someone know about something like that?
Answer: Normally, Kerberos would be integrated with PAM pam_krb5.so.  It will attempt to acquire a Kerberos ticket based on your username and the password you supply.  It can also use that to verify whether you are allowed to login, but that can be set to ignore if you just want the ticket.  It needs to be added as both an auth and a session module, probably also password if you plan to keep your Kerberos password in sync with your desktop.  If you plan to use Kerberos for verifying a user's login, you should also setup your keytab file at /etc/krb5.keytab with a key for firstname.lastname@example.com replace hostname and example.com as appropriate for your environment.


Joining Points One by One in ArcMap?

Question: In ArcMap 10.4 I'm trying to manually join two nearby points on a one-by one basis by visually inspecting a single point in one layer, and associating it somehow with a point in another layer.  Using nearby points is troublesome, because I need to use subjective criteria to make that join.  For example, I have a geolocated electricty service account point, and I need to associate it with a gas service account.  They are not always the two closest points on a map, so I must use my judgement to join them together.  The last step would be to join those points to a building footprint which is a geolocated polygon.  I'm not savvy in python, so a way to click one point and then click a second point and join them would be something I initially think would be a user-friendly solution?
Comment: What do you mean by "manually join"?  What kind of join are you trying to make - a line between the two, or attributes from one added to attributes of the other?  What kind of "subjective criteria" do you have?
Comment: Line drawn is your best go, next step is trivial assignment of from and to nodes
Comment: If not python, would other languages be acceptable?
Comment: If some sample scirpt could be copied and pasted with a link to some step by step instructions, I'd give it a go!  Any advice is helpful and I'd be willing to fumble through this
Comment: No line - just add to the attribute table.  The subjective criteria is to identify building by building what the kWh use is and whether the therm usage, in my 'engineering judgement' is correlated to each other.  Also - whether the utility tariff is compatible.  For example the closest account may be a street light account, but that shouldn't me matched with a building.  The list goes on, and scripting something could be unwieldy and not always valid.
Answer: The standard database way to do this would be to assign each layer--electric, gas, building--unique identifiers, then use the Attribute Transfer tool to point and click and transfer the attributes from layer to layer.
For example, your electric layer could have the following fields: Id, GasId, BuildingId. Your gas layer could have the following fields: Id, ElectricId, BuildingId.  Your building layer could have the following fields: Id, ElectricId, GasId.
So, if you want to be able to relate all 3 layers to each other, you would populate these Id's accordingly. Then you would set up relationship classes so you don't have to keep relating them over and over manually. For each layer, it's Id would be it's primary key, and the other Id's would serve as foreign keys to the other layer's.
Here is the link to the Transfer Attributes tool.  Note that it does require an advanced license, although it is definitely one of those things one can program around and simulate with a lesser license with python.  http://resources.arcgis.com/en/help/main/10.2/#/Transfer_Attributes/001v0000000s000000/

Joining Points One by One in ArcMap?


Why a range in area for catchments even if stream definition is set at a single size?

Question: Using ArcHydro, I set stream definition at 5000, 20x20 cells (approx. 50 acres).  I placed points at origins of each subsequent stream with batch point generation tool. Then used batch watershed generation, which gave me 23 watersheds ranging in size from approx. 50 acres to 82 acres.  Why the range in watershed sizes?
Answer: The key here is that flow may proceed into your origin point from multiple directions (depending on your flow direction method). Considering a D8 method, the could be as few as one inflow cell or as many as 7 (and one outflow). In the case of one inflow cell, all 50 acres upstream accumulate to this one cell and therefore initiate a stream, by your definition. However, multiple other flow paths could flow into this same cell, but accumulate less than 50 acres upstream. Therefore, the cell in which your origin point has been placed has accumulated the requisite 50 acres from one upslope cell as well as additional area from other inflowing cells.


When the woman was caught in adultery in John 8 vs 3, why is the man not mentioned?

Question: In John 8 vs 3, a woman was made to stand before Jesus after being caught in an act of adultery but there is no mention of the man. Why is that?
Answer: The reason for' no man' is in the reason for this account. It wasn't about the adultery .... at all. It was about the Law.
The Pharisees were trying to have Jesus violate (speak against) the Law. Jesus had to  fulfil the Law, both as a Rabbi, and as a 'man' having to fully 'keep' the Law.
Jesus was going about preaching grace and Mercy, but could not be allowed to use this against the Law. The penalty for adultery was death by stoning, and Jesus had to agree - and he did! He could not say No!
Jesus could  not Let her 'off', nor exercise Mercy - the Law  has no room for Grace nor Mercy. He had to demand what the Law demanded - it was his Fathers Law! If, through compassion, he went against the Law, he would have been a 'bleamished' sacrifice.
The Pharisees thought they had set up the perfect snare to have Jesus break the Law, thereby 'legally' having an excuse to put him to death - (a Rabbi not enforcing the Law was breaking it.) - which was their intent.
Answer: In John 8:1-11, not mentioning the man involved in this clear Jewish setup, was part of the plot.  The woman was used and the man was very possibly one of the accusers who wanted to "frame" Jesus by trapping Him (v6).
In fact, their actions, in themselves were also illegal under Torah.  If anyone saw that a crime was to be committed (v4), that person should make every effort to avoid the crime being committed.  Therefore the accusers were as guilty as the woman they were accusing, especially the man involved!
It was such provisions that made it almost impossible to accuse someone of a crime worthy of the death penalty because several witness must observe the crime and such must try to prevent the crime being committed.
Jesus was also correct that the one who had no sin was to be the first to cast stones; none did because all knew they were themselves guilty.
None of this says that the woman was innocent; only used to trap Jesus.  Jesus approached the situation in such a way as to save both the woman and the accusers.  All left chagrined (v9), but the woman left to presumably begin a new life (V11).
Answer: The Torah, in prescribing the death penalty for adultery, required that both the adulterer and the adulteress be put to death. It was not lawful to slay one and spare the other.
Also, by claiming that the woman had been caught in the very act, they affirm that the adultery was not established by some other basis of evidence. Nor did they claim that the man, having been caught, had escaped, so they had no excuse for failing to haul the man as well as the woman into Jesus' presence for judgement.
That this is a set-up is obvious; if the case was as open-and-shut as they declared it to be, there was no reason to get Jesus' opinion on the matter; the execution could have proceeded without bringing Him into it. How the set-up was intended to work isn't too hard to imagine. If Jesus tells them to go ahead with the stoning, the accusers would "forget" that they had proposed an unlawful execution and spread the tale that He had ordered it, but if He told them to spare her, they would leave out the unlawful nature of what they proposed and spread the tale that He had let an adulterer go unpunished.
Instead, He chose not to even dignify their challenge with a response.
They of course prodded Him, perhaps supposing that He was stalling for time in order to think the matter over, and His response is not what they expected. He neither endorses the execution, nor opposes it, but instead gives the qualification of who may impose the penalty: "He that is without sin among you, let him first cast a stone at her." Since only God is without sin (of those who have the capacity to understand), only God is qualified to take human life outside of the Torah.
One by one, they realize that He has seen through their game, and depart; and with the departure of those who cared nothing for the Torah, He upholds it.
(I have heard it argued that part of the trap was that endorsing the execution would have gotten Him into trouble with the Roman authorities, but this makes no sense. To punish an adulteress with death was a fairly common sentiment; unless the words are backed up with action, the Romans simply had more important thing to worry about.)


Can't change settings in Ubuntu 18.04 (Screen Lock)

Question: I can't change any settings  inside Screen Lock portion as they are grayed out. Settings options for other categories seems okay.
How can I fix this ?
Comment: couldnt figure it out. had to resort to `dconf reset -f /` (THIS RESETS ALL YOUR SETTINGS)
Answer: I found the answer at Ubuntu 18.10: Screen lock options grayed out
In short, you can remove the "lockdown" of this setting by using the command
gsettings set org.gnome.desktop.lockdown disable-lock-screen false


Screen resolution in X windows different from command line

Question: I have a raspberry pi zero and I'm running Jessie lite (very similar to ubuntu distros). I'm using my pi to run a MagicMirror. Everything runs correctly but X windows does not take up the whole screen. The command line view does take up the whole screen, however. My framebuffer is set to 1280x1024 which I think is the correct resolution for my monitor, but when running my kiosk (kweb) browser in X windows (or anything else started with xinit) I only use up about 2/3 of the screen for both height and width. I'm using matchbox as my window manager. Does anyone know what would be causing this and how I can get my application to use the whole screen?
Answer: Common LCD monitors these days are larger then 1280x1024.  Look at your monitor's documentation and don't guess what the size is.  The command line view is text mode and the monitor is probably already programmed to take a standard 80x25 character size and fit the screen with it.
Comment: It is actually 1280x1024 (older monitor), but even if I change the resolution it just changes the aspect ratio and distorts the image with affecting the screen area usage.


How to send everything in a bitcoind account?

Question: I have create an account in bitcoind, which has got some balance of 1.77 btc, I would like to send everything to another address that is an admin address, so is there any rpc method to send everything or need to do  transaction fee calculation for this.  If transaction fee calculation has to be done, please let me know the calcuation, this particualar func has to be impl in my backend for a platform.
Comment: Do you want to send everything in the *account*, or everything in the *wallet*?  Accounts are deprecated and there may not be good support for doing anything related to them.
Comment: I want to send everything in an account.
Answer: I would highly recommend that you not use the accounts system as it is deprecated and has been removed for Bitcoin Core 0.17 and beyond. Furthermore, the way that you want to use the accounts system is not how it actually works. Accounts are only associated with addresses for receiving; for spending, when you "send from" an account, all that happens is the numbers for the account are deducted, not that addresses that were associated with the account for receiving are the ones actually used in the inputs.
To send everything from an account, just use the sendfrom command with the balance of the account. This will change the accounting entries so that that account is deducted however much you sent. Note that this will not necessarily choose the inputs that you think are associated with the account; it can choose any input in the wallet to create the transaction. However if you call getbalance <account>, you will see the account's balance be 0.
Comment: Are you sure this works?  Where do transaction fees come from in this case?  `sendfrom` doesn't have the `subtractfeefromamount` parameter like `sendtoaddress`.  Do they come from another account, or what?


Web "frameworks" for Haxe to deploy in a PHP environment?

Question: Lately I've been taking a look at Haxe, to build an application to be deployed to Apache running PHP. Well, while it looks like it might suit my needs (deploying to PHP, but not using an awful language), I haven't found anything to make the actual application development easier than building a traditional non-MVC PHP app. Are there any toolkits/frameworks that I'm missing, that would be worthwhile?
It'd be nice if it were MVC inspired, and I'd definitely want an easy way to use nice URLS, though I could settle for mod_rewrite rules if necessary.
Edit: The idea is to not use something like CakePHP on the PHP end, but to instead use something like CakePHP on the Haxe end.
Answer: There is a port of PureMVC for Haxe: https://github.com/PureMVC/puremvc-haxe-standard-framework/wiki
As far as I know this the only thing for Haxe, but there are discussions on the mailing list about creating a own framework, but this could take a while.
Comment: The home page looks like it has been abandoned.
Comment: @Anwar probably because a lot of things have changed in the 13 years since this answer was made.
Answer: I'm happy to say that haXigniter has been completely rewritten, to get away from the PHP-framework-style as mentioned by Marek. Now it adheres much more to better OO-principles and is also a standard haXe library, so upgrades are much simpler. Please check it out at http://github.com/ciscoheat/haxigniter.
Comment: Haxigniter is an outdated project nowadays, ufront is recommended instead: https://github.com/ufront/ufront
Answer: I see that someone is starting to develop an MVC framework for Haxe called "Hails", though I don´t know if it is usable yet.
hails: A minimal Rails-inspired MVC web-framework for Haxe / PHP
http://code.google.com/p/hails/
Answer: Take a look at HaXigniter, a new kid on the block:
http://github.com/ciscoheat/haxigniter
Answer: I would recon you to do your own.
The problem with frameworks above (Excluding PureMVC) is that they were designed for particular language.
Haxigniter is a good copy, but it has the architecture that was kind of enforced by PHP4.
Its a good excersise!
Let's you understand the differences and work out bottomline mechanics - and this is very important as your haxe code will be translated ( so you have double abstraction 1. translation 2. framework its good to know how to work thing out ;])
Answer: I am working on a Haxe-based toolkit/framework for NekoVM/PHP. It is also built around a Zend Framework/Ruby-on-Rails-ish MVC workflow and has various classes for authentication, caching, form validation, session management etc. It can be compiled to both NekoVM and PHP and I have already used this library for a couple of websites. Unfortunately there is not much documentation available right now but I am working on that for the upcoming version 1 release of the library.
The project is hosted at http://code.google.com/p/toolkat
Answer: There is also ufront:

http://lib.haxe.org/p/ufront
http://code.google.com/p/ufront/

It works with php and neko.
Answer: See
 forum FAQ ( 7th entry ), but the list and links may not be still relevant, so below is a revised list of some that seem current.

poko
hxquery
uform
hxWiki

But if you are interested in just MVC structures then I suspect more robot legs type approaches maybe better, and injection is also useful.

unject
cube
inject
robotlegs


CMake run custom command with externalproject's target

Question: I have a subproject in my project for generating code used in the project, however i want to include it using ExternalProject so it can be built and ran regardless of the toolchain i use for the main project.
It mostly works except i can't figure out how to use it in add_custom_command, since i want it to use the target rule specified in the docs:

If COMMAND specifies an executable target name (created by the add_executable() command), it will automatically be replaced by the location of the executable created at build time [...]

Simple example of my project setup that replicates the issue:
https://godbolt.org/z/of8G4c4Gf
Replacing the ExternalProject_Add with a simple add_subdirectory makes it work, but wouldn't do what i want in the case of using a different toolchain.
Comment: A somewhat related thread with potentially useful info: ["_CMake - linking to library downloaded from ExternalProject_add()_"](https://stackoverflow.com/q/6351609/11107541)
Answer: ExternalProject_Add will add the codegen target. However, CMake has no idea what that target is doing and what output it will provide, as that info is now hidden away in the external CMake run. So the outer CMake run has no idea about the codegen binary produced by that step and where it will be located. You need to provide the full path to the executable to add_custom_command manually.
ExternalProject_Add will build codegen and place the resulting binary in a subdirectory inside your build directory. The exact location is toolchain dependent, so it can be tricky to reconstruct the full target path. The most robust way to solve this is:

Add an install step to the codegen project. This will allow you to portably specify which path the installed binary will end up in relative to the install root directory.
Set the INSTALL_DIR option on ExternalProject_Add to a subdirectory inside your PROJECT_BINARY_DIR.
Hardcode the full path to the installed codegen binary in the custom command of the outer CMake project. To work on multiple platforms, you may need to make use of the CMAKE_EXECUTABLE_SUFFIX variable.


Problem in understanding a proof by contradiction in Real Analysis

Question:
I came across this theorem and its proof while studying Real Analysis on my own. I don't understand how does the contradiction as claimed in the second last line hold when $d$ is less than or equal to $0$. If anybody could shed some light on this, it would be very helpful.
Comment: You are right. You need to take $0 < d < \min\ \{\delta, c-a \},$ which is possible. The author has implicitly assumed that $d$ is a positive quantity.
Answer: It isn't explicitly stated (though it probably should be), but $d$ is chosen to be positive. This is possible because $\delta>0$, and it's been proved that $a<c$, so that $c-a>0$. Thus, $\min\{\delta,c-a\}>0$, and we can choose $d$ so that $0<d<\min\{\delta,c-a\}$.


Can Flow Update Field using a formula once and then allow users to edit the field later?

Question: I want to use flow to update a field on account level using formula  once an Opportunity has been Closed Won ( so Closing Winning and Opportunity would trigger the flow), after the field has been updated, Im wondering, can Users be allowed to edit this field afterwards, and then once a new Opportunity is Closed Won again Flow would update this field using a formula (just once) and again users would be allowed to overwrite the value Flow inserted if its not relevant.
Answer: Yes, just make a Process Builder or Flow that updates the account when the Opportunity moves to Closed Won (e.g. you could trigger on NOT(PRIORVALUE(IsWon)) && IsWon) that updates the Account. This should be a pretty trivial customization.


Generate Ethereum address in PHP?

Question: I am working on a web application where I need to generate Ethereum addresses in PHP, how do i go about generating a random Ethereum public/private key pair in PHP?
thanks.
Answer: You coud use JSON rpc to create a wallet and and set password. But PHP and geth don't go well together, it will limit your app. I recommend going directly with web3.js and javascript/jquery/node. By the way, myetherwallet is a very nice code and open-source so you could integrate as on site wallet.
For generating wallet thought JSON-RPC (pass sent over the network):
<code>//create eth wallet supplying pass, return wallet address if created

function getethwallet($pass) {

    $url = "http://node.ip:8545";
    $data = array(
                 "jsonrpc" => "2.0",
                 "method" => "personal_newAccount",
                 "params" => array($pass),
                 "id" => "1"
                 );

    $json_encoded_data = json_encode($data);

$ch = curl_init($url);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $json_encoded_data);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Content-Length: ' . strlen($json_encoded_data))
);

$result = json_decode(curl_exec($ch));
curl_close($ch);

        $parsed = $result->result;

return $parsed;
}
</code>
Comment: this is quite unsafe

Generate Ethereum address in PHP?


Are some questions hotter than others?

Question: Why can some Hot Network Questions gather over 1000 views in a day, when others only get 100 in two days? Are they shown in the "Hot Network Questions" side bar with different frequency? Or it is just the attractiveness of the site and title of the question?
Comment: How long it stayed on HNQ. If it stayed there for 15 minutes before being thrown out by hotter stuff, then the 95 views aren't unexpectedly low.
Comment: I'd be very curious to see an example of a HNQ question which started there for two days while gathering less than 100 views. Got a link to provide?
Comment: Yeah, that puzzles me as well. I've gathered some information during the last year about question views during their presence in the HNQ, so I can probably figure out what the minimum was.
Comment: @Jenayah both asked yesterday on the same site: 721 views https://codereview.stackexchange.com/questions/229116/account-creation-and-log-in-system and 95 views https://codereview.stackexchange.com/questions/229073/pure-python-range-implementation
Comment: That's why I am asking. 7 times difference with the same site? Can't believe they are shown with the same frequency.
Comment: Asked today, 762 views https://codereview.stackexchange.com/questions/229152/algorithm-for-competing-cells-of-0s-and-1s Really random selection?
Comment: I really doubt the second one stayed in the HNQ for long. Do you have data on it?
Comment: @Jenayah what kind of data do you mean? All I know that https://codereview.stackexchange.com/posts/229073/revisions says "Became Hot Network Question occurred yesterday". I also doubt that it really occured.
Comment: Oh it can be thrown out... Don't know about it and how it works, sorry. There is no informaion in the revision history about being thrown out.
Answer:
Are they shown in the "Hot Network Questions" side bar with different frequency?

No, that's just a random selection. The only places the order matters are in the complete lists found on stackexchange.com and in the mobile apps (not in the feed itself, but when you visit 'More hot network questions').

Or it is just the attractiveness of the site and title of the question?

Yes, that's part of it. That's why it's important for questions to have a proper title, one that covers the topic of the question. If it's clickbait, it will probably get more views.
The other part is the time which the question spends in the Hot Network Questions list, which is reinforced by the number of views, since more views tend to lead to more votes and often to more answers as well, increasing the question's hotness.

Are some questions hotter than others?


How do I create a smooth curve along an edge on this model?

Question: I am trying to recreate a Toro Lantern, like the ref image below. I am trying to figure out how to create a smooth curve that goes up the neck of the Toro Lantern. I have tried edging a crease on it and subdividing it, but to no avail I cant reach the desired look I'm going for.
Comment: could you please highlight the part you're talking about on the second picture?
Comment: It is the hourglass figure the Toro Lantern creates, I left a white outline in the updated post. Thanks in advance!
Answer: I would use an actual curve object in combination with a Screw Modifier.
First create a curve that will be one of four curve edges of your final object. Then in Edit Mode make it the shape you want, but also move it away form the origin in a way that will make the origin the center of your final object. (note the orange dot/origin in the gif image)
Then put a Screw Modifier on the curve object. Set the Axis to X, the Angle to 360, and the Steps to 4. Now if you manipulate the curve, all four curved edges change accordingly.

When you are happy with the shape press Alt + C and choose Mesh From Curve/Meta/Surf/Text, which changes your object to a mesh and applies the modifier.
Since the edge curve in your example image highlighted in white actually splits into two edges at some point, you might want to model this part manually as proposed by moonboots. You can select part of the edges of the curve, up to where the split would be split, and press Ctrl + B to bevel the curve and create the split. (in this example the top part would also have to be scaled down manually to make the curve flow nicely)
Answer: I think you just need to bring some horizontal edge loops and squeeze a bit, like that:


Invalid username or password

Question: After installing Craft 3 successfully, I can't access the admin panel while using the correct credentials. I get an "invalid username or password" message.
Answer: I ran into two different issues that prevented me from logging into Craft CMS:
1) By default, Craft CMS uses PHP sessions and my PHP installation (via homebrew) had a blank value under "session.save_path". I updated my php.ini file and searched for "session.save_path", it was commented out, so I uncommented it. It now looks like this: session.save_path = "/tmp"
2) The second thing I noticed is that Craft CMS 3 uses the Yii 2 framework, diving into that framework I found a condition that checks a user's IP address. If the IP address is empty, then it rejects the user from logging in. In my case, I was using the built-in PHP local webserver (php -S localhost:8000) so my IP address wasn't being sent along in the requests. To fix this, I changed my setup to use NGINX instead.

Invalid username or password


Why Didn't Evolution Cause the Human Body to become Streamlined?

Question: If streamlining makes movement/locomotion quicker and easier, why didn't the apes evolve into life-forms that had streamlined bodies (much like fish)?
Comment: No single advantage drives the evolution of body type.  The advantage of streamlining is much greater for aquatic animals as water has a much greateer influence on viability. On land other concerns, defense, physical strength and size are at least as important.  Most land animals don't even move quickly.
Comment: I don't think the premise is flawed, as evidenced by @shigeta's comment. I vote to reopen.
Comment: I agree - @shigeta's comment does essentially answer the question. The reason we're not as streamlined as fish is that we don't need to be!
Comment: This question seems to be based on a fundamentally flawed premise, I don't think it is really answerable due to that.
Comment: " 'cause we're lovers, not fighters!"
Answer:
If streamlining makes movement/locomotion quicker and easier, why didn't the apes evolve into life-forms that had streamlined bodies (much like fish)?

As with everything in Evolutionary Biology, you must ask yourself: Gain vs. Cost?
In your specific case, the Gain is very little.  Air isn't nearly as dense as water, so a streamlined form won't show a major benefit unless the organism is traveling very, very quickly. This is why you see it in birds; raptors can travel over 100mph while diving, and at those speeds small changes in drag can mean the difference between dinner and starving. Smaller birds often make very quick turnabouts and changes in direction mid-flight where, again, small changes in efficiency can mean the difference between life and death. The cost was is worth it.
For apes and monkeys, moving very quickly isn't a case of living or dying. That's what we evolved opposable thumbs and prehensile feet(/tails) for. You don't need to run fast when you can climb a tree and simply get away from any predators on the ground. After we came down from the trees permanently, our larger brains allowed us to use tools to fend off predators - which, again, is much simpler than evolving an aerodynamic form that won't make a difference until you're running at the speed of a car.
So, in lieu of becoming a land-shark, we have hands that can use keyboards and minds that can invent the keyboard. Unfortunately, while the gains are many, the costs do include both a very long period of time where humans are helpless without parents, and an absolutely terrible form of locomotion with our upright stance on forward-pointing knees. Though you won't catch Cheetahs digging sewers anytime soon.
Answer: Who says we are not streamlined?
One could easily imagine body structures that would cause much greater drag in air and humans do not have them.


distribution for a subset of md5

Question: I need to uniquely assign a 32 bit integer to a collection of human readable strings (i.e. they will not be generated with hash collision in mind).  I don't expect more than a few thousand strings.  I would like to evaluate the possibility of using the first 32 bits of the md5 sum for this.  What is the distribution of these bits?
Comment: I'll go a little off-topic, but... How about using this? https://www.gnu.org/software/gperf/
Comment: Disclaimer: I have never used it, just saw it some weeks ago by coincidence in the MacPorts repository.
Comment: The collection can be extended, so unfortunately gperf will not work.
Answer: I guess it is wanted to assign a 32-bit integer to each of human readable strings in some collection (for the problem as worded, the answer is 00000000000000000000000000101010).
Assuming that the human readable strings are chosen independently of the definition of MD5, then the first 32-bit of the MD5 hash of each string is about uniformly distributed. That would be a classical result for any hash that is a PRF (for any distinguisher able to recognize the first 32 bits from a random function can trivially be turned into a distinguisher for the full function). MD5 was designed with the goal to be a PRF, and remains good enough. Sorry I do not have a reference.
Odds that there is at least one collision with $n$ strings is
$$p=1-(2^{32})!/(2^{32}-n)!/2^{32\cdot n}\approx1-e^{-n\cdot(n-1)/2^{33}}\approx n\cdot(n-1)/2^{33}$$
The approximation on the right is quite good for $n$ up to about $2^{14}$, arguably including " a few thousand strings ". For $n=10,000$, $p\approx1.2\%$.
However, one knowing your plan to do this and in a position to generate the human readable strings can make the number of collisions high (including having all the strings giving 00000000000000000000000000101010). That MD5's collision resistance is now badly broken is not relevant: the problem is that a 32-bit value is too small. To solve this issue (and return to the probability of collision previously stated even for evil choice of the strings), use a MAC with a secret key, e.g. a truncated HMAC.
Note: the MAC solution also allows to solve the problem of finding a hash with no collision for a particular collection, known as a perfect hash, in a simple way: try distinct keys at random until finding one for which there is no collision: that's easy to check with with $2^{32}$ bits (512 MiB) of RAM. It is tried on average $1/(1-p)$ keys and less than $n/(1-p)$ MAC computations. When $n$ grows past about $2^{17}$ that becomes increasingly impractical, and dynamic perfect hashing comes to the rescue.
Comment: The particular information I was seeking was "Assuming that the human readable strings are chosen independently of the definition of MD5, then the first 32-bit of the MD5 hash of each string is about uniformly distributed".  Where can I find a reference?
Comment: By human readable, I meant to convey 'not chosen with the intent of inducing collisions'
Comment: I am always a little taken aback by birthday problem calculations at an order of magnitude I hadn't seen before.  Intuition really fails, usually spectacularly.

distribution for a subset of md5


What does views UI Module do?

Question: I'm new to drupal and I have read about view UI module in many places but was not able to find what exactly it is.Can any one help me on this ?
Comment: Did you read the description given in the views_ui.info file ("Administrative interface to views. Without this module, you cannot create or edit your views.")?
Answer: Views UI module gives you a nice user interface to create, and edit your views.
A "view" here means what the Views module produces; it could be a slideshow, a page with a table, a block of recent comments, etc.
You can turn that module off if you have finished making all the views, and the site is ready to go on production. Your views will work no matter you have the Views UI module enabled, or not.

What does views UI Module do?


Is it important to consider channel bandwidth of the signal to measure cable path loss for RF testing?

Question: I am performing some RF tests for 802.11 and measuring path loss of the RF test setup, it has a mix of PSK & OFDM signals. I see the norm is to use a Continuous Wave signal to perform RF path loss, from signal generator to power meter. But when testing an actual signal which can have channel bandwidth of 20 or 40 or 80 MHz, which is a collection of subcarriers or multiple bundled frequencies. Shouldn't the path loss signal be an actual modulated signal instead of just Continuous Wave signal to perform RF tests on high channel bandwidth modulated signals?
Comment: Usually the expectation is that the bandwidth is a small fraction of the center frequency and that changes in behavior over it are minor.  If one of those is not true you may need a more involved test.  It's probably going to be easier to do CW measurements at a number of frequencies (or with a slow sweep) than to measure actual modulated signals.
Comment: Sorry, you mention cable - is this a cable path-loss test? And, are you asking what is the best signal type to use?
Comment: Yes that correct. This is for conducted RF testing. I usually see Continuous Wave signal used for performing Cable Loss Calibration to perform any RF tests. If the RF tests involve a 40 MHz signal, would still using the Cable Path Loss values obtained using a Continuous Wave signal stay valid to perform, say TX Power Tests.
Comment: Isn't center frequency a small fraction of the bandwidth? Is it OK to comment that using a modulated signal to characterize the cable loss at a test station would be more accurate, but using a CW signal would be just OK if not accurate, to test a modulated signal?
Answer: If you view the cable as a transmission line, you can model all of its characteristics using standard transmission line formulas. This suggests that single frequency tests at the spectrum limits should provide most of the needed information.
Take care however, that your tests
also examine group delays given the wide spectrum of the application. With careful phase change measurements across the application spectrum, you will be able to predict any possible group delay effects.
Comment: This would mean, modelling the losses by the transmission line/cable could be done at the chosen frequency within the bandwidth, which can be used as reference to test your actual modulated signal which contains a complex signal of multiple CW signals within that channel?


Magic the Gathering - What to do with permanents that only work "until end of turn"?

Question: I specifically have a Trial of Solidarity that is only active "until end of turn." I am wondering for this and other relative cards, whether they are to be discarded at end of turn since they are used up, or if they remain as permanents with no use? It is especially important for this card, since it has an additional effect that depends on another card's entering the battlefield AFTER its been played.
Answer: An enchantment is a permanent, and permanents remain on the battlefield indefinitely. Only another effect can move them to another zone.

110.4. There are five permanent types: artifact, creature, enchantment, land, and planeswalker.
110.1. A permanent is a card or token on the battlefield. A permanent remains on the battlefield indefinitely. A card or token becomes a permanent as it enters the battlefield and it stops being a permanent as it's moved to another zone by an effect or rule.

You are correct that once a Trial has entered the battlefield and done its thing, it's practically useless. When you play a Cartouche and return the Trial to your hand, you can cast the Trial and get its effect again. You can play the Cartouche the same turn or any number of turns later. The Trial will remain on the battlefield until something happens to it.
The idea behind the "Trials" card cycle is that you get a one-shot effect that you can reuse with Cartouches, with the downside being that the combo can be broken by e.g. destroying the Trials while it's sitting uselessly on the battlefield.
Answer: Trial of Solidarity has two abilities that are both triggered abilities. The first one triggers when the Trial enters the battlefield, and creates an effect that lasts until the end of turn, and then other triggers when a different card enters the battlefield, and returns the Trial to its owners hand. In the first ability, what lasts until end of turn is not the permanent itself, but the effect created by that ability.
Comment: It's just a permanent. It has a triggered ability that creates an effect and that effect exists independently of the Trial itself. The Trial doesn't say to take it off the battlefield or move it somewhere else when that effect ends or at the end of the turn, so you don't, you just leave it there.
Comment: @slaiger Note that even though Trial of Solidarity will not normally be helpful in future turns, it still matters that it is there. Things such as Devotion or Ascend care, for example.
Comment: Understood. With that being said, does that then mean that Trial of Solidarity would simply remain on the field as a permanent after the turn is over, with its effect having expired?


How should I add extra SATA ports on mini itx system

Question: I have a home server running Proxmox with a few VMs running. I currently have 5 shucked 8TB WD Ultrastar disks running in a TrueNAS VM using a m.2 to SATA adapter and I directly pass the adapter to the TrueNAS VM. This setup worked flawlessly until a few days ago.
Recently I moved apartment and upon booting the home server, only the first 3 of the 5 disks get detected by TrueNAS. If I swap any of the disks, it is always the first 3 that get detected. (I haven't tested for power but I doubt that this is the issue and I can explain below) Due to my RAID setup, this isn't much of an issue as I have 2 redundant disks and can recover the data if needed.
My questions

Should I purchase a better m.2 adapter? If so which one?
Should I just rearrange the setup to passthrough the motherboard SATA ports? This solution is potentially troublesome as I may accidentally passthrough the boot SSD or the disks could be passed through without it's vendor info (which is used to identify the disks so I can physically swap them around and TrueNAS doesn't loose track)
Should I do a combination of the two, populate some/all of the motherboard SATA ports and purchase an M.2 to 2X SATA ports? I am not sure if each SATA port can be individually passed through, however, in Proxmox I can see 4 SATA controllers 2 grouped together with low PCIe address and another 2 grouped together with a much higher PCIe address. With limited testing I wasn't able to pass on board SATA controllers to TrueNAS.
Also, if you had my hardware what would you change/upgrade given that I want a highly reliable, self sufficient system and I do mention some other small problems below.

Current Hardware

Motherboard: X570 I AORUS PRO WIFI
CPU: AMD Ryzen 5 5600G (I used to use a 3900X, downgraded to to needing GFX and lower power usage)
RAM: 32 GB Corsair Vengeance (The RAM gets too hot to touch even in idle, should I get new ram? Possibly ECC)
M.2 to SATA: JMB585 M.2 to 5 SATA ports
Case: JONSBO N1 (it is pretty good but the front panel metallic piece makes a buzzing noise when using the disks and also limits airflow, so I removed it)
Boot Drive: 2TB Samsung 860 EVO SATA
Network: Mellanox ConnectX-3 CX311A (SFP+) 10GB

Hardware Arrangement

PCIe slot: Mellanox card
Front M.2: JMB585 adapter (every port is plugged in)
Back M.2: not used
SATA port 3 on motherboard is given to SATA SSD
The rest of the SATA ports on the motherboard are not used

BIOS Setup (relevant stuff)

SVM Mode [Enabled]
IOMMU [Enabled]
CSM [Disabled]
Everything is can be considered default

Probable cause of only 3 disks out of 5 showing
JMB585 M.2 to SATA
The JMB585 M.2 to SATA has been perfectly reliable, however from my small investigation, this adapter likes to corrupt some data (which I believe is corrected by the RAID setup). Maybe the JMB585 is broken? I see these logs in the boot sequence sometimes.
The JMB585 adapter is too thin for me to hotswap the drives as it would flex too much. The PCB is thinner than a regular debit card and perhaps the adapter stopped working due to flexing.
Shared/limited PCIe lanes
The motherboard has an "issue" where if you use both m.2 slots, the m.2 drives will be given less PCIE lanes (and only the first 3 drives visible like it is currently).
However, after noticing this problem I switched the boot drive for the SATA one and it worked as expected. There is now nothing using the PCIE lanes except the internal IO, M.2 to SATA, Mellanox card and 1 SATA SSD. So there is no reason for the Adapter to fail.
Booting the system with everything unplugged except the Boot SSD and M.2 Adapter yields the same results.
This M.2 limitation is not in the manual and I only found out after searching the internet after setting up this system.
The other two disks might not be getting power
I doubt that this is the case because in normal circumstances, after passing the JMB585 adapter through to TrueNAS. Shutting down the TrueNAS VM shuts down the disks connected.  When the host system is powered on, all the disks get powered on.
Currently shutting the TrueNAS VM with 3 of the 5 disks being connected does result in a quieter system but there is still the sound of disks running. So I assume that the first 3 disks are powered off and the 2 that were never connected remain in an idle powered on state.
Rebooting the system
When I had this home server in my previous apartment, I would reboot occasionally for various reasons and never ran into this issue again. Sometimes I would disassemble the system to clean and/or to do cable management. When transporting the server to my new apartment, it was wrapped in thick winter blanket and put in a suitcase and walked to the new apartment. The server showed no signs of damage during transport.
Answer: I've had troubles with ZFS RAID over consumer-grade SATA controllers, so this doesn't surprise me.  I think I would try some things:

Move your drives to the motherboard SATA ports.  Maybe you could put your boot SSD on a USB adapter so that you have 4 drives on the motherboard and one on the JMicron?  That will take some of the pressure off the JMicron SATA controller even though you can't eliminate it.

Supposedly the Orico PM2TS6 uses the ASMedia ASM1166.  I'd trust an ASMedia part over a JMicron one.

If you can find the space, I'd go for a proper enterprise RAID controller over a multiport SATA.  You don't need to use hardware RAID, but it should be robust to avoid data corruption.  LSI MegaRAIDs, HP Smart Array and Dell PERC can be found cheap on the used market and come in low profile form factor.  For that I'd use an M.2 to PCIe cable and then find somewhere to hang the RAID PCIe card.


passing return code to parent shell based on conditions

Question: I am running a wrapper within a wrapper  with the innermost having all my commands
Like this
<code> L4.ksh # topmost wrapper
    L3.ksh
        L2.ksh
           Nohup command > log 2>&1& # label that c1
           Nohup command > log 2>&1& # c2
           wait                      # w1
           Nohup command > log 2>&1& # c3

        L2_1.ksh
           Nohup command > log 2>&1& # label that c4
           Nohup command > log 2>&1& # c5
           wait                      # w2
           Nohup command > log 2>&1& # c6
</code>
what I want to do is capture exit status of C6 and C3. of course I will stick a rc=$? below it .Ok just did that .
Next -I want that when ALL commands L2 get over at that time Look at the status of C3 which is the LAST nohup in L2 and exit code of L2 should be that of C3 AFTER EVERYTHING in L2 has completed . Note these  C1 C2 etc are all  run in parallel.
When L2 finishes I will execute L2_1 the same way only after L2 finishes completely that is all processes in it finish off ( so C3 could have finished and C1 C2 are still running
- but all C's should finish off is the reqd. criteria )
Finally if the status codes of L2 and L2_1 are both 0 then L3 should return 0 else l3 should return non zero status code.
if I put capture the $? of the last command in L2 series ( C3 and C6 ) and  then put wait and then exit $rc
<code>            C3
            rc=$?
            wait
            exit $rc
</code>
for L2 and L2_1 both and then do a conditional switch  for status code of L3- would that serve the purpose ? or how best can it be done
ty
sam
Thanks Dogbane for your reply to capture individual PID's. The problem is that I dont know how many shells get fired. L2.ksh is a run-time generated shell that contains commands
so the question is how do I collect all PID's.I'd have to start some counter ? to keep track.
Isn't there a better way of finding out the status when all background tasks have finished their work in a shell and then  flag exit status of the last background task fired ?
Answer: I suggest you capture pids and wait on them as shown below:
<code>L2.ksh
   nohup command > log 2>&1& # label that c1
   c1_pid=$!

   nohup command > log 2>&1& # c2
   c2_pid=$!

   nohup command > log 2>&1& # c3
   c3_pid=$!

   # wait for c1 and c2 to finish.
   wait $c1_pid $c2_pid

   # wait for c3 to finish
   wait $c3_pid
   exit $?
</code>
Comment: Hi Thanks for your reply. I updated the question with a note on that rather than stick it here in the comments where it doesn'nt stand out and is hard to read.


Why do rainbows always appear to be far away from us?

Question: We know that the single rainbow we see is actually a continuous cone of rainbow. If so, why don't we see that cone instead of a single, far-away rainbow?
Answer: When sunlight enters a (roughly) spherical drop of water, it will be refracted at the entrance point, perhaps reflect one or more times off the interior surface of the drop, and then will be refracted again at the exit point. A significant proportion of the light enters, reflects once internally, and then exits, leaving at an angle of about 41° from the incoming ray. For a single drop, the light that follows such a path will emerge in a cone, centered on the sun and with a half angle of 41°.
When the light refracts at the air/water interface, the angle is wavelength-dependent. The result is that the cone is actually a conical rainbow, ranging from an inside blue cone at an angle of 40° to an outside red cone at an angle of 42°.
Of course, you can't see the rainbow from a single water drop, because you only see light that makes it to your eyes. So, the color (if any) you see from any one drop is the part of that drop's rainbow cone whose light hits your eye. The result is that your eye sees colors coming from a reversed cone of drops; drops at an angle of 42° between you and the sun shine red, those at an angle of 40° shine blue, and those between shine intermediate colors.
Now, why can't you see the cones of color as actual cones? Because the cones' apexes are all at your eye, so there's no way for your eye to see the depth of the cone.
And why does the light always bounce exactly once internally? Answer: it doesn't. Some light bounces twice and comes out at a slightly different angle, forming a double rainbow. Other numbers of bounces form other rainbows, but they're generally difficult to see.
Comment: Note also that you can't use optical parallax to judge the "distance to the rainbow" because (as you correctly point out) all the light rays are entering your left eye and your right eye at the same angle.  Since there's no discernible parallax between the two views, the rainbow appears to be "very far away."
Comment: @  Michael: The parallax of the rainbow is discernibly zero. Zero parallax means the observed image is _infinitely_ far away. For example, in geometrical optics, a zero parallax image is formed at infinity behind a lens, if the object distance is equal to the focal length.
Answer: The difficulty is telling them apart.
By construction, these "several rainbows" overlap in the field of view of the observer and, in general, especially for atmospheric rainbows, distances are usually large so it's hard to tell from where exactly the rays you see are emerging, even if the necessary droplets and lighting happen to be present in a large range.
However, you can create a rainbow with a garden hose, and then the rainbow is close to you and it's easier to test for the existence of the cone.
Answer: An interesting option is to treat your question as a simple geometrical optics problem with a virtual image at infinity. Then, the rainbow image produced by the rain curtain is the single apparent origin of the light rays received by observers, either eye or camera, at different observation locations. That apparent origin is a single 42° circle at infinite distance (because parallel rays appear to originate from a single "point" at infinity).
So your question why the eye does not see a cone instead of a single, far-away rainbow, is answered by pure geometrical optics. It is similar to looking in the mirror and asking why the eye sees an image, instead of the light rays and the particles of the mirror.


How can I stay anonymous in a LAN without Internet access?

Question: I need to perform attacks (SQL injection) on a server. I thought of using a proxy to be anonymous, but the topology is a LAN without Internet access. I have no idea of the protocols used in the topology.
Comment: Anonymous on a LAN? Huh? You need to define your definition of anonymity.
Comment: Why do you want anonymity? From whom do you want to be anonymous? The answer to these questions will help to define an answer. Also, you can use a proxy in a LAN, you just have to set it up.
Answer: Anonymity on a LAN is a bit of an odd question but here are some points to address which I feel may aid in your quest.
Firstly if you are on the LAN plugging in your laptop via an Ethernet port, I know where you are. Your physical being would easily be identifiable by anyone choosing to look.
For the sake of discussion let us assume a nice easy scenario, you are connecting to an open WiFi using a high gain antenna from a safe distance, this WiFi simply being a poorly secured access point to give access to the LAN via wireless means.
Change the MAC of your network interface
A mac Address is made up of 6 parts 00:D0:94:00:00:00 The first 3 parts make the vender ID (who is the creator of your device) the second part is the unique identifier of your device. While it could take a lot of effort to find out who has this MAC, it is just good house keeping (especially if you have used the MAC on the network for legitimate purposes)
Change your hostname
This is just another piece of the puzzle; and can leak information as to what device you are using. default host names can make it fairly obvious what you are using.
Block as much traffic as you can
Firewall off your device, you want as little information leakage as possible when remaining anonymous, lets say you accidentally a service running (e.g. a web browser). Once again its the puzzle as a whole, not each issue by its self.
Virtual machine
I would recommend attaching an network card to a VM and running the attack from inside it, keeping your host segregated from the network.
So many things
You could use so many different ways, such as network implants, compromising other machines, stealing user credentials, using an onsite work station. the list is truly massive. For a more relevant answer to you, you would need to provide a lot more information of the network, your proximity, the size/type of organisation and much more than what you have provided
Disclaimer
There is no guarantee in all of this but its a good foundation
Comment: I use 0050574E4552 as MAC for such activities :D
Comment: @Overmind I might have to use something like this in the future :P 00:09:BF:00:00:00
Comment: Looks good and has double meaning.
Answer: If the written contract which asks you to perform penetration testing at this organization also includes to check if the end users follow the security policies correctly, then this might be a good opportunity to check if everyone locks their PC when they leave their office. Using an unattended PC of someone else to demonstrate a vulnerability can be an effective way to demonstrate the importance of IT security to the end-users. It is a way to teach them that the security rules do not just protect the company but also protect them personally from wrong accusations.
But the question is what kind of security vulnerability you are trying to prove here. If an intranet web application is vulnerable to SQL injections, then it's vulnerable from every workplace which can access it. If you want to prove that the way they do access logging is unreliable, then you don't need to do so by performing an SQL injection.
Answer: If using Linux, set your firewall to deny everything that's not allowed, spoof your hostname, change your MAC address. If you are using Windows then leave this place.
Or maybe try to do it from another client.
Comment: I am severely unimpressed by the Windows quip. Elitism has no place here.
Comment: Why is Windows a problem? What do you mean by "leave this place"? Also, as mentioned above, can you add some detail as to why the things in your answer are important for anonymity?
Comment: I think you should add more details as to why these things are important. Maybe mention about basic inventory practices that could determine even your location in the building due to the Ethernet port you have put plugged your lan cable into
Comment: If somebody knows( 99.999% likely) that on port i.e. 2/12 FastEthernet is connected to patch panel that's connecting to the ethernet wall plug on 4th flor, room 5. Than it's pretty easy to locate you. That's why you should probbably do it via some victim's machine.


The relation between acceleration and inertial force

Question: Acceleration causes inertial force, and it is not relative, but why?
What is the reason for feeling inertial force by acceleration?
Answer: Inertial forces, also known as pseudo-forces or fictitious forces, appear in accelerating reference frames; the inertial obsever sees their action - centrifugal forces, Coriolis forces, Euler forces, as well as responses to simple acceleration.
The pseudo-force laws all appear in the form of Newton's Second Law of Motion, F=ma.
The occupant of the spinning teacup feels the centrifugal force! It is prportional to their mass. They also respond to the sudden stopping of a car, hence the utility of air bags.
D'Alembert was the first to devote extended effort to analyze inertial forces. His results paved the way for analytical mechanics.
Einstein, while working on the puzzle of how to fit gravitation into the framework of Special Relativity, noted that Newton's Universal Law of Gravitation was of the same D'Alembertian form, decided that gravitation must also be a pseudo-force, starting him on the long path to General Relativity.
So, in conclusion, pseudo-forces always appear linear in the mass and the acceleration. As Isaac Newton noted in his famous whirling bucket experiment,  acceleration is always absolute with respect to every inertial reference frame.
Comment: Ok I make the question more clear:
Comment: Is there still a question? I've explained how it works. The why is that it is consistent with the laws of motion.
Answer: You don't feel "inertial force".   What you feel is the friction of the floor on your shoes, or the side of your car pressing against your body.  These are perfectly real forces caused by the non-uniform motion of something in your environment interacting with you as your inertia tries to keep you in uniform motion.
Comment: Is there a physical reason for the inertial force ?
Comment: Hello. A question if I might: When we accelerate, don' t we feel a force opposite to the direction of acceleration, in our reference frame? Thank you.
Comment: @ConstantineBlack Yes.  Note that I'm focusing on the word *feel* that the OP used, making a distinction from the word *observe*.  What is the agent of the force that you *feel*?  In an accelerating elevator, it is the floor producing a greater normal force on your feet.  In a cornering car it's friction between the seat of the car and your back and bottom.  If you were floating in a spaceship which begins to accelerate, you would *observe* that your path is non-uniform in the frame of the spaceship, but you would *feel* no force at all.
Comment: OK I make the question more clear: point X and Y in space are getting far from each other with acceleration (a). If they move by a constant velocity there is no difference between X and Y but when they get apart by acceleration only on the real moving mass we will observe or feel inertial force. The question is "why" not "how"
Comment: @Reza  What do you mean by "real moving mass"?  I'm afraid I still don't understand the question.  Perhaps someone else does?  I recommend editing your original post.  It will then get more views.
Comment: Inertial force is real, you will feel the force with all your body cells. By certain acceleration all amount of our blood will move to the opposite side of acceleration. If a mass moves without acceleration its movement is relative and actually there is no difference between moving point and motionless point, but if it accelerates only the moving point will experience the inertial force. the question is what makes this difference and how.
Comment: @Reza  Only if your body is in contact with an accelerating object, like a wall or a floor. The *normal* force, a real force, produces the acceleration that you speak of.


InDesign CS6 quality difference "Export to PDF" vs "Print Booklet"?

Question: Using InDesign CS6, I regularly create booklets of anywhere from 8, 12, 16 to 32 pages for offset printing.
For this I typically use the Print Booklet module, set to create a PDF file at Press Resolution.
Occasionally I have a single or double-sided insert for which I generate a separate PDF, using the Export to PDF module, with the same Press Resolution setting.
I noticed that these 'single page' PDFs look markedly different than the PDFs created with the Print Booklet function - which are far superior in terms of contrast.
To make things even stranger, the Print Booklet function generates files that are significantly smaller than the Export function PDF files.
My workaround has been to create a 4-page "booklet" with the same material on each of the pages, and then delete the superfluous pages from this booklet. This does not make any sense.
Any suggestions, anybody?
Answer: Suggestion/Answer
All you need to do to get your desired PDF is to File > Print your insert from InDesign, and select Adobe PDF as the printer the same way you're doing in the Print Booklet window. This should create a PDF of the same quality/contrast/size you're used to seeing from the Print Booklet method.
For the most accurate output though, I think  you may want to continue using File > Export instead to create your PDF though - but any difference in the final printed output may be negligible. Read on if you'd like to know why, or at least why I think so.
Why it Happens
Someone with a press background will likely be able to give a more accurate answer, but in case they aren't around, hopefully this can provide some assistance.
When using File > Export to create a PDF, InDesign writes the vector shapes, fonts, characters, and raster artwork directly to a PDF according to your specified PDF settings.
When using File > Print Booklet or even File > Print and selecting Adobe PDF as the printer, even though a PDF file is the destination, InDesign is outputting everything as it would to a printer (PostScript language?), and then Adobe Distiller is converting that printer language output in to a PDF file according to some PPD (PostScript Printer Description) file definition.

I may be mistaken, but I believe the File > Export method provides the most accurate output as a PDF file. Here is a comparison of two raster images zoomed at 1200% in a PDF outputted by the File > Print > Adobe PDF (left) setting vs File > Export > Adobe PDF (right).

Additionally, process colors seem to be routed through some conversion process when using the File > Print > Adobe PDF method. Here is the color swatch as defined in InDesign:

When viewing separations in Acrobat, the PDF output by Export has the same process color values:

But when Printed to a PDF, the process values are slightly changed:

This is all based on my experience though, and not on any credible training. I may be completely wrong about all of it.
Answer: apex is about 99% there at the answer. the Distiller settings are making the difference you see. the different presets will change the colors depending on output. they'll lower the amount of ink for papers like newsprint vs coated and whatnot. with export you can choose the Distiller preset, where as with print booklet, you can't.
but best way to deal with the color shift, in my experience, is in the print/export setting, play around with them if time permits. i suggest that you DON'T let indesign determine colors.


FIFA approved sensors for Soccer

Question: There are many dedicated sensors available for soccer games and major clubs have stated to use them. Are all these sensors (as listed in the link) approved by FIFA? I know that FIFA has approved Goal Line and VAR technology recently. I want to know the list of sensors that are approved by FIFA till now.
Comment: As listed in the link? List them here please. The question should be complete.
Answer: The Laws of the game allow only specific gear:

Players (including substitutes/substituted and sent off players) are
  not permitted to wear or use any form of electronic or communication
  equipment (except where EPTS* is allowed). The use of any form of
  electronic communication by team officials is not permitted except
  where it directly relates to player welfare or safety.

<code>*</code> Electronic performance and tracking systems
And if EPTS are allowed:

Where wearable technology (WT) as part of electronic performance and
  tracking systems (EPTS) is used in matches played in an official
  competition organised under the auspices of FIFA, confederations or
  national football associations, the technology attached to the
  player's equipment must bear the following mark:

So (except for health and safety devices) only EPTS devices are allowed in certain competitions and they must have that mark. Anything else is forbidden.

FIFA approved sensors for Soccer


How To Restore Locked iPad Air 4th Gen. with Windows 10 and iTunes (2016/2020)

Question: How can I restore my iPad with a Windows 10 machine if I don't remember the password and the iPad is in locked state?
Basically, what are the clear steps to get me back on-track without going back to the Apple store? I have installed the latest iTunes on my Windows 10 machine and the iPad is not recognized, the restoration process cannot be initiated.
Answer: I put a series of best practices to restore the iPad Air below after the long paragraph description.
Description:
I spent about 4 hours figuring out the steps below to get my iPad Air restored shortly after purchase. I did not have the password set during the original install, so the iPad Air got in a locked state. I have a MacBook Pro that does not run the latest OSX. I cannot connect and restore my iPad Air. I decided to do the restoration with a Dell laptop running Windows 10 Home edition (Version: 2004, OS build: 19041.985, Experience: Windows Feature Experience Pack 120.2212.2020.0)
First of all, there is a major problem with the iTunes installer on Windows.
I have noticed the latest versions of iTunes (12.10.11) do NOT install the Mobile Device Support Driver files. The only way to have them installed is by installing an older version of iTunes(see below why). So basically if you have a new Windows computer with the latest iTunes 12.10.11 from Dec 7.2020 you do not get the driver files. It means that when you put the iPad in restoration mode, Windows does not detect it when you connect it to the computer over USB-C.
There is very little online about this issue and how to solve it properly. Most of the support ask to re-install iTunes, unfortunately, you have to remember that NOT ALL versions of iTunes are equal (this comment is directed to the support teams at Apple and Microsoft!).
I found one website that would provide the driver files by themselves so they can be dropped in the file system. I thought I would look for the actual version of iTunes that would install the driver files.
I tested iTunes 12.10.11 64bit version from Dec 7, 2020, as explained, followed by iTunes from Mar 25, 2019. Finally, the iTunes 12.4.3 64bit from Aug 1, 2016, is the release that installs the driver files. From that install, it is possible to upgrade to the latest iTunes, so you would install the latest version for August 15, 2021, which is version 12.10.11. It installs well over the 2016 version without compromising the driver files.
Now at that point, I thought I was good to go with the proper driver files installed on my Windows machine. I put the iPad (Air) into recovery mode and got it connected to the Windows machine. I heard the usual Windows sounds when devices are connected (USB), I also almost right away heard the Windows sound for disconnection. Looking at iTunes it would not show the iPad at all. The Windows Device Manager would not list the iPad Air under Universal Serial Bus controllers!
So my last move was to connect another Apple device to see if the issue was related to the iPad Air or iTunes. I connected my iPhone, UNLOCKED the screen and the phone showed up in iTunes. Next, I put the iPad Air in restore mode and connected to the computer, to my surprise, iTunes recognized the iPad Air this time with the option to restore it. From that point, I initiated a first restoration which failed with an error message, followed by a second restoration that succeeded.
List of lessons learned and best practices to restore the iPad (Air):
(Windows 10 user only)

If you don't have the iTunes version from August 1st, 2016, installed on your computer, remove iTunes and re-install the iTunes 12.4.3 from 2016. It will guarantee you have the proper files under C:\Program Files\Common Files\Apple\Mobile Device Support

Update the iTunes to the latest version, 12.10.11 (latest for this post on August 15th 2021).

If your iPad Air is in a locked state, and you don't have a password, connect to another Apple device and unlock the screen. What it will do is help iTunes to recognize the iPad Air later on. That's a weird step, but it works.

Initiate the restoration of the Apple iPad Air (twice if needed) via iTunes.

None of this is trivial and, by neglecting the iTunes installer deliverable, Apple generated a tremendous amount of support for both Microsoft and Apple on a procedure that should be trivial. The outcome of the support does not help in the condition that I faced. No posts at Microsoft or Apple addressed my needs. I do believe I am not the only one struggling with this issue and, pretty much every single user running Windows 10 with a recent computer would face the same problem(scary!). We do not expect to do a restoration every day. At the minimum, we should have the Windows installer doing the proper thing.


Why in the Year 3000 do they still have cars shaped like cars from our time?

Question: I mean through out the whole show cars are depicted almost exactly the same as cars from our time, except for the lack of wheels. You would think that people 1000 years more advanced than us would be able to come up with a new design.
Answer: I say it's nostalgia and marketing...As evidence for this I reference the existence of New New York, Mom's Friendly Robot Company ads and just human nature in general. For every viewpoint, you can use nostalgia to sell it! That, I believe, is the simple, unadorned reason that cars look the same in the year 3000.
Answer: The requirements for a car in 3000AD are probably very similar to those of cars today i.e. get people around comfortably, safely and cheaply, so they'll end up with broadly similar designs. Certainly demands of fashion will affect the decorative bits that car designers add to distinguish their models, but until material wealth becomes irrelevant I suspect cars will look broadly similar.


surjective and injective mappings between finitely generated groups

Question: I wonder how much surjective and injective mappings can describe finitely generated groups ?
More specificly,if there are two finitely generated groups $A,B$, with a surjective homomorphism $f:A\rightarrow B$,and an injective homomorphism $g:A\rightarrow B$. Then can I say A is isomorphic to B? If so,can f or g be non-isomorphism?If not,under which condition can I derive a isomorphism?
Actually,My question has been solved in the case of finitely generated abelian groups.
Answer: Let $F_n$ be the free group on $n$ generators. Define $g:F_3 \rightarrow F_2$ as the map which sends the third generator to identity and preserves the other two. This is a surjective morphism. There's also an injective morphism: send the three generators of $F_3$ to $b, aba^{-1}, a^2ba^{-2}$. Notice that this is not a surjection; for example, $a$ is not in the image.
Comment: a nice construction! Thx!
Answer: So you have an surjective mapping $f:A \rightarrow B$ and an injective mapping $g:A \rightarrow B$.
Ignoring the fact that A and B are finitely generated Abelian groups, what can we say about A and B as sets? This may give an answer to your question.
Comment: Actually, let A=B, and consider a non-hopfian and non-cohopfian group.Then there exits a surjective but not injective mapping and a injective but not  surjective mapping.So I think it's not that easy...
Comment: I can't find any specific examples satisfies non-hopfian and non-cohopfian, and that's another question for meQAQ


Bike handlebars loose with front wheel

Question:
If I put my leg on the side of the wheel and rotate my handlebars in the direction of my leg, the bars get out of sync with the front wheel as seen in the image below.

This is a threadless headset.

Do y'all have any ideas?
Comment: In your last photo - it looks like you're missing a pinch bolt completely.  One's not enough, and runs risk of you overtightening it.  Get another bolt from a bike shop.
--- scratch that I see its coming in from the far side.
Comment: @Criggie: The top pinch bolt is visible on the first picture. But what worries me is the fact that the end is not visible in the threads. On all the bikes I have of the type the bolts sit deeper.
Comment: Yes they do look oddly shallow. A rule of thumb is 7 threads gives full strength. That is 7mm of thread for M6 bolts
Comment: @Henry Crun: IMHO they have been replaced by shorter ones which might be an explanation for the slipping stem (?)
Answer: Tighten the pinch bolts, not the centre bolt.
I recommend putting a drop of oil on the pinch bolts thread or greasing them, as they are steel-in-aluminium, and prone to corrosion.

The two pinch bolts (on the back side of the stem) hold the stem on, and perform two separate effects

They stop the handlebars rotating
They lock the steering bearings.

The top bolt is for setting the pre-load of the steering bearings.
BUT once the pinch bolts are tightened, it does nothing, as the stem is now clamped in place. You cannot tighten the bearings UNTIL you loosen the pinch bolts. If you loosen the pinch bolts, then you should check that the bearings are still set right.
If you try to tighten the bearings by cranking down the centre bolt without loosening the pinch bolts, then you pull the star washer up or you can shear it, as it is only an M6.
Comment: Good answer addressing some incorrect information in other answers.
Answer: Tightening the two bolts on the back side of the stem should prevent it from turning freely. Make sure you align the stem and front wheel before tightening.
The bolt on the top is for adjusting the headset. If the headset does not have problems, you should not need to adjust that bolt.
Answer: Very likley you have to tighten the screw in the middle of the stem, aka the one in the middle of the cap that says "Giant".  You don't want to tighten into too much however, because then steering will become very hard.
This video gives good explanations.

The procedure is both the same on roadbike and mountain bike.
If you feel unsure what to do, got to your LBS to repair this - if wheel/handlebar become desyncronized while riding the bike you'll face major injuries.
Comment: The centre bolt is used to adjust the bearing preload *when the pinch bolts are loose* , it does not clamp the stem.
Comment: Sorry, this answer has incorrect information. The bolt in the steerer cap *does not* tighten the stem, it is for preloading the headset bearings. The two bolts in the back of the stem are for tightening the stem to the steerer tube. Follow the The GCN video and you'll be OK.
Comment: I forgot to say that this happens even though I have tightened my stem bolt to the max, without a torque wrench.

Bike handlebars loose with front wheel


Just finished learning x86 assembly language. What can I do with it?

Question: I just finished learning assembly language. But I couldn't understand what could I implement (for practice/like small project). Would be great if its something useful for anyone.
Comment: You learned assembly with no specific reason?
Comment: I learned to understand the internals. Well now I know how things exactly work.I can see them. I compile my C codes into asm and view it. Things are making sense to me.

Should one learn asm, for a specific purpose alone?
Comment: It's not always about implementing. Moderate knowledge of assembler can help quite a lot when debugging (especially if you ever run into a code generation bug of the compiler you use).
Comment: Is this community wiki? Not sure there is one correct answer here.
Answer: One of my favorite hobbies is Reverse Engineering.
It requires a solid knowledge of assembly and the use of disassemblers/debuggers to walk through compiled code.  This allows you to alter, understand and reverse compiled programs.  Each new program is like a puzzle waiting to be solved!
For example, a lot of people reverse games like Minesweeper when they are first starting out.
Here is a screenshot of a key section of code in Minesweeper I reversed awhile back (comments on right-hand side):

This was located by placing a breakpoint on calls to the rand() function and stepping backwards in the callstack.  After some digging it becomes obvious that:

Minefield Height is located in 0x1005338
Minefield Width is located in 0x1005334
Minefield Baseaddress is located at 0x1005340

With this knowledge it becomes easy to determine the location of any given mine in the minefield by:
cellAddress = mapBaseAddress + (32 * (y+1)) + (x+1);

Then, with a simple loop and some calls to ReadProcessMemory() you've got the ultimate Minesweeper hack!
Reading hand-written assembly is far easier than reading machine generated assembly.  Modern compilers do some magical and crazy things to the code for optimization that can sometimes be difficult to follow.  So, this will definitely push your assembly knowledge!
There are tons of activities that can branch off from this:

Reverse hidden API's in libraries
Write advanced game hacks using DLL Injection, Code Caves, Function Hooking and more!
Understand the limitations of various protection schemes employed by software
Reverse a fileformat that isn't published or known and write code to read this format for interoperability purposes.
Write emulators for various systems (including older game systems!)
Understand how a well-known program does a particular task.
Reverse malware and viruses to see how and what they do.

And more!
If you are interested, I highly suggest the book: Reversing: Secrets of Reverse Engineering
Comment: @user25464, I believe that is Ollydbg.
Comment: What software are you using @Simucal?
Answer: You can learn how OS work at low level (interrupts, virtual memory and so on).
First write a bootloader which will give you full access to the hardware, then you can start playing with protected mode, VGA programming and so on.
Two good resources:
http://wiki.osdev.org/Main_Page
http://www.osdever.net/FreeVGA/home.htm
[Edit]
If you want to learn about optimizations, check out Agner Fog's website: http://agner.org/optimize/.
[Edit]
Copied from Simucal's comment:

You might want to add a link to MikeOS also. It is a small operating system written in Assembly that is designed as a learning tool to see how simple operating systems work. It has well commented code and documentation: http://mikeos.berlios.de
Comment: You might want to add a link to MikeOS also.  It is a small operating system written in Assembly that is designed as a learning tool to see how simple operating systems work.  It has well commented code and documentation: http://mikeos.berlios.de/
Comment: I wish I could pick multiple answers.
Answer: Today, assembler is used in these areas:

Kernel/OS development. Ask the Linux guys or check out the other OS projects out there.
Compiler development (someone's got to translate the higher level languages to the CPU)
Driver development
Embedded devices (but more and more are moving to higher level languages here, too ... my set top box runs Python)
Game development for special effects (but this is mostly in specific assembler dialects for the graphics card)
Answer: Depending on how well you learned assembly, you could try writing firmware for small microprocessors or even for small devices hooked up to your computer. You could also try writing full software applications in assembly and give them a nice looking GUI.
Generally speaking, from my experience, assembly isn't as useful in programming massive software projects because for a lot of applications, speed doesn't really matter (at least, not in the days of multi-core processors) so what you can do is somewhat limited.
Comment: Also, if you're not really good at optimization of the code, chances are that the compiler will generate faster code anyway.
Comment: Speed matters, but fortunately you don't need to write in assembly language to get great speed for your apps. Also, you pretty much need to be a assembly guru, to beat a modern compiler at optimizations.
Answer: This may seem very cliche, but you could try and answer some of the questions over at projectueler using assembly.
Answer: Optimization. Learn how to use Intel's VTune if you program on Windows. Here you can see where your bottlenecks are. Then rewrite those routines in assembler.
As most modern software changes all the time this is more an intellectual exercise and self satisfaction in getting something to run faster then of benifit in the real world.
There are one or two people who have re-written many of the core C primatives, memcpy, memset etc. in assembler tailored to the runtime CPU. So the code is bigger as it has extra routines to take advantage of CPU extensions, SSE etc but faster. These C primatives often end up in many packages .dlls as most programs do memory stuff all the time.
Answer: You could take a look at the liboil project:
http://liboil.freedesktop.org/wiki/
Its a library for highly optimized innerloops.
Most of the loops already have a x86 assembler implementation, but there are still some loops left to be rewritten.
Answer: I suppose you could try code-golf
There is also at least one O.S. written for the PC in assembly: MenuetOS. (I have no idea why.) They may want contributions.
I understand that prior to the invention of C in the early 1970's, most operating systems were actually written in straight assembly. I wouldn't recommend doing that, but you could write a stand-alone program, just for fun.  Note that the CPU will start up in 16-bit mode and it's quite difficult to get it to switch to 32-bits. It's probably best to just write the stand-alone program in 16-bit x86. You might use a simulator for development.
Answer: You can look for a robot or a controller that can hookup to your Parallel port and write some cool key handlers to control them. You can also intercept the BIOS calls like Int13 for Disk and write some disk mirroring tools, RAID drivers etc. You can hookup some transducers like Temp/vibration/pressure etc and do some data acquisition.
Answer:
Would be great if its something useful for anyone.

You've familiarized yourself with low level operation of computers.  Being able to read assembly may help you understand how your compiler behaves.
The rest may call some criticism, because it reflects a polarized view.  One day after a one woeful embedded project, my mentor told me: "If anyone working for you writes in assembly, fire him to keep your own job."  I agree with him.  From a programmatic standpoint, writing in assembly is too troublesome.
Answer: At the very least you can now output assembler from gcc like this:
gcc -c -S test.c -o test.asm
Then you can inspect the output of generated C code for educational purposes.
Answer: If you're already a developer in a higher-level programming language, assembly language allows you to create optimized routines/functions. I don't know about the others, but Delphi, for instance, allows you to perfectly integrate assembly code into any unit, and takes care of the function parameters etc.


Block finalization stops after nominating 4 validators

Question: I am running a substrate private network on polkadot-v0.9.36 and observed something, i.e., after nominating 4 validators from a single nominator finalization got stopped which  i didn't expected, as per the document of polkadot a nominator can nominate upto 16 validators but in my case it is not happening. Can anyone help in this.
Answer: I don't think this is related to the nominator.
Please check your validator configurations.

Make sure you put the session keys in their keystores
Make sure they are using different session keys
IIRC, there is an issue that you need to restart your node once you put the GRANDPA key in its keystore; otherwise, it won't work
Comment: I have done all the things right as you said but still getting the same issue.
Comment: Can you add more detail to the question? How do you check these?


Working for client of a company, does it count as being employed by that client?

Question: I am currently working in a consulting role, officially employed by company A, and am currently working on a project in collaboration with one of my current company's clients, company X.  When looking at other positions, I noticed a couple of positions with this company and have applied.  While filling out the application, there was a question which asked "Have you been employed by company X, Y or Z?", where one of the companies listed was the client which I am working for under the consulting company.  I'm slightly confused as to whether I should say yes or no, as officially, I work for company A and not company X, but I'm worried as to whether if I say "no" it could cause any problems as far as conflicts of interest go if I were to move on in the hiring process, since I have worked with company X in some capacity as part of working at Company A.
Comment: "Have you been employed by company X, Y or Z?"  Is this like a "yes no form", ie with a checkbox, on a web page .. or, do you write in an answer?
Comment: Why don't you contact someone at X and ask them what to put, given your situation.
Comment: @Fattie It's a Yes/No.  Some of the answers seem to suggest "No"
Comment: Have you checked the terms of your contract with Company A to see whether you are prohibited from even applying for a job with Company X?
Answer: You have worked with company X.
You have maybe* worked for company X.
But you have not been employed by company X.

If it's a simple yes/no question then the answer is no. If they give you space for a more lengthy response, then mention the collaboration.

* Depending on how different people interpret the word 'for' as it relates to your consulting relationship.
Answer: "Employed by" means equally "the name of the company who signs your paycheque" or "the name of the company co-signer of your employment contract".  Both of these are the consulting company, not the client.  Therefore you have not been employed by the client.  The answer is no.
If something comes up in an interview setting where you may want to mention you've done work for this company before, then feel free to mention it (if you're allowed to; I worked for a consulting company once where part of my NDA was to not disclose the names of my client companies), but for the purposes you're asking, the answer is no.
Comment: It's entirely possible that the OP works _with_ employees of Company X, so he may be known to one or more of them. If his NDA prevents him disclosing his work _for_ X, he could indicate that "I'm known by some of your employees on a professional basis".
Answer: Just be transparent and honest.

While employed by A, I collaborated with X from September 2020 until the present.

Legally, it's clearly not the same thing to be employed by X as opposed to collaborating with X - you have a contract of employment with A, not X. But the company you're applying to will have a reason they've put this question on the form, and they possibly aren't actually concerned about the legal pedantry. However, nobody here can tell you what the reason for including the question is, so the best thing you can do to ensure you don't end up in hot water in the future is to be fully transparent about what the situation is.
Comment: Philip, I probably wouldn't use the word "collaborated" to describe ordinary old contracting.  It's quite confusing.  For example, Steven Spielberg "collaborates" with Disney.  But I, a mere programmer, certainly don't "collaborate" with Disney!  I happened to contract at Disney.  But not "collaborate!"
Comment: I'd say the usual language is "contracted to".  Hence "I was contracted to X from A for 18 months".  For example, "I was contracted to Microsoft from ComputerPeople for 18 months."
Comment: Thanks, that makes more sense now. :)
Comment: Another way to phrase it is "While with ComputerPeople, I was contracted to Microsoft for 18 months."
Comment: @Fattie I'm following the language in the question "working on a project in collaboration with one of my current company's clients, company X" which doesn't sound like a normal contracting relationship.
Answer: Tl;dr
Be honest, and use initiative to contact the employer and clarify ambiguities.
The long read
To offer an alternative perspective here, a crucial mistake people often make is to assume that the party putting a question (typically an organisation) has, like Humpty Dumpty in Through the Looking-Glass, the right to decide on the meaning of any words they use, and that the party putting an answer to that question (typically a person conducting their own affairs) has no such right.
In law, the opposite is often the case, as with the contra proferentem rule, where it is the person interpreting the material who is given the benefit of the doubt, not the person drafting the material.
I don't think "who have you been employed by" is any different from "who have you worked for". If the question were legally specific about contractual relations, it could say "have you previously entered into an employment contract directly with companies X, Y, or Z?".
But candidates would usually find this sort of wording vexatious, and difficult to parse precisely because it is legalistic and precise in a way that doesn't correspond to everyday forms of communication. Some might ask what the distinction is between direct and indirect. Legal eagles might wonder whether a transfer of undertaking counts as an "entering into".
As it stands, the question could perhaps be answered in either fashion, by saying either yes or no. A person attributing a legalistic meaning to the word "employed" can rightfully say no, and a person whose contract is with a connected company but who works substantially at a workplace where the name above the door or at the end of the telephone is Company X, can equally say yes.
If there is reason to believe that the company is asking the question for the purposes of establishing a conflict of interest, the bias towards yes answers would also be the most desirable for triggering further enquiries into possible conflicts at the earliest stage.
This is not to promote obtuse or absurd interpretations of words - such as an electrician claiming to have worked for an insurer because he was once called in to fix a light bulb there - but to emphasise that words often carry a range of possible and plausible meanings, and questioners themselves often do not intend a narrowly legalistic meaning, nor are answerers bound (even in law itself) to attribute only a narrow legalistic meaning.
And except amongst practising legal professionals, people cannot be assumed to even have a correct knowledge of the law or the subtle conceptualisations that exist there.
Of course a HR department can play Humpty Dumpty with new applicants, and reject on a whim before they have offered any employment to the applicant, but they can do that equally with candidates who employ legalistic responses to questions which are asked in a broad and commonsense way.
The lesson here for candidates is to be honest, and if there is an appreciable lack of clarity as to how a question applies to particular circumstances, and a job hangs in the balance, then use initiative to seek clarification and reach a meeting of minds with the would-be employer about the purpose of the question.
For those drafting application forms, the lesson is to be prepared to interact. Ensure that you are easily accessible to candidates completing application forms who may have questions, don't make them tiringly long or difficult to parse (as people will start having to economise on the attention paid to any particular answer), and ask questions only at appropriate stages in the process where candidates have enough perceived investment to chase clarifications (or ask simple questions early, but in ways that are unambiguously biased towards getting the things you are trying to find out, and then target further questions later to filter out the things you don't actually care about).
Comment: "the bias towards yes answers would also be the most desirable for triggering further enquiries into possible conflicts at the earliest stage." ... or more likely, for the application to be sent straight into the trash bin.
Comment: @MSalters, quite possibly, but that perception arises through the fault of employers; from the commonsense perceptions they create amongst applicants by the way they (either individually, or as employers collectively) have habitually treated applicants in the past, that their applications will be handled arbitrarily or rejected for spurious convenience. (1/2)
Comment: The point is that applicants have the right to answer the question according to any plausible interpretation of the question, including what is plausible at face value and offhand, which is not necessarily the interpretation that the questioner intends. This is different from some other answers which suggest the only relevant interpretation is one that depends on the most careful parsing and legalistic meanings, which as I say could just as easily incur rejection from HR. Employment applications are not (generally) contracts concluded between a pair of experienced employment lawyers. (2/2)
Comment: @Steve As a contractor...it's usually pretty clear that you are not employed by the client. As in, lots of e-mails with "XYZ employees and contractors" or "this does not apply to contractors" or "employees only". There might be an English language interpretation, but not a plausible one if you've been a contractor for more than about a month.
Comment: @user3067860, I disagree. You're simply falling back into the trap of holding that they control all aspects of the English language, or that all matters of interpretation are to be brought back to the details of employment or contract law. What they call an employee, and who you practically speaking call your employer, need not be the same thing. (1/2)
Comment: Businesses often engage in such song and dance about the contractor/employee distinction not because they have the power to rewrite the English language, but to introduce their interpretation to you for the purpose that you will come to accept it, and thus abandon the ordinary or obvious reality of the situation in favour of the contractual sophistry which they have arranged. (2/2)
Answer: Unless this is a particularly small/new company, they have had plenty of opportunity to revise (in both the British and American sense) their application questions. Think about how much time it would take them to go over their questions and make sure that the questions meet their needs for clarity. And think about how small that amount is amortized over all their applicants. Now think about how much time it took you to think about the question, go to SE, post your question about the question, and peruse the answers.
I expect that the ratio between those two times is rather large. Is your time really that much less valuable than theirs? If your answer causes them to have a false belief about you, whose fault is that really, and how much responsibility do you have to prevent that?
Make your best guess what it means, and move on. The flip side of "HR is not your friend" is "You aren't HR's friend". If they made a mistake as far as making something sufficiently clear, you aren't obligated to bend over backwards to fix it for them.