Similar objects same labels

Question: Example: red paprica and green paprica. The output I need is just paprica, should i label them the same or give them two labels "green paprica" and "red paprica" and leater on just treat them as one? Other example: 5 cent coin, "heads" and "tails". Output i need is just 5 cent coin. From machine learning point of course. Are there downsides and upsides of splitting labels or keeping them together in terms of accuracy?
Answer: If you only need to predict whether an object is a pepper or not why bother predicting whether it is a red pepper or a green pepper, you are making your problem more complicated than it needs to be. In my opinion you should try to make the problem you want to solve as simple as possible so I would advise using the shortest label possible as long as it solves your problem.

Similar objects same labels


What concessions did India make to get a 9% discount on the Rafale jets deal?

Question: The Modi government claims that the Rafale deal it brokered is cheaper than the original deal by 9%. How did it achieve this? What concessions did Modi give to Dassault in order to get the deal at a cheaper price?
Comment: Rafale aircrafts are reputably so expensive that they're very hard to sell. It could be that he simply placed an order.
Comment: Background: https://www.bbc.co.uk/news/world-asia-india-45636806 ; I suspect the actual reasons will be shrouded in secrecy.
Comment: 9% discount is not much. The company selling the fighter jets probably still makes a decent profit.
Answer: The said 9% discount is not a discount but a value-addition service done by Anil Ambani's Reliance and probably HAL. I.e., Dassault will transfer technology, and the aircraft will be built locally. Also, Dassault will invest 30% of the money back into India.
This is not a new maneuver in the history of the Indian defense industry. Previously, the Su-30MKIs went through the same type of negotiation and process. The only difference is that Rafale is an over-the-board expensive aircraft; therefore, it needed additional measures to cut costs.
The following is my observation:

Rafale was a way over the board expensive aircraft, and the BJP government, in no way, did any favor to the Indian taxpayers by purchasing this aircraft.
i. Rafale is a costly aircraft in the first place. When the UPA government was negotiating to purchase Rafale, that was probably part of the Indian MMRCA competition, where many manufacturers competed. Rafale did not come out to be the best aircraft in the competition considering strategic interest, money, and performance. The BJP government scrapped the whole MMRCA competition and started government-to-government negotiation, which was a wrong move to begin with.

Rafale deal helped some businessmen to earn money. Therefore, BJP was not a saint. They indeed had some monetary transactions between the party treasury and those businessmen. However, that would probably be kept a secret forever unless a BoFors-style scandal ensues.
i. Clearly, Anil Ambani's Reliance was a huge beneficiary of this Rafale deal. Please note that Anil Ambani was facing imminent bankruptcy, and this deal probably saved him.
ii. Rafale's negotiation involved bribing. Susen Mohan Gupta worked as a middleman, and allegedly Dassault Aviation bribed him so that this deal could go through. It is not clear who he was working for. Was he working for Dassault Aviation or BJP or Reliance - this is a burning question.

So, the conclusion is,
BJP successfully pulled a substantial political move and brainwashed the entire nation into believing that Rafale was a ground-breaking deal that would benefit India in the decades to come.
The truth is - either it was an expensive deal, or it was a regular deal.


Tapping a creature on the turn it enters play

