Traversing through subdirectories and create simillar directory structure & then process each file in sub directories

Question: I want to create a batch script to process the directory and files in
 that directory, Basically I am using one tool to convert files in
 directory to some format and it can take each file separately also can
 handle complete directory.Now i want to convert all the files in
 directory/sub directory with same directory structure, e.g., suppose I have 3 directories:
║
║═════ Folder 1
║         ║
║         ║══════ Folder A
║                     ║
║                     ║═════ File1.adt
║
║═════ Folder 5
          ║
          ║═════ File5.adt

Now i want the conversion of above files in same directure structure but can be at different location.
║
║═════ Folder 1
║         ║
║         ║══════ Folder A
║                     ║
║                     ║═════ File1.txt
║
║═════ Folder 5
          ║
          ║═════ File5.txt

Comment: Your task is essentially two steps: 1) Copy (or move) the entire directory structure to a new location. RoboCopy or Xcopy can do that. 2) Process all files (or directories, because you wrote your conversion script can handle directories), and that's a duplicate Su question.
Answer: you should use robocopy  for this:
robocopy /e "%source folder%" "%destination%"

-------------------------------------------------------------------------------
   ROBOCOPY     ::     Robust File Copy for Windows     ::     Version XP010
-------------------------------------------------------------------------------

  Started : Sun Aug 11 12:58:38 2013

          Usage :: ROBOCOPY source destination [file [file]...] [options]

         source :: Source Directory (drive:\path or \\server\share\path).
    destination :: Destination Dir  (drive:\path or \\server\share\path).
           file :: File(s) to copy  (names/wildcards: default is "*.*").

::
:: Copy options :
::
         /S :: copy Subdirectories, but not empty ones.
         /E :: copy subdirectories, including Empty ones.
         /LEV:n :: only copy the top n LEVels of the source directory tree.

         /Z :: copy files in restartable mode.
         /B :: copy files in Backup mode.
        /ZB :: use restartable mode; if access denied use Backup mode.

  /COPY:copyflag[s] :: what to COPY (default is /COPY:DAT).
               (copyflags : D=Data, A=Attributes, T=Timestamps).
               (S=Security=NTFS ACLs, O=Owner info, U=aUditing info).

           /SEC :: copy files with SECurity (equivalent to /COPY:DATS).
       /COPYALL :: COPY ALL file info (equivalent to /COPY:DATSOU).
        /NOCOPY :: COPY NO file info (useful with /PURGE).

         /PURGE :: delete dest files/dirs that no longer exist in source.
           /MIR :: MIRror a directory tree (equivalent to /E plus /PURGE).

           /MOV :: MOVe files (delete from source after copying).
          /MOVE :: MOVE files AND dirs (delete from source after copying).

       /A+:[RASHNT] :: add the given Attributes to copied files.
       /A-:[RASHNT] :: remove the given Attributes from copied files.

        /CREATE :: CREATE directory tree and zero-length files only.
           /FAT :: create destination files using 8.3 FAT file names only.
           /FFT :: assume FAT File Times (2-second granularity).
           /256 :: turn off very long path (> 256 characters) support.

         /MON:n :: MONitor source; run again when more than n changes seen.
         /MOT:m :: MOnitor source; run again in m minutes Time, if changed.

      /RH:hhmm-hhmm :: Run Hours - times when new copies may be started.
        /PF :: check run hours on a Per File (not per pass) basis.

         /IPG:n :: Inter-Packet Gap (ms), to free bandwidth on slow lines.

::
:: File Selection Options :
::
         /A :: copy only files with the Archive attribute set.
         /M :: copy only files with the Archive attribute and reset it.
    /IA:[RASHCNETO] :: Include only files with any of the given Attributes set.
    /XA:[RASHCNETO] :: eXclude files with any of the given Attributes set.

 /XF file [file]... :: eXclude Files matching given names/paths/wildcards.
 /XD dirs [dirs]... :: eXclude Directories matching given names/paths.

        /XC :: eXclude Changed files.
        /XN :: eXclude Newer files.
        /XO :: eXclude Older files.
        /XX :: eXclude eXtra files and directories.
        /XL :: eXclude Lonely files and directories.
        /IS :: Include Same files.
        /IT :: Include Tweaked files.

         /MAX:n :: MAXimum file size - exclude files bigger than n bytes.
         /MIN:n :: MINimum file size - exclude files smaller than n bytes.

      /MAXAGE:n :: MAXimum file AGE - exclude files older than n days/date.
      /MINAGE:n :: MINimum file AGE - exclude files newer than n days/date.
      /MAXLAD:n :: MAXimum Last Access Date - exclude files unused since n.
      /MINLAD:n :: MINimum Last Access Date - exclude files used since n.
               (If n < 1900 then n = n days, else n = YYYYMMDD date).

        /XJ :: eXclude Junction points. (normally included by default).

::
:: Retry Options :
::
           /R:n :: number of Retries on failed copies: default 1 million.
           /W:n :: Wait time between retries: default is 30 seconds.

           /REG :: Save /R:n and /W:n in the Registry as default settings.

           /TBD :: wait for sharenames To Be Defined (retry error 67).

::
:: Logging Options :
::
         /L :: List only - don't copy, timestamp or delete any files.
         /X :: report all eXtra files, not just those selected.
         /V :: produce Verbose output, showing skipped files.
        /TS :: include source file Time Stamps in the output.
        /FP :: include Full Pathname of files in the output.

        /NS :: No Size - don't log file sizes.
        /NC :: No Class - don't log file classes.
           /NFL :: No File List - don't log file names.
           /NDL :: No Directory List - don't log directory names.

        /NP :: No Progress - don't display % copied.
           /ETA :: show Estimated Time of Arrival of copied files.

      /LOG:file :: output status to LOG file (overwrite existing log).
     /LOG+:file :: output status to LOG file (append to existing log).

           /TEE :: output to console window, as well as the log file.

           /NJH :: No Job Header.
           /NJS :: No Job Summary.

::
:: Job Options :
::
       /JOB:jobname :: take parameters from the named JOB file.
      /SAVE:jobname :: SAVE parameters to the named job file
          /QUIT :: QUIT after processing command line (to view parameters).
          /NOSD :: NO Source Directory is specified.
          /NODD :: NO Destination Directory is specified.
        /IF :: Include the following Files.


integrate Google Photos with android system

Question: I use ios for long time recently switched to android. my whole photo library in google photos but when i need to upload somewhere  i need to download it first to device and proceed to upload its irritating is there any way to link google photos to gallery like ios icloud photos when i use ios i can select icloud photo directly and it download & upload automatically. why google can't do that?
Answer: Google Drive was the integrating factor till July this year. It was possible to sync photos with Drive. Drive also works with ios.
Now that it is discontinued, there is no automatic way to upload but from Photos settings you  enable sync to drive (tap on the cloud icon) or using the share option upload to third party cloud/messaging/mail options.


Custom install profile calls another install profile

Question: I want to create a custom install profile that will switch on some modules. I want it to be based on the open atrium profile. Ie Run the OA install profile and then switch on some additional modules. Is this possible?
Answer: The way install profiles work on Drupal 6, I don't think this will be possible. The modules that are installed are based of the dependency list in the .info file, and since you can't depend on an install profile you can't create that full attachment.
You could come far, by doing includes and callling the fuctions that would otherwise be called by Drupal though, but you would probably have to maintain your own .info file.


Screen management: How to switch between screens

Question: How can I switch between different screens that implement Screen?
Comment: Draw the background then the buttons. Check if mouse clicked position was inside a  button's rectangle (x, y, width, height).
Comment: and then? that is just checking if the condition is true.
Comment: That is what a menu is. The behavior after a button was clicked depends on your game and is for you to implement. All you need is a way to idenify which button was clicked and I explained briefly that you can check for `Point (mouse position) inside Rectangle (button bounds)`. It is like asking what will happen if I press "q" in a game. In one game you might use a spell, in another you might quit the game.
Answer: Something like below. Off course you need to add the Button to the stage, create a skin and the OptionScreen yourself.
@Override
    public void show() {
        final OptionScreen optionScreen = new OptionScreen();

        TextButton optionButton = new TextButton("Options", skin);

        optionButton.addListener(new ClickListener(){
            @Override
            public void clicked(InputEvent event, float x, float y) {
                ((Game) Gdx.app.getApplicationListener()).setScreen(optionScreen);
            }
        });
    }

Because we use optionScreen inside a listener here it has to be final since the application never knows when the button is clicked it. You can also just create a new instance of OptionScreen inline setScreen(new OptionScreen);.


Hiragana: How does dakuten affect chi and tsu?

Question: In the Human Japanese app, it says that chi and tsu become ji and zu respectively, while on Wikipedia it says that most commonly, they become shi and su.
Comment: Where on wikipedia did you read that? Adding dakuten to ち andつ turns them to ぢ and づ, however the pronunciations of づ and ぢ have merged with ず and じ over time.
Answer: Imagine the dakuten as a mark that transforms unvoiced phonemes (sounds that make up a language) to voiced phonemes. A quick-and-dirty way to tell whether a phoneme is voiced is checking whether making that sound makes you use your vocal cords or not.
For example か (ka) is unvoiced, が (ga) is voiced. と (to) is unvoiced, ど (do) is voiced.
You're making the same formation in your mouth to produce the sound, but the voiced one uses your vocal cords. This should hold true for EVERY pair of characters with and without dakuten.
So it holds true to adding dakuten to ち (chi) and つ (tsu). The issue arises because the characters resulting from adding a dakuten to "chi" and "tsu," (ぢ and づ respectively) are much more difficult to approximate with English phonemes.
Try saying ち or つ while using your vocal cords and you'll get something like "dji" and "dzu." Much harder to romanize than "ka ki ku ke ko."
While most Japanese phonemes have pretty straightforward English analogues, ぢ and づ are oddballs, backing up the age-old adage that learning the script of the language is immensely helpful to capture things that you might not catch with romanization.
As a side note, words containing づ are not super common (though they do exist, such as 続く/つづく and 葉月/はづき), and words with ぢ are even rarer.
Answer: My bad, everyone. The Wikipedia page for Tsu (kana) and Chi (kana) both say something like

