ESTA approved, despite new rules? do we have to apply for visa?

Question: I am a Danish citizen but born in Iran of Iranian parents but have not traveled to Iran. My children are born i Denmark and have only Danish passport and never visited Iran.
We have approved our ESTA for traveling to US july 16, however, after the new rules, I am not sure whether we qualify for entry under the VWP? If our ESTAs are not revoked, does that mean that we are qualified? I can't see any reason that my children can't travel under VWP??
Comment: Did they ask about your other nationalities when you applied for the ESTA? If so, did you disclose your Iranian nationality then?
Comment: Yes we did. about my children, they have never been registered, they only have danish citizenship, but I am afraid, that they automatically are considered as iranian, since their father is iranian too (law of the country).
Answer: If I understand the new rules correctly, the important thing is not whether you currently hold an Iranian passport or not, but whether you're a citizen of Iran. Did you successfully renounce your Iranian citizenship when you acquired Danish citizenship? If not, then you're hit by the new rules and need to get a visa for yourself for the trip.
US authorities have stated that they will revoke the ESTAs for travelers they know are covered by the new rules, but even if they don't currently know you might still get into trouble if they find out later (say, when you present yourself at the airport).
If your only current nationality is Danish, and you haven't been to Iran (or one of the other targeted states) later than 2010, then you should be good to go.
Comment: @Amanda: From a quick Google/Wikipedia search it looks like your children are not Iranian citizens (assuming, based on your user name, that you're a woman), since Iranian citizenship is inherited only through the father -- that is, of course, assuming their father is not also an Iranian citizen. There shouldn't be anything against traveling as a group where some are covered by VWP and others have a visa.
Comment: I have not actively renounce the Iranian citizenship, so I think I still automatically am Iranian citizen (though lived in DK for 30 years). So you mean despite the approved ESTA I need to apply for VISA... But what about my children which was born i DK and they have never been registered in Iran, only in Denmark. Can they travel under VWP only having ESTA and me having VISA? would that give problems?
Comment: @Amanda you can also ask about your children at the consulate when you apply for your own visa.
Comment: @Henning: since their father also is born in Iran and automatically of Iranian nationality, I am afraid that they consider our children as Iranian too. However, they have never been registered nor have Iranian passport. we will cancel our road trip if it is necessary to apply for 4 visas, because of the unnecessary expenses. I think this law hits very unfortunately the wrong people...


my iPhone keeps losing wifi connection. Why is this?

Question: My laptop connects to my Wifi but my iPhone does not. I connect my macbook air from the basement to the wifi and i get all 3 bars, but then i connect my iPhone from same place in the basement, the iPhone keeps losing the wifi.i had an iphone 4 before so I thought it was just the Antennas of the iPhone 4 that was weak. Now I have the iPhone 6 plus and its the same issue. what do you think is the problem? is it my router? i have a netgear WNR1000v2 and it is upstairs, about 50-60 ft away from my room in the basement.
Comment: Please specify within your original question if you are comparing Wi-Fi accessibility from the exact same point? Which channel your Wi-Fi router is using? Which main obstacles are between your router and your iPhone (concrete ground…)?
Answer: Download a wifi analyser onto your phone (plenty of good free ones) and check the signal strength your getting on it when scanning for WAP's.
This should help you rule out if its the signal strength, leaving either your netgear or iPhone as the culprit.
See this article as well
http://www.digitaltrends.com/mobile/ios-8-problems/2/
Comment: The link provided doesn't lead to a page about Wi-Fi problem analysis. On the other hand it is overloaded with heavy advertising, and the number of cookies loaded is awful. I suggest you to choose a better reference.


Tracking user activity in Google Apps

Question: I'm using Google Apps for my company. Is it possible to track the users' activity on my domain? (Search history, activity log, email, etc.)
Answer: I'm not sure if your question was general or specific. If general, then by logging into your Google Apps administration screens at https://google.com/a/[yourdomain.com] and going to Reports > Apps Usage Activity, you can get reports that cover the following and more:

apps usage activity
login and admin activity
weekly active users
documents shared externally
review active
suspended and blocked users
monitor storage usage
keep track of security metrics
view login activity
Answer: The majority of this can be done from the Admin console.
Otherwise, you can use the Reports API.

Tracking user activity in Google Apps


How to restrict bugzilla non-authorized access?

Question: I have a Bugzilla server and I found a security issue. If I make logout on web interface I still can read bugs by direct link. Enumerating bug ID in the URL I can read all bugs already exists.
I was unable to found how to restrict access Bugzilla for unauthorized (not logged in) users?
Comment: I'm voting to close this question as off-topic because security issues from individual software should be adress to the respective developers not on this side as we do not maintaine this software
Comment: This is a question about QA/Testing software and its configuration.  I think its appropriate.
Comment: Better audience to ask this question would be Bugzilla mailing list. Part of guidance we should provide is that there are many questions related to QA which are better asked elsewhere.
Comment: Thanks, I understand that this question is also oriented to administrators, not only to QA.
Answer: If you want to stop external access then one way is to set Apache Password Protected Directories with .htaccess File
This will mean any user accessing below a certain DIR level will require a password for access.  Please note, this access is independent from the access granted by Bugzilla
A simple instruction guide is available here


Mechanics of casting Bless

Question: I'm new to D&D and most of the stuff is easily understood (though might require some time spent reading the rules). What has me flummoxed is how casting of bless works for my cleric. I can't figure out how I determine if the cast was successful. I understand the mechanics for attack spells and spells requiring saving throws. But can anyone shed some light on how I determine if the cast for Bless was successful?
Comment: related https://rpg.stackexchange.com/questions/73972/
Comment: [Related] [Casting healing spells is automatically successful?](https://rpg.stackexchange.com/questions/55779/casting-healing-spells-is-automatically-successful)
Answer: In general, if a spell targets allies, it just succeeds if they're willing.
In the case where some mechanical element would be interfering with the spell (anti-magic or counterspell), I don't think there's an explicit mechanical way to be notified if a spell succeeds or fails.
There are no saving throws against Bless. Given that it's an entirely beneficial effect, I don't know why you would.
Comment: Generally, you are rewarded for your actions as a spell caster. If you're taking the time to not reduce the encounter's total HP, you better be doing something worth just as much. Making your allies better at the cost of your concentration slot is pretty worth it. While you're maintaining Bless, you're not maintaining Hold Person, for example. One makes your allies better at combat, one removes a significant combat element from the combat.
Comment: I was wondering if this was indeed the case. Just seemed a bit odd to me that a spell always succeeds considering ability checks for actions. Which makes this one hell of a spell to have for a lvl2 cleric in a 3 person party of lvl2 and lvl1 characters.
Answer: Unless your concentration is disrupted (someone attacked you while casting), or something directly prevented you from casting the spell (like a no-magic zone), the spell succeeds. "Success" is the default state for "good stuff happens" spells, you'll only need knowledge of if it fails.
Answer: Assuming you fulfill all requirements of the spell, it just happens.
Pick up to three creatures within 30 feet of you, spend an action if in combat, and poof, they are #blessed.
Unless there is a specific effect that prevents your spell (counterspell/anti-magic field/etc.) it takes hold.
Answer: Spells Do What They Say.
Jeremy Crawford has said numerous times, "Spells do exactly what they say." That if they require a roll, the spell will say so.
Design and History
Older versions of DnD had spell failure.  5e removed it because you're already spending an extremely limited resource (spell slots) to cast it. There are ways to force spells to fail, but there isn't just a random chance the spell does nothing.
When There are Rolls
When casting a battle spell there is typically an attack roll or saving throw to give the opponent an attempt to avoid or decrease the impact of the spell (there are some exceptions like Magic Missle). Missing or the opponent dodging or saving vs damage isn't spell failure; though if there is a single target the effect is basically the same as if there were.
When casting healing or buff spells, the spell typically just works in 5e. The rolls involved (if any) typically tell you how much health/how effective the effect.
So, When is Bless is Successful?
Bless just works when you have a focus or material components, speak the incantation and do the hand motions with a free hand. It is always successful. Once cast it will continue in operation until

1 minute passes,
you cast another concentration spell,
you use the Ready Action to ready a spell,
you use a feat or feature that requires you to concentrate as if casting a concentration spell, or
you take damage and fail the Constitution Save to maintain concentration.

Yes, it is a powerful spell, but it using two resources: concentration and a spell slot.
Answer: Largely the actual casting is not the difficult part, If cast during combat, you will spend your action, or outside of combat you can just cast it (but note the 1 minute maximum duration).  Keeping the benefits alive can be more difficult.The actual cast is usually not the difficult part.
More detail about concentration:

Casting another spell that requires concentration. You lose concentration on a spell if you cast another spell that requires concentration. You can't concentrate on two spells at once.

Taking damage. Whenever you take damage while you are concentrating on a spell, you must make a Constitution saving throw to maintain your concentration. The DC equals 10 or half the damage you take, whichever number is higher. If you take damage from multiple sources, such as an arrow and a dragon's breath, you make a separate saving throw for each source of damage.

Being Incapacitated or killed. You lose concentration on a spell if you are Incapacitated or if you die.

Other than that, be wary of the Mage Slayer feat.

Mage Slayer: You have practiced techniques useful in melee combat against spell casters, gaining the following benefits:

When a creature within 5 feet of you casts a spell, you can use your reaction to make a melee weapon attack against that creature.
When you damage a creature that is concentrating on a spell, that creature has disadvantage on the saving throw it makes to maintain its concentration.
You have advantage on saving throws against spells cast by creatures within 5 feet of you.

Mechanics of casting Bless


Sprouting and Sowing seeds

Question: What is the distinction between seeds/grains for sprouting and other edible uses and seeds/grains for sowing/planting?
Comment: @WayfaringStranger no answers in comments, please.
Answer: Generally there is no distinction, other than that the variety for eating the sprouts may be a special one developed for taste.
Having said that there is another consideration: Seeds for sowing often (not always, depends on the supplier and type of seed) are coated with anti-fungals and things to make them less attractive to pests. These seeds should not be eaten, nor should the sprouts from them!
Answer: The seeds grown for propagation are the same species but they may be grown differently, sometimes to the level where you wouldn't want to eat them. A good example is beans where you eat the pod, i.e. string beans and runner beans. If you want to eat them you pick them while they are technically unripe, but they are tender. If you want to grow them to plant them you let them grow until the seeds inside the pods get large and the pods start to shrivel, and they really aren't very edible by then.
Answer: Seeds sold for sprouting are larger. They've been sorted from the smaller ones. Source: trucker who hauls them and has seen them being sorted.

Sprouting and Sowing seeds


Possible to have more than one wire connected to "G" terminal in furnace?

Question: I have a 25 year old gas furnace without A/C. I had a 2 wire basic thermostat that I have replaced the wiring with 5 wires and also a new Nest 3rd generation thermostat. On the wall beside the thermostat is a humidifier control to run the fan that connects to terminal "G" in furnace. The new thermostat also requires terminal "G" for the furnace... Is it possible to have both the nest and humidifier control connected to the "G" terminal in the furnace or will something go up in smoke? The nest does not automatically run the fan when humidity increases, it only has a setting for a timed control.
Answer: As long as both thermostats are also using the same R wire, that should be fine.  Internally, the only thing the thermostat does is connect R to G with a switch.  Have you looked at all the documentation for the Nest?  There may be a different, "best practice" way to connect the humidifier control.


iPhone YouTube music player (background and no video)

Question: On Android there is an app called PVStar+ which is a YouTube player that lets the user play music in the background and turn off video. Is there such an application for the iPhone?
Answer: There are plenty but you should give a try to Foxtube (FoxTube 4 - Player for YouTube par mix1009
https://appsto.re/ca/CgFO2.i) and Protube (ProTube for YouTube par Jonas Gessner
https://appsto.re/ca/GkqG3.i)
Answer: Tubex is the best one I've found.  You can put Tubex in the background or even turn off the screen and YouTube music keeps playing.  You can also login to your YouTube account and access favorites, playlists, etc...
I've had it on my phone for months now in a variety of situations and with different people controlling the music and it's very stable and reliable.


Importing Contributions - Email Receipt

Question: When importing contributions I would like receipts to go to the contacts that made the payment. What is the best approach to make this happen?
Answer: You could import and tag or add to a Group, then find via Adv Search (filter by Group/Tag plus date of donation) but set to 'Display as Contributions, then use the Actions to trigger Print or Email Contribution Receipt which is described thus:

You may choose to email receipts to contributors OR download a PDF file containing one receipt per page to your local computer by clicking Process Receipt(s).
Comment: I have looked at that. It opens a new can of CiviCRM worms, I'll learn in due course. Only two years experience so far!!! We do not have a website for members. All being done by separate payments via the bank that gives us payment info.
Comment: How do you Tag on Import Contributions? For Import Contacts it works OK.
Comment: no way to Tag on a Contribution Import. Suggest you add a custom field to Contributions. Add a column to your data import to put in that custom field. then you can do a search in civi, find contacts with a contribution with the custom data, and then Tag those contacts.
Comment: not sure which can of worms you found - worms in tomato sauce? worms and meatballs?

Importing Contributions - Email Receipt


Did 70 or 75 people go down to Egypt with Jacob?

Question: Acts 7:14 states that "Joseph sent word and invited Jacob his father and all his relatives to come to him, seventy-five persons in all."  This seems to contradict Deut. 10:22, Ex. 1:5; and Gen. 46:27 which all say it was 70 persons.  What accounts for this difference?
Answer: Acts 7:14 is part of a speech which Luke records. The speech is given by Stephen, a Greek Jew who no doubt would have read the Septuagint. The Septuagint (along with the Dead Sea Scrolls) varies from the Masoretic Text in both Genesis 46:27 and Exodus 1:5 and reads instead "75 people." It's likely Stephen was quoting this tradition.
Comment: I would include that the Septuagint version of Genesis 46:20 includes the names of 5 grandchildren and great-grandchildren of Joseph. (3 children and 2 grandchildren of Manasseh and Ephraim)

Genesis 46:20 (LXX) "And there were sons born to Joseph in the land of Egypt, whom Aseneth, the daughter of Petephres, priest of Heliopolis, bore to him, even Manasses and Ephraim. And there were sons born to Manasses, which the Syrian concubine bore to him, even Machir. And Machir begot Galaad. And the sons of Ephraim, the brother of Manasses; Sutalaam, and Taam. And the sons of Sutalaam; Edom."
Answer: Gen 46:27 indicates that 66 biological descendants of Jacob had traveled to Egypt. That is, when Joseph and his two sons are not counted from the genealogy (along with Er and Onan, who had died previously in Canaan), the number is 66 people according to the Masoretic Text. Thus 66 biological descendants of Jacob traveled to Egypt. This number did not include the wives of the sons of Jacob (Gen 46:26).
However, Gen 46:27 indicates that 70 people traveled to Egypt. In this regard, the additional four people appear to have been -

Jacob
Leah
Zilpah
Bilhah

Thus Ex 1:5 and Deut 10:22 indicate that there were 70 persons "...who went down to Egypt."
Finally, the Septuagint (LXX) indicates 75 people, as noted in Acts 7:14 of the Christian New Testament. That is, the Genesis passage in the LXX reads as follows:

Gen 46:27 (NETS)
27 And the sons of Ioseph who were born to him in the land of Egypt were nine persons. All the persons of Iakob's house who came into Egypt were seventy-five.

Thus the LXX takes the perspective: 66 + 9 = 75. That is, the 66 biological descendants of Jacob plus the nine children of Joseph (as noted in the LXX) would comprise the people "who came into Egypt." In this regard, Jacob and his three wives are excluded from the count. From this perspective, Jewish tradition, provides yet additional (and alternative) information to consider this problem.
As apparent in Acts 7:14, Joseph desired that Jacob and all his relatives would live and remain with him in Egypt. So, if the 66 biological relatives plus Jacob and his three wives comprised the 70, who were the other five people, whom Joseph wished to live and remain with him from the apparent perspective of Jewish tradition (which assumes that Joseph only had two sons)?
The additional five would appear to be -

Manasssah (son of Joseph)
Ephraim (son of Joseph)
Jochebed (daughter of Levi born in Egypt - Nu 26:59)
Er (died in Canaan)
Onan (died in Canaan)

The latter two had died in Joseph's absence--that is, they died after Joseph was sold into slavery in Egypt, and so Joseph may have learned from Judah that they were born to him (Judah) during the 22 year hiatus (that is, Joseph's absence), but not that they had died.  As regards Jochebed, according to the Talmud, Jochebed (Levi's daughter) had been conceived, but yet unborn when she arrived in Egypt in the womb of her pregnant mother. Thus she constituted a living person albeit unborn. According to the translation of the Babylonian Talmud by Neusner (2011), we read the following in b. Baba Batra 8:4, II.4.D -

He said to him, "I had a valuable pearl in my hands, and you want to take it away from me! This is what R. Hama bar Hanina said, 'This refers to Jochebed, who was conceived on the way [down to Egypt] and was born between the walls of Egypt: '… who was born to Levi in Egypt' (Num. 26:59), meaning, her birth was in Egypt but not her conception."

In other words, if Joseph's two sons (Manassah and Ephraim) are included with Jochebed, Er, and Onan as part of the "in all" (NASB translation of Acts 7:14), then the LXX number of 75 persons would comprise "Jacob and all his relatives"--that is, Jacob's direct relations, whom Joseph had desired to live and remain with him in Egypt from the apparent perspective of Jewish tradition (which assumes that Joseph only had two sons).
In summary, the Masoretic Text and the LXX (with additional information supplied from Jewish oral tradition in the Talmud) appear to be aspects of the same issue, but viewed at from different angles.
Neusner, Jacob (2011). The Babylonian Talmud: A Translation and Commentary (Vol. 15). Peabody, MA: Hendrickson Publishers, 361.
Comment: Is it possible that Joseph's wife Asenath instead of Jochebed could be counted as part of the 75?
Comment: @Joseph v27 Is regarding Joseph and stil no women are included in the numbering. as you pointed out LXX's 66 + 9 = 75 is Josephs 9 children or MT 66 + 4 which seems to be wrong but then is including Jacob with Joseph Manasseh and Ephraim.
Answer: As to the question of 66 vs. 70 going down to Egypt:
Genesis 46:26 states: "All the souls coming to Egypt with Jacob, those descended from him, excluding the wives of Jacob's sons, all the souls were sixty six."
The above excludes both Jacob and the women, as it's said "with Jacob" (thus excluding).
Joseph and his 2 sons were already in Egypt.  Therefore, once Jacob and his descendants arrived, there were a total of 70 (The 66 plus Jacob, Joseph, and Joseph's 2 sons).  As verse 46:27 states: "all the souls who came to Egypt".
Verse 46 says "coming to Egypt".  Verse 47 says "who came to Egypt".  Therefore verse 47 includes those already there, whereas verse 46 hadn't included those already there.
Answer: The 66 persons in Gen. 46:26, 1. Joseph, 2. Manasseh, 3. Ephraim, 4. Er and
5. Onan were excluded but Jacob was included (70-5+1=66).
In Gen. 46:27, it is exact in citing 70 went "with Jacob" which means that Jacob was excluded in the counting and the wives (Jacob's and 12 sons).
In the book of Acts 7:14 it is counted 75. How can it be? Stephen possibly counted 1. Leah, 2. Bilhah, 3. Zilphah, 4. Dinah (daughter of Jacob) and 5. Serah (daughter of Asher - Gen. 46:17). Rachel was not included because she was already dead (Gen. 35:19).
Shalom!
Answer: The answer may lay in Acts 7:14 where Joseph invites his father Israel and all his relatives ( meaning Joseph and all his grandchildren) .
We allready know that the remaining wife (Lea) and two other mothers of his children were not numbered among the seventy, as were not numbered the wives of his sons .
In Genesis 46:6 is mentioned something where I think the answer is hidden. In the children counts is mentioned Dina, daughter that Lea have him, and Sera, daughter of Asher.
But....in 46:6-7 is mentioned : they came in Egypt, Jacob and all his seed with him. His sons and the sons of his sons with him, his daughters and the daughters of his sons, and all his seeds he brought with him in Egypt.
This was the invitation. You notice the plural in his daughters ? So there was one or two more daughters born to Jacob in Kanaän except Dina . You notice the plural in daughters of his sons? So there was one or more granddaughters born to Jacob except Sera. Together 5, and that answers
the question of the difference.
Comment: Hi Eric and thanks for contributing. To greatly improve this post please actually quote the passages you mention rather than just giving their "address". Other than that it looks you did a great job of focusing on answering the question and backing it up with a primary source (in this case, the scriptures). Please take advantage of the formatting tools above the edit box. Your contribution is greatly appreciated.
Answer: First references here's an opportunity to see what I saw when attempting to answer this question on my own with a little help.
Summary of Genesis 46:9-14.
From Reuben (Hanoch, Phallu, Hezron, & Carmi). [5]
From Simeon (Jemuel, Jamin, Ohad, Jachin, Zohar, & Shaul) [7]
From Levi (Gershon, Kohath, & Merari) [4]
From Judah (Er, Onan, Shelah, Pharez, Zerah, Hezron, & Hamul) [8]
From Issachar (Tola, Phuvah, Job, & Shimron) [5]
From Zebulun (Sered, and Elon, and Jahleel) [4]
Gen 46:15  These were the sons of Leah, whom she bore to Jacob in Padan-aram, and his daughter Dinah. All the souls of his sons and his daughters were [thirty three].
Gen 46:18  These were the sons of Zilpah, whom Laban gave to his daughter Leah; and she bore these to Jacob, [sixteen souls].
Gen 46:22  These were the sons of Rachel which were born to Jacob; all the souls were [fourteen].
Gen 46:25  These were the sons of Bilhah whom Laban gave to his daughter Rachel; and she bore these to Jacob, all the souls were [seven].
Gen 46:27  And the sons of Joseph which were born to him in Egypt, two souls. All the souls belonging to the house of Jacob coming into Egypt were [seventy].
This is what I noticed. In the count we have 33, 16, 14, & 7. Adding these numbers gives us 70, obviously. The number 75 comes from the 5 names in bold. I included a summary of verses 9-14. This way we can all together note that Dinah isn't included in the original count for 33.
One may want to disregard Rachel as she died on the way to Bethlehem (Gen. 48:7). However, if this were the case I would also believe that Er & Onan who also died in the land of Canaan would also be disregarded. (Gen. 46:12)
Therefore it is my humble opinion that the number 75 came from including all the names in this passage.
Comment: I don't see how you can say that Dinah wasn't included in the count of 33 when the verse specifically states that she was. Er and Onan aren't included in the count because they are dead. Remember, the verse isn't discussing all of Jacobs offspring, but those that came to Egypt (Genesis 46:8).


installing twitter and oauth on drupal

Question: I have just been trying to get twitter going on my drupal 7.21 website.  i followed the tutorial at http://drupal.org/node/1346824
Everything was fine until the last step of authorising a twitter account, when i got a blank page back from the twitter app and a message saying "unauthorised oauth request".  I've tried re-installing, messing with callback URL's etc but cannot get anything to work. Has anyone else solved this problem?
Thanks
Andy
Comment: Is your server behind a firewall or running a proxy? We had similar issue with OAuth tokens not being generated (check the URL when you get a blank page, it should have like `oauth_token=` (blank)) which generally means there's a problem with firewall or misconfiguration
Answer: After the new Twitter API upgrade, I would recommend using the Twitter Pull sandbox project. It works beautifully.
Answer: make sure to put correct "OAuth Consumer key" and "OAuth Consumer secret" from admin/config/services/twitter/settings
Comment: Thanks Sharef, I had managed to do that bit....it seems to talk one way to twitter, but can't cope with the return handshaking.  IS there a need to set some kind of special "context" do you know?

installing twitter and oauth on drupal


Coming to France to create a business with a French partner

Question: I want to start a business with my friend, who is a French citizen. I am an Indian national and I have a very good business plan. After a lot of discussions we both agreed to start an SARL company. We will be making products in France and will be exporting them to other countries especially to middle-east countries. However, as I am an Indian, I want to know if there are any requirements or restrictions for me to be a partner with French citizen. Which visa can I get and how can I stay longer in France? Also, are there any chances that I can get citizenship so that I can spend maximum time on our exporting business?
Comment: Some clues here (in French) : https://www.service-public.fr/professionnels-entreprises/vosdroits/F22494
Answer: Follow the link that was given by @audionuma. If you can't speak French, your French partner can read that and translate. It's basically all there.
As for citizenship, you need at least 5 years of continuous residency in France, prove stable means of income, a clean record, and integration into the society -- knowledge of the language, culture, history. This last part is a bit vague, even in the official text, but let's assume that if after 5 years in France you still need your French friend to help you do the application, you probably won't get it. But depending on where you apply, your mileage will vary greatly.
Comment: Official sites like https://www.service-public.fr/particuliers/vosdroits/F2213 do mention history and culture but this isn't evaluated systematically AFAIK. There might be some differences between *préfectures* but in my experience, *assimilation* is evaluated through interviews (one at the *préfecture* and possibly one from the town administration and one with the police), the focus is mostly on signs of affiliation with radical islam, polygamy, etc.
Comment: The last part isn't as vague as you make it to be. Except if you qualify for a simplified evaluation, it means a diploma or certification that you speak French at the [B1 level in the European framework](https://www.service-public.fr/particuliers/vosdroits/F11926).


My adult cat kneads and sucks on my blanket like a kitten. Why?

Question: I have seen this behavior in kittens before who are nursing with the mother. They push and pull on the mother's fur with their paws to get the milk. My cat, however, is a adult and has no mother. She does this while purring loudly and it seems to make her happy. Is this is memory that she is re-enacting? Is it a self-soothing behavior? I know little about her before I found her and her siblings abandoned, seven years ago. She was very hungry back then.
Comment: Some cats will knead in mid-air if they're feeling particularly pleased. I suspect it as automatic for them as a smile is for us. Suckling is less common but not uncommon.
Comment: I have heard that cats that were improperly weaned are apt to display this behavior.  That seems consistent for your particular cat...  It was so long ago, I don't remember where I heard that, and I didn't look into whether that may be the case.... YMMV
Comment: ...that seems reasonable as the whole litter had been abandoned.
Answer: From http://m.livescience.com/40548-why-do-cats-knead.html
"In adulthood, a cat supposedly will knead when it's feeling happy or content because it associates the motion with the comforts of nursing and its mother. Adding further weight to the explanation: Some cats even suckle on the surface they're kneading."
When it comes down to it though, no one knows for sure why exactly some adult cats knead.
Comment: My cats usually want to knead my stomach for a while each night before curling up next to me ; I've always presumed it was memories of mama-cat. The more surprising thing is that they knead in different places, consistently, perhaps because they were in the habit of going for particular teats. It's actually a bit annoying since the big one leans hard, but it seems to please them, so... If I'm not there they'll kneed the blanket, which might even be useful in creating a soft spot.
Answer: Humans' domestication of cats has caused them to retain many childhood actions and habits into adulthood and kneading (as in kneading bread) is thought to be one of them.
As you know, kittens knead at the mother's teats to cause lactation (the flow of milk). Can you imagine something better than being up close to Mom, all warm and cosy, getting delicious milk?
When an adult kneads, he or she is demonstrating an activity which was pleasurable for them in kittenhood and still gives them pleasure.
We have had kneaders that are so into it that I've often wondered if there is a way to get them help me knead the dough when I make bread.
Comment: I have observed my cat carefully and I wonder if she can recall the mother, though I doubt it. She is recreating the sensory experience with a kind of body-memory. It is very bittersweet, knowing that her mother is long gone, as is kittenhood, and she will never experience the thing that she is enacting. But I am happy that she is "happy."


Minimal BASH-like line editing is supported - GRUB error - Ubuntu 16.04, luksPartition, boot-repair does not work

Question: Just after starting my laptop I am seeing black screen with the message in the title. This has happened when I've had 2nd drive connected to my laptop and I've installed fresh Ubuntu 16.04 on it. Apparently this action broke boot on my main drive Ubuntu 16.04.
I was trying to follow this guide:
https://itsfoss.com/fix-minimal-bash-line-editing-supported-grub-error-linux/
Unfortunately this does not work to me.
This is what I've from boot-repair: http://paste2.org/8sPXwAjj
EDIT: My problem was that I didn't boot pendrive in UEFI mode, even though it still does not work, although the output looks cleaner: http://paste2.org/7PWwdh03
Any ideas how can I fix it?
Thanks
Answer: The solution was to boot from the EFI-bootable USB pendrive.
Then decrypt the luks with cryptsetup.
Then run the boot-repair.
Got my OS back :)


How would you say, 「Will you please look at this picture?」

Question: I am talking to my a teacher of mine, and would like to ask her to look at a picture I took a screen shot of this morning because one of her staff came up to us and said 「おはようございました」and we had a debate on whether or not people actually used that sentence because it seemed obscure. I was thinking it might be something along the lines of, "この画像見てください。"
Comment: 「おはようございました」て、ほとんどよしもと新喜劇の世界やん!安尾信乃助あたりが言いそう。
Answer:
「この画像見てください。」

lacks the nuance that you want and sounds too direct. It is basically saying 'Look at this image please'.
Even though ください is generally translated as 'please', it doesn't have quite the same sense of imploring someone to do something. Take, as an example' 「ビールをください」. While it could be translated as 'Beer please', it could also be translated as 'Give me a beer'. ください is just a more formal way of saying 'do this for me'.
That small non-sequitur out of the way, a way to phrase it to sound more like a polite request would be to say:

「この画像/写真を見てくださいませんか。」- 'Won't you look at this image/picture?'

or, even just adding a softener to the end would help a bit (but might make you sound too chummy) :

「この画像/写真を見てくださいね。」- 'Please look at this image/picture, okay?'

As far as 「おはようございました」, it seems that this is dialectical speech in small segments of the Kanto population, but more prevalent (yet still not common) in the northern reaches (Tohoku, Hokkaido), and some people (probably the same people) think it sounds more polite in the past-tense form.
Comment: I live in Hokkaido. Never once have I heard おはよございました。 What would you imagine it means?
Comment: I'm not saying that it is wide-spread. I haven't really heard it myself, but going by some 知恵袋 comments, it seems that it is used in some pockets of those areas. By saying 'more prevalent' I seemed to be implying that it was more standard than it is. Will fix.


COMException error: 80040154 Class not registered in microsoft.office.interop.excel.application C#

Question: I'm trying to make a application which will print some values to the excel file, for this I'm trying to use the Microsoft.Office.Interop.Excel library
but whenever I try to create a object as mentioned below
Application xlApp = new Application();
I'm getting COM exception

System.Runtime.InteropServices.COMException: 'Retrieving the COM class factory for component with CLSID {00024500-0000-0000-C000-000000000046} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).'

I have Microsoft Office 365 installed in my machine and also PIA are available in C:\Program Files (x86)\Microsoft Visual Studio\Shared\Visual Studio Tools for Office\PIA.
Is this right way to initalize the object.
Answer: I got the same issue and found solution here.
Here is one way to proceed:
Dim xlApp As Excel.Application = New Microsoft.Office.Interop.Excel.Application()
Dim xlWorkBook = xlApp.Workbooks.Add
[...]


Black and White Adjustment in Photoshop

Question: What is the purpose of this adjustment? Why should I use it over just converting to grayscale?
Answer: The black & white adjustment has multiple options for tuning how you want to transform colors into purely grayscale. It seems most apt for converting color photos into black and white. If converting a photo, you will notice the powerful control of details in the scene and be able to apply contrast/levels right there on the fly. Simply hitting Mode - > Grayscale will not allow you to fine tune visual elements that may require your hand, or at least your eyes to be aware of, and instead will use the default Black & White settings.

Black and White Adjustment in Photoshop


Search for tags by their popularity

Question: When I'm deciding what framework/library to use, I give a lot of weight to how many questions have been posted under their Stack Overflow tag. If, say, someone was looking for a new JavaScript physics engine, it would be really useful to be able to search for 'JavaScript physics engine' and have tags with matching descriptions returned by their popularity.
Answer: You can use the Stack Exchange Data Explorer for this. Here is a query which lets you search in tag excerpts:
<code>Select t.TagName, p.Body
From Tags t Inner Join Posts p On t.ExcerptPostId=p.Id
Where p.Body Like '%##contents##%'
Order By t.[Count] Desc
</code>
Note that SEDE is updated once a week on Sunday morning, but for slow-changing content like tag descriptions this shouldn't be a problem.
Answer: As a similar alternative to the answer; I wanted to see how how many views questions tagged with a particular tag are generating over time:
<code>;with cte as (
  select
  FORMAT(convert(date, P.CreationDate), 'yyyy-MM-01 00:00:00.000') [date],
  P.ViewCount,
  P.Tags,
  P.AnswerCount

  from Posts P
  join PostTypes PT on PT.id = P.PostTypeId

  where
  PT.Name in ('Question')
  and Tags like '%<tag you want to see>%'
)

select
[date],
sum(ViewCount) ViewCount

from cte

group by
[date]

order by [date] desc
</code>

Search for tags by their popularity


What is the definition of sorrow according to Sri Krishna, what are the main reasons of sorrow?

Question: According to Sri Krishna,  What is sorrow? and what are the main reasons of sorrow in one's life?
How can someone overcome from it?
Answer: Refer the following from the Gita:

dhyāyatoviṣayān puḿsaḥ sańgas teṣūpajāyate sańgāt
  sañjāyate kāmaḥ kāmāt krodho 'bhijāyate
If one meditates on 'objects', he develops attachment on them.
  Attachment leads to desires/lust. Unfulfilled desires lead to anger.
krodhād bhavati sammohaḥ sammohāt smṛti-vibhramaḥ
  smṛti-bhraḿśād buddhi-nāśo buddhi-nāśāt praṇaśyati
Anger leads to illusion. Illusion leads to bewilderment of memory.
  When memory is bewildered, you lose the power of discrimination. One
  perishes when discrimination/intelligence is lost.

So, thinking continuously/meditating on objects culminates in the fall of beings. One perishes if attachment is developed.
The propensity to associate with other living entities is a fundamental characteristic of the spirit soul.  Even if you want to, you cannot give up the tendency to associate with other living entities.  This is so because we are all part and parcel of Krishna or God, and this tendency is there in Krishna (God).  You can see that in any of his incarnations, he is always associating with a close circle of associates who are blissful in his association, and also in the association of each other.
BG Chapter 2, Verse 13

dehino 'smin yatha dehe  kaumaram yauvanam jara tatha
  dehantara-praptir dhiras tatra na muhyati
As the embodied soul continually passes, in this body, from boyhood to
  youth to old age, the soul similarly passes into another body at
  death. The self-realized soul is not bewildered by such a change.

He hints that those who are not Self-Realized are bewildered by this illusion of Jagat, because they have not yet realized the Satchidananda. What is Self-Realization then?
BG Chapter 2, Verse 16

nasato vidyate bhavo  nabhavo vidyate satah  ubhayor api drsto
  'ntas tv anayos tattva-darsibhih
Those who are seers of the truth have concluded that of the
  nonexistent there is no endurance, and of the existent there is no
  cessation. This seers have concluded by studying the nature of both.

In the Visnu Purana it is stated that Visnu and His abodes all have self-illuminated spiritual existence.

Jyotimsi visnur bhavanani visnuh.

The words existent and nonexistent refer only to spirit and matter.
Says Gaudapāda in his Māndukya Kārikā (IV. 95):

अजे साम्ये तु ये केचित् भविष्यन्ति सुनिश्चिताः ।  ते हि लोके
महाज्ञाना तच्च लोको न गाहते ॥
aje sāmye tu ye kecit bhaviṣyanti suniścitāḥ | te hi loke
  mahājñānā tacca loko na gāhate ||
'They alone are said to be of great intellect (wisdom) who are farm in
  their conviction of the Self, beyond causality and ever the same. This
  ordinary men cannot grasp.'

Kena Upanishad describes Brahman as the adorable One (IV. 6):

तद्ध तद्वनं नाम तद्वनमित्युपासितव्यं स य एतदेवं  वेद अभिहैनं सर्वाणि भूतानि संवाञ्छन्ति ॥ ६ ॥
taddha tadvanaṃ nāma tadvanamityupāsitavyaṃ sa ya etadevaṃ veda
  abhihainaṃ sarvāṇi bhūtāni saṃvāñchanti || 6 ||
'Brahman is well known by the name Tadvanam; so It is to be meditated
  upon as Tadvanam, All beings love Him who knows Brahman as such.'

Now Shankara explains Tadvanam as;

तस्य प्राणिजातस्य प्रत्यगात्मभूतत्वात् वननीयम् सम्भजनीयम्, अतः तद्वनं नाम प्रख्यातम् ब्रह्म ।
tasya prāṇijātasya pratyagātmabhūtatvāt vananīyam sambhajanīyam, ataḥ
  tadvanaṃ nāma prakhyātam brahma |
'Brahman is well known by the name Tadvanam because It is the
  innermost Self of all beings and therefore the most adorable, the most
  worshipful.'

Realization of Brahman as the innermost Self of all beings transforms the individual man into the universal man; he becomes Brahman. Naturally he is then loved by all, just as Brahman is so loved.
So what is this Brahman which promises fanciful results such as turning an individual man into a universal man?? Sounds interesting and fascinating isn't it??

Bhagavad Gita: Chapter 4, Verse 24

ब्रह्मार्पणं ब्रह्म हविर्ब्रह्माग्नौ ब्रह्मणा हुतम् |
  ब्रह्मैव तेन गन्तव्यं ब्रह्मकर्मसमाधिना ||
brahmārpaṇaṁ brahma havir brahmāgnau brahmaṇā hutam
  brahmaiva tena gantavyaṁ brahma-karma-samādhinā
For those who are completely absorbed in God-consciousness, the
  oblation is Brahman, the ladle with which it is offered is Brahman,
  the act of offering is Brahman, and the sacrificial fire is also
  Brahman. Such persons, who view everything as God, easily attain him.

Bhagavad Gita: Chapter 8, Verse 3

श्रीभगवानुवाच |  अक्षरं ब्रह्म परमं स्वभावोऽध्यात्ममुच्यते | भूतभावोद्भवकरो विसर्ग: कर्मसञ्ज्ञित: ||
śhrī bhagavān uvācha  akṣharaṁ brahma paramaṁ svabhāvo 'dhyātmam
  uchyate bhūta-bhāvodbhava-karo visargaḥ karma-sanjñitaḥ
The Lord said: The Supreme Indestructible Entity is called
  Brahman; one's own self is called Adhyatma. Actions pertaining to the
  material personality of living beings, and its development are called
  karma, or fruitive activities.

Bhagavad Gita: Chapter 13, Verse 3

क्षेत्रज्ञं चापि मां विद्धि सर्वक्षेत्रेषु भारत | क्षेत्रक्षेत्रज्ञयोर्ज्ञानं यत्तज्ज्ञानं मतं मम ||
kṣhetra-jñaṁ chāpi māṁ viddhi sarva-kṣhetreṣhu bhārata
  kṣhetra-kṣhetrajñayor jñānaṁ yat taj jñānaṁ mataṁ mama
O scion of Bharat, I am also the knower of all the individual fields
  of activity. The understanding of the body as the field of activities,
  and the soul and God as the knowers of the field, this I hold to be
  true knowledge.

Lastly I would like to quote 2 verses so that you get the true nectar of what it is to be merged into Brahman or the Imperishable Truth. One from Bhagavad Gita, the other from Adi Shankara's Bhaja Govindam.
Bhagavad Gita: Chapter 8, Verse 8

अभ्यासयोगयुक्तेन चेतसा नान्यगामिना | परमं पुरुषं दिव्यं याति पार्थानुचिन्तयन् ||
abhyāsa-yoga-yuktena chetasā nānya-gāminā paramaṁ puruṣhaṁ divyaṁ
  yāti pārthānuchintayan
With practice, O Parth, when you constantly engage the mind in
  remembering me, the Supreme Divine Personality, without deviating, you
  will certainly attain me.

Adi Shankaracharya speaks thus:

भज गोविन्दं भज गोविन्दं  गोविन्दं भज मूढमते । सम्प्राप्ते सन्निहिते काले नहि नहि रक्षति डुकृङ्करणे ॥
bhaja govindaṁ bhaja govindaṁ govindaṁ bhaja mūḍha-mate |
  samprāpte sannihite kāle nahi nahi rakṣati ḍukṛṅkaraṇe ||
Worship Govinda, worship Govinda, Worship Govinda, oh fool! At the
  time of your death, Rules of grammar will not save you.
Comment: My pdfs and and physical books.
Comment: @SuryaKantaBoseChowdhury it's easy to get Sanskrit texts of popular scriptures from sanskritdocuments.org
Comment: Mr @K.C.Polai, your question is such that there is no written objective answer as to what suffering is and how it can be overcome. Unfortunately I cannot specify in bold where it mentions. It is not a one-word or a one-sentence answer. Even after reading the entire Shastras and doing degrees on them, one finds him/herself unable to grasp the true essence of Self-Realization. This answer is but an attempt to consolidate the main parts from Bhagavad Gita and other verses which point out what needs to be done for it.
Comment: The reasons for sorrow from the Gita are mentioned on top. You should read it even more properly. There are 2 quotations from the Gita. Then it goes on to describe that people are bewildered by this worldly-illusion and only Self-Realized men are free from it. Then it proceeds to what Self-Realization is, but in brief - ""They alone are said to be of great intellect (wisdom) who are firm in their conviction of the Self, beyond causality and ever the same. This ordinary men cannot grasp"". It proceeds to consolidate the unknowable nature of Brahman or the true Self.
Comment: And this unknowable can be only attained by concentrating the mind on Krishna all the time (or your ishta devta). Brahman is the source of all peace and happiness but is unknowable ordinarily. Which is why contemplation on Krishna or sadhana is necessary.
Comment: As I said your question is not like a "multiple choice question" which you have in examinations. Suffering and Moksha are the 2 mool tattvas of Hindu metaphysics and spirituality. So its not surprising that this answer was unsatisfactory.
Comment: Where did you get the Sanskrit texts?


Where can I find a global life expectancy table?

Question: I've found good information on specific countries and demographics, but I can't seem to find global numbers.  I know that the world life expectancy is around 71.0, but I'm trying to get a percentile breakdown in the form of something like an actuarial life table.
Answer: Not surprisingly, the WHO has a lot of data, I think especially interesting for you is this interactive figure, which you can find here:

Other data on this topic can be found on the WHO website here, in the Wikipedia or from the Worldbank.


Is it bad practice to add external links in documentation?

Question: Often I find myself solving bugs by finding the answer on Stack Overflow. Is it bad practice to add a snippet of why I did what I did and then add a link to an article or page from the web?
Comment: Possible duplicate of [Is it OK to put a link to Q&A sites in a program's comments?](http://programmers.stackexchange.com/questions/133096/is-it-ok-to-put-a-link-to-qa-sites-in-a-programs-comments)
Comment: Possible duplicate of [Should I add MSDN notes or Stack Overflow links to source code?](http://programmers.stackexchange.com/questions/134564/should-i-add-msdn-notes-or-stack-overflow-links-to-source-code)
Comment: FWIW I do it all the time, and even [asked how to do this properly on StackExchange](http://meta.stackoverflow.com/questions/316496/citation-for-linking-to-answers). Not that it answers your question, but some arguments for and against can be found over there.
Comment: Is the question only about the links (OK for me), because you also mention copying parts of the code/answer. This is something I would only do to explain a complex algorithm or processing. Code structure and naming should be clear independent of where you read about a solution.
Answer: I don't think its bad, but external links have a bad habit of going away over the life cycle of a solution.  When doing so, I recommend putting a sufficient summary that will help the reader if the link is not longer functional.
Comment: Adding a summary useful for two reasons: 1) As Jim pointed out, it helps the reader understand whether or not the link is outdated, and 2) it forces the developer copying the code from the link to understand what they are copying. This helps to make sure that code isn't only being used because "it fixes the problem".
Answer: This is why companies should have its own knowledge repository. For instance, my company have a corporative Redmine which is used for project's management, ticketing (bugs and tasks tracking) and the tool I use most, a wiki. All these features per project :-)
What do we have at project's wiki?

Links to documentation: Functional, Technical, Architecture, requirements.
Actors involved: Project Manager, Devs, Customer's Key Account managers, ...
Description per environment: Virtual Machines, O.S, servers, configurations...
Misc: Any important/interesting thing (related to the project) learnt during the project's lifetime.
Some more pages.

I put bibliography (links) at Misc wiki. But only from those I trust:

Stack Overflow: Positive votes and well argued
Software Engineering Stackexchange: Positive votes and well argued
MKyong.com: I like this page. It's really useful and its tutorials are really easy to follow
MDN
W3C.org
W3Schools: Its documentation is interactive (most of the cases) and user-friendly.
OWASP: For referencing issues related to security and vulnerabilities
Official web pages: Sometimes the best tutorials or explanations are at official web pages.

My bibliography comes with a summary typed down by me, in order to ensure that I have understood what I'm linking to. I try to keep Javadoc as clear as possible. Every link in the code is referencing the Redmine's wiki or the Redmine's issue code.
In absence of tools like Redmine, I found to be useful Markdown files to be useful for these purposes. Overall for developers due to these files are in the SCM and comes along with the code.
Comment: I agree with everything except trusting W3Schools.com. You can find most of what's there on MDN which has way more authority.
Comment: W3schools has been around longer than MDN. I may be wrong, but I think W3schools has more content, tutorials and web technologies documentation. Despite its issues it keeps been one of the best reference for beginners because its content is way more user-friendly and interactive. On the plus side MDN has a great community supporting its content. But on the down side, it could never be impartial in its documentation because it has a browser to defend. Anyways, I'm in agreement with you, now a days MDN seems to have more authority. if you don't mind, I will add the reference to my answer.
Answer: Links to the web are somewhat problematic as documentation because the internet doesn't guarantee that the content you're seeing behind them will be the same that a future doc reader will see. If possible, strive to link only to resources that are very unlikely to change.
For instance, when you link to Wikipedia, you should link explicitly to today's version rather than the generic article name. For stackexchange.com, well, at the moment it looks unlikely to go away, but questions get edited or even deleted all the time, and in five year's time a hot new gathering point might have come along. I wouldn't risk hanging documentation that carries substantial business value on a site that is so external to your organization.
Comment: "Wayback Machine - Internet Archive" (web.archive.org/) is a good place to check for deleted content.


using temporary tokens for secure communication with IFRAME

Question: I have questions about our application's security architecture:
A critical piece that cannot save state but collects and displays sensitive information is served up in an IFRAME inside a more modern web framework that would control login, session, etc.
IFRAME app and parent are on same domain.  Both IFRAME and parent will use https.
When user logs in to the outer web application, an iframe-ed form containing sensitive information is generated and then made available inside and IFRAME via a unique URL  (e.g. hxxps://example.com/myapp/form/a8ba8b8dsf8sdfasfsd0sfd/) and immediately expired so that a subsequent request with the same url token cannot access the sensitive data.  Contained in the form is a one-time, time sensitive submit token (like a csrf token) that protects against unauthorized form submission.
I am thinking that the risk of a malicious user playing around with the iframe url is nearly non-existent due to the one-time tokens.

What security risks are there to this architecture?
Is there a better way for a wrapper app to communiate with the
IFRAME app?

I suppose the wrapper app could make requests directly to the child app and write the response straight out to its own page instead of using an IFRAME.  We would still need to generate temporary tokens because the resulting form would still need to submit to the "child" app that cannot maintain state.  The advantage to this is that now the wrapper application is the only host allowed to make GET requests to the "child" application  (the client must be allowed to make POST requests but those won't be able to get sensitive information).
This advice from OWASP seems to warn against this kind of thinking but the immediate expiration of each token seems to mitigate their concerns.

Highly protected applications should not use URL rewriting to maintain state when cookies are turned off on the client.

UPDATE::::::
the wrapper app making direct requests to "child" app solution will not work for us and we are going the path of the IFRAME.  Are my conclusions about the IFRAME valid?
Comment: How does the inner frame know what is and isn't a valid token? Are the backend servers communicating in some way so they can exchange tokens?
Comment: thanks for responding.  The inner frame creates a document (HTML or PDF) with a URL containing the valid token and then lets the wrapper app know that URL and then expires it (the document is destroyed).
Answer: You can make the requests to the child app directly from the wrapper's server code and drop the use of the iframe. The child app should only allow access from the main application server.
This would also result in a better user experience, because you would have a better, uniform design.
Comment: I like it Dino.  Unfortunately I have since learned that the "direct requests to child app" won't work and I have updated the question.


Converting a user management system to use ajax

Question: I am currently building a website, which until quite recently was purely PHP. However I am now making trying to have the site use more AJAX, to lessen the page reloads. In PHP I had a lovely object orientated user class with methods for updating data, logging out, and so on. When a user logs on this would be stored as a session variable, and then any page that wishes to do anything the user could just grab it from the session and call it's methods. Clearly this use of php objects and the session doesn't really work with ajax. However I don't want to have to scrap storing the user in an object (which neatens things up somewhat), so don't just want to go down the route of defining a ton of js functions that grab the current username, and use the to do mysql queries through ajax.  Am I being stupid here, and what route would people recommend I take.
Answer: AJAX requests send the cookie by default. Assuming that you are mapping your user object to the PHP session, the request over AJAX should automatically have access to the session and the user object.
If you're using another method to handle sessions (e.g. a session id added to the query string) a) be wary of session spoofing, and b) append it to the AJAX request manually. And VOILA.
Comment: How can I modify the user object from JS though as it is a php object? I'm guessing I'll have to echo it out from the server using json_encode.
Comment: Do you have to expose it to the front end?
Answer: Sessions and objects still work with ajax. Sessions persist information on the server-side and objects are just organization structures for the code that is executed there.  Much of what you are asking is stuff you pick up from experience programming in general.  You should do a little reading and planning to come up with a more solid blueprint of how you want the application to work.
First, check out resources like the following:
www [dot] phptherightway [dot] com
www [dot] codecademy [dot] com/tracks/javascript-combined
More specifically:
http://www.phptherightway.com/pages/Design-Patterns.html
https://en.wikipedia.org/wiki/Front_Controller_pattern
These are the fundamentals of code organization.  Learn them early and life will be easier down the road.  Once you have those down pat, you will likely know where to go to find more advanced solutions.  Of course, stackoverflow is a great resource to find all kinds of solutions.
Always keep in mind that with AJAX, you are doing the same request/response cycle you always do from the server-side perspective.  From the client side perspective, you are treating sections of the page as independent little browsers that are capable of making new requests while you are looking at the page.  So, with that in mind the following example would be a method of achieving what you are looking to do.
header file segment

<form action="ajax_controller.php">
    <input type="hidden" name="action" value="authenticate" />
    <input type="text" name="username" />
    <input type="password" name="password" />
    <input type="submit" />
</form>

ajax controller
<?php
    if ($_SERVER['HTTP_X_REQUESTED_WITH']) {
        /* Safety first, but use the mysqli version of
         * this if you are using a mysql db
         */
        foreach ($_POST as $post)
            $_POST = mysql_real_escape_string($post);

        if ($_POST['action'] === 'authenticate') {
            $user = new User($_POST['username']);
            $success = $user->authenticate($_POST['password']);

            //let's pretend authenticate() returns true or error message
            if ($success === true) {
                $response = array(
                    'firstName' => $user->get_firstName(),
                    'lastname' => $user->get_lastName()
                );
                return json_encode($reponse);
            } else {
                return $success;
            }
        }
    } else {
        //bark and throw exception, or return html, or whatever
    }


Why does Lt. Manion stand mute, rather than plead not guilty in Anatomy of a Murder?

Question: In the film Anatomy of a Murder, on the advice of his lawyer, Paul Biegler, Lieutenant Manion elects to stand mute rather than plead not guilty by reason of insanity, despite that defense being employed.  Why does he do this?
Answer: If the defendant stands mute, the judge will assume a plea of "not guilty". Therefore it has the same legal effect.
There are two possible reasons for Biegler's advice. The first is that a "not guilty" plea would have raised even more scandal in the local community, so Biegler is trying to minimise the societal disruption.
A second, rather more tenuous, explanation might be related to the effects on the defendant's right to Clergy, and the possible effects on right to appeal (see page 513 onwards in this edition of The Complete Bill of Rights).
I think the first explanation is the most likely.


Books for biology,popular but rigorous?

Question: There are very goods in physics and mathematics (like Feynman lectures for exemple) that give an elementry but but broad view of their,therefore I'd like for help to find help to find a biology book that:
-Covers a variety of subject in an elementary fashion.
-Is written for the non-specialist.
Comment: Wikipedia is fairly decent :P
Answer: Where I studied, every undergrad read Campbell Biology. You can start it as a non-specialist but you will not be one at the end..
Comment: Such a good book.
Answer: The Campbell Biology is a good very introductory book to biology. It is popular book but a very standard text book. I am not aware of any popular and introductory book that are broad enough to encompass all of biology.
I would suggest that you get the campbell and in parallel you can follow free online courseware. There are lots of them. Starting with KhanAcademy is maybe a good solution. It gives some introductory courses to a bunch of disciplines. ItunesU is also a good solution to search for further introductory courses given by the best universities such as Berkeley and the MIT typically.
Answer: I would suggest something like "The Selfish Gene" by Richard Dawkins. It covers many examples or organisms and how their behaviour at a molecular level is ultimately selfish in order to ensure survival by passing their genes, which is perhaps the most important biological function of any living organism. However, as pointed in comments below, this book primarily concentrates on evolutionary biology and little else (at least in any noticeable depth) and puts forward many philosophical arguments regarding survival and passing your genes but doesn't talk about proteins or mRNA. "The Extended Phenotype" by Richard Dawkins again is an evolutionary biology book but it does talk about protein synthesis and the idea of phenotype and how genotype effects this and how the genotype of an organism can affect the environment!
Books by Richard Dawkins tends to give examples of whole organisms and in a sense the bigger picture to make his points about elementary concepts which allow life and its propagation and how it shapes the environment but doesn't go too much into details in order to keep the attention of the reader and keep it interesting to the lay audience. [for the lay audience] It is much easier to imagine a bird and its mating habits and how genes control this than knowing the molecular mechanism behind the signalling pathway responsible! However since the question is slightly subjective, my response tends to reflect a subjective response.
Comment: [The Selfish Gene](http://www.amazon.com/The-Selfish-Gene-Richard-Dawkins/dp/0192860925) is indeed a very popular book but it talk exclusively about evolutionary biology and about nothing else. One that reads the selfish gene will probably not have any clue about how mitosis works, about the chemistry of life (proteins, mRNA,..) or about cytology! Also the Selfish Gene gets into some philosophical and epistemiological issues in biology. I don't this is what the OP is looking for.
Comment: indeed. I agree! I shall edit my response to clarify this point. thanks.
Comment: I am a Richard Dawkins fan too !
Answer: Alongwith campbell ,look up some "advanced" books - like  Bruce Alberts molecular biology of The Cell , Lehninger, etc. It is not necessary to read everything in those books. Read whichever topics interest you the most.
There is also a very good site : ibiomagazine.org which has videos of some of the big shots of biology.
And remember, most important is to keep all your senses open always. There is so much biology going around. Observing and thinking about it can teach you things which 100 textbooks can't !

Books for biology,popular but rigorous?


How can I set NeoTree to always show hidden files?

Question: The only way i know to make NeoTree show hidden files is to use neotree-hidden-file-toggle, but this is meant to be used interactively when the NeoTree buffer is the active buffer. Is there a way to globally set in my .emacs init file to make NeoTree always have the behavior of showing hidden files?
Answer: Found here: https://github.com/jaypei/emacs-neotree/issues/117#issuecomment-126751086
add (setq-default neo-show-hidden-files t) to your init.el.
Just in case you use Spacemacs:
add '(neo-show-hidden-files t) in custom-set-variables of your .spacemacs file.
Comment: When a variable is global (like `neo-show-hidden-files`), `setq` is sufficient.  `setq-default` is generally used for things like `buffer-local` variables where a user wishes to start with a particular default value which may or may not be set differently in certain buffers.  Using `setq-default` in an answer leads the reader to believe that the variable is `buffer-local`, which is not the case here.
Comment: @eestrada -- Making a global variable capable of buffer local settings is normally achieved by adding `(make-variable-buffer-local 'neo-show-hidden-files)` and then it can be set locally in any buffer using `setq`.  However, it is possible to use `setq-local` to make a global variable local in a current buffer.  There are a few other methods to take a global variable and use it locally ...
Comment: Shouldn't the instructions for spacemacs say the same thing, that is to use `t` instead of `nil`?
Comment: @lawlist Thank you rounding out the answer. However, I actually do want to be able to set this differently in different NeoTree buffers, so only setting the initial default buffer behavior is correct. Thus the answer is best suited to my needs, even though my question doesn't indicate the need for such flexibility.
Comment: @JurajMartinka you are correct. I don't know what i was thinking back then. I updated the answer. Thanks!


Breadth-first search vs Depth first search in knowledge-based chess engines

Question: I would like to learn about the difference between depth-first and breadth-first search in knowledge-based chess engines (that, of course, excludes alpha-zero). The difference isn't that clear-cut, but, to my knowledge, some engines prefer to go deeper than explore more options per move. It seems that depth-first search, as it is used in Stockfish, has prevailed for now, but I don't necessarily find that obvious. Can anyone point me to research which has been done in this area?
Answer: Strength in chess engines depends on speed and speed depends on how strongly you can prune the tree. That is, how many nodes you can discard without degrading the accuracy of your search result.
In principle you might be able to visit the same nodes using either BFS or DFS, so a priori it is not clear which would be better prunable i.e. faster.
In chess, however, DFS is better prunable because one strong countermove is enough to invalidate a move. Therefore, the value of a move depends more strongly on a small set of next countermoves and the value of these countermoves on a small set of next moves etc. So, Min-Max-Search naturally lends itself to better pruning with DFS.
Comment: I see, that makes sense. I'll take 'Min-Max search' as a starting point in order to improve my understanding of the subject matter.
Comment: The usual term is _minimax_ search.
Answer: There is no need for research. Breadth-first, by definition needs to traverse all nodes at a level before going to the next. It just doesn't work for chess, where the number of positions is too many and most of the positions are just stupid (e.g. dropping a queen). Chess engines always use deep-first.
Comment: Maybe it wasn't clear from my question formulation, but I didn't mean pure DFS or pure BFS. Instead, I simply meant comparing engines that go deeper but explore fewer options per position to engines that go less deep but explore more options per position. It would be very surprising to me if all engines automatically explored the same number of moves per position, on average. It could also be that my question is based on a fundamental misunderstanding. If so, I would be happy if you could point out what I'm missing.
Comment: @postnubilaphoebus: I'm afraid you are misusing the terms then! Breadth-first search is qualitatively different from depth-first search. What you are talking about is simply a speed vs knowledge trade-off.
Answer: One important point to consider is that BFS has a hugely higher space complexity than DFS.
Notation:

b = branching factor = number of moves per step, about 31 in
chess
d = minimum depth of tree till optimal solution (e.g. 10 if checkmate in 10 turns is possible)
m = maximum depth of tree (e.g. 150 moves till draw)

Space complexity of BFS: O(b^d)
Space complexity of DFS: O(b * m)
Assuming that a position with b=31, d=10 and m=150 is evaluated and each node needs 24 Bytes of space, BFS would need about 20 Petabyte of space and DFS only  111 KB, making BFS infeasible. Also keep in mind that modern CPUs only have a few MB of cache (e.g. 16 MB for the i9-9900KS), so they could not even fit all nodes of BFS at the depth of d=4 (22MB).
With strong pruning (i.e. throw away very bad moves), the branching factor can be reduced to perhaps 5-10 good moves per step, but this does not solve the exponential space complexity of BFS.
Answer: In addition to the great accepted answer, I'll point out that engines do differ in the amount of breadth/depth they analyze, even though all of them do use depth first search because of alpha beta search (something you should research if you want to learn more, as all traditional engines use it) being much better optimized for it.
For example, Stockfish is very well known for aggressively getting rid of moves it has to consider through various pruning techniques, so it can consider the best few moves to extremely great depths because it doesn't need to calculate as many positions.


Web scraping using perl

Question: I might ask something stupid but I want to learn some web scraping. I already know how to use perl, so I would prefer to do it using this language. I know there are a lot of modules on CPAN, I tried to read those but I barely understand something. I haven't found anthing that would explain from zero what this process means. I could use some help with some links or some materials to study a little web scraping.
Thanks!
Comment: Wait, what? You want to learn about web scraping, but you don't know what it is? How do you know that you want to learn it?
Answer: At a pretty basic level, 'web scraping' is just downloading a webpage, and parsing it to extract the information you want. At a started level, the module you want is LWP that lets you fetch content, and then 'something' to extract the information you want. HTML::Parser or HTML::TableExtract for example. There's nothing to say you can't roll your own using pattern matching of course, but ... well, processing HTML isn't a new problem, so why re-invent the wheel?
At a more advanced level though, you might want to interact with a site - log in to it perhaps, or 'click through' some menus. For this, I like WWW::Mechanize.
I'm afraid I can't give you much more without a better understanding of the sort of problem you're trying to solve though. Are you at a basic 'fetch a webpage and parse' sort of level?
(You can find details and examples of the above modules on CPAN. The LWP page has some examples that should get you started.)
Answer: I wrote a pretty basic tutorial on WWW::Mechanize here
..I have successfully crawled pages on several occasions so please let me know if you have a case you would like to try and need some help :)
Answer: To start you can look at WWW::Mechanize and HTML::TreeBuilder::XPath modules.
Answer: In my opinion, the best module for web scraping is Web::Scraper. Its language can be quite terse at times, but there are plenty of examples.

Web scraping using perl


What does ∈ mean in the exponent?

Question: I'm having troubles understanding the following proof:
$$
\begin{align*}
&\text{Proof: } \forall \epsilon \in \mathbb{R}^+, \forall a \in \mathbb{Z}^+, n^\epsilon \gg \log_a(n) \\
&\Longrightarrow \ln(a(n)) = \log_2(e)\ln^2(n) \ll n^{0.01} = \ln(d(n)) \\
&\Longrightarrow a(n) \ll d(n)
\end{align*}
$$
The topic is Big O comparisons. The proof is about $a(n)= n^{\log_2 n}$ and $d(n) = e^{n^{0.01}}$. The proof is very heavy in mathematical notation. I'm not sure what ∈ means in the example.  I know that it denotes set membership in a more usual case, but have never seen it in the exponential position.
Comment: whoops, I only saw the $\in \mathbb{Z}$. That there is just $\epsilon$, the greek letter Epsilon. Like most symbols in math, it doesn't "mean" anything. Here it's just a placeholder for any positive real number.
Comment: https://en.wikipedia.org/wiki/Element_(mathematics)#Notation_and_terminology
Comment: @jmite knowing that it is called set membership in a more usual case, but never seen it in the exponential position.
Comment: @jmite Well, it would be very unusual for $\epsilon$ to be used for anything other than a positive real number in a context where "it's a positive real number" would make sense. Indeed, more strongly, it's usually a small positive real. That's a lot of meaning, really.
Answer: That's not $\in$ but $\epsilon$: that is, a lowercase Greek letter epsilon. It's normally written $\varepsilon$ instead for clarity, but this author chose to use the "lunate" form for unknown reasons.
In this case, epsilon is being used as a shorthand for "an arbitrarily small but positive real number". This should probably be explained in the proof, but it's a fairly common shorthand in mathematics (for example, delta-epsilon proofs, floating-point epsilon…).
In other words, it's saying that the log of $n$ is always asymptotically smaller than $n$ raised to any positive power. In the next line it substitutes in a definite value, 0.01, for epsilon.
Comment: The "unknown reason" is most likely simply that LaTeX uses `\epsilon` for $\epsilon$ and `\varepsilon` for $\varepsilon$, which is more typing. And, honestly, $\epsilon$ and $\in$ are plenty distinct enough -- you only need to be told once to know that they're not just "the same thing in different fonts." (Though, historically, $\varepsilon$ was also used for the set membership relation.)
Answer: It's a variable name, like any other. In your property you could rename it to (e.g.) $b$, turning
$$\forall \epsilon \in \mathbb{R}^+, \forall a \in \mathbb{Z}^+, n^\epsilon \gg \log_a(n)$$
into
$$\forall b \in \mathbb{R}^+, \forall a \in \mathbb{Z}^+, n^b \gg \log_a(n)$$
That's it.

Why calling it $\epsilon$, then, instead of a more common variable name?
In maths, it is common to call such variable $\epsilon$ when you could restrict its range to any positive interval $(0,x)$ with $x>0$ and get a completely equivalent statement, no matter how small the interval is. That is, instead of proving $\forall b \in \mathbb{R}^+$ we could only prove $\forall b \in (0,10^{-8})$ and that would be just as good. Indeed, once it is proven for the small interval, it's easy to extend the result to all positive reals.
In a nutshell it conveys the idea that "only small positive values actually matter".
This is a sort-of implicit statement which is suggested every time $\epsilon$ is used. You can safely neglect this "hint" to the reader, and take the statement as it is.

What does ∈ mean in the exponent?


Women and writing a Mezuzah

Question: Can a women write a Mezuzah?
Comment: Here's a female sofer in New York City who's even writing a sefer torah: http://www.hasoferet.com/  she has some comments on her site about the laws concerning females writing Torahs, mezuzot, and t'fillin.
Answer: The gemara in Gittin 45b states:

ספר תורה תפילין ומזוזות שכתבן אשה וכו' פסולין שנאמר וקשרתם וכתבתם כל שישנו בקשירה ישנו בכתיבה
A Torah scroll, phylacteries, or mezuzot [...] that was written by a woman  is unfit for use, as it is stated: ""And you shall bind them… and you shall write them" anyone who's included in the mitzva of binding can write them

This would seem to indicate that a women may not write a Mezuzah.
The Drisha(יור''ד סימן רפ''א) asks why is it that the Tur skips this Halacha about Mezuzah but does say it about Teffilin (אור''ח סימן ל''ט) The Rif and the Rosh also fail to mention this Halacha of women not being Kosher to write a Mezuzah.That is since the above mentioned exception to women states that only those who can not wear Tefillin cant not write it seeing that it does not apply to Mezzuzah nor Tefillin it seems that women may write them. Therefore the Drisha comes out That A WOMEN MAY WRITE A TORAH AND MEZUZAH.
The Beis Yosef the Mechaber(יור''ד סימן רפ''א) changes and says a Torah she may not but makes no mention of not allowing Mezzuzah.
In SH"UT Shagas Aryeh he says the reason that women may not write Mezzuzos is because since we learn out of the word  וכתבתם the laws of writing Teffilin so to Mezzuzah from which we learn out from the Tefillin for sure a women can not write.
We are left with a Question as the Meor Ktziah (אור''ח סימן ל''ט) points out The Mechaber never says a women can not write Tefillin!!!
The Mishneh Berurah(אור''ח סימן ל''ט ס''ק א') brings that according to Halacha that a women may not write Tefillin and answers that the Mechaber did not have to write it explicitly by Mezuzah  because by Teffilin he writes just as a women or slave writes Teffilin is Posul so to by Sefer Torah and Mezuzah and he did not need to repeat himself.

Women and writing a Mezuzah


Calculating Distance and Time on a network without the use of ArcGIS Network Analyst

Question: I'm trying to calculate a distance and time for walking commuters (about 30,000 records) on a street network (NYC Lion).  I have a starting and ending address for each record that have been geocoded.  As far as I know I don't have an ArcGIS Network Analyst extension license at the moment (maybe there's a free trial?) so I'm curious if anyone knows how to do this without Network Analyst.  I have QGIS but I'm not sure if you can batch process records in this capacity.
Comment: Network analysis in Arc requires a Network Analyst extension license. If you don't have it, you could try taking a look at pgrouting in QGIS. It's worth pointing out that per your description, you're looking at 30k route solves regardless of which software you're using (so you would need to batch/model either way *or* solve for a tremendous number of routes and filter the result). Is this a commercial or personal/student purpose? You can get NA for $100 a year (along with a lot of other extensions) with a personal license of Arc.
Answer: Try the Urban Network Analysis toolbox download from City Form Lab.
Link to Download/site: http://cityform.mit.edu/projects/urban-network-analysis.html
Comment: Thanks Cameron, This toolbox looks really interesting but it requires Network Analyst
Comment: Try this link: http://cityform.mit.edu/projects/una-rhino-toolbox . This provides a way to work within Rhino 3D (which can be downloaded for free). There are videos within the link that explain how to export and import data into the rhino software and use the UNA toolbox. This is the only way around that I have found so far.
Comment: Let me know how that works.


SPO modern list view with multiple filters not filtering list

Question: I have run into an issue where I create a view with the filters in the image below (the list is a modern list in SPO converted over from 13' to SPO by share gate). The issue is that I continue to see all of my list items previous to 2017 which date back to 2013. this seems like a Microsoft bug. Has anyone else experienced this and is there a workaround?
Comment: Check your 4th condition, you have added "is greater than" operator... Is it causing this issue?
Comment: no, we have tried all variations of the operator and it does not work as expected. it does work if I remove all filters except the date.
Answer: I have done a  test in my SharePoint online list, when i filter with created is greater than a time, the items are displayed fine in the list.

Try to filter only with created is greater than 1/1/2017 and compare whether the issue exists.
Try to do a test in another list and compare whether the issue exists.
Comment: I have tried using the filter for date only and it works as expected.

We have also tried testing in other lists and we can recreate in several sites and lists(newly created and existing lists)


Upgrading pip on QGIS 3.16

Question: I'm trying to run the Aequilibrae package on QGIS 3.16.14 (on windows)and to do so, it seems that I need to update my pip package.
I tried the command :
-m pip install --upgrade pip
on the integrated python console, but I had an invalid syntax error pointing to the first 'p' of 'pip'.
Since it was the recommended command and I am very new to the python console, I have to admit I'm a bit lost...
Comment: You don't run `-m pip install --upgrade pip` from a python console, you run `python -m pip install --upgrade pip` from a command prompt
Comment: thanks for this tip. I tried it but now have a SSL error trying to run it. ('WARNING: pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.')
Answer: you need to run the upgrade from osgeo4w shell. I tested it on my machine (win 10 Qgis 3.16.13) and it seems to work.
To find the shell two ways :

(if you are on windows) you use windows indexation by pressing windows button on your keyboard and typing the first letters of OSGeo4W, it should appear and you can launch it

you go to your Qgis installation directory and you find OSGeo4W.bat, you double click it and you launch the shell

if you are on another OS, you need to find this shell too, but I dont know where, probably in your installation directory as well

(if you type python in the shell, it should start the interpreter for the python distributed with Qgis, you can exit it by typing exit())
Then, you can run python -m pip install --upgrade pip. In my case I had warnings
WARNING: The scripts pip.exe, pip3.9.exe and pip3.exe are installed in 'myOwnPersonalPath\Python\Python39\Scripts' which is not on PATH. Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location. Successfully installed pip-21.3.1
If you then go to the python console in qgis you can check the version by typing :
import pip
pip.__version__
it should be the upgraded one
see Installing 3rd party python libraries for QGIS on Windows for more details

Upgrading pip on QGIS 3.16


One-to-many without exposing child collections and/or foreign keys in the model

Question: I'm having a problem with Dapper when I do not expose my foreign keys and child collections in the POCO model.
Let's take a simple example with the two entities:
Bike (Id, ModelName)
Tire (Id, Tread)

In the database each Tire has a foreign key to Bike. But my model does not.
From the database, I want to materialize this structure into a Dictionary<Bike, IEnumerable<Tire>>. Where each Bike (unique) will have two tires.
I could select this one-to-many relationship using the following query:
SELECT b.Id, b.ModelName, t.Id, t.Tread
FROM Bike b
JOIN Tire t ON b.Id = t.bike_id

In order to map that using Dapper, I have done the following:
var dbResult = connection.Query<Bike, Tire, KeyValuePair<Bike, Tire>>("sql-query-above",
(a, s) => new KeyValuePair<Bike, Tire>(a, s);
splitOn: "Id");

And to turn that result into my dictionary, using LINQ:
Dictionary<Bike, IEnumerable<Tire>> dict = dbResult.GroupBy(g => g.Key, g => g.Value).ToDictionary(g => g.Key, g => g.AsEnumerable());

And it correctly returns the data structure:
Bike #1
 - Tire #1
 - Tire #2
Bike #2
 - Tire #3
 - Tire #4

But is this the most efficient way of materializing this data structure?
An alternative would be to avoid the dictionary and create other entities that exposes the foreign keys and relationships (e.g. Tires collection on Bike and FK on Tire), and use a mapping approach like described here.
But I would like to avoid that in my model because it would result in lots of extra classes. But what about performance? Is this worse or the same?
Answer: I am no expert at using Dapper but I have run into limitations with it like the one you're experiencing. I had a similar situation where one of the properties in my object was a collection like you tires. I found it was simpler to create a second query to populate those inner types of collections with an extension method.
So you might just grab all the bikes first and then call your extension method to grab the tire data like:
dict.WithTires();

I know its a second call to the database but the tradeoff is that you can still grab a bike without having to get the tires information everytime.
Also, you might think about adding the tires collection as a property to your bike class which IMHO is better than uing a dictionary. If you had something like this:
public class Bike
{
    public int id { get; set; }
    public string modelName { get; set; }
    public IList<Tires> tires { get; set; }
}

public class Tires
{
    public int id { get; set; }
    public string tread { get; set; }
}

You could easily create an extension method for grabbing the tire data for an individual bike or a collection of bikes:
Bike myBike = new Bike();
List<Bike> bikeCollection = new List<Bike>();

myBike.WithTires();
bikeCollection.WithTires();

Comment: Thanks Colin, but in this case the problem is that I need to load the Collection in one trip to the database and materialize the dictionary.


Informal vs. formal journal acceptance letter

Question: I got a letter from a journal editor telling me that they 'would be happy to accept my paper'; the editor asked me to take care of some minor citation issues (I carelessly misspelled one author's last name and I misplaced the publication year of a cited work.) and then upload the final version of the manuscript to the submission system. Although this letter sounds very certain/positive to me. I am still a bit wary and anxious (after all, this is still not a formal acceptance letter). I quickly resubmitted the final version of the paper to the submission system in the same day. It has been two weeks since I heard from the editor and resubmitted the final file. I know that it's impossible to expect a speedy response. But, in my scenario, how long should I wait to write back to the editor and ask for a formal acceptance letter (or is it even okay/appropriate to do this?) At this stage, should I be worried (about any possible hiccups that may stand on the way of getting the paper published)? Thanks very much for your insights and experience sharing.
Comment: Not an answer to your question, but: is there any evidence that a referee looked at your paper?  Otherwise, what you describe sounds rather sketchy.  This isn't one of those low-quality pay-to-publish journals, is it?
Comment: sorry that I did not make it clear that I have to 'fix' the citation issue because I carelessly misspelled one author's last name and I misplaced the publication year of a cited work. No, the journal is one of the best journals in my field, indexed in SSCI. Also, I know that it was not sent back to the reviewers (as shown by the submission system: with the editor).
Answer: You shouldn't worry much.  It's extremely unlikely that an informal acceptance will turn into a rejection, although I suppose it is theoretically possible.  In my experience, this is something editors do to get leverage over authors: authors are faster and more diligent about making revisions when acceptance has not yet been guaranteed, even when they know it is almost certain.
I wouldn't worry about the two week delay or get in touch with the editor yet.  For example, if the editor is in the U.S. the Thanksgiving holiday intervened, and the end of the semester is always a busy time.  It's also possible that the editor is checking with a referee (although this may not be necessary for such minor revisions).  It can't hurt to ask whether the revised paper was received, but I'd recommend waiting another week or two.
Incidentally, asking you to add citations sounds a little odd.  Are these from a referee report, and do they look like important references that you missed?  One unethical thing editors are occasionally tempted to do is to pressure authors to add citations to manipulate citation rates.  (For example, adding citations to their journal or their friend's journal.)  That's not necessarily going on here, but if it is then it's an inappropriate use of informal acceptance to get leverage over authors.
Comment: Thank you very much for your information. I totally forgot about the fact that it is now the thanksgiving holiday in the States. This could take some some time. Sorry that I did not make it clear that I have to 'fix' the citation issue because I carelessly misspelled one author's last name and I misplaced the publication year of a cited work.
Answer: I agree that you have nothing to worry about, but I slightly disagree with the premises of Anonymous Mathematician's answer. Basically, I don't think there is such a thing as an "informal acceptance letter". Or, to be a bit more precise, I don't consider a distinction between formal and informal acceptance letters to be a helpful or a particularly meaningful one. Rather, the distinction that may be worth making in connection with your situation is between simple acceptance and "conditional acceptance". Another distinction that may be relevant here is between a well-written letter and a poorly phrased letter.
Let me explain: a conditional acceptance is one where the editor indicates willingness to accept a paper conditioned on the author making certain revisions to the manuscript that are deemed to be satisfactory. It may be reasonable to characterize the letter you got as a conditional acceptance letter from a purely logical point of view, but honestly, given the fact that you were only asked to make a couple of changes of a purely cosmetic nature, I would view this as semantic nitpicking. If, as Anonymous Mathematician said, the "informality" of the acceptance means that the journal still has a theoretical option to reject your paper, then I would argue that by the same logic they could do that even with a more formal, or less conditional-sounding, acceptance. After all, it would be no less ridiculous for them to argue that they are now rejecting the paper because you failed to satisfy the "condition" of correcting a couple of typos, than it would be for them to retract a completely formal, unconditional acceptance. If you look around on Academia.SE you will find examples even of such crazy things happening on very rare occasions.
Personally, given the "I would be happy to accept" wording and the modest nature of the corrections you were asked to make, your letter just sounds like a simple acceptance letter to me, which brings me to my second point about the distinction between a well-written and poorly phrased letter: some people -- in fact, rather a lot of people -- use language in a careless or sloppy manner and/or are not sensitive to nuances of the English language such as the difference between a conditional and unconditional verb conjugation. I think it's quite possible that the editor used the conditional tense not as a way to pressure you to submit your revised manuscript faster as Anonymous Mathematician speculated, but simply out of a lack of awareness of how the writing would be perceived by you, the recipient of the letter, and without realizing that the lack of clarity on what would happen after you submit your revised manuscript would result in needless worrying on your part, you posting a question here, us writing an answer to your question, etc.
To summarize: congratulations on your paper being (in)formally and (un)conditionally accepted to one of the top journals of your field! You have nothing to worry about, but to once again differentiate myself from Anonymous Mathematician, I won't tell you that you "shouldn't worry"; it is human and reasonable to worry, and it is human and reasonable to be annoyed at an editor who uses needlessly ambiguous language in an acceptance letter. What I would probably do in your situation is to wait a few more days and, if I still don't hear anything, send an email to the editor politely asking for an acknowledgement that my revised manuscript was accepted and for confirmation that the acceptance is "formal". You may in fact need to do this for your peace of mind, since my guess is that without contacting the editor yourself you may not get any more "formal" acceptance notification than the one you already got. (You will probably get some correspondence from the publisher at some point about galley proofs of your paper, copyright transfer forms etc., which would be an implicit confirmation of the acceptance, but this could not happen for many months.)
Comment: Thank you so much for taking your time to respond to my inquiry, which not only addresses my question but also turns my question into a learning opportunity to me and other (junior) scholars in the field. I agree with you that 'simple' acceptance seems to be more applied to my case. Thank you also for the suggestion regarding what I should proceed. Thank you once again for your information and experience sharing. I really appreciate it.
Comment: @NYC10027 no problem, you're very welcome. By the way, I've been frustrated by poor email communication myself many times, including from journal editors, and still often find myself baffled about such things, so this is by no means an issue only junior people are frustrated about.


Where can I find head MRI files?

Question: I have to calculate some anatomic values on different brains so I have to work on different MRI images for my project. Where can I find MRI images for this?
Answer: Brain Imaging Data Structure (BIDS) is a simple and intuitive way to organize and describe neuroimaging and behavioral data. You can find it on bids.neuroimaging.io.

BIDS is heavily inspired by the format used internally by the OpenfMRI repository (now known as OpenNeuro.org). While working on BIDS we consulted many neuroscientists to make sure it covers most common experiments, but at the same time is intuitive and easy to adopt. The specification is intentionally based on simple file formats and folder structures to reflect current lab practices and make it accessible to a wide range of scientists coming from different backgrounds.

Full public datasets including MRI data (for data analysis) can be found on openneuro.org. Other BIDS example data can be found in this GitHub repository.

Where can I find head MRI files?


Where can i get the aerodynamic data of aircrafts for controller design and testing?

Question: I have some research papers on aircraft controller design that i want to simulate, but no system data is given in the research paper itself. I am also unable to find the aerodynamic data for any commercial/fighter aircraft anywhere.
So i want to know where do the academic researchers get their data sets from? And is there some way for me to get trimmed or untrimmed aerodynamic data for my simulation?
Comment: Amazon has many of major manufacturers spec books. Some even  have online complete with training videos.
Comment: Some get data given by the aircraft manufacturer, some final year students get projects from companies - it all depends on the links the institution has with industry.
Answer: I think I might get this question wrong, but if you are looking for aerodynamic characteristics and data of wing sections (aerodynamic profiles), we often use websites like Airfoiltools.com. You can also model and generate basic characteristics of chosen 2D shape in simple programs like XFOIL, or use XFLR5 by Mark Drela from MIT to extrapolate 2D characteristics to 3D shapes (wings and even whole airplanes with fuselage etc). If you are looking for data of already existing aircrafts you can try finding their "Operation Manual" / "User Manual".
P.S. For small models, flying with low speed = with low Reynolds numbers, the programs I mentioned are accurate enough, but for bigger airplanes they are too simplified