Question: Let's say, for example, I summon a Gemhide Sliver this turn. Am I allowed to tap the Gemhide sliver for it's ability the moment it enters into the field, or is it affected by summoning sickness?
Comment: @CharlesBoyung No need to respond like that. The rules for MTG aren't as straightforward at the beginning. My friends and I took a few weeks before we were confident with what could and could not be used right after a creature was summoned. The fact some things could be used and some couldn't was confusing for a while.
Comment: I'd say that it's more you can activate Glare's ability by tapping the Sliver, because that's not the Sliver's ability. (The fact it doesn't use the {T} is more relevant if you turn Glare into a creature and use its ability while it still has summoning sickness.)
Comment: You could tap it for [Glare of Subdual](http://magiccards.info/rav/en/207.html), however. That does not use the {T} symbol.
Comment: Wow, I don't think I've seen something so basic asked as a question here. Even if you only START to read the rules of the game, this is covered, and has been in every edition of the rulebook since Revised at the very least.
Answer: It will have summoning sickness; you cannot active its ability this turn.
From the comprehensive rules:

302.6. A creature's activated ability with the tap symbol or the untap symbol in its activation cost can't be activated unless the creature has been under its controller's control continuously since his or her most recent turn began. A creature can't attack unless it has been under its controller's control continuously since his or her most recent turn began. This rule is informally called the "summoning sickness" rule. Ignore this rule for creatures with haste

A creature that has the Haste ability can tap immediately, so unless you have a Reflex Sliver on the 'field, you will not be able to tap a Gemhide Sliver for mana on the turn it comes out.
Answer: There is a comprehensive rule citation, but basic questions should also have basic references.
Basic Rulebook, page 6:

Unlike other types of permanents, creatures enter the battlefield with "summoning sickness": a creature can't attack, or use an ability that has {T} in its cost, until it has started your turn on the battlefield under your control. You can block with a creature or activate its other abilities no matter how long it's been on the battlefield.


How make snoozing iphone alarm go away for today?

Question: Very often by the time I get tothe phone it's lock screen is already on and black so when i wake it up the alarm goes to snooze and i have not found any way to disable the alarm for today unless I go to the alarm settings and switch it off and on again.
Answer: Instead of swiping the snooze to the right like you would if unlocking, swipe to the left, then push the x.  Done
Before swiping, the screen will look like this:

After swiping left on the "Snoozing" message, you should see:

Clicking on the small cross should then cancel the alarm.
Comment: I've added some screenshots to the answer. (They will need to be reviewed before they appear, but I hope they will help).
Comment: @bornfromanegg not everyone comes back or even understands what the Accept mark does. Keep on voting and asking and answering. That's the best way to grow the site :)
Comment: @bornfromanegg because on my 5c and ios931 it doesn't want to swipe to the right; swiping the alarm itself to the left unlocks the phone then SLEEPS the alarm again. That might be why it's not more accepted.
Comment: @frumbert I have iOS931 and it works fine. "Swiping to the left" means placing your finger on the screen and moving it to the left. If you do this on the "Snoozing: x:xx remaining" message you get on the lock screen after you have snoozed, then a delete button (an 'x' in a circle) appears. Remember, this question was about how to cancel the alarm *after* it has been snoozed.
Comment: @bornfromanegg yes, after the alarm has been snoozed, swiping to the left  as you say does NOT produce the delete button on my iPhone5C iOS9.3.1
Comment: Hmm. Are you definitely swiping the "Snoozing: x:xx" message - not the "Slide to unlock" message?
Answer: As you already know, if you unlock your phone while the alarm is going off, the alarm is acknowledged and won't sound again until the next day.
If the alarm is snoozing, it seems that the only way to prevent it from going off again is to manually turn it off (and on) again. The only help I can offer is recommending that you unlock the phone by sliding the clock icon where it says "Snoozing" on the lock screen, as that will at least take you directly to the alarms menu.
I imagine that they have this obstinate functionality because people might use alarms for other purposes than waking up, and they might be using their phones for other things and perhaps don't see the alarm.
Comment: That is not what happens for me, otherwise I wouldnt be unhappy about it. Maybe because i disabled the unlock password and fingerprint scan?
Comment: Hmm... I'll have to try to make it happen for me. I feel like it has happened under some circumstances like you say. I'll let you know what I find.
Comment: Yeah, it doesn't turn off unless you get it while the alarm is going off, huh.
Answer: Everybody is missing the point. He said that, by the time he got to the phone, it was already black. Swiping doesn't work. Hitting buttons doesn't work. I know. It happens to me. The one thing you can do is to tell Siri to turn off all your alarms. That works 9 out of 10 times for me, but sometimes it doesn't. I think it would be nice if the phone didn't go black so fast. Then you could pick it up and swipe to the right.
Answer: Just activate it with the home button then you can slide then lock the phone
Answer: Try restarting the phone. It worked for me. All thought it's a year later lol


How to install Windows 7 onto cFast USB flash disk

Question: I have a cFast USB 3.0 (eSATAp) flash disk and I am trying to install Windows 7 to it. When the installer displays partition list, my cFast drive does not appear. It is formatted as a normal NTFS disk and shows up properly under computer local disks.
Answer: While installing Windows 7 you get offered to load third-party Drivers.
In the bottom-left corner it says "Load Driver".
You should check your USB Device Manufacturers Website for additional drivers.
Comment: Unfortunately, Addonics do not have drivers for this reader.
Answer: After spending some time with partitioning finally found a solution. When partitioning the flash disk (cFast) using built-in windows disk management, in order to be able to install an operating system to it the partition must be marked as Primary and Active.


How Windows Portable Executables are portable across machine architecture

Question: Is Windows Portable Executables are really portable across machine architectures? If so how it works? If not then what does "Portable Executable" mean or which part of executable is portable?
Thanks, Siva Chandran
Answer: The executables aren't themselves portable.  PE format is "portable" in the sense that executables for different architectures use the same PE format, but the executable code within a PE file is specific to a single processor architecture.
In practice this means that a lot of the same compiler and linker code can be reused for different architectures, and that tools for examining executables can (to some extent) work for "foreign" executables.
(I'm talking about native executables here - .NET assemblies also use PE format and can be truly portable.)
Answer: From Wikipedia:
"The term "portable" refers to the format's versatility in numerous environments of operating system software architecture."
http://en.wikipedia.org/wiki/Portable_Executable
Answer: Well, it is portable in means of that the format can be used for executables on various platforms (SkyOS used it before they switched to ELF). It is not portable in means of platform independent code or that if you produce a PE file on one OS that it runs on another.
Answer: PE-files are just containers for binary application data.
They allow to target different CPU architectures (or even non-CPU software architectures like .Net). That is why they are called "portable".
Each binary application image they contain, however is suited for exactly one architecture.


Is there a Stack Exchange site that is to Stack Overflow as Math.SE is to Math Overflow?

Question: Math Overflow is primarily for research-level questions and minds. Math.SE is for graduates and undergraduates and non-professional (but not incompetent, I'm not speaking foul here) enthusiasts.
Is there any similar 'brother' to Stack Overflow for 'really beginner programmers'? I couldn't find any SE sites of the sort in the complete list. I heard of Area 51 but I wanted to see what you see here first. That's besides that I can't login to area51 yet.
Note: Programmers SE isn't what I need. I don't need a site for concepts but really the Math.SE/MO is the best analogy there is.
Comment: Beginner questions are welcome on Stack Overflow as long as they're good - just like "expert" questions.
Comment: Well formed questions that show research effort, even if they are very  "basic", are answered really fast. I don't see the whole crowd on SO getting tired of them - great rep. generators actually. **But** keep in mind that SO (and the other SE sites) are not forums. It's Q&A - if you need/are looking for mentoring, you're pretty much  on the wrong network.
Comment: @Mat, Still, -and I know I will be so- professionals get tired quickly from _really-starting_ questions that's why math.SE was welcomed. I don't think SOF's users would be that patient with _really-starters_ and no one can blame them. // Oh, and I certainly didn't mean low-grade/weak/ill-said/ill-formatted questions when I said 'beginner.'
Answer: Math Overflow is basically an aberration, an artifact of an earlier time. They're not actually part of the current Stack Exchange network, but rather one of the few Stack Exchange 1.0 sites still hanging on.
Just like Mathematics.SE accepts questions from people of all levels and education, so does Stack Overflow. It doesn't matter if you're a beginner or an expert (and really, even the experts in one thing are beginners in something else), if you ask a valid question that can be reasonably answered in our Q&A format, then you're a valuable member of our community.
Follow the rules and guidelines set out in the FAQ and ignore anyone who tells you to do differently.
We don't have an "experts-only" requirement for a reason. Not only is everyone welcome, but we're here to learn things and self-professed "experts" aren't interested in learning anything because they think they already know everything.
If you're looking for a place to sit around and socialize with fellow "experts" (read: elitists), then you'll need to find a different online community. This one is for "professional and enthusiast programmers, people who write code because they love it". It requires that you "treat others with the same respect you'd want them to treat you [because] we're all here to learn together". It requires you to "be tolerant of others who may not know everything you know". It asks that you "bring your sense of humor".
Unfortunately, one thing that beginners to programming need is a teacher, and that is something that the Stack Exchange platform cannot and does not hope to provide. This isn't a limit of Stack Overflow, but rather of the structured Q&A format of the site. We do not provide lists of resources nor will we write complete solutions for you. You will have to find the resources and time to learn programming on your own. However, if during the process of learning, you should run into a problem that you cannot figure out, that's something you should ask a question about on Stack Overflow. Remember that we are here for "practical, answerable questions based on actual problems that you face".
Answer: NO - there is no "really beginner programmers" Q&A site in the Stack Exchange network... Any technical, programming related question should be asked on Stack Overflow.  That said, If you are planning to ask beginner questions on Stack Overflow - here is somethings to keep in mind -
SO is not a place to learn to learn to program from scratch...
To borrow from this post -

Stack Overflow is not your personal research assistant
The Stack Overflow community is very forthcoming with their help, provided you have done a few things to help yourself.  Have you:

Put some effort into researching the problem,
Attempted to write some code yourself
Attempted to debug your code when it has failed, and
Some basic, fundamental knowledge of your tools?

The fourth item here is what I want to highlight.  Users on SO are not going to walk you through the basics of programming, you'll have to come with some knowledge of your own.  Basic questions (as has been said) are welcome, however you should not expect to get answers to fundamental questions such as

what is a string?
what is an array?
how to start learning to program...
etc...

The examples I have might be a bit extreme but the point I'm trying to convey here is that if the questions are too basic you won't get positive feedback on them.  Make sure you have some idea of what you are doing or want to do before posting a question.
Comment: @M.Na'el: Maybe this helps you: http://wiki.python.org/moin/BeginnersGuide/NonProgrammers
Comment: Actually, my background is mostly undergraduate-math and I was looking forward to pick up programming as well. Sadly, I could find very few good resources to teach programming and actually define its world. Without money to get professional assistance, there's nothing left but ask off-line, non-human help. So basically, the exact question I asked _this_ question for was "What are good resources to get acquainted with programming and the different language?" Then the same for the language I'd pick up. I never said I was asking for step-step tutoring.


Will we have to die twice?

Question: As far as I am concerned, at the time of Qyamah people will rise from the graves  and other people will see them but ultimately everyone will be destroyed. So, the people who rise from their graves will they die again and thus ultimately end up diying or tasting death twice?
Answer: First of all look at the following verse:

قَالُوا رَبَّنَا أَمَتَّنَا اثْنَتَيْنِ وَأَحْيَيْتَنَا اثْنَتَيْنِ
  فَاعْتَرَفْنَا بِذُنُوبِنَا فَهَلْ إِلَىٰ خُرُوجٍ مِّن سَبِيلٍ ﴿١١
They will say, "Our Lord, You made us lifeless twice and gave us life
  twice, and we have confessed our sins. So is there to an exit any
  way?" (11)

As well as the mentioned verse, it is said from Allameh-Tabatabae علامه طباطبائی  as a Shia scholar (by helping of other verses): The human when entered the Barzakh, would be dead in comparison with the world and would be alive in compassion with Barzakh. And when he transferred (went) to Qiamat-al-Kobra, he would be dead in comparison to Barzakh and would be alive than Qiamat-al-Kobrah.

Reference:
www.tebyan.net
http://tanzil.net
Comment: I meant about the rising from graves which I described in the description....
Comment: Your answer was kind of irrelevent

Will we have to die twice?


Avoid verification code request when using sudo using Google authenticator

Question: I've just activated the two factor authentication using Google authenticator and I'm now required to provide the verification code any time that I use sudo. How to avoid the authentication step when using sudo while preserving the layer of securing when logging in?
Answer: Just came across this question while looking for a solution to this problem myself. This is how I have managed to have Google Authentication in the existing services except when using sudo. I assume you have added the following line to /etc/pam.d/common-auth in order to enable the Google Authentication:
auth    required    pam_google_authenticator.so    nullok

In the same /etc/pam.d directory you should have a file called sudo which handles sudo authentication. This file should contain a line
@include common-auth

This is pulling the content of the common-auth file which is forcing the additional google authentication to be implemented.
NOTE -> you should make a backup of your sudo file before proceeding (just in case).
In order to solve this, copy the contents of the common-auth file into the sudo file below the @include common-auth line.
Then comment/remove the lines
@include common-auth

and
auth    required    pam_google_authenticator.so    nullok


Meaning of "make some benjamins"

Question: Big Smoke: Yeah, yeah, it's cool. Now, the way I see it is that we don't have a choice. Ain't nothing to feel bad about. You put a gun to a brother's head, brother's gonna do what he's told, no matter if he's a fool or a wise man. You don't want a bullet in the brain, but if you can make it work and make some benjamins while you at it, then that's cool.
Comment: Hi, welcome to ELL! Just to let you know, it's worthwhile to show what effort you put in to researching the topic about which you're asking. Did you try searching for the phrase in a search engine? What difficulty did you encounter? Questions which appear to be simply the result of laziness will often be downvoted. It's worth taking the tour and learning how to ask good questions which will help your status. (Also- if there's an acceptable answer, it's proper to "accept it" which benefits you as well as the answerer. All the best!
Answer: This is very easy to just look up in a search engine of your choice. I searched 'benjamins meaning' and the first result was:

Today's word is Benjamins. It is a noun meaning hundred dollar bill. The word comes from the name of a famous American whose face is showing on the hundred dollar bill. His name is Benjamin Franklin. Therefore, a Benjamin means a hundred dollars.

Also found in the Merrian-Webster dictionary:

Benjamin noun (2)
  Definition of Benjamin (Entry 2 of 3)
  US slang
  : a hundred dollar bill
  Along the way, he amassed a small fortune, which he keeps in neat stacks of Benjamins in a closet by his bed.
  — Ben Mezrich

Meaning of "make some benjamins"


How to deploy git-versioned web apps through WebDAV?

Question: I have:

Mac OS X
web app being developed using PHP, etc
basic git knowledge ;)
remote hosting server with WebDav access
possibility to manage server files using local git binary via Terminal and WebDav

I don't have:

git installed on my remote server
ssh access to my remote server

What I do now?

Develop my app locally.
Mount remote server as volume using WebDav (remote files behave like "normal" files in MacOSX)
Copy and replace (upload) my web app to remote server using normal OSX functionality.

What I want to do?

Track my web app files using git (git init,add,commit works well as for now)
Deploy (upload) my web app to the server using git and WebDav.

What is the best way to achieve these goals? I am able to use local binary of git app on remote files using Terminal and "cd"-ing to them thanks to the mounted WebDav volume. What's next? Do I set up a "git remote" on my local repo and then push changes to the server? Or maybe vice versa, I set up a git remote on my server repo and pull changes from my local repo?
I imagine that I could for example have two deployment directories on the server, one that I push a stable branch to (public accessed website version) and the other one for testing purposes ("unstable branch"). I could easily return to an older version of website if something doesn't work using git...
Thanks in advance for your help, I promise that I tried to find a good solution myself, but didn't find anything that would answer all my questions.
Answer: You can huse githooks. They are small scripts that are executed after some actions in git.
For instance, if you want to upload your repository to the webdab folder everytime you commit some changes, you can add a hook on commit with cp -fr /your_git_dir/* /your_webdav_dir/


expressing consequences with "as" + present simple

Question: Looking up "as" in an English dictionary,  I once came across this example: "such a bright light as makes your eyes ake".
Is the simple present correct here? I would actually  expect the infinitive (...."as to make your eyes ake").
In case it is correct, could anyone show me some more examples (either from everyday's life or any book writer)?.
 Thank you very much in advance
Answer: The spelling ake rather than the modern ache is a clue:

The old fellow shall live till he makes his heart ake, I can tell him that for his pains. —The Spectator, 1803.

As + 3rd per sg transitive verb, once a common construction, is not nearly as frequently used today. It is grammatical, but dying out.

Add to this, that the near Neighbourhood of those Mountains causes such Reflexion in the Day Time, as makes the Heat excessive … 1734.
Is not this such Love as makes your Blood run cold? as causes the Ears of him that heareth to tingle? — John Wesley, 1755.
The art of handing Baby round to kiss, during dessert, in a manner so enticing as will make your richest old friend present anxious to stand godfather. —  Punch Magazine, 1872.

There are a few exceptions where one may still find this construction, both with verbs with the no longer productive prefix be-: become and, as @ChuckkHubbard pointed out, befit:

In the earlier works Berkeley's expository principles are put forward in a dialectical and necessarily blunt fashion as becomes a reformer. 2012.
This is a very large book, as befits a long life and a career that included high achievement and deep failure. 1996.

Use with a linking verb has never gone out of fashion:

Let us begin — as is fitting — with what is familiar. 1997.
If this is not so, again, punish those responsible as seems appropriate. 2014.

The verb appear is more limited in this construction, but still current in official or legal contexts and in making a citation:

…the court shall make such order as to the postponement of the trial as appears necessary.
A revised Memphis Conference Budget Summary 2012 Askings (as appears on page 18 of the 2011 pre-conference booklet) has been prepared by Conference Treasurer James Finger…
Comment: One phrase where this can still be heard occasionally is with "befits": She was buried in the cathedral, as befits someone of her position." From https://dictionary.cambridge.org/dictionary/english/befit
Comment: @ChuckkHubbard: thanks for pointing that out. I added _befits_, which made me think of _becomes_ and to make a note of linking verbs.


Isn't the master branch just a surrogate of tagging in the gitflow model?

Question: Reading the gitflow model, it seems to me that the master branch is there only to provide a branch where to store stable versions. What does that add to just tagging develop with the stable versions?
Comment: I've already found an issue with just tagging `develop`: hotfixes. Hmm, still curious about other pitfalls.
Comment: `gitflow` also assumes there is an integration phase in the `release-*` branches, and that work might evolve for some until it becomes a stable release while the `develop` branch has progress further in the mean time. Simple tagging wouldn't allow you to capture that.
Comment: @HugoFerreira How so? If you were to simply remove master from the gitflow model, then the release branches would still be there and develop would still continue. And once release is joined back to develop, it can be tagged as the new version.
Comment: well, the tag would have to be in the `release-*` branch (which are not meant to be long lived branches) to accurately point to the actually release code, and not in the `develop` branch because you might have added new commits to `develop` in the meantime. The image in the link is a bit erroneous because it doesn't illustrate that, while you're doing the release, other devs might be committing to `develop`.
Comment: @HugoFerreira Oh I see.
Answer: It is similar to the question "Why do we say 'today', instead of 'the day that started the last time the clock went from 23:59 to 00:00'?"
Having the concept of "latest stable" codified in a branch rather than something you have to search for simplifies things.
Whenever you need the latest stable version of the code, you check out the master branch. If you only use tags to mark stable versions, you'd need to first find out what the latest version was so you can check out the correct tag.
You can also feed it into your production line; any time a commit is made to the master branch, that triggers a build and deployment of your product.
You could do all those things without a master-branch; without any branches or tags at all. But it is easier with them, and the whole point of git-flow is to make things easier. Easier to know what you should do, what others do and to communicate about those doings.
Answer: Not quite/completely. But you're not far off.
Sure, it does give a stable name to the tip of the state of
production. But the "release" process is so incredibly rigid that you
hardly gain any information from the branch itself:

Every commit to master is a true merge from some other branch
Every commit to master is tagged
Every commit to master is a new production release by definition
(italics in original)

master has become so bubble-wrapped that you can clearly make out what
master is even if it was to turn invisible.
So what do you gain? You get an effective alias for the latest release
tag. Okay. Is that hard to remember, or to look up? Since all commits to
master are true merges (--no-ff) you also get to navigate back to
previous versions from each commit on master by following the first
parent. (What for?) Another thing you gain is that you can easily see
what the previous versions were named. But your versions were probably
some appropriately boring monotonically increasing things, so I don't
see what you will learn from that.
You also gain this:

Therefore, each time when changes are merged back into master, this
is a new production release by definition. We tend to be very strict
at this, so that theoretically, we could use a Git hook script to
automatically build and roll-out our software to our production
servers everytime there was a commit on master.

For the price of all that ceremony, you gain the ability to indirectly
push a "deploy" button by committing to a branch instead of pushing the
"deploy" button directly.


On U.S. Treasury getting a percentage of sale of TikTok to Microsoft

Question: Regarding the potential sale of Chinese company TikTok to Microsoft, Trump "says he told Microsoft's Nadella that U.S. should get a cut 'because we're making it possible for this deal to happen'".  Are there any laws that would enable Trump to make this a condition of the sale?  Conversely, are there any laws that would prohibit this?
Comment: It wouldn't be a condition of the sale, but of regulatory approval of the sale.
Answer: The law which allows the government to have any say in the question is 50 USC 4564, by which presidents have blocked the sale of US property so that they become under the control of foreign persons. For example, the acquisition of two Chinese companies were ordered to divest themselves from Stayntouch, a US company. The sale of Qualcomm, a US company, to two foreign companies was blocked under that same law. The transactions affected are described in
50 USC 4564(a)(4)(B), all of which involve acquisition of a US business by a foreign person. This is the opposite of the proposal that a foreign company be acquired by a US company (I am setting aside the possibility that the government could threaten MS with antitrust action).
Subsection (d) concerns when and how the president can take action regarding a covered transaction, namely that the president deems that it threatens to impair the national security of the United States, and allowed legal actions (in US district courts) are to implement and enforce this particular law. A kickback does not relate / eliminate a national security threat.
Acquisition of a foreign entity by a US entity is not a covered transaction, and Congress did not authorize taxing a US company for the acquisition of a foreign concern. CFIUS or Trump can order ByteDance to divest from TikTok (foreign companies), because that is authorized by Congress.


Book suggestion for practicing tough Ordinary DE problems

Question: I am preparing myself for a post undergraduate (masters) entrance exam in mathematics. Can someone suggest a really good practice material with challenging questions of all types for ordinary differential equations (any order/homogeneous/non-homogeneous etc.)? Do you think Differential Equations - Martin Braun useful for this purpose? I don't want any elementary text as I already have it, I think a good practice material would be more useful..
Comment: Braun's book *is* an elementary textbook.
Answer: It is hard to advice some book. Because differential equations are either easy to solve (these equations are in undergrauate textbooks) or difficult. When I studied mathematics we over in undergraduate course all types of ODEs, but solution of them was mainly "mechanical work". Difficult nonlinear equations are solved by numerical methods. So maybe you can go in this way.
You can also look at some applications of ODE, there you can find difficult problems...equations with uncertain data, control theory, dynamical systems, biomathematics. In textbooks of ODEs are mainly basic exercices but problems from practice can be extremely tough (my experience from industry). Try to look at some textbooks in this fields, there could be more difficult problems.
I have job as mathematician for industry and sometimes find solution of some problem is not easy exercise.
Answer: A Book of Problems in Ordinary Differential Equations (English)
de M.L. Krasnov (Author), A.I. Kiselyov (Author), G.I. Makarenko (Author), Vladimir Shokurov


Intuition for gradient when you only have one variable?

Question: I am learning about gradient. I understand how gradient is a vector that represents the sum of the rates of change for each component variable of a function. I am able to follow the Khan Academy video showing the gradient of f(x,y). I am also able to imagine (if not visualize) what gradient would be if you had more variables. But what if you only have one variable? Like for the function $f(x) = x^2$ Do you just have a one dimensional vector? What would it look like in the case of $f(x) = x^2$?
Comment: A one dimensional vector is just a real number. The gradient of $f$ would just be its derivative, $2x$. In fact, you should really view the derivative as a special case of the gradient, and if you know some linear algebra, you should view the gradient as a special case of the Jacobian matrix.
Answer: In $n$ dimensions, $\nabla$ is the operator $$\nabla = \left(\frac{\partial}{\partial x_1},\cdots,\frac{\partial}{\partial x_n}\right)$$that acts on a differentiable function $f: \Bbb R^n \to \Bbb R$ producing: $$\nabla f = \left(\frac{\partial f}{\partial x_1},\cdots,\frac{\partial f}{\partial x_n}\right).$$Make $n= 1$. So: $$\nabla = \left( \frac{\partial}{\partial x}\right) = \left( \frac{\rm d}{{\rm d}x}\right) = \frac{\rm d}{{\rm d}x},$$ since we identify $1 \times 1$ matrices with numbers. If $f(x) = x^2$, we have: $$\nabla f = 2x = f'(x).$$
Comment: great answer. thanks!
Comment: There's a formality that seems off to me. When writing the gradient as a vector, aren't there implied unit vectors with each of the components? Thus, when reducing to one dimension, shouldn't it be $\hat{i}d/dx$, not $d/dx$? That is to say, $(d/dx) \neq d/dx$, but rather $(d/dx) = \hat{i}d/dx$, just as $(\partial/\partial x+\partial/\partial y) = \hat{i}\partial/\partial x+\hat{j}\partial/\partial y$. Otherwise we would have a vector equal to a scalar.
Comment: Yes. The real line $\Bbb R$ is a smooth manifold and for every $x \in \Bbb R$ one has $T_x\Bbb R \cong \Bbb R$. But of course I wouldn't say this in the answer, given OP's background (at the time).
Comment: Or, you can say that including $\hat{i}$ or not is explicitly describing the identification between numbers and $1\times 1$ matrices, as in the original answer.
Answer: As other answers suggest, the gradient is a generalization of the ordinary derivative.
Answer: Well, you do have a one dimensional vector since if you think about it that would really just be a scalar. In particular $\frac{\partial f}{\partial x}$ is just $\frac{\text{d}f}{\text{d}x}$ in the one-variable case, so your gradient is just a derivative! So then $$\nabla x^2 = \frac{\text{d}}{\text{d}x}x^2 = 2x.$$


How can i find anvil GUI nbt?

Question: So i'm trying to to make a datapack, where you can enchant blocks with enchantments on an anvil in survival. I've tried getting player's data, block's data, but i can't find where the anvil GUI nbt is stored.
Answer: This may upset you --- I don't think GUI interactions are open for manipulation by command.
See that "isFurnaceGuiOpen" nbt tag? It looks like you can at least detect if a player is interacting with a furnace right? But in fact, it doesn't work.
execute as @a[nbt={isFurnaceGuiOpen:1b}] run say open_furnace. The same would apply to something like isAnvilGuiOpen:1b.
The truth is, my visual studio datapack add-on doesn't even recognize this nbt tag.
Another thing, you cannot modify the nbt tags of a player.
There might be other approaches to your question. If you want you can explain in detail more about your concept and I will do my best to help.
Comment: Sadly, i guess you can't detect the GUI. I've looked trough all of the player tags, but there was nothing about anvil. I guess i'll use a hopper. Thanks for the help offering, but i already understand datapacks very well. :)

How can i find anvil GUI nbt?


How can I get metrics such as incoming and outcoming traffic with Apache servers?

Question: Suppose a network consisting of hubs A, B, C, D ... and X. I am looking for ways to visualize how users use the network such as incoming, outgoing and other metrics. In Apache logs, I can see some errs if something did not work but I have no realistic picture about such a system in  general i.e. how the system actually works. I am looking for some sort of flow-analysis and I would like to get pure data to create some graph. Then analyze the graph with some metrics where I do not even know the right metrics, perhaps some dispersion metric. My goal is to create some sort of objective way to judge quality.
Answer: etherape? mrtg? argus? pastMon? How much data are you gathering, how long do you want to store it? You've not given a lot of information.
However network monitoring is not the solution to diagnosing application faults. Maybe you're looking for mod_security.
Answer: I don't think your question is specific enough to actually answer. Here's a couple things to try and why:

Boundary. Collector sends granular stats to Boundary, where you can see the impact of traffic flows and ideally, identify anomalies.
Scout. Automatically measures per-server network stats and makes it really easy to write a custom plugin of your own.
Blitz.io. If you're mostly focused on HTTP, this will at least let you discover how your site degrades under load.

There isn't a single "objective way to judge quality," but based on your question, any or all of these will be a huge improvement from where you are.


Forward swap sensitivity

Question: How do we replicate a forward swap using ordinary swap?
Do we have either sensitivity or present value on forward interest rate swap prior to the effective date?
Answer: Say you received on a 5y5y swap at 2% in 100m notional.
You could directly simulate this via receiving a 10y swap at 2% in 100m and paying a 5y swap at 2% in 100m.
The first 5y worth of cashflows will fully net out leaving the residual swap. This is a permanent replication, i.e. once you have executed all trades there is no need for dynamic hedging at different market levels to maintain the cashflow neutrality.
However, in practice the market might only permit you to replicate with 10y and 5y swaps at market rates (i.e. other than 2% on the forward), which generally creates some residual cashflows that will also need hedging with other swaps, but those are quite small comparatively.
Comment: Yeah but the cash flows still won't match because the off market swaps will require payments or credits on either a cash debit or credit right?
Comment: at 2%, 2% and 2% all of the contractual cashflows will be fully replicated and net. The collateral (due to off market swaps) will also be identical (upon netting) since the replicated cashflows must have the same overall value, presumably zero at initiation. In the case of using market rates, i.e. 2% x% and y%, then there will be a non-replicable cash flow profile that needs additional hedging, although as stated this is generally much smaller comparably
Comment: I agree. Here's a little simplified proof i did:

duration 1.75 4.25
term 2.00 5.00
rate 1.00% 2.00%
fwd  2.67%
fwd-spot 1.67% 0.67%
pv 2.926 2.857
Answer: It's not a perfect replication and works better for shorter forward starts but receiving 1x 2 year and paying 1x 1 year is close to a 1 year forward 1 year.

Forward swap sensitivity


Light, Fourier Transforms, Spherical Harmonics

Question: Mathematically, I'm having trouble understanding where we can use what with light. I read somewhere on this site that Huygen's Principle is effectively just taking an expansion of a wave onto the spherical harmonics, (Is Huygen's Principle Axiomatic? comment by gatsu) and on another on of my question, I was told that the image produced from a lens is some how related to a fourier transform of the incoming light. That answer is here: Why can't we perfectly focus light-abberations aside
So my question is, why are these two ideas appropriate for light? What is the general statement for either of these? Does the fourier transform always have some relation with lenses, and why does an expansion on the spherical harmonics have a name, is it a fundamental quality of light?
Answer: It is not a fundamental quality of light so much as it is a fundamental quality of anything that can be modelled as a wave.  The easiest illustration of this is diffraction by a single slit (this could be diffraction of light sound or any other wave).  So if we have plane waves arriving at the slit and we look at any point, P, beyond the slit we can think of the waves arriving at P as a sum of waves arriving from every point within the slit.  Let us indicate each point "along" the slit by its distance from one side of the slit, $x$.  The width of the slit is $a$ so $x$ runs from 0 to $a$.  Let $r(x)$ be the optical path length from a point at $x$ to the point P.  So, the contribution by a "piece" of slit at x to the total amplitude at P is
$$dE_P = \frac{E_L dx}{r(x)} \exp \left[ i (kr-\omega t) \right]$$
where $E_L$ is just the amplitude of the plane wave.  Now we can make various approximations to simplify this (many optics texts have a good presentation) but the upshot is that after simplifying how $r$ depends on $x$ and on the location of the point P we get something like
$$E_P \sim \int_0^a e^{ik x} dx$$
where $k$ is an "angular spatial frequency" which emerges from the analysis of the geometry.  The punch line is that we can think of this as
$$E_P \sim \int_{-\infty}^\infty E_A(x) e^{ik x} dx$$
where $E_A(x)$ is the amplitude at the slit as a function of $x$.  For a plain old ordinary slit and waves of uniform intensity falling on it this means $E_A(x)$ is just $E_L$ for $x$ from 0 to $a$ and zero elsewhere.  But look at the structure of the above.  $E_P$ is just the Fourier transform of the spatial dependence of the amplitude at the slit!  The wave "takes the Fourier transform of the shape of the slit" and this is what we see projected on the wall as an interference pattern.  Notice that I never assumed this was light.  It is true of any wave as long as the wavelength is small compared to the slit size.


ZAP authenticated scan without locking out the test user

Question: I'm trying to set up an authenticated scan for a webapp, lets say admin.example.com. The authentication is done by a different service login.example.com through a JSON AJAX call. After successful authentication, the login.example.com would set two cookies, a JWT access token and a refresh token for the whole *.example.com domain. My problem is, if I include the login.example.com endpoint into the scan context, ZAP begins to test the JSON request parameters, and locks out the test user before it can authenticate, on the other hand if I exclude login.example.com from the scanner, there will be no authentication attempt at all. My desired solution would be to only use login.example.com for authentication with the defined credential, no bruteforce, no parameter tampering, no magic, and then scan admin.example.com with the valid session. Is it possible to configure this somehow?
Answer: Configure ZAP to understand your authentication and then exclude your login URL.
For lots more dsetails on ZAP can handle authentication see https://www.zaproxy.org/docs/authentication/


LP for gas stove

Question: I am trying to hook up a 40# LP tank to my house to supply my gas stove.  I have the LP conversion kit installed and piping installed and inspected to the the exterior.  Can I just use flexible piping (i.e. Mr Heater type/gas grill) and connect it from the house termination to the tank?
Comment: I haven't read through the codes, but I think either rigid pipe (black steel pipe), or [Corrugated stainless steel tubing (CSST)](http://en.wikipedia.org/wiki/Corrugated_stainless_steel_tubing) is acceptable.  You're probably not going to be using the same piping you used for your portable gas grill, unless your gas grill is really heavy duty.
Answer: The gas grill lines aren't OK but CSST, which is a flexible line usually painted yellow for interior or black plastic coating for exterior, should be OK. Here is a safety website about CSST http://www.csstsafety.com/

LP for gas stove


MVC Routes - How to get a URL?

Question: In my current project we have a notification system.  When an oject is added to another objects collection, an email is sent to those who are subscibed to the parent object.  This happens on the object layer and not in the View or Controller.
Here's the problem:
Although we can say who created what with what information in the email, we cannot embed links to those objects in the email because in the object layer there is no access to a UrlHelper.  To construct a UrlHelper you need a RequestContext, which again does not exist on the object layer.
Question:
I want to make a helper class to create the url's for me.  How can I create an object that will generate these urls without a request context?  Is it possible?
Comment: I'm currently working on asolution where I pass a function to the object that does the url generation.  When I finish, I'll post my solution.

Thanks for the great Ideas!
Answer: The problem is compounded by the fact that you don't want a relative URL in an email, you want an absolute email so you need to hard-code the domain too because there is no request to grab it from.
Another factor is that emails can outlive the current site structure by months or years so you need a kind of permalink, and thus a way to associate multiple Urls with a single action (additional routes).  This latter issue is also a factor in SEO where you don't want to leave any page behind.
For now a static method on your controller UrlToActionX(params) sitting next to the method ActionX seems like the simplest workaround.  All it does is the appropriate string.Format(...) on the id's of the strongly-typed parameters to generate the permanent Url.  Add a static domain on the front, or a domain from the user object (since you know which domain they visit when they come to your site) and you have your email link.
It's not ideal but at least you now have only one place to maintain the Url generation.
IMHO: When it comes to permanent links to a changing web site sometimes it's better to rely on "configuration over convention". :-)
Comment: I've actually got the domain issue figured out.  That part is was easy.
Answer: I'm not aware of a way to do this, you MUST have access to the routes at the very least to make your own helper. Unless your business objects know about the registered routes, you can't get away from doing some hard-coding.
Here is how you might limit the hard-coding of urls though...
Code in a url with all the relevant bits in your object's methods..
    class Event
    {
        public void SendEmail()
        {
            var url = string.Format("http://myurl.com/r/Event?eventId={0}", EventId);
            //send emails...
        }
    }

Note the /r/Event piece of the url. This would be a map to a RController that would be responsible for taking arbitrary, made-up links and sending a 301 Permanent Redirect and going through the route engine to create a real url using the current routes. This way you are only hard-coding a utility controller url and not to the ever evolving controller actions of your real pages.
class RController : Controller
{
    public ActionResult Event(int eventId)
    {
        Response.StatusCode = (int)HttpStatusCode.MovedPermanently;
        Response.RedirectLocation = Url.Action("Details", "Event", new { eventId = eventId });
        return null;
    }

    public ActionResult Register(int eventId)
    {
        Response.StatusCode = (int)HttpStatusCode.MovedPermanently;
        Response.RedirectLocation = Url.Action("Register", "Event", new { eventId = eventId });
        return null;
    }
}

It just feels a bit better than hard-coding a bunch of different controllers/actions that you might decide to rename later.  Think of it as your own little TinyUrl like service.
Answer: You could define an interface with a method that takes whatever information is necessary to create a URL (object ids or whatever) and returns a URL.  Write an implementation of that interface that uses the UrlHelper to do this work, and then supply this to your object layer (ideally with an IoC container).
Answer: You could use:
VirtualPathUtility.ToAbsolute(string.Format("~/r/Event?eventId={0}", id))

to resolve the url. Still not nice though.

MVC Routes - How to get a URL?


Does this look like amplitude modulation?

Question:
I have designed a transmitter and a receiver  for amplitude modulation. Does the signal in the image looks like amplitude modulation?
Comment: Are the signal and the carrier wave separated by about a factor of 10?
Comment: It certainly has an AM component.
Comment: It would help to know what you are trying to achieve overall, and where in the process of modulating, transmitting, receiving, and detecting your trace is a snapshot of.
Comment: I am designing a 13.5 MHz transmitter. Both the transmitter and the receiver have antenna from a coil of wire. I just used copper wires around 5-6 turns.I used a function generator for generating the carrier signal. The snapshot is for modulating the data sent through a micro controller.
Answer: The image you posted shows a constant-frequency carrier with a strong Amplitude Modulation at a frequency about 1/5-1/6 of the carrier frequency.
Comment: It's a tiny picture, but I'm counting only about 5 carrier cycles per envelope cycle.
Comment: I might have doubled the cycle there...messed up by drawing a +/- range around 2 pulses...thanks for catching that.
Answer: Yes, there is some amplitude modulation.  There is also a significant shift in the DC level of the carrier, seeming to correspond with the carried signal.  In other words, this looks like amplitude modulation plus the baseband signal.
For most uses of amplitude modulation the additional baseband signal added to the carrier at the transmitter is irrelevant since it's at much lower frequency.  It will get automatically filtered out by the resonant output filter of the transmitter, and the antenna system.  Even if not, it should get filtered out by any competent receiver.
In your case, the modulating signal is only about 1/5 of the carrier frequency.  If this signal is transmitted over the air, then that could result in significant out of band transmission, which may cause interference with other devices and be illegal.
If this is the signal inside your receiver, then it has problems.  By the time you are trying to demodulate a AM carrier, it's DC level should be nice and constant.  This is a basic assumption of most AM demodulation techniques, like the common diode detector.
As a side note, only 5:1 ratio of carrier to baseband signal is very slim.  Depending on what the baseband signal is, it might result in unacceptably low signal to noise ratio.  The spectrum of the whole AM signal will also be very broad relative to the carrier frequency.  Usually you want significantly more frequency ratio for AM.  That for commercial AM radio is about 100:1, for example.


What is the difference between a macro and a function in C?

Question: What is the difference between a macro and a function in C? Please tell me one application where I can use macros and functions?
Comment: The only reason you ask for "one application where we can use macro and functions" is because this is homework. Why oh why don't you try to do it yourself?
Answer: The basic difference is that function is compiled and macro is preprocessed. When you use a function call it will be translated into ASM CALL with all these stack operations to pass parameters and return values. When you use a MACRO, C preprocessor will translate all strings using macro and than compile.
Minus of using macros is that they hide implementation. Its way harder to find bug if have one.
Answer: In C (and C++) a macro is a preprocessor directive. This means that before your program starts compiling it will go through and process all your macros. Macros are useful because

They can make your program easier to read
They can improve efficiency (as they can be calculated at compile time)
They can shorten long or complicated expressions that are used a lot. For example, we use a macro to get the current log4cpp logger and another few to write to it with various levels.

Disdvatages

Expand the size of your executable
Can flood your name space if not careful. For example, if you have too many preprocessor macros you can accidentally use their names in your code, which can be very confusing to debug.

Example
<code>#define INCREMENT(x) x++
</code>
A function is a piece of code that can relatively independently be executed and performs a specific task. You can think of it sort of like a mathematical function: a function given a set of inputs will give a particular output. In C these are defined as
<code><return type> <name>(<parameters>)
{
  //code body
}
</code>
Answer: You have to think the macro just as a text replacement: is like you inline the macro code every time you see the macro in your code. This is good for "code snippets" because you avoid the function calling overhead, because every time you call a function you have some effort in pushing parameters onto the stack.
Comment: Yeah, inline functions are better for this aspect.
Answer: And another difference is that in function there is stack overhead but in case of macros there is no stack overhead; it is just the expansion of code.
Comment: If the function is inlined there will be no stack overhead.
Answer: A function is an operation from values to values, i.e. the kind of data you normally think of a program manipulating (numbers, strings etc.).
A macro is an operation from code to code. It takes a part of a program and uses it to generate a different part for the program.
There is no overlap at all between functions and macros in C; they do not do the same thing. (You cannot write a function from a value to code; you cannot, despite appearances, write a macro from code to a value. I know it looks like you can, but it's important to understand that that isn't what you're actually doing.)
A macro can be made to look like a function, because you can write a macro designed to handle a piece of code that itself generates or represents a value, but that macro is still not operating on the value itself: it is taking the value-generating code (which may be a simple number) and weaving it into value-consuming code (which is what looks like the "body" of the macro). That means that using macros like functions is extremely confusing and not what they are best used for. Functions in contrast actually are a single discrete block of code.
The fact that functions generally run at runtime and macros (in C) always run at compile time is simply a limitation imposed by the fact that values are usually dynamic, and code is usually not available at runtime, respectively. It isn't actually a fundamental aspect of either functions or macros (functions can be inlined and optimised out; macros can be applied to dynamically generated code), and is a bit of a red herring.
Comment: This answer is awfully muddled. It confuses more than it enlightens.
Comment: There is zero overlap in purpose between functions and function-like macros, and I stand by that. There is overlap in *usage* (obvious by the fact the question exists), but they do not do that same thing. A macro can never take 2 and 2 and produce 4, it can only take `2` and `2` and produce `2+2`. *This is the core difference.* Absolutely everything else is incidental/an implementation detail/specific to C *culture*. On the contrary, suggesting any relationship between macros and inlining is an example of the kind of thing that muddies the water on this topic.
Comment: @JohnKugelman Well, what's confusing about it? How can I make it clearer for you? It seems straightforward enough to me or I wouldn't have written it out that way, and it is technically correct which is more than can be said for some of the existing answers to this question. Yeah yeah sure it's an old question, didn't see that when I wrote this answer, sorry. It still contributes different material to the question. Answers that focus on compile-time/runtime or machine-code/text are *wrong*, they describe an implementation but are missing the point.
Comment: (a) A function is not strictly an operation from values to values; that's a mathematical definition. Functions have side effects, they're not just mappings. And they needn't return a value. (b) Saying a macro is "an operation from code to code" is a confusing way of describing what a macro is. I'd explain macros in terms of *textual substitution*. (c) There is *huge* overlap between functions and function-like macros. It's really strange to claim that they do not overlap in purpose. One major use of macros is to forcefully inline code that would otherwise go in a function.
Answer: Advantage of MACRO is, we define that only once, and if we want to change the value we can make change at only one place, and value gets reflected across the program.
Comment: This is not an answer to the question!


How do I add grip to concrete sealer after it is already applied?

Question: Last fall, we had H&C Colortop Solvent Based Concreat Sealer 250 applied to a textured concrete driveway and walkway. It look amazingly better and have gotten many complements from the neighbors, but now we are finding out that when it is even slightly moist, it gets incredibly slick. At times, it is almost like walking on ice. What is the best way to add grip to this surface?
Answer: You'll probably need to reapply the product (or another compatible sealer) and apply grit to it as an admix.
Comment: Yeah, that is what I was kind of afraid of. I guess I won't have to be quite as careful about edges and cracks if I match the color. I have seen some clear coat options but I doubt they would last as long as the coating


Previous part time employer never paid me but I received a W-2

Question: I worked part time for a corporate company that never paid me. I received a W-2. Who do I contact? I tried to reach the manager but he won't return my calls.
Comment: Did they never pay you for valid reasons, or did they never pay you because they were sleazy/dishonest? If the latter, then you might be better off worrying about getting the money they owe you rather than about the bogus tax consequences. E.g., here in California, if an employer doesn't pay you when they owe you, you can get paid a multiple of what they should have paid. This makes this type of case attractive to employment lawyers.
Answer: If they didn't pay you, you do not owe any tax on the W-2 income, but the IRS will be informed of the income and expect to see it on your return.
You should contact the company asap and tell them that as they didn't pay you, their filing of Form W-2 was incorrect and ask them to correct and issue you a W-2C.  They probably won't want to as it's a real pain depending on how big the Company is, but if they do, that would solve the issue.
Even if they don't, as long as you have proof that you were not paid, you are not subject to any liability with the IRS with respect to this matter as long as you can document that you never received anything from them.  You would probably get a letter from the IRS asking why the income was not reported by you and you would then send them the evidence of your not having received it and that would be that.
Comment: It is hard to prove a negative. How on earth can the OP _prove_ that he was never paid? Show the IRS the monthly statements from the bank to show that the amount was never deposited by you (or sent to the account via EFT? All that shows is that the.money was not deposited into _that_ account, not that the money was never received. Many large grocery store chains offer check-cashing services (including payroll checks) for their customers who do not have bank accounts, etc. In short, your suggested method for "prooff that you were not paid" will not work as you claim it will.
Answer:
I tried to reach the manager but he won't return my calls.

If this is a corporation, call their Human Resources (HR) department.  Or their payroll department.  Your manager probably has little to do with payroll.  This also takes some emotion out of it if you and your manager parted on bad terms.
Consider the possibility that they cut you a check that you never received.  It might be easier to get them to send you that check or a replacement than to to get the W-2 changed.  If so, try to resolve that quickly.  That route probably involves you paying the taxes as if you were paid last year.
If there are difficulties, there are additional steps that you can take.  But they depend somewhat on the circumstances of you not getting paid.  Some of them might fit better on Law.SE or Workplace.SE -- we're getting into a gray area.  My main point was that if you're dealing with someone large enough to have an HR department, that's where I'd probably start regarding this.  They can tell you the way that things seem from their perspective.
Comment: Even if it's not a corporation, call their Human Resources department or their Payroll department. There's nothing special here about being a corporation.


apt-get update only for a specific repository

Question: When I add a PPA and I want to install some of its content, it is quite annoying to re-update all my apt list using apt-get update.
Is it instead possible to only sync the content of a given repository?
Comment: Starting from wily, you could just use `add-apt-repository -u`
Comment: There is no `-u` on Ubuntu (15.x) Vivid as far as I can tell.
Comment: @Treviño It isn't mentioned in the Wily manpage: http://manpages.ubuntu.com/manpages/wily/en/man1/add-apt-repository.1.html Is it documented elsewhere?
Comment: @muru I think that has to be fixed, it's only mentioned on `add-apt-repository --help`. Please open a bug asking to fix the manpage.
Comment: @Treviño @muru FYI, the `-u` functionality was removed since 18.04. See https://askubuntu.com/questions/65245/apt-get-update-only-for-a-specific-repository/1132852#1132852
Answer:
yes, apt-get can do that, and can do it in a nice way.

Append following to ~/.bash_funcs
update-repo() {
    for source in "$@"; do
        sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/${source}" \
        -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
    done
}

Append following to ~/.bashrc
if [ -f $HOME/.bash_funcs ]; then
.  $HOME/.bash_funcs
fi

Append following to ~/.bash_completion
# Debian user-defined completion                             -*- shell-script -*-

_ppa_lists(){
    local cur
    _init_completion || return

    COMPREPLY=( $( find /etc/apt/sources.list.d/ -name "*$cur*.list" \
-exec basename {} \; 2> /dev/null ) )
    return 0
} &&
complete -F _ppa_lists update-repo

Then source the files
. ~/.bashrc
. ~/.bash_completion

Done and start to fire it
update-repo <tab> <tab>

You can update a single ppa repository without having to update whole apt source, with implement of bash-completion.
Answer: If the repository is configured in a specific file in the directory /etc/apt/sources.list.d/, say myrepo.list, you can update that single repository with the command:
sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/myrepo.list" \
    -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"

Nevertheless this is not very convenient.
This can be simplified defining a bash function
update_repo() {
    sudo apt-get update -o Dir::Etc::sourcelist="sources.list.d/$1.list" \
        -o Dir::Etc::sourceparts="-" -o APT::Get::List-Cleanup="0"
}

so that you can simply run
update_repo myrepo

Comment: can you explain what does '-' mean in sourceparts config?
Comment: I think '-' just a dummy way to tell `sourceparts` should not be used. See https://github.com/Debian/apt/blob/master/apt-pkg/sourcelist.cc#L313 . I could be wrong though, couldn't find a proper doc explaining the '-'.
Comment: I've checked this again, but it doesn't work if then you want to install a package that has some unresolved dependency on another repository (also in the main archive)
Answer: Y PPA Manager comes with a command line tool called update-ppa that lets you update a single PPA.
For example:
sudo update-ppa ppa:nilarimogard/webupd8

Also, when adding a PPA through Y PPA Manager, the PPA source is automatically updated (only for that PPA). In a future version, there's going to be a GUI to manually update single PPAs as well.
More information about Y PPA Manager, HERE.
Comment: `sudo add-apt-repository ppa:webupd8team/y-ppa-manager` then `sudo apt-get update` and finally `sudo apt-get install y-ppa-manager`
Answer: To update a specific repository, use -o, e.g.:
apt-get update -o Dir::Etc::sourcelist=/path/to/repo.list

Here is a one-liner updating only recently added apt repository
find /etc/apt/sources.list.d -type f -name '*.list' -exec sudo apt-get update -o Dir::Etc::sourcelist="{}" ';'

It's much quicker than updating all repositories, especially during VM provisioning after adding new.
Comment: I think this updates everything found in `/path/to`
Comment: @JohnBachir Exactly.
Answer: The -u option was added in 15.10. From 15.10 to 17.10, you could use -u to automatically update only the specific repo you are adding:
add-apt-repository -u my-ppa
The silly thing is that this option was not added to man until 18.04 (it was documented in add-apt-repository --help, however). But in 18.04, this functionality was removed! (Again, not in man, but you can see in add-apt-repository --help).
In 18.04, the update functionality was changed to always do a full apt-get update after add-apt-repository. The -u option was effectively removed. It remains there for legacy syntax, but it is always set to options.update = False. In 18.04, you do have the option of -n, --no-update, which is like the old behavior. But it's all or nothing, you cannot update a single repo since 18.04.
Answer: One can also reduce the available choices to one single repository:
echo "deb http://archive.ubuntu.com/ubuntu/ focal universe" > /etc/apt/sources.list
apt-get update -y && apt-get install -y ncftp

This may be radical, but it saves time and traffic, when running apt-get in a single-use container.
If you don't know what a single-use container is, please educate yourself before casting a vote...
because this is a correct and functional answer, which serves an actual purpose (saving time).


Idea 3 of 3: Badge inventor badge

Question: For people whose badge ideas get implemented.
Because new good badges are good for the SO site.
Comment: I want a Recursion badge... awarded for receiving the Recursion badge.
Comment: Tautology badge. Indicates user has received tautology badge.
Comment: Do you get a badge if this badge idea gets implemented?
Comment: how would this even work? the badge suggestion would only be made on meta, so would the badge only be given on meta? or would it be given to the user on every site it is implemented on?
Comment: Maybe, I don't set the rules.
Answer: Awarding badges manually rather than automatically through an algorithm is going to be prone to chaos, confusion, and a bureaucratic nightmare for the site maintainers.  Currently the only such badge is "Hacker", which is being reserved for exceptional circumstances and still has not yet been awarded.
The current reward for suggesting a good idea is increased reputation on Meta Stack Overflow. That reputation is visible on the other SOFU sites in everyone's user profile under the "Accounts" tab. I don't see a need to extend the recognition beyond that; if badges were awarded, many Meta regulars would want to be given this badge retroactively as recognition for their ideas that have been implemented.
Comment: OK, agree. Thanks for pointing to accounts tab thing.
Answer: To be very frank, meta gets an pretty heavy stream of badge suggestions as it is (in fact at one point the mods closed all the various individual badge suggestions and made a unified questions to hold them all), and most of them are not so hot. A few are decent, a few really suck, and the really great ones are few and far between.
This suggestions would magnify the scale of the sorting problem by encouraging an endless stream of suggestions.
BTW--As I count it there are 44 existing badge separate of the specialist ones (admittedly there are several groups: [nice|good|great], [notable|popular|famous] and so on). We don't lack for either numbers of diversity of requirements. So we can afford to be picky.
Comment: Because we don't want to wade through a bjillion repeats of "Badge for accepting answers" and "Badge for getting answers accepted" and "Badge for a lot of downvotes" and "Badge for a contraversial post" and "Badge for reopeneing" and "Badge for having you post closed and reopened N times" and "Badge for navel gazing" and and and
Comment: I agree. That's why really good badge ideas are rare, even less gets implemented, so why not reward it? Meta is created for suggestions, let's not limit it. Good ideas will be up-voted, bad ideas - down-voted, so the number should not be a problem.
Comment: @ dmckee: If something has potential problems it doesn't mean that it has to be rejected outright. It just means that those issues has to be thought about and accounted for. Basically you listed two problems that SO faces every day: bad and duplicate questions. And yet SO successfully exists. Because there are ways to deal with it. To minimize bad badge suggestions it should be **clearly stated**, that good badge is a badge that promotes good behavior on the site.

Idea 3 of 3: Badge inventor badge


Adapter to turn wired USB keyboard wireless?

Question: I've got a wired USB keyboard that I really like. I know it is a long shot, but is there a way to turn it into a wireless (maybe even Bluetooth) keyboard through some sort of adapter or hack?
Comment: you could try hacking some ardiuno project
Comment: You'd need some sort of wireless USB hub, I suspect.  Unfortunately, they're bulky and expensive.
Comment: @DanielRHicks Where can you actually get them? Searching for them just turns up regular USB hubs, USB extenders, and suchlike.
Answer: I developed a wireless converter for wired USB keyboards since I never saw this convertor except Bluetooth adapters. I wanted to make a wireless converter for fast pairing.
I created a converter using USB host MCU (pic24fj128gb106) and RF IC (nRF24L01).
I built a USB dongle using RF IC, the built in MCU and USB controller (nRF24LU1P).
You can check a demonstration of the wireless converter on YouTube.
This converter is not for sale, I just made for my requirement. I tested it using a wired USB keyboard.
Comment: @CarlB The OP was asking if there was a way to turn a wired keyboard into a wireless one, even through a hack, which this answer is about. So we can let it stay.
Comment: This is great commentary, but not an answer IMO.
Comment: @Heesoo, can you provide schematics / hex (or source code) for your project so that we can duplicate it?
Comment: @slhck - I can see your point. My challenge was/is - content, "here is what I did", but not "here is how you can do it" or "here is where you can get one"..
Comment: I am sorry I can not understood about this site. I just remain my experience. If my answer was not enough then please delete away.
Answer: depending how good you are with a soldering iron and circuit design you might be able to make a Frankenstein keyboard by sacrificing another wireless keyboard, but the end result probably would not be pretty. so unless you are very attached to this keyboard it i doubt it would be worth it.
Answer: Go to handheldsci.com and find their Bluetooth Keyboard Adapter (http://handheldsci.com/kb). I have one and it works great. Very handy and unique device.
Comment: http://handheldsci.com/kb
Comment: This looks like it still needs a USB host for power, possibly a USB power pack would work?
Answer: Here's an example of a 'wireless USB hub'.  Bulky, but if you REALLY like the keyboard it might work for you. :)
Note: this one doesn't say it supports keyboard specifically, and probably won't work in the BIOS, or with anything other than Windows.
Comment: Actually, since there's a USB receiver on the computer side, there's no reason it shouldn't just function like any other USB hub in both BIOS and on the computer side. I don't have one myself but this is how they seem to work in practice; i.e - the wireless part is invisible to the computer.
Comment: It doesn't look that bulky.  It says it's EOL though, I've been looking for a while and can't find another like it. -- All the wireless hubs I find don't have the USB receiver, and instead work in software somehow..., which is not what I want.
Answer: Officially, no, not really, but you can have a look at this article to see if it is something that might be possible for the model of keyboard you have.


GPS to Cartesian

Question: I'm interested in turning GPS position into Cartesian, I want to then transform it so the starting point is the origin.
Anyone have experience with this?
Comment: I've been using the geodesic and distance functions in geopy in python https://geopy.readthedocs.io/en/stable/#module-geopy.distance, where two calls to `geodesic()` get x and y offsets in meters from starting lat long location (and decomposing x y meters into two `distance()` calls would go in reverse to get lat long)- if this seems promising I can expand to full answer, but I'm not super confident how good this method is even over small distances.  Some additional code here: https://github.com/geopy/geopy/discussions/506
Comment: Let us know if you want a more complete answer, but GPS is usually given in latitude and longitude.  It can be given in MGRS (military way of doing the same thing).  After accounting for where you are on earth, both can be used for short distances w/o too much regard to error as X & Y offsets.  But if you travel far, you need to consider using the Great Circle Distance Formula.
Comment: I would like a more complete answer, GPS should also give altitude so you get a 3d coordinate?
Answer: It sounds like maybe you're looking for UTM projections. From the Wiki article:

The Universal Transverse Mercator (UTM) is a map projection system for assigning coordinates to locations on the surface of the Earth.

You're not clear with your purpose here so it's not really possible to give you more context related to your use case. Generally speaking, though, you convert latitude and longitude to a UTM easting (x) and northing (y) value. Your altitude can stay as elevation, and you've got x/y/z values.
This is a projection, so like with any project there is distortion. Again quoting the Wiki entry:

By using narrow zones of 6° of longitude (up to 668 km) in width, and reducing the scale factor along the central meridian to 0.9996 (a reduction of 1:2500), the amount of distortion is held below 1 part in 1,000 inside each zone. Distortion of scale increases to 1.0010 at the zone boundaries along the equator.

You can get into trouble when you cross UTM zones, but then it's your choice on how you want to handle that, if it's swapping zones or extending the origin zone's projection to the outlier point(s).
Answer: This is a geopy https://geopy.readthedocs.io/en/stable/#module-geopy.distance method for going back and forth from a coordinate and a reference coordinate to relative meters in north and east:
<code>#!/usr/bin/env python
# convert latitude-longitude-altitude to meters relative to reference point

import geopy
# geopy.distance doesn't work unless this is also done
from geopy import distance

# x is north and y is east
def coords_to_relative_meters(lat0, lng0, lat1, lng1, ellipsoid="WGS-84", north_then_east=False):
    xa = distance.geodesic((lat0, lng0), (lat1, lng0), ellipsoid=ellipsoid).m
    ya = distance.geodesic((lat1, lng0), (lat1, lng1), ellipsoid=ellipsoid).m
    print(f"north-then-east relative x north {xa}m, y east {ya}m")

    yb = distance.geodesic((lat0, lng0), (lat0, lng1), ellipsoid=ellipsoid).m
    xb = distance.geodesic((lat0, lng1), (lat1, lng1), ellipsoid=ellipsoid).m
    print(f"east-then-north relative x north {xb}m, y east {yb}m")

    print(f"north-then-east vs. east-then-north error {(xb - xa):0.6f}m {(yb - ya):0.6f}m")
    if north_then_east:
        return xa, ya
    else:
        return xb, yb

def relative_meters_to_coords(lat0, lng0, rel_x, rel_y, ellipsoid="WGS-84", north_then_east=False):
    # 0 is north (rel_x), 90 is east (rel_y)
    ll_na = distance.geodesic(meters=rel_x, ellipsoid=ellipsoid).destination((lat0, lng0), bearing=0.0)
    ll_ea = distance.geodesic(meters=rel_y, ellipsoid=ellipsoid).destination(ll_na, bearing=90.0)
    print(f"north-then-east relative x north {ll_ea.latitude}° {ll_ea.longitude}°")

    ll_eb = distance.geodesic(meters=rel_y, ellipsoid=ellipsoid).destination((lat0, lng0), bearing=90.0)
    ll_nb = distance.geodesic(meters=rel_x, ellipsoid=ellipsoid).destination(ll_eb, bearing=0.0)
    print(f"east-then-north relative x north {ll_nb.latitude}° {ll_ea.longitude}°")

    text = "north-then-east vs. east-then-north error"
    text += f" lat {(ll_ea.latitude - ll_nb.latitude):0.6f}°"
    text += f", long {(ll_ea.longitude - ll_nb.longitude):0.6f}°"
    print(text)

    if north_then_east:
        rv = ll_ea
    else:
        rv = ll_nb

    return rv.latitude, rv.longitude

if __name__ == "__main__":
    print(geopy.__version__)

    lat0 = 46.8454439
    lng0 = -121.7649698
    print(f"reference {lat0}° {lng0}°")

    lat1 = lat0 + 0.01
    lng1 = lng0 + 0.01
    print(f"target    {lat1}° {lng1}°")

    # if this is set false then round trip error much lower because of the way the conversion
    # back to lat to long works
    north_then_east = True
    print(f"relative coordinates {lat1 - lat0}° {lng1 - lng0}°")
    for ellipsoid in distance.ELLIPSOIDS.keys():
        print(f"\n{ellipsoid}")
        rel_x, rel_y = coords_to_relative_meters(lat0, lng0, lat1, lng1,
                                                 ellipsoid=ellipsoid, north_then_east=north_then_east)
        lat1b, lng1b = relative_meters_to_coords(lat0, lng0, rel_x, rel_y,
                                                 ellipsoid=ellipsoid, north_then_east=north_then_east)
        print(f"round trip conversion error lat {(lat1b - lat1)}°, lng {(lng1b - lng1)}°")
</code>
and the output for WGS-84:
<code>reference 46.8454439° -121.7649698°
target    46.8554439° -121.7549698°
relative coordinates 0.00999999999999801° 0.010000000000005116°

WGS-84
north-then-east relative x north 1111.6792380437344m, y east 762.6088552752285m
east-then-north relative x north 1111.6792380437344m, y east 762.7504100234593m
north-then-east vs. east-then-north error 0.000000m 0.141555m

north-then-east relative x north 46.85544346321024° -121.7549698000608°
east-then-north relative x north 46.85544346336275° -121.7549698000608°
north-then-east vs. east-then-north error lat -0.000000°, long 0.000002°
round trip conversion error lat -4.367897545876076e-07°, lng -6.080824732634937e-11°
</code>
The bigger the change in latitude the more error the relative y/east meters has- 0.15 meters when for example about a kilometer is traversed moving north from the reference point to the target point using the above output.  As long as everything has good lat/long coordinates to start and they share the reference point and use consistent coordinate conversion functions it may not matter much (it's a little useless if a gnss sensor sdk has the option to output relative meters but doesn't expose a call to convert any coordinate using the same function, or document what they did to do the conversion, you wouldn't want to commingle two different sensors with two conversion methods).
If you had really good relative distance measurements and wanted to convert in the other direction, get latitude longitude given distance traveled from a reference point it would be better to break the path up into segments than take the endpoints and ignore the path between them if the amount of error is a concern.

GPS to Cartesian


why does adding new variables to a regression model keep R squared unchanged

Question: I have linear regression model clustered on both firm and data. when I add two more variables to the regression model, one of the newly added variable is significant, but the R squared remains the same as the model without these two variables. Could this be the case? If so, why?
Answer: If you are adding new variables and not getting any change in $R^2$, the most likely explanation is that your new variables are linear combinations of the existing variables, so that your design matrix does not have full rank.  I would recommend finding the rank of your design matrix, both before and after the addition of your variables.  This can be done in R using the rank function, but you need to be careful with it, because rank calculations can be subject to tolerance issues in computation.
It is theoretically possible for new explanatory variables to add nothing to the $R^2$ of a regression, even if they are not linearly combinations of existing variables.  However, this requires some exact vector angle conditions that are essentially impossible for random data.  You can construct this by design, but it does not occur at random with continuous data (and even for discrete data it occurs with vanishingly small probability).  For this reason, I strongly suspect that you are adding variables that are just linear combinations of your existing explanatory variables.
Comment: Hi Ben, thanks for your suggestion. I haven't looked at the rank of my independent variable matrix (will do that), but I did check the correlation matrix of all independent variable. And I do not detect very high correlations. Does that give some hints on whether the newly added variables are the linear combination of existing variables?
Comment: Not necessarily - if a new variable is a linear combination of several others then it could have low correlation with each of them individually, so it is not necessarily a hint.  A better test would be to regress your new variables against the old ones - if they are linear combinations, you will get a perfect fit (i.e., $R^2=1$).
Comment: Under what conditions would the correlation of the new variable be low with the original variables but the multiple correlation high?  Are you simply referring to low  correlations with many variables or did you have something more in mind?


What is the purpose of the SD card on an Asus ZenPad

Question: I had this issue on the Dell Venue but was never resolved. On an ASUS ZenPad, what is the purpose of the SD card if it can't be accessed? So how does one play movies from the SD card?
Answer: 4.4 had a change that made all but one folder per app on the sdcard read only, but you could disable that... you should be using 7.1 anyway... why can't you access it? Did you format it as internal storage? If so you are using it, just transparently.
Is this the correct model? https://wiki.cyanogenmod.org/w/P024_Info
Answer: Check that it is not formatted for a pc, which usually uses ntfs, whereas android can only read fat32 (also readable by windows, but has 4gb max file size :( and ext4. I also saw people in forums talking about the asus zenpad not supporting exfat, so make sure it's not formatted as that either. To reformat using windows: https://www.sdcard.org/downloads/formatter_4/index.html
hope that helps :)
Comment: Thanks very much for that, really. However, when I used that formatter it showed upon completion that it was still exfat. The only options available when formatting were quick or full and had nothing to do with chosing fat32 or anything else. Know of another formatter maybe?
Comment: Maybe try http://tokiwa.qee.jp/EN/Fat32Formatter/
Comment: Didn't make it easy to use and I never could get it to work, too much commercial stuff going on there and adding add ons that I didn't want. I tried using pre formatted cards, anything 32GB or smaller were formatted FAT32, which is good, but now I have issues with them not copying right somehow. They copy, they show filed and of course they are listed as each chapter of the movie instead of the whole movie but I could live with that if they didn't playback stills instead of action.


Add-on doesn't show up in the Toolbar

Question: I am new to Blender, I've been playing around with it for about 2 weeks now, first time with a 3D software. I've done some tutorials and there are some where I have to go to user preferences and choose an add-on, the first time I did this, it was with the sapling add-on, worked fine, however today when I went to play around with it again, I checked the box, but the add-on settings that usually showed up on the tool bar on the left side of the screen isn't there. for any add-ons. I was really hoping someone could shed some light on why this is?
Answer: Enabled add-ons can be enabled permanently by saving the user settings.
Otherwise they are enabled only on the current session, but will not be loaded next time you open Blender.
Comment: I figured it out, when I first used the add-on, it appeared on the tool bar tab that was already open, I did some rummaging through all of them and found it, apologies, I am a newb.
Comment: thank you for answering, I did try that, but it does not show up in the left hand tool bar in the first place, all I get is a blank tab underneath the "tools" saying operator and nothing is in it. thanks again for answering, but I must ask you to share your knowledge again lol
Comment: @Beizabel You should post that as an answer.

Add-on doesn't show up in the Toolbar


Does it always rain in Gotham?

Question: I've been catching up with the Gotham TV show and It seems the city is always covered with dark clouds and everyone is carrying or put on a overcoat. Does it always rain in Gotham ?
Comment: It can't rain all the time.
Comment: Not a bad question at all. Only pointer I can give is to make it a liiiittle bit less broad. i.e. "Is this something that the producers are aiming for?", etc.
Comment: @JoeL. No, Gotham City is based on New York City (and "Gotham" is in fact a real-world nickname for New York).  This is only natural, since DC artists were almost exclusively New Yorkers until recently.   Metropolis is also based on New York, which is of course confusing.  Frank Miller attempted to address this when he said that "Metropolis is New York in the daytime; Gotham City is New York at night."
Comment: I thought Gotham City was originally based on Chicago, also known as "The Windy City".
Comment: Well, when Bruce finally gets old enough to put on the suit, Jim will need the clouds as the canvas to paint the signal on ;) (as @Thaddeus points out in his great answer)
(^^V^^)
Answer: No. It does not always rain in Gotham. However, sunshine does seem to be in short supply. It is likely the producers want to create an overall feeling of gloom and existential despair.
Gotham is as much of a character in this series as any of the Gotham City Police Department. But it wasn't always so.

Batman's first appearances in Detective #33 were thought to be in New York. Batman was as liable to appear in the day as he was at night. These early depictions of his home city didn't have much character.

The concept of Gotham City was first developed by Bill Finger and Bob Kane. In the early Batman stories, his home base was established as New York. The name "Gotham City" was first used in Detective Comics #48. (1941)

Gotham would start to get more character in the 1970's as Batman's writers and editors began to alter Batman from his more campy appearances in the 60s. In Detective #327 we start seeing more of Batman at night and both Gotham and the Batman take on a much darker tone.

The Gotham we see in the televised series is strongly patterned after Gotham from the famed No Man's Land event of over 80 comics in 1999. Many of the characters of the GCPD became well known during this time. This would lead to the well-received comic police procedural, Gotham Central.

Though the events of No Man's Land haven't taken place, Gotham is much darker, the citizens are harder and the criminals are fierce and competitive. During No Man's Land, Gotham itself became a character in the stories, not just a backdrop for the Gotham City Police Department.

"No Man's Land" is an American comic book crossover storyline that ran for the whole of 1999 through the Batman comic book titles published by DC Comics. The story architecture for "No Man's Land" and the outline of all the Batman continuity titles for 1999 were written by cartoonist Jordan B. Gorfinkel.
The lead-up story began with the "Cataclysm" story arc, which described a major earthquake hitting Gotham City. This was followed by the storylines "Aftershock" and then "Road to No Man's Land" which resulted in the U.S. government officially evacuating Gotham and then abandoning and isolating those who chose to remain in the city.

Gotham exists as a city of gloom, darkness and despair with weather to match. This Gotham is Gothic. It has highly stylized, dramatic and varied architecture, a city with an Old World aura much like the current depictions of Gotham television series.

Most depictions of the city are overcast, with constant cloud cover if not outright rain. The overcast can be taken for granted because there is never a time at night, the famed Batsignal couldn't be shown on the cloud cover above the city.

In terms of atmosphere, famed Batman writer and editor Dennis O'Neil has said that, figuratively, "Batman's Gotham City is Manhattan below Fourteenth Street at eleven minutes past midnight on the coldest night in November."[O'Neil, Dennis. Afterword. Batman: Knightfall, A Novel. New York: Bantam Books, 1994. 344.]

Gotham and Metropolis are often played as sister cities but spiritually opposite. Metropolis, future home of Superman is depicted as a city of the future. Metropolis is bright, modern or even futuristic. Gotham is depicted as dark as Metropolis is bright.
Answer: Due to the sheer size of Gotham, the metropolis generates its own microclimate which in turn has allot of rainfall.
Comment: What?  You mean like Manchester?

Does it always rain in Gotham?


Synthetic Testosterone Laboratory

Question: I can't seem to find any research articles stating how testosterone is made synthetically in a lab. I am looking for research papers on how anabolic agents (synthetic testosterone) are made in a lab?
Comment: Interesting is, the question is not about pharmaceutical production and hormonal treatment, but it is about lab production of anabolic agents. You do not ask about a doping cookbook, do you?
Comment: Maybe a quick "don't try this at home" or "don't use your own product" disclaimer would be nice
Answer: From Wikipedia:

The chemical synthesis of testosterone from cholesterol was achieved in August [1935] by Butenandt and Hanisch. Only a week later, the Ciba group in Zurich, Leopold Ruzicka (1887–1976) and A. Wettstein, published their synthesis of testosterone. These independent partial syntheses of testosterone from a cholesterol base earned both Butenandt and Ruzicka the joint 1939 Nobel Prize in Chemistry.

Both original papers are in German. I don't know if these have industrial relevance nowadays. Might be better to ask on Chemistry SE that.
There's a somewhat fully 2009 article on Pfizer's "2nd/green generation" process. They use androstenedione as the immediate precursor. (The "green" claim seems mainly because of no longer producing heavy metal byproducts.) As they mention both "bioprocess" and the Kalamazoo, Michigan plant in there, which was acquired from Upjohn way back, the androstenedione might be derived from plant sterols (which was Upjohn's big innovation in the 70's), but that's not made explicit in that Pfizer article. You can read about the bioprocess route e.g. in a recent review. It's called a bioprocess because conversion from plant sterols is rather inefficient done by chemical means, so microbes are used. There's another paper/review which talks about that:

For example, the steroid hormone testosterone (TS) is chemically synthesized from the steroidal intermediate 4-androstene-3,17-dione (AD), which is previously obtained from natural sterols by microbial biotransformation (Fernández-Cabezón et al., 2017a).

For details on the chemical conversion from AD, you could probably look at Ercoli and de Ruggieri (1953). More recent papers (like Fernández-Cabezón et al.) propose to use biosynthesis in this step as well. Pfizer's article only speaks of a "proprietary intermediate" being used in this step.
Note that due to extremely short half-life of testosterone in the blood (like 10 mins), medical products use esterified testosterone.
Comment: A google search on "synthesis of testosterone" yields this pdf document which describes the steps for making testosterone from cholesterol without experimental conditions (did you want conditions?)  https://www.lkouniv.ac.in/site/writereaddata/siteContent/202003291608409347arun_sethi_steroid.pdf
Comment: @Waylander: why are you asking me? I didn't ask the Q. I tried to answer mostly with how it's made in industry nowadays because the Q was posted to Medical Sciences when I answered it. (My answer was migrated together with the Q.)

Synthetic Testosterone Laboratory


Download photos from iCloud Photo Library to an iPhone without uploading everything from this iPhone

Question: From time to time I am uploading photos from my PC to my iCloud Photo Library. I would somehow like to set my iPhone XR so it will automatically download those photos to it's Photos app. It seems to me that I can do it only if I allow uploading from it too. I would like to prevent that, if that is possible (I do not want to upload all 10K+ photos from iPhone to iCloud).
Answer: iCloud is a syncing service an not a backup service.
That means that every device logged-in with the same Apple ID will have access to the same files, including photos.
There's no way to do the selective download that you're asking for.  Either you sync your photos to your iPhone or you continue to selectively download the photos you need.
Other possibilities include not using iCloud for this and using a 3rd party backup service like Dropbox.
Answer: The Apple camera app will not let you set up iCloud and download only. However, you don't have to use the apple camera app to take pictures. It would work fine to set up iCloud and allow sync both ways and just never take a photo from your lock screen / control center / Apple app.
Pick any third party camera that saves the photos to the sandbox / local storage and doesn't automatically move the photos to iCloud.
In your case, you would have to move all those photos out of the Photo Roll before you enable sync else they will upload.


Apache 2.4 not reachable in windows server 2012

Question: I'm using Apache 2.4 32bit with php 5 and sqlsrv library in windows server 2012.
Sometimes this stops to receive connection and browsers waits for answer for long time. The only way to unlock it is to restart the apache service.
I really don't understand what causes this trobule, it happends few times per week or many per days.
I tryed to update all apache/php components but I still get this error.
What can I do? How to set an high apache log level? Are there any known bugs about win server 2012 and apache?
Answer: How many connections to your server are allowed? What is the limit of concurrent users allowed to connect to Apache?
Comment: I left the default configuration about inbound connections