The dakuten forms づ, ヅ, pronounced the same as the dakuten forms of the su kana

And I didn't read the "same as the dakuten forms of" part.
That is, tsu becomes zu and chi becomes ji as expected.


iOS and Gmail Notes Syncing Issue

Question: I have a iPad and iPhone, both of which are having severe Gmail Notes syncing issues.
My setup was working fine for the last several years, but recently (starting about a month and a half ago), my Notes randomly stop syncing between the devices and Google.
The notes will be locally updated on the particular iDevice I used last, but never sync up to Gmail (verified by looking in my account on a web browser), and therefore never sync to my other iDevice. This causes out-of-sync Notes, and is a pain to get working again. When I do get it working again, it only works for a handful of days (2-5 days), and then suddenly stops syncing again for no obvious reason.
I only use Gmail for Notes - I have all other Gmail syncing turned off in the iOS settings (as has been for at least the last year and a half without issue). I use Office 365 for Mail, Contacts, and Calendars. My Gmail Notes integration was legacy, but I preferred how it worked over the Office 365's OneNote setup.
Things I've tried:

Turned off Note syncing (which deletes the notes from the Device), and then turning it back on. This does not seem to have any effect, and the Gmail notes section under the Notes app never shows back up. It's like it's still not enabled.
Deleting the Gmail account off the iDevice entirely, and then re-adding the Gmail account and turning everything off except Notes syncing. This works for a few days, and then suddenly stops again.
Tried doing a Network Settings Reset on both iDevices. This has no effect.
Tried updating my iDevices from 10.3.1 -> 10.3.2 hoping there was some issue/bug in the Notes app from Apple... but this had no effect, even after repeating the above things.

Oddly enough, when I go into Settings and enable Gmail Email syncing, the notes seem to start to sync again. The problem here is I forward all email to my Office 365 account, so I don't want to sync my Gmail Mail to the iDevices. My password for Gmail has not changed recently, and deleting/re-adding the account to iOS would confirm if I've entered the wrong password anyway.
My Devices:

iPhone 6 on iOS 10.3.2
iPad 4 on iOS 10.3.2

How can I make my iDevices cooperate with Gmail Notes like they used to?
Comment: Nothing new ? What good alternatives do we have ?
Answer: My iPad updates right away if I add or edit a note in gmail.  iPhone does not.  Only way I can get the iPhone to sync is to do a hard reset of the phone (waiting for the white Apple) and then restarting the notes app.

iOS and Gmail Notes Syncing Issue


If you can't ping an ip address this means nothing in regards to dns right?

Question: If you can't ping an ip address since you are not resolving a canonical name this has nothing to do with dns and only has to do with the inability to reach that machine (routing) right?
Comment: Did any answer help you? if so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
Answer: You are correct in that if you ping an IP address you are not using DNS.  If you are using a hostname instead of an IP address with ping, then you will be using DNS.
However, just because you are using ping with an IP address, even if you don't get a response this does not necessarily mean there is a routing problem.  Many hosts are configured to rate limit ICMP echo requests (i.e. ping) or to ignore them entirely.
Answer: Correct.
DNS is a service which resolves a name to an IP address. If you are not pinging a name, you aren't using DNS.
Answer: "PING" on a Windows 7/8 machine will attempt to perform a "Reverse DNS" lookup on the IP address before attempting a PING. It's reverse DNS because you are doing the reverse of what DNS natively does, i.e. resolve a name to an IP address. But that is just a feature to help identify what you're pinging.
PING still uses the IP address to formulate its echo request. The inability to perform the reverse DNS does not preclude the ICMP echo request to be sent, nor does it prevent the echo reply to come back if there is one.
Hope this helps.
Comment: Do you have anything to back up this answer? It may be true in certain circumstances, by my Windows 7 does not do a reverse lookup when pinging an IP address.  Verified with captures from both the computer and a span port on switch.
Comment: This is not the case when using an ipaddress as argument to ping.
Comment: Good catch. I think this behavior changed between Windows XP and Windows Vista/7/8. I just tried it and my statement is incorrect.
Comment: Looks like you now need the "-a" switch to resolve an IP address to a hostname when using ping.


Reputation recalculated: only even reputation now?

Question: So +1 get 10 points for answers and questions, and -1 give -2 points. It is easy to see that users only have even reputation numbers now. Or did I miss a reputation-changing mechanism? (If not, why not +5 for good answers / questions, and -1 for bad ones?)
Comment: if you downvote an answer 1 rep.point is subtracted from your own score; and if your answer is accepted you gain 15 points, so there is no parity conservation.
Comment: Since every user starts with +1 reputation, if only possible reputation changes were by an even number, you would expect reputation to be always odd.  Of course, users with association bonus start at 101, but that's the same parity. (Maybe it's odd to start at 1 reputation point.)
Comment: @CarloBeenakker Thanks - that's the part I forgot about!
Comment: @CarloBeenakker I guess that if you expand your comment a bit (and perhaps add a link to some FAQ posts listing all possible ways to gain/lose reputation such as "[How does "Reputation" work?](https://meta.stackexchange.com/q/7237)") this would be perfectly acceptable answer. (So maybe you could post it as such.)
Answer: This was basically answered in the comments, let me summarize the main points here.
Various ways of gaining/losing reputation are listed both in the help center and in this FAQ post: How does "Reputation" work? There are a few where the reputation change is odd:

If your answer is accepted, it gives you +15 reputation points.
If you downvote some answer, it means -1 reputation for you.
The only possible bounty amounts are multiples of 50. So if a bounty is auto-awarded, the reputation earned by the answerer is therefore a multiple of 25 which can be odd - depending on the size of the original bounty.. (More details on bounties and auto-awarding can be found in the help center and in this FAQ post: How does the bounty system work?)

Some additional points:

If the only possible reputation changes were by an even number, you would expect the total reputation of a user to be odd, since a new user starts with 1 reputation point. (Or with 101, if the user got association bonus.
A user cannot have total reputation below 1 reputation point. So even if somebody gets enough downvotes that would get them to negative numbers, only part of the reputation is deduced. (It is cut off after the user gets to 1 reputation point.)
There is also the daily reputation cap on reputation from upvotes/downvotes and suggested edits at 200 reputation points. That means that sometimes part of the reputation increase is not counted - if the reputation from votes and suggested edits would exceed 200 reputation points. (For example, from an upvote you get only 6 reputation points if you were already at 194 on that day.) However, this cannot influence parity, since the total is 200 reputation points.

I will also add that you can audit your reputation on this link: https://mathoverflow.net/reputation (It is similar to your reputation tab, but this link is probably better if you want to check many various days.) There you can see your reputation after every day, when it was odd/even and how it changed. (The reputation breakdown is shown using the current rules - both the upvotes on answer and upvotes on questions add +10.)
Comment: If someone puts up a 50-point bounty, and fails to award it to anyone, the software awards half of it to someone, so that's another way to get an odd increase, right?
Comment: @GerryMyerson Again, what you're saying is perfectly correct. (And it's a bit embarrassing that I have not noticed that when writing the answer.) I have rephrased the bullet point concerning auto-awarded bounties.
Comment: Sorry, don't know how I missed that. But shouldn't it say, "the reputation change *may be* odd"? If the bounty offered is 100, the auto-award is 50.
Comment: @GerryMyerson Yes, that's entirely correct - and this is mentioned in the third bullet point of the [current revision](https://meta.mathoverflow.net/revisions/4396/4) (and also of the [original revision](https://meta.mathoverflow.net/revisions/4396/1)). (And thanks for correcting the typo in my post.)


Doubt on sending audio from Addictive Drums to an Aux track

Question: In Addictive Drums there are volume faders, and I'd like to know what happens with those faders when you send the audio out. Does the volume on the aux track keep the fader changes?
Answer: I'm unfamiliar with Addictive Drums specifically, but it sounds like you are talking about pre/post-fader send.
Usually, when you send audio to an aux track, there will be a button somewhere (usually with "pre" on it) which allows you to send the signal pre-fader.

pre-fader will 'tap' the signal before it reaches the fader, i.e. the fader changes will not affect the 'sent' signal.
post-fader will 'tap' the signal after the fader, i.e. the fader changes will affect the 'sent' signal.

So... in Addictive Drums, when a signal is sent to an aux track, is it sent pre-fader or post-fader?
Well, in my experience the default is always post-fader, but there should be a button or option somewhere allowing you to choose. So I'd say the volume changes are affecting the aux signal.
One way to be sure is to change the fader by a noticeable amount while monitoring only the aux signal; if the changes affect the aux signal, then it is routed post-fader.


How to alter user's data in block in blockchain if i want to change user's details

Question: In blockchain each user's data stored in seperate block, right? If I have created my own blockchain and i want to alter some user's data then I would need to alter some perticular block as I have stored data in that perticular block. but it will break proof-of-work. So how to change block in blockchain to alter user's data? If I create new block with updated details then what happened to old data and next time how to know which block to refer?
Comment: I think you are confused. There is no "user's details" stored in the blockchain.
Answer:
In blockchain each user's data stored in seperate block, right?

No, blocks do not store user data, they store transactional data.
A user of bitcoin can create a wallet using software of their choosing, and the wallet will store their keys that allow them to spend coins. The blockchain simply has a record of transactions, but no accounts/personally identifying information.
Instead the blockchain just specifices where the coins exist (in a certain address as a UTXO), and then users can spend coins if their wallet software contains the keys to that address.
So you never have to go and change an old block in order to spend coins. If you're trying to spend coins that were last sent 10 blocks ago, then you just need to sign using the key that corresponds to the address those coins exist at. This will create a new UTXO, with your transaction specifying which new address the coins will be locked into.


interest rate on online banks

Question: i live in Israel, a country with a non-competitive banking system, which causes them to offer unattractive interest rate on almost every acoount (regular, savings short term deposits etc.-- short term deposit interest rate was 2.02 %, ridiculous)
im looking for a way to manage my money in a more profitable way, and i thought of transferring my money to an online bank. will that help? or the conversion rate would cause more losses than the profits?
what online bank would you recommend for that?
also can i get a credit card in one of those banks?
Comment: There is no way this could be answered. You could only do so if you knew what changes in currency exchange rates were going to happen while you owned the investment.
Comment: If so you just answered me. And there is no viable solution for me. But i reckon there has to be a way to do it assuming no major changes in currency rates...
Comment: Most countries have low official interest rates so their banks will also have correspondingly low interest rates. Putting your money in the bank is no way to grow your money profitable, you will need to take some risk for that.
Comment: You think 2% on short term deposits is bad? Try 0.2% or less - that's reality in Europe and has been in Japan for over two decades!
Comment: im not saying its a way to make profit, im only looking for better ways to "store" my money, so i will lose less due to comissions and inflation
Answer: I beg to differ: Israel has an incredibly well managed central bank, and the usury market is wonderfully competitive.  It's a shame Stanley Fischer has retired.  His management is the case study in central bank management.
Rates are low because inflation is low.  The nominal rate is irrelevant to return because a 2% nominal return with 1% inflation is superior to a 5% nominal return with 9% inflation.
A well-funded budget is the best first step, so now a tweak is necessary: excess capital beyond budgeting should be moved quickly to internationally diversified equities after funding, discounted and adjusted, longer term budgets.
Credit will not pay the rate necessary for long term investment.  Higher variance is the price to pay for higher returns.
Comment: +1 for  "5% nominal return with 9% inflation". Any Fx rates for pair of currencies normally get adjusted for inflation difference.
Comment: http://www.haaretz.com/business/.premium-1.533606
94% is controlled by three banks, rates are all the same in all of them, and the difference between each bank is virtually non existent
Comment: While the regulation is very good, and the central bank is very powerful - the competition is still almost nil. It's a very small and very centralized market.
Comment: @davyx8 Your country has 8 million people, the whole world is coming out of a credit bust, and your mortgage rates are lower than US Treasury rates.  Americans could only be so lucky!  Please show me a country aside from the banking states & Japan that have better real interest rates.
Comment: Australia.  NZ.  south africa. UK.
Comment: @davyx8 Double your inflation, infrequently 2-3x your inflation, horrible, double your inflation.  You're looking to build wealth from credit.  It won't happen.  Credit is for banks, insurance, and old people trying to salvage their insufficient wealth.
Answer: There are no "on-line" banks in Israel. There were various attempts to create something that would look like an online bank (HaYashir HaRishon comes to mind, Mizrahi did something similar recently), but that essentially is a branch of a brick and mortar bank (Leumi and Mizrahi, respectively) that allows you online management and phone service instead of walking into a branch, not a replacement for a traditional bank. Thus there are no significant operational savings for the banks through which they could have afforded higher savings rates.
I agree with the other responder that the banking system in Israel is very well regulated, but I agree with you also - it is not competitive at all.
That said, at the current inflation rate and the current strength of the currency, the 2.02% that you have is actually pretty good. Israel has no interest in paying high rates on incoming money since its currency is too strong and it hurts exports, so don't expect much at home on this issue.
Opening an account outside of Israel poses a different problem - tax reporting. You'll have to file an annual tax return and pay your taxes on the interest you earn, something most Israelis never have to do. That will cost you and will probably eat up much, if not all, of the gain. Also, currency fluctuations will hurt you, as no-one will open an account in Shekels outside of Israel and you'll have to convert back and forth. In fact, the first thing to happen when the rates in Israel go up would be for the currency to go down, so whatever you might gain abroad will disappear when you actually decide to move the money back. And you will still be taxed on the interest income (can't deduct capital loss from interest income).
Your options, as I see them, are either the stock market or the bonds market (or, more likely, a mix).
In Israel, the bonds similar to the US T-Bills (short term bonds) are called "makam" and you can either invest in them directly or through mutual funds. These are traded at TASE and can be held for free (banks are not allowed to charge you for holding them). They're taxed at lower rates than capital gains (15% vs 25%). During the times of low interest these may provide much better alternative than bank savings (pakam).

interest rate on online banks


Non-academic positions after PhD in computer science

Question: With the academic job situation so tight and uncertain, I am thinking of jobs outside academia (after a PhD in Computer Science). There are plenty of programming jobs that require an undergrad or even no degree. I tried some of them and they are so routine and so narrow that one gets frustrated easily. They also involve 8-5, M-F drudgery.
Can anyone suggest better alternatives. How do companies advertise for research positions? I haven't seen many ads for those. BTW, I live in Southeast of US and due to family reasons can not relocate far.
Comment: No, I don't hate coding. In fact, I love it. But many of the jobs I took had people "finding and fixing bugs" or doing very routine coding or migrating from one .NET version to another. I doubt you can call that real coding.
Comment: I am surprised at "finding and fixing bugs" being too easy. The most difficult thinking I've ever had to do was some industry debug. I found subsequent PhD coursework and research relatively relaxing. The first debug jobs I got were easy, but as I showed I could solve the easy problems I kept being given harder ones.
Comment: You should contact a tech recruiter. There's plenty of new development projects out there for you to try out as well, in addition to other answers. I had no luck finding a job until I got a recruiter and ended up getting a bunch of interviews at higher-level development places.
Comment: You should specify the field of your **PhD** in the title or ask the question not limited to the **Computer Science field**
Comment: Patricia, I never said "finding and fixing bugs" was "easy". It doesn't give you the same satisfaction as building something new. The project I last worked on had a massive code base with lots of bugs, and I spent days and nights looking at old (Visual Studio 2005) code that had very poor design. @user137 - I like academia, but it's hard to find tenure track positions. Most jobs are post-doc or adjunct faculty.
Comment: It's my understanding that "finding and fixing bugs" is 80-90% of real coding.
Comment: Do you hate coding in general? If you're a PhD doing BS/no-deg level software jobs, I'd wager that you just aren't being challenged at that job.
Comment: Do you want to ever return to academia? I don't know much about CS, but from what I've seen, once you're out of academia, it's almost impossible to go back.
Comment: Related, although in pure math rather than CS: [Pure Math PhD Careers](http://academia.stackexchange.com/q/18300/4140)
Comment: @EnergyNumbers That's a poor use of a developer's time, IMO. If I spent 80-90% of my time fixing my work, I'd never get any actual coding done.
Comment: @Compass Thus, the difference between scientific code and high-quality production code, as discussed in [this excellent question](https://academia.stackexchange.com/questions/37370/should-i-share-my-horrible-software)
Comment: @SamJones You, of course, know how you feel about debug, but don't tell me "It doesn't give **you** the same satisfaction as building something new." (emphasis added). I get a lot of satisfaction from tracking down bugs.
Comment: @Compass If you _don't_ spend 80-90% of your time fixing your work, you aren't getting any real coding done.
Comment: @JeffE I have, of course, included compiling in my schedule. That takes up 30-40% of that 80-90%. I guess if you consider the compiling also counts as fixing, then yes, we're getting close to that.
Comment: @PatriciaShanahan, "you" was used in a generic way i.e. for most people I have interacted with. I didn't mean you  personally. :)
Comment: _I have, of course, included compiling in my schedule._ — What?  First, what kind of stone-age computer are you using?  Second, you don't at least _think_ about how to fix X while you're compiling Y?
Answer: There is a large and active demand for computer science Ph.D. holds outside of academia. Some of the main classes of positions:

Contract R&D organizations like IHMC (near you in Florida) or my own employer, work a lot like soft-money academia.
Government laboratories are much the same, though the money works differently.
Government agencies need Ph.D.-level people to help manage their R&D portfolios, either directly as program managers or via private-sector contractors like Booz-Allen.
Giant companies like Lockheed-Martin, Pfizer, or Ford have high-tech or internal R&D sections that do Ph.D.-level computer science work.
Near any major tech university, you will find lots of startup companies and  consulting firms and other odd niches.
Finance companies and hedge funds will offer you lots of money in exchange for your immortal soul.

These are just a few of the more typical routes: the research ecosystem in the US is actually very complex and has a lot of strange niches; I don't have solid numbers, but I suspect the outside-of-academia R&D world is actually much larger than traditional academia, and that's even before we start counting non-R&D positions like hedge funds.
Some of these sorts of jobs, you can find via ordinary online job listings.  You'll likely do a lot better, though, if you reach out through your professional network and research community.  Your advisor and other faculty are one good place to start: they'll likely have former students and other colleagues to put you in touch with outside of academia.  Another good step is to go to the big conferences in your area, especially those with a more applied flavor, and look for the industry people there.  You'll likely find quite a number of good opportunities, especially if you are a US citizen.
Comment: "Finance companies and hedge funds will offer you lots of money in exchange for your immortal soul." Why is Lockheed Martin not included here?
Comment: @G.Bach Because they're such a complex company that they work on a lot of cool civilian aerospace stuff, like the [Orion crew launch vehicle](http://en.wikipedia.org/wiki/Orion_(spacecraft)) and the [Hubble space telescope](http://en.wikipedia.org/wiki/Hubble_Space_Telescope) too.  Also, for the OP: they've got major operations in Alabama.  I can't say the same for hedge funds.
Comment: @jakebeal I have found most of my friends at Lockheed bailed out ASAP. While Lockheed does have cool projects, the chance of you getting put on one of those cool projects is not high.
Comment: @Compass Sad to hear... I've not worked with them personally, myself, so I don't know their culture.
Answer: If you're finding boring (to you) jobs, you're not looking in the right places. Off the top of my head I thought of SAS, which is located in North Carolina. One possibility is to look for companies that were spun off from university research.
Ask your professors--where did other master's and PhD graduates end up, if they didn't go into academia? Talk to the career center. Even though they may be focused on undergraduates, they may have some ideas.
Answer: I have found LinkedIn to be pretty good at recommending jobs for me, both with its own algorithms and with the occasional 'inmail' from a recruiter. Sometimes it's enough to make me wrestle with leaving academia, for the reasons you cite in the question.
Make sure you use it to its full potential by (signing up!), updating your profile and making it look amazing, following companies, joining groups, connecting with people you know, and connecting with tech recruiters.


How was beer brewed before the discovery of Yeast?

Question: Yeast was identified as the cause of fermentation in the 1800s, but beer has been around since long before then.  How was fermentation started before the intentional introduction of yeast?  Was it all lambic-style ambient yeast, or what?
Comment: Not enough for an answer, but it's interesting to note that the infamous ["Reinheitsgebot" German beer law](http://en.wikipedia.org/wiki/Reinheitsgebot) only explicitly permits water, barley, and hops. This is unsurprising since, as you note, yeast wasn't identified until the 1800s and the law dates to the 1400s.
Answer: You don't need to know what something is to use it effectively.  Though yeast was only identified as a microorganism recently, it has been known as the cause of fermentation for many centuries.  It's easy to underestimate how sophisticated people throughout history were.
Before yeast was monocultured in labs it was actively cultured by brewers.  They would transfer the yeast cake from a batch that's finishing into a recently-brewed batch.  This cake contained a whole ecosystem of yeasts and bacterias, but a few strains were usually dominant.
By applying artificial selection brewers developed different strains of yeast in different areas.  The yeast culture was the make-or-break characteristic of a brewery, and defined the styles of beer that could be produced more than any other factor (other than water in Burton).
Evidence of this process comes from the history of lager: bottom-fermenting yeast (Saccharomyces carlsbergensis) emerged in the fifteenth century as a direct result of the cold storage regime of northern brewers such as Carlsberg.
They may not have known it was a microorganism, but middle ages brewers most certainly knew that yeast was the cause of fermentation.  That's why they called it "Godisgood".
Comment: A point of pedantry: Carslberg itself was founded in the 19th century, so while it may have emerged from the regime of northern brewers in the 15th, Carlsberg itself wasn't involved.
Answer: Actually, there are still people who brew the same way people did before the discovery of yeast, so we have a pretty good idea how it worked. There are also data from early 20-th century ethnological surveys where brewers describe their methods. Some of the equipment used for yeast transfer is still in use, or in ethnological museums.
People usually didn't brew that often, so they couldn't transfer the yeast cake itself. Instead, they would collect yeast from the previous brew and either keep it in a jar that they kept cool, for example in a well, or by drying it on a wooden log, piece of linen, straw ring, etc etc etc. There were lots of methods, but they basically boil down to either keeping wet or dry yeast. Odd Nordland's 1969 book is the only detailed source of information on this that I know; unfortunately it's near-impossible to get hold of.
As far as I know, this type of yeast and yeast use only survives in two places: the Lithuanian province of Aukstatija, and western Norway (specfically, Hardanger, Voss, and Sunnmøre).
I've written a summary of what's known of Norwegian practices, and earlier this year I was able to brew with a brewer who still uses his family's ancestral yeast strain. I've published an account of that brewing session.
I hope people will forgive me for linking to my own stuff here. I don't know of any other detailed sources of information on the web anywhere.
Comment: I have come across some ancient recipes that mention using a starter. I'll try to find the references. I do know that in the old wine making tradition, the blessing of the destemmed & crushed grapes in a vat would include the pouring of wine in a bottle (presumably containing lees with resident good yeast) from a previous vintage. That would have acted as a starter as well. The bottom line is that wine & beer makers of the past were more sophisticated than what is commonly understood these days.
Answer: There are many plants where yeast grows in symbiotic mutuality. Take fresh dark grapes - the slight white "sediment" on the surface is natural yeast, and you won't find grapes without it.
Another such plant is barley. Normally, the yeast only appears on the seeds, in relatively small amounts. Malting creates optimal environment for the yeast growth though, making the whole volume of the seed (as opposed to just the surface) nutritious for the yeast, and as it grows, it produces alcohol.
Sure there is always a risk that a different culture of fungi or bacteria takes over, killing off the yeast (and e.g. producing vinegar instead of alcohol) but if brewing is performed in relative cleanliness, with little contaminants that could disrupt the process, the natural yeast will take over and dominate it, killing off all competing cultures.
Currently, cultured yeast provide a kick-start to the process, simply leaving no time for different cultures to dominate the batch, and radically shortening the process that would normally take a long time until natural yeast reaches concentrations you create by just adding cultured yeast, but it's not essential to the process - it's just a strong push in the right direction.
Answer: There is no production of alcohol without yeast. Before the "discovery" (better: selection and cultivation) of the Yeasts we know and use today, humans had to rely on luck.
Its a wild fermentation, many different microbes and fungi are competing for their nutrition (sugar).
The problem here is: Many yeasts produces fusel alcohol, i.e. methyl alcohol (which can cause blindness).
Other bacteria could cause the fermentation to vinegar.
So the resulting product seldom was good, mostly it was not drinkable for us today ;)
Since the cultivation of special yeasts it's possible to control the fermentation, while adding a big amount of the yeast. So this yeast has a big advantage over others. Further the produced alcohol and carbondioxyde protects the beverage from other organisms.
Comment: "fusel alcohol".
Answer: Before brewers discovered the importance of yeast in the brewing process they had to rely on the local wild yeasts for fermentation.  Louis Pasteur discovered the importance of yeast to brewing in 1857.
Ancient brewers still used the same process of mashing the grains to extract sugars for fermentation and adding hops for bittering and preservation.  As a side note, prior to the use of hops in brewing brewers used a mix of herbs called "gruit" which provided flavoring but no preservation.
Certain areas of the world are known to have wild yeasts better suited to brewing and still produce beers of this style today, such as Belgian lambics.
Comment: I'm sorry, but this is all wrong. Brewers were well aware of yeast centuries before Pasteur. A Norwegian yeast log, an implement used to preserve the yeast between brewings, has the year 1638 carved into it. In Sweden, Olaus Magnus's recipe from 1555 mentions yeast, etc. There are even hints that brewers knew about yeast in Roman times. Very likely ancient beers were not spontaneously fermented, for a whole number of reasons.
Comment: Lars, do you have the reference to yeast being mentioned in Roman times? The New Testament has reference to Jesus warning about the yeast of the Pharisees. The standard interpretation is that it is a reference to yeast in bread making. However, since wine and beer making involved the use of yeast as well, it could have had a broader application. After all, bad yeast can result in sour beer and wine that results in headaches. Fun fact: Wine makers often get rid of their barrels, infected with brettanomyces, to beer makers. It's a win/win situation.
Answer: Yeast as a microorganism was discovered by Pasteur. The Vikings did not have microscopes, likewise neither did the Germains who wrote the beer purity law of 1516 which does not include yeast as in ingredient. Brewers (often clergy or women called "brewives") believed it was a mystical process and kept beer consistent by saving sediment in patties or cakes for the next batch like bakers save chunks of dough. The term yeast may have been used before pasteur but he surely changed the meanining and revolutionized standardized beers by isolating yeast types.  As far as I know beers that rely on wild yeasts are the "farmhouse" styles compared to the main two; lager and ale yeasts.
Comment: You wrote: "Brewers...believed it was a mystical process and kept beer consistent by saving sediment in patties or cakes for the next batch like bakers save chunks of dough." Do you have a source for that comment? Are there recipes from the monks for beer & wine making? For example, I'm aware of an Italian tradition of taking wine from a previous harvest and pouring that into a fermentation bin as part of a religious blessing. I suspect the good residual yeast in the wine poured into the vessel, from a pervious harvest, acted as a starter to over power the wild (i.e. not so good yeasts).
Answer: The Vikings used to brew beer (some of us still do!). They did this without the specific knowledge of yeast. Each family owned a stock of wood that belonged to the family brewery which was used to stir the wort prior to fermentation. This inoculated the wort and provided the yeast needed for fermentation.
Although they didn't know why it happened, they did know that unless they used the stirring stock, they wouldn't get beer.
Comment: I'm afraid this is false. The vikings had words for yeast (kveykur) and there's even a passage in the saga that talks about a brewer adding yeast to the beer, but it wouldn't ferment (probably stored too long) "so that all their work was in vain". They definitely knew about yeast.


How many aurors guarded Hogwarts in Harry Potter's 6th year?

Question: In Harry Potter and the Half Blood Prince, it was mentioned that the Ministry for Magic offered protection to Hogwarts by placing more counter-curses, anti-intruder jinxes and a small task force on the grounds of Hogwarts Castle for the sole purpose of protecting the school. So, how many Aurors did Rufus Scrimgeour place in Hogwarts grounds to protect the castle?
Answer: Tonks mentions herself and 3 others.
During Harry and Tonks' dialogue in HPB she mentions other Aurors guarding Hogwarts.

"But what are you doing here, anyway?" Harry asked
 "I'm stationed in Hogsmeade now, to give the school extra protection," said Tonks.
"Is it just you who's stationed up here, or -?"
"No, Proudfoot, Savage, and Dawlish are here too."
"Dawlish, that Auror Dumbledore attacked last year?"
"Thats right."- Harry Potter and the Half Blood prince, Chapter 8 (Snape Victorious)
Comment: as you mentioned there was also protective charms/jinxes and members of the staff would be willing to fight.
Comment: But there are more than 30 Death Eaters, so how come 3 to 4 aurors are sufficient in protecting Hogwarts?
Comment: @Ken_To_2018 plus, it's the same with normal police, you don't expect a full scale attack on a single target. If someone is "under protection", they have a few cops stationed close-by, even if they are "under protection" from the let's say the mafia (typically alongside being placed somewhere unknown if there is a serious threat).  The small group is enough to help detect an attack early and sound the alarm bells to get the whole auror squad there if indeed it would be a frontal assault in force. That's why Malfoy goes for the cabinet, to stage a quick assault from inside.
Answer: In the harry potter and the half blood prince game there are 5 or 6 Aurora on the marauders map guarding each area of Hogwarts, I can't find the particular map I want but if you play that game it will show you but this wikia shows you the locations which they guard, it may or may not be canonical to the movie though.
http://harrypotter.wikia.com/wiki/Harry_Potter_and_the_Half-Blood_Prince_(video_game)


How can I generate an Entity-Relationship Diagram and SQL DDL statements from natural language text?

Question: I am using LaTeX or another text-macro tool/library. How can I (1) use natural language text to describe relationships, then (2) generate an Entity-Relationship Diagram and (3) generate SQL DDL to create the database schema from it?
Comment: What SQL are you trying to generate?  DDL or DML?
Comment: DDL (for Oracle)

Basically just the Create reference + attribute related commands need to be generated.
Answer: There are many ways to do this, but the most important thing to know is that there is a name for what you want to do: Object Role Modeling. It's a process for creating conceptual models using natural-language semantics.
This is a pretty good (if old) overview of the process.
The Wikipedia page for ORM has a pretty complete list of the available tools, many of which are free.
The most up-to-date solution is NORMA, since it is actively maintained by the ORM Foundation, but that's a plug-in that requires Visual Studio.
If you don't have Visual Studio, Infagon looks like it is still pretty actively developed and may be your best bet.
CaseTalk is also worth a look. Free to students and educators, but commercial otherwise.
Answer: I think I will write the SQL by hand, and generate a diagram from that using SchemaSpy.
Unless you can think of a quicker; more efficient way?
Answer: I did something like this once with a document parser tool I wrote.  It would strip out specially formatted comments from a DDL statement and produce a data dictionary.  This was renedered with LaTeX.  However, I still had to reverse engineer the database into Visio to make E-R diagrams.
For a limited subset of SQL needed to parse create table statements it wasn't too hard to write the parser.  I had it working in a couple of weekends.
Comment: Awesome, would you be able to share this?
Answer: Hey If it's any help i have used visio to create my ERD and revere engineer it to DB using it's Reverse engineering tool, which provides reverse engineering support to ms access, ms sql server, ...


Riddle containing other languages than english

Question: Is it allowed to create riddles containing partly languages which are not english? If yes, which languages are allowed?
Answer: If you want to post a puzzle written in a specific language, then sorry you can't (according to this policy). But if you want to post a puzzle which needs the knowledge of any specific language, please feel free.
language tag should only be used in case when the answerer needs to know about a foreign language while answering, not while reading the puzzle.
Have a look at this meta post too.
Comment: Thank you for finding that the language issue has been settled at the SE level, manshu! @arc_lupus, I would very much enjoy seeing your puzzle, and think many others would as well, if introduced in English, then completely described in its native language, and finally answered similarly, with an English introduction. (I'd feel enriched even if it had no English at all and I used computerized translation to understand any of it.) Many puzzles here rely on technical or cultural details that are equivalent to being in an another language.
Comment: @humn: http://puzzling.stackexchange.com/q/30889/4043
Comment: Nicely done, @arc_lupus, an excellent example for future posts
Comment: The puzzle would be partly in another language, otherwise it would not make sense in the context. If that is not possible, I will design it completely in english (but that would destroy the context).
Comment: @arc_lupus I think it is purely opinion based. Some people might be ok with that puzzle while others might get frustrated for not having enough knowledge about that language. So by asking me, you are only taking the opinion of single person. And who knows if others agree or disagree with my opinion.
Answer: There is the tag japanese for puzzles that use Japanese characters or the Japanese language. You may want to check out the corresponding puzzles,
and compare the puzzle-type to your puzzle.
https://puzzling.stackexchange.com/questions/tagged/japanese
Comment: [This](http://puzzling.stackexchange.com/questions/29460/an-italian-rebus) puzzle uses italian words.
Comment: Good examples, Gamow and @manshu, ones considerately introduced in English at that. Super! (Even if they included no English I wouldn't mind, thanks to the infinitesimal effort required to ignore inscrutable posts.)


xterm crash - set pantheon-terminal to open terminal applications

Question: When I set Emacs(terminal) as my default editor and try to open a file, I get the error message
 Failed to execute child process "xterm" (No such file or directory)

Additionally, when I try to click on the Emacs(terminal) application, nothing happens (presumably because of the same error).
I know I can fix this by installing xterm (sudo apt install xterm). Ideally, however, I'd prefer to use the pantheon-terminal to do this. How can I trigger the elementary terminal when opening terminal applications?
Note:
I tried using the dconf editor. org > gnome > desktop > applications > terminal. But the value for exec, 'pantheon-terminal' seems like it should open the elementary terminal.
Answer: According to this post it should be:
io.elementary.terminal -e "emacs"

answer updated for Juno & Hera


How would you explain COVID-19 lockdown to a 4 year old?

Question: How would you explain COVID-19 lockdown to a 4 year old given that the lockdown might be in place for months in London?
Comment: I also struggle to explain this to my 18 year old...
Comment: I found this to be fun and useful at the same time. https://www.mindheart.co/descargables
Comment: @Vlad And also my elderly grandparents ...
Comment: For what it's worth, I started with The Magic School Bus  S1E3: Inside Ralphie.  That did a good job of characterizing how germs work.  But that's just a way to start.  You are asking how to explain the lockdown, not "how to explain germs."  None the less, I found it a useful starting point.
Comment: There is a quite nice explanation video for children produced by the South Tyrolian Research Center EURAC: https://www.youtube.com/watch?v=MVvVTDhGqaA
Comment: Here's a YouTube video story book: [Time to Come In, Bear: A Children's Story About Social Distancing](https://www.youtube.com/watch?v=DA_SsZFYw0w).
Comment: Friends of mine made a (free to download) [picture book](http://www.flipengrotevriend.nl) called 'Flip, grote vriend en corona', it is in Dutch but the English translation is in the works. You can also have the book read to you in the picture book app '[bookabooka](http://www.bookabooka.nl)' (also in Dutch) Or get an impression of the book on [youtube](https://www.youtube.com/watch?v=HkutqzW7xjM)
Comment: Sorry, I forgot to vote for your question. My youngest grandchild was 3 years in February and it is very hard for her to understand why she can't see me not every week like before. And also me too!  Nobody can explain to me why I couldn't embrace her yesterday on my birthday! +1
Comment: Little late to comment but I told my son there is virus outside so we don't shake hands or go bear relatives. He understood is well ask everyone to wash hands when r coming from outside
Answer: First of all, recognize that your concerns may not be the same as your four year old's concerns. This has two implications:

Your child may be worried about things you couldn't have thought of. Your child is likely shielded from or doesn't understand a lot of what's going on, and that can also mean that they don't have access to bits of information that would actually be reassuring. Encourage your child to ask questions about corona, so that they're not left to ponder on their own things that may seem frightening.
You are likely worrying about outcomes your child has no thought of. Try not to pass on your own fears to your child. If pre-school is closed and one parent has to stay home from work to care for the child, recognize that this may be viewed as a mainly positive outcome to the child.

With my three year old, I emphasize that all closures and restrictions (writing from Sweden, we're not currently in full lockdown) are not - ultimately - to protect us from disease, but to protect our elderly from catching it from us. I find that framing to be appealing because it's both true, and I imagine it's less scary to a young child to hear how we all have to chip in and make sacrifices to protect another group, than to convey an image that it's actually unsafe for them to step outside.
Why we should wash our hands and what's so good about vaccines are some things we talk about normally, and the current situation is a good opportunity to put that into context. You can say that it is to avoid this that we vaccinate against a lot of other things, and that scientists are working on a vaccine against this too. That perhaps once your kid will have children of their own, and they will receive a corona vaccine as well in the routine program, and your child will be able to tell their children how they remember what it was like before the vaccine. Washing hands has been a constant battle. Now we've introduced a longer routine, which involves singing a 20-second-long song, and compliance has (temporarily, I assume) increased.
Consider whether you are changing your own behavior in a manner which may require explanation. For instance, if you are suddenly buying groceries in conspicuously larger quantities than normal, or even if they may have seen the images of empty shelves, you may want to point out that you and others are trying to reduce your number of trips to the grocery store, and hence the number of chances you may infect some at-risk person, lest they think that you're actually going to run out of food.
As an adult, it's easy to become consumed by this. We like to stay updated about what's going on in the world, and this is certainly a main event, and a rapidly evolving one. For my own sake, I could easily bingewatch news for the greater part of the day, and spend the remainder hypothesizing over different future scenarios. Recognize that a young child's world is smaller than yours. Talk about it as a thing that's happening right now, but make sure most of your interactions revolve around normal day to day activities. The above is addressing your question, how to talk about corona, but also make sure you don't talk exclusively about corona.
Comment: @AlbrechtHügli a 4 year old doesn't necessarily need to understand it to the same extent as an adult, though, because they also won't understand how unprecedented these circumstances are. If the current lockdown conditions were an annual occurrence a 4-year-old would barely know any different. They have at most one more year of experience to draw from when they had a clue what was going on. If parents don't project their own trepidation, there's no reason why this should especially daunt them.
Comment: While one must break this explanation down to a child's level, I don't fully agree to only "blame" older or generally any other people for the restrictions the child must follow. On one hand it could make the child think "no problem for me so I don't want to care any more" - realistic thoughts for children and the very wrong way to handle this situation. On the other hand even children are not absolutely safe, they can get this virus too and also suffer badly from it, although probably not to the same degree as older prople. So one should explain this as well, wrapped in child-safe words.
Comment: +1 but actually I ask myself why a 4 years old child must/can understand something that many adults don't understand. Maybe Tommy og Tigeren (Calvin and Hobbes) would understand it if we told him that we are in a space shuttle and right now we were passing through a hail of comets.
Comment: @puck: valid bit of nuance, thanks for your input.
Comment: Parenting a 3 year old here: I told her "everybody is a bit ill", which isn't far from the truth and explains a lot to her (staying inside most of the time, her not being able to see some friends, shops being closed, washing hands more often ...).
Answer: Some great resources exist already for this.  Here are a few my child's school has suggested, which I also think are fantastic.
The CDC site on talking to children about Coronavirus focuses both on parents ("remain calm and reassuring," "provide information that is honest and accurate," etc.) and on facts that are presented in a way children can understand - what is COVID-19, what can I do to avoid getting COVID-19, etc.
The National Association of School Psychologists resource page includes much of the same information as well.  In particular I like the age appropriate suggestions:

Early elementary school children need brief, simple information that should balance COVID-19 facts with appropriate reassurances that their schools and homes are safe and that adults are there to help keep them healthy and to take care of them if they do get sick.

This is also appropriate to four year olds.  The worst thing for them is fear, because they don't have anything to gauge this by - for that matter, most of us don't either; but we have more context than they do.  Give them that context when you can, but when you can't, reassure them that this will get better, and while there will be some bad things that happen because of it, a lot of people are working hard on this to make it better for everyone, and that you will take care of them if they do get sick.
Answer: To you and me, this lockdown is unprecedented. To a four year old child, everything is unprecedented. They are used to new things happening because new things happen all the time to them.
"There are lots of dangerous germs around at the moment that can stick to your hands and make you sick if they get into your mouth, that's why we don't meet other people unless we have to, and that's why we have to wash our hands for a long time with hot water and soap, especially after we touched things and before we eat".
Kids don't have to understand it completely, just enough to make them act in a safe way.
Answer: There are some great YouTube videos that have been put together by Michelle Dickinson aka NanoGirl.
This one is explicitly aimed at kids:
Coronavirus Explained! (For kids)
as is this one: How to teach your children how hand washing helps prevents the spread of coronavirus
This one is a round table with the New Zealand Prime Minister:
Coronavirus COVID-19 update with PM Jacinda Ardern, Dr Michelle Dickinson and Dr Juliet Gerrard
Comment: Whilst I believe the links are helpful, [it would be preferable](//meta.stackexchange.com/q/8259) to include the essential parts of the answer here and provide the link for reference. At least a summary of *how* to explain it would be good enough.
Comment: I think, given the specific timeliness of this particular topic, we can relax a bit on that expectation; it would be better, certainly, but I think there is (short term, at least) value in link-outs in this particular case.
Answer: I did this as a pen-and-paper game with my small child. It was dotted paper, I said "each of these dots is a person, now look I'm going to make this one sick." I coloured in one dot with a pen. "This is day one."
"The next day this one makes two more people sick." I took a different coloured pen and coloured two adjacent dots, and crossed off the first. "Now three people are sick."
You can see where this is going. A four-year old can follow a "circle two dots and cross out one of yesterday's" procedure, and changing colours each "day" makes it easy to keep track.
When the sheet of paper is full, say "this is a whole town of people, they're all sick now, what will happen tomorrow? There will be three pages full of dots."
Comment: While I believe it's not intended, it's strange that for me, crossing off the dots implying more than sick: they are not alive anymore...
Answer: Thank you, Mr. President.  It's not easy for me either.  I also stay at home all the time.  I don't shake hands with anyone, not in a long time.  I wash my hands thoroughly, every day, as it should be, over and over again.  We just have to fight this virus.  It is more important than ever that we all help each other.  Especially the older generation.  The have the greatest risk.  And those who are sick.  By giving them space and not shaking hands.  We have to see that we take it incredibly seriously.  Otherwise we all have to stay in quarantine at home.  Then we all can't go out anymore.  I really hope everyone takes it seriously. Roger Federer
I'm sure a 5 years old child will understand it.
Answer: Most answers focus on explaining why it is important that the virus is super infectious and what we can do to decrease the spread. These are incredibly valuable. For me, it helps if you understand what a virus is. I think the basic concept isn't that difficult.
I use lego as a simplified analogy. I generally dislike simplified analogies in arguments because by definition they leave out details but they can have a function to make complex concepts easier to understand.
Lego has these blue instruction manuals. They tell you how to make all different sort of things. It can be cars, helicopters, houses, whole fire stations. Now, let's imagine there would be such a blue book which would instruct you to build a robot. And not just any kind of robot, this would be like a super lego mindstorm robot which can actually read these blue books himself and build lego cars, helicopters, etc. That would be quite the awesome robot. And think of it, anybody with the right amount of lego could be told how to build the robot if you would just send them the blue instruction book! Wouldn't that be fun if someone send us the book? In reality, there is no such book for lego of course, but in a way there are such books for all plants and animals. They are really tiny and you only see them if you have a really really good magnifying glass. You can actually look up pictures on the internet. They look nothing like lego books but they work just the same. They can be read by tiny tiny machine like parts, which are a bit like factory robots. They read the books to build all living things. They build leaves, trunks, bones, skins, eyes, legs, hands, everything! These books is what people mean when they talk about DNA. That is an abbreviation for what it is made of. We can look it up what it stands for but it is not really important now.
What is important is how viruses work. What is really special about viruses is that unlike all other living things, they don't have the robot like machines to read the blue instruction manuals. What they do, is they try to get inside and, while no one is looking, put a few extra pages in the blue book of others. If they succeed, the reading robots never noticed and just follow the build. You know how sometimes lego instructions contain extra mini cars in a set. You build them in just a few pages. And sometimes with a lego instruction it says "2x". The pages of viruses are like that but they just say: "go back and build another one".
This way millions of virusses get build and they leave your body if you sneeze or go to the toilet. You cannot see them and some can stick to your fingers and then get on anything you touch. Then they might stick to someone elses finger and if they touch their mouth the virus could get in and if they manage to stick their few pages in the other persons books they have successfully repeated the cycle.
Depending on the child I would add extra details, like explaining the concept of cells and that each cell has their own copy of DNA, the concept of an immune system to protect against invaders, mutation and repair systems by having a double copy of each. Procreation where copies are passed on, explaining why donkeys make small donkeys and fish make small fish. They pass on their own DNA which is a combination of the 'books' of two parents, mixing up pages (combining the color scheme of the lego bricks) and random mutations. And from there it is only a small step to explaining that if living things produce more offspring than two while the population stays more or less the same than the mutations/combinations that help you find food and find a partner will accumulate, conversely, lets say a mutation makes you blind, then that mutation dies of. If a mutation improves something, it will remain.
Comment: I just tested this again on my own kid. He asked: "so what happens if your own machines start endlessly copying the pages of the virus?". I explained that is actually what makes you sick.
Answer: To my 3 years old niece we have told that we have to stay inside because there are invisible "little monsters" which can make people badly sick, and we don't want to come in touch with them.
The "little monsters" were more easy for her to understand than the concept of virus/bacteria, and she has been happy with that explanation.
Comment: I could easily imagine this causing nightmares instead of having any productive effect.
Answer: I am a psychotherapy student. :)
CAMH (Centre for Addiction and Mental Health) is a leading institute that offers mental health research and advice. See their resource centre for mental health and COVID-19. They also have a section about how to talk to children.
http://www.camh.ca/en/health-info/mental-health-and-covid-19
I strongly advise looking for institutes that are already active in mental health for direction about this (some links have been posted here already).  Children usually understand things very well. They may not understand the logic but they definitely feel the emotions that parents may think they can hide them from. Children are some of the first people in a family to notice things that go wrong (the coldness between parents for example, etc), so it is very important to acknowledge the fear or emotion or any emotions that you or they are feeling.
It is not so much about explaining what is going on in a logical way. More so, it is about seeing how they feel about this. Stay with each other and try to be honest and real. :)


How much damage does fire do?

Question: How much damage does burning do over it's lifetime? Does it differ depending on class or the pyro's weapon?
Answer: Assuming you mean Afterburn, which is the amount of fire damage you suffer after the flame thrower/flare's initial damage, assuming it is no longer directly hitting you:
Degreaser is 2 damage/half second for 10 seconds (40 total if not extinguished).  If a player is jarated, it does 3 damage/half second.
All other flamethrowers, flare guns, lit arrows, or the Cow Mangler 5000's charged shot are 3 damage/half second for 10 seconds (60 total if not extinguished).  If a player is jarated, it does 4 damage/half second.
Comment: @Ronan Forman: Just to clarify, the state of being "on fire" is a different mechanic from afterburn. A Pyro can be briefly set on fire, during which time he can be extinguished or suffer a critical hit from a flare or the Axtinguisher, but he can never take afterburn damage.
Comment: I should note, I'm not sure how the Buff Banner affects Afterburn.
Comment: If the person who put you on fire is buffed w/ the Buff Banner, you will take minicrit damage until the effect ends.
Comment: How long is it before the pyro gets extinguished? Because it suffers less, but still some afterburn.
Comment: @RonanForman The Pyro takes direct fire damage (which is considerably higher than the damage mentioned here), but do not take afterburn damage.

How much damage does fire do?


Viewing Physical Memory Addresses in OllyDbg or any program?

Question: I'm having a tough time finding any information at all concerning physical memory addresses and if/how I can get them from a program at runtime (Windows NT/10). When I run a program in OllyDbg and I'm at a breakpoint, for example, are the memory addresses in the dump, disassembler window, and memory map physical addresses or are these actually still virtual addresses? Do user-mode programs even have any concept of the physical memory or is this only between the kernel and the MMU? Thanks.
Answer: Please note this mapping is by no means trivial, but there are several resources available:
INFOSEC INSTITUTE - Translating Virtual to Physical Address on Windows: Physical Addresses
Translating Virtual to Physical Address on Windows: Segmentation (more theoretical view)
Using WinDBG
Stack Overflow: How to translate a virtual memory address to a physical address?
I'm sure you're able to come up with many more sources. Basically, you must use the directory table to map virtual address pages to physical ones. You can find it using the C3 register or traversing the EPROCESS structure.
Please note that there is no concept for physical addresses at user space, because the ability to write and read from these addresses would give the application the possibility to own the system.
Comment: Got it, so this means ALL addresses that are visible in OllyDbg or IDA, for example, are actually virtual addresses, not physical addresses?
Comment: Basically tools can calculate them and some do, but since they seldomly have any purpose, tools like OllyDbg and others display only virtual addresses
Comment: Ahhh that makes sense. I was confusing virtual addresses in memory with the "dummy" addresses that are displayed when the program is on disk. I forgot the official name for these but they are basically addresses just used as reference while the program is not yet in memory for disassembly purposes and once it's loaded, the addresses could change to wherever the loader places them, but what I've learned from you is that even still, the addresses will be shown as virtual addresses.
Comment: Ah you are talking about the file offset (also called RVA). The RVA is basically the Virtual address with the image base substracted.
Comment: Yes, I assume the disassemblers just use the preferred image base as default for this. Anyways thanks those resources were extremely helpful in learning about virtual memory vs physical memory further. I'm going to have to calculate some physical memory now


I have replaced my brake cylinders, but the brake pedal goes to the floor

Question: I have a '07 Silverado. Both rear wheel brake cylinders blew apart. I fitted new ones along with new shoes. I have bled the brakes but my pedal still goes to floor. What else can I do?
Comment: Have you bled the master cylinder, brakes, and ABS unit?  If you lost all the fluid in the master cylinder you'll have to bleed everything.
Comment: chris - I had to edit to make the question readable. Can you please confirm I haven't changed the meaning.
Comment: That looks good
Comment: Agree completely here with @JPhi1618
Answer: It's fairly common on GMs when all fluid leaks from the system that you have to bleed the ABS Bypass Modulator Valve. This requires a scan tool with bi-directional controls.
Answer: As JPHi1618 said, you'll have to bleed everything, from the master cylinder on down.  And the master cylinder may require "bench bleeding".  Google it to find out.
Comment: I suggest if you could add the bench bleeding steps to your answer of include a specific link. It would be even more helpful if you can tell us in what situations a "bench bleed" is required.
Answer: I have a 97 suburban.  I've replace just about every piece of hydraulic equipment on the vehicle aside from the hoses on the rear axle and the ABS pump.  Since replacing a broken line 2 years ago, the pedal hasn't been the same.  I probably put about a gallon of brake fluid through the braking system trying to bleed it correctly.  I finally was able to get it bleed completely and I can now lock the wheels on dry pavement.  Here is what finally worked for me.
Pull the bleeders off, clean them, install Teflon tape so they make a good seal.  Bleed the vehicle with the normal 2 person method, vacuum bleeding, or pressure bleeding.  If doing the 2 person method, close the bleeders before releasing the pedal.  This will get out any bubbles near the calipers/wheel cylinders.
There is a catch, any bubbles near the master cylinder or ABS will want to go up, and there is a good 1 foot drop to the bleeders.  I did a reverse bleed.  This pushes fluid from the bleeders to the master cylinder.  You want to make sure you have a good bleed on the system first, so you are not pushing dirty fluid back through the system.  After doing a reverse bleed, do a normal bleed again to ensure there are not bubbles trapped around the caliper/wheel cylinder.
Here is a company that makes a reverse bleeder.  http://www.brakebleeder.com/
I was able to build my own with a glass jar, some clear hose, and a connection to the air compressor with a regulator.  I took an extra set of bleeders and cut the tip off, so I could screw it in all the way to avoid leaking around the threads.  It seemed to work well, but I got brake fluid everywhere.
Comment: I would disagree with putting teflon on the bleeders, they do not seal on the threads, they should seal against the seat in the bottom of the hole.
Comment: The Teflon is for when the bleeders are open to let fluid through to ensure air isn't sucked in around the threads.  Correct, when they are closed they should seal against the bottom.


Multiple points of gravity in GameMaker Studio 2

Question: I'm trying to make a simple 2D prototype in GameMaker Studio 2 where there're multiple points of gravity, essentially static objects in the scene that attract the player-object based on distance and mass of the object. Does anyone know if this would be complicated to get working? I've been trying to find resources on how to do this, but so far I've not found much helpful, so if anyone has any pointers for me that would be much appreciated.
Answer: The difficulty really depends on your programming experience. If you're looking for a prefab solution I doubt you'll find one out there. Seems like a pretty straight forward coding challenge. You'll need to create an object and write some script that detects it's distance from the player and use the distance to determine how far to move the player toward the object. I suggest looking at GameMaker Studio 2's platformer sample game and using that as a jumping off point. Hope that helps, good luck!


When to use item:Created vs Item:Saved

Question: I have a scenario where I need to modify a certain value of an item when it is created (not saved) off a particular template.  In order to do that I tapped into the item:created event, however I noticed that I cannot read any of the field values in this event (even with item.ReadAll()), however on the item:saved event I can.  So what should I use and why cant I read any value on the item:created event?
Comment: You can use the item:added event. This event is fired for every field of that item.
Comment: The item:added and item:created events seem similar, but Sitecore only fires item:added when a user creates an item through the UI, but it fires fires item:created when code creates items through APIs. Use item:added if you only need to trap manual item additions.
https://stackoverflow.com/questions/13279060/sitecore-itemcreated-vs-itemadded
Answer: The item:created event will come too soon as the fields will not be populated yet (as you have noticed).
The item:saved event will do the trick, but created overhead as it is called on every save (so it works, but you really don't want to take that hit).
There is an item:added event that could help. I've used this one before and it works, but apparently only when added through the UI and not when added with the api (don't know your requirements on this).
Another option, next to events, is using one of the pipelines. I would take a look a the AddFromTemplate pipeline as that seems to be a very good match to your requirement. Zachary wrote a nice blog on it: http://zacharykniebel.com/blog/sitecore/2016/march/30/using-sitecores-new-addfromtemplate-item-provider-pipeline in which he states:

The <addFromTemplate> pipeline differs from the <uiAddFromTemplate>
  pipeline in that the <addFromTemplate> pipeline is run whenever an
  item is added, regardless of whether it is added programmatically or
  from the UI.
You should use the <addFromTemplate> pipeline when you want to execute
  custom code whenever an item is created. Note that this is also the
  best option if you want to run custom logic whenever an item is
  created from a specific or nonspecific branch template.
Comment: You beat me to it :) I'm all about using the `` pipeline. It's faster, and you're guaranteed to have all of the data for the item that you need: populated fields, branch template (sometimes called "master"), etc.
Comment: I actually considered pipelines initially, but then I saw recommendations asking to use pipelines only if user interaction is necessary?
Comment: I don't see any connection between pipelines and user interaction - no idea where that recommendation would come from..
Answer: Hope the below details help you understand item:Created,item:added,item:Saved and item:saving, .

item:added and item:created
•  These events seem similar, but Sitecore only fires item:added when a user creates an item through the UI.
•  It fires item:created when code creates items through APIs.
•  Use item:added if you only need to trap manual item additions.
item:saved and item:saving
•  Sitecore fires item:saved in either case(item:added and item:created), Using item:saved lets me put all the logic in a single handler, which fires after create, update, rename, move and potentially other events.
•  item:saving event before committing the change, while it raises the item:saved event afterwards. An advantage of using the item:saving event as opposed to the item:saved event is that you can access the values from the item before the save, and the new values, and can prevent the user from saving their changes.
Answer: If it is only on created you need to modify an item, I would not recommend using item:saved. However have a look at item:versionAdded. At this point your item should be populated with field values and you should be able to read and change it.
Comment: I agree with you that `item:saved` should be avoided in this case, but can you add some details explaining _why_ to your post? It will make the answer far more useful for the OP and future readers.

When to use item:Created vs Item:Saved


Can one developer work on two different projects (and in effect, two different backlogs) in a single Sprint? Any Agile recommendations on this?

Question: Can a single developer work on two different projects/backlogs completely independent in two Sprints (One Sprint is for one project/one sprint for the other) in the same timeline.
Comment: Possible duplicate of [Is it possible for someone to be a member of two Scrum teams, and how can that be made to work most effectively?](https://pm.stackexchange.com/questions/5027/is-it-possible-for-someone-to-be-a-member-of-two-scrum-teams-and-how-can-that-b)
Comment: @AlanLarimer I don't think this is strictly a duplicate. If there *is* no separate Scrum Team for Project B, such that Project A is being worked on by Dev 1, 2, and 3, and Project B by Dev 2, then Dev 2 isn't really on two Teams; s/he's just working on two *projects*.
Comment: *If* qualification and *possible* duplication.  Regardless, the answers to the other question, even with age and some inaccuracies, offer some level of applicability.  Elaboration on the question may be helpful.
Comment: My question was open ended to make sure I understand the different scenarios.
Answer: There are several problems with a developer working on more than one sprint. These include:

What happens if Team A needs the developer desperately, but they are busy with Team B? There will need to be a mechanism to prioritise the developers time across the two teams.
Capacity planning becomes more complicated for both Scrum teams. How much of this developers time will they have? Will it always be consistent?
A lot of Scrum is based on the concept of being a fully committed team member. If one Scrum Team is having trouble, the developer can simply say "it's not my fault, I was busy working for the other team".

There may also be some advantages; for example the developer may help to spread knowledge across the two teams. However, generally it is seen as a bad idea because of the concerns mentioned above.
Answer: There is nothing specifically stated against it in The Scrum Guide; the closest statement to barring it would be Cross-functional teams have all competencies needed to accomplish the work without depending on others not part of the team..  It would definitely violate two of the five values: Commitment and Focus.  It could also increase difficulties with empiricism: Transparency, Inspection, and Adaptation.
Answer: Yes, a developer could work on two sprints at the same time in an agile project, each sprint being for different projects with different backlogs.
Depending on your environment, this may not be the most efficient use of the developers time though. Often, working on one project at a time allows faster development due to focus. It then shortens your feedback cycle, allowing you to iterate. If you are juggling two different projects, giving a sprint on, followed by a sprint off may allow your product owner to get the feedback they need from live users.
It is also not uncommon for a single developer to integrate two projects into a single backlog, making it in effect one sprint. That allows you to prioritize the work across the two projects (because it is in a single backlog.) The main requirement to do that would be that both projects share the same product owner to prevent distraction from setting priorities.


Use separate domain as forwarder of landing page for SEO

Question: I have a website, which has a domain which is the company name. I also have a domain specificly for one of the services the company offers, plus a landing page created for that service.
From SEO perspective, would it be better to create a 301-redirect from that specific domain to the landing page, or to pull that landing page out of the company website, and make it a separate landing page / simple site?
So, set-up 1:
Specialservice.com is a 301 redirect to website.com/special-service
Or set-up 2:
Specialservice.com is a separate landing page, with links leading to website.com
In either case, there wouldn't be any duplicate content. There is just 1 page, and that's either it's own domain, or a page in a bigger website.
Which setup is better, and why?
EDIT: According to closetnoc, adding a redirect does nothing. But is a landing page worth the effort?
Comment: Adding more domain names that redirect to another does absolutely nothing. Otherwise, everyone would do it. Cheers!!
Answer: Ideally to increase the traffic, you can create the different domain and have totally different content but have links to your main website so that whenever a user clicks on any of the link it would go to an inner page on your mail website.
I've seen a ton of companies do the same


Get Product Id On Product Page

Question: How can i get product id on product page without registry? Such as class registry is deprecated in magento 2.3
Comment: can you post your code? what di you try,? you can use ProductRepository
Answer: I have created a demo extension for you.
Link >> https://github.com/magento1993/ProductId
Comment: You are right, but, you created class and extends it from `AbstractProduct` that is using registry
Comment: extension updated plz check again, this time I am using product view block in the layout
Comment: Yes, but block you are using, use registry to get a product.
Answer: You can use a view model.
Vinal kopp, write a blog where he has to create a custom registry but note that registry, not Magento generic registry like global variable.

The product is loaded by
\Magento\Catalog\Helper\Product::initProduct. This method dispatches
the event catalog_controller_product_init_after.
In the event observer RegisterCurrentProductObserver the product is
set on a shared instance of the class
\VinaiKopp\CurrentProductExample\Registry\CurrentProduct.
A new template block is added to the product detail page with layout
XML. In the XML the block is configured to receive a view model, an
instance of the class
\VinaiKopp\CurrentProductExample\ViewModel\CurrentProductExampleViewModel.
The view model uses the shared Registry\CurrentProduct instance to
retrieve the current product. This makes it a registry but without
the downsides of the global core registry.
The template retrieves the view model from the block and renders the
required product value

More detail at https://github.com/Vinai/module-current-product-example
Comment: It's not proper for me, but it is the best decision among the proposed.
Comment: Credit goes to vinai koop

Get Product Id On Product Page


Which of Plato's Dialogues should I read to learn about Socrates' views on science and epistemology?

Question: Which of Plato's Dialogues should I read to learn about Socrates' views relevant to the philosophy science and epistemology? I'm quite a beginner in these things and the titles of the Dialogues are hardly helpful.
Comment: @JosephWeissman: Sorry. I meant the downvote, not your query, which is a good one. I've been reading Popper and Deutsch which made me curious about Socrates.
Comment: Welcome! Is there any chance I might be able to persuade you to give us a bit more here? What else might you be reading or studying that has made Socrates' views on the philosophy of science and epistemology an interesting or urgent concern for you?
Comment: @JosephWeissman: Mostly ignorance. I'm curious whether any ancient views on how knowledge of the world is acquired correspond to the way it actually is. (Not sure why the question is inappropriate though.)
Comment: I don't think it's inappropriate; I'd just like to enhance your chances of getting a great answer. (Telling us a little more about your context and motivations will definitely help.)
Answer: The Republic is supposed to be Plato's primary work on epistemology.
Also, take a look here:
http://en.wikipedia.org/wiki/Platonic_epistemology
As for science, Plato rejected empiricism as a means of gaining knowledge, unlike Aristotle whose ideas contributed greatly to the philosophy of science.
Comment: Hmm, I too am a beginner, but from what I've learned so far, I'm not sure I'd agree with Socrates's philosophy as being the root of the scientific method.  Some of his philosophy is very unscientific; for example, he believed in the existence of the soul and talked about it quite a bit, so the soul must have been very important to him, even though it cannot be proven scientifically.  I see a very big contrast between Socrates and Aristotle in epistemology, Aristotle being very scientific and empirical while Socrates is more analytical.
Comment: As I say, I'm a beginner but I'd have thought that The _Republic_ is more Plato that Socrates, and that the Socratic method is at the root of the scientific method (though empiricism was historically important as a counter to authoritarianism).
Answer: Meno Dialogues is what I read for intro to philosophy. It's a dialogue between Socrates and his friend Meno. It sounds like useless ramble, but Socrates goes into detail about how he believes the soul is immortal and that is where we need to draw out knowledge.
Comment: also we should note that in Phaedo, Socrates explicitly try to prove reincarnation of the souls.


Logistic regression: maximum likelihood vs misclassification

Question: Traditionally the fitting of the logistic regression function is explained using maximum likelihood. Could one fit the logistic regression function as well based on either least-squares or based on misclassification error, or is this not possible / has drawbacks?
Comment: One issue with using misclassification error for a logistic regression model is that the model doesn't explicitly classify anything.  It estimates probabilities.
Comment: See also https://stats.stackexchange.com/questions/127042/why-isnt-logistic-regression-called-logistic-classification/127044#127044
Answer: One could possible estimate the logistic regression model by minimizing the classification error, but there is usually no reason why to do so!  Why do you want to do it?
But, such questions have been asked here before, so I will not rewrite an answer, very good answers can be found to this question:  Logistic regression: maximizing true positives - false positives
Basically, minimizing misclassification error amounts to using a score function which is not a proper scoring rule, see:  https://en.wikipedia.org/wiki/Scoring_rule
If misclassification is minimized by some parameter vector $\beta$, it will be also minimized by many other values of $\beta$ in some vicinity of the first $\beta$. In other words, the criterion function is flat around the maximum! To see this last fact, we explore the connection with scoring rules (se wiki above).  We specialize to the case with only a binary variable, possible values 0 or 1, with distribution given by a probability vector $p=[p_1, p_2]$.  Let the random variable be $X$, the forecaster makes a probabilistic forecast $r=[r_1,r_2]$, a probability vector.  Let $S$ be a score function.
This means that if the forecaster forecasts $r$, then $X=x$ is observed, he receives the reward $S(r,x)$. This reward then has expected value $E S(r,X)=p_1 S(r,1)+p_2 S(r,2)$ and we say the scoring rule (reward) is proper  if this expectation is maximized (under $p$) by forecasting $r=p$. It is strictly proper if that maximum is unique.
Trying to minimize the misclassification rate corresponds to using the following score function:
$$
     S(r,i)=\begin{cases}  1 ~~\text{if $p_i=\max(p_1,p_2)$} \\
                           0 ~~\text{otherwise} \end{cases}
$$   $(i=1,2)$
Now, consider if the true $p=[0.99,0.01]$.  If the forecaster then reports $r=p=[0.99, 0.01]$ then his expected reward becomes
$$
E S(r,X) = p_1 S(r,1)+ p_2 S(r,2) = p_1
$$
Consider then if the forecaster report $r=s$, some other probability vector such that $s_1 > s_2$, that is $s_1 > 0.5$.  Then you can calculate as above, and find the exact same expected reward! So this score function fails to reward truthful forecasting, it only depends on the event actually forecasted having been given a probability larger than one half.
That is the reason use of this will not lead to very effective learning! and so should be avoided.
Answer: In a word, yes, but it wouldn't be logistic regression anymore.
The logistic regression loss function (i.e., the negative log likelihood), is essentially a regression in the log odds. Changing that to a least squares loss function will make it linear regression, which will lose three things: (i) the interpretation of the regression coefficients in terms of log odds and (ii) interpretation of the model predictions as log odds (or when exponentiated, as probabilities) (iii) that linear regression does not bound the model predictions between 0 and 1, so it can easily make predictions <0 or >1. That said, for many real world applications, simply minimizing the least squares criteria using a 0/1 response (output, DV) works quite well, because there enough noise etc so that the model never gets close to 0 or 1 (the sigmoid function around 0.5 well approximated by a straight line). Plus in terms of things like ROC performance, that doesn't matter since all you care about is the ranks of the predictions.
For the misclassification error, that loss function is not differentiable and not convex (also called 0/1 loss), so it's very hard to minimize effectively. Hence, both support vector machines and logistic regression minimize two convex proxy loss functions, the hinge loss and the logistic loss, respectively, which can be seen as approximations to the 0/1 loss (convex relaxations).
Comment: Just to clarify, exponentiating the log odds will make them odds, but you can then convert to probabilities too.
Comment: I'm not following this.  How would fitting a *logistic regression model* by least squares make the logit a linear function?  I wonder if you're addressing a different question than the one the poster seems to be asking (unless I'm misunderstanding it).
Answer: I believe you can reduce the probability of misclassification by introducing a class of random effects mixing distributions. Using this approach, you can develop a full-likelihood model, which includes effects of misclassification [Ref 1, 2, 3].
However, there are two major challenges in applying this modelling approach:

Relaxation of the assumption on the mixing distribution of the nuisance parameters
Determining the efficiency and reliability of the model's validations

Finally, you might like to look at the semi-parametric Maximum Likelihood algorithms, such as [Ref 4].

Rice, K. M. (2004). Equivalence between conditional and mixture approaches to the Rasch model and matched case-control studies, with applications. Journal of the American Statistical Association, 99(466), 510-522.
Roeder, K., Carroll, R. J., & Lindsay, B. G. (1996). A semiparametric mixture approach to case-control studies with errors in covariables. Journal of the American Statistical Association, 91(434), 722-732.
Rice, K. (2003). Full‐likelihood approaches to misclassification of a binary exposure in matched case‐control studies. Statistics in medicine, 22(20), 3177-3194.
Schafer, D. W. (2001). Semiparametric maximum likelihood for measurement error model regression. Biometrics, 57(1), 53-61.
Comment: I dont think this answers the question! It answers __another__ question!