Theoretical explanation of using time-fixed effects

Question: I am currently sitting on an understanding issue. I did some regressions (pooled OLS) on my panel data and hold for time fixed effects.
However, I am confused about the interpretation of the time fixed effect as my results are completely contradicting each other. I tried to find some literature about time-fixed effects but I could not find the answer I was looking for.
My scenario:
I did a pooled regression by holding for time-fixed effects (monthly) as I try to investigate the impact of Fintech Funding on banks stock return. When I run the pooled OLS without holding time fixed my result is slightly positive (0.30) while running the regression with monthly time-fixed effects my result is negative (-1.12).
I am confused on how to interpret the results. Why does the time-fixed effect leads to a different result? And also what is the theory behind this?
Additional: I did not use a fixed or random effect model because my Breusch-Pagan LM test indicate to use pooled OLS. However, when using the Stata command testparm my result show that time should be considered.
Answer: The time-fixed effect allows to eliminate bias from unobservables that change over time but are constant over entities and it controls for factors that differ across entities but are constant over time. So, with and without time-fixed effect result can be significantly different.
This might be a helpful source for theoretical understanding.


Create line segments from GeoJot Points

Question: I would like to create numerous line segments from a set of GeoJot points. Is there a way I should format the data so I can run a script; and is there a script that can accomplish this? I have coordinates (geotagged photos) for Intersection "A" and "B" and would like to link them with a line that would then have the data form from the point (deplicate data form for "A" and "B" except one says "begin" and the other "end"; I don't care about this field, so could use either point). I have done an entire community this way and it is tedious to create new segments by manually inserting a line between the points, moving the data form to the line and then deleting the points.
Answer: Are your "GeoJot" point created from a GPS unit?  Are they in a shapefile or feature class?  There is a "point to line tool" in ArcToolbox that would work with your points in those formats? You shouldn't need a script.

Create line segments from GeoJot Points


Word or phrase for water coming out of clothes

Question: I was looking for a simple word or phrase to describe how sometimes, water comes out of wet clothes and spill on the floor. For example if you handwash your clothes and hang them up to dry but you don't wring them out first. So the water is spilling all over. How to say this?  water coming down the clothes, water coming out of the clothes, water spilling down the clothes or something else? Because these all sound wrong to me.
Answer: In your example (wet clothes hanging on a line) the verb is drip:

Water is dripping from the clothes.
The clothes are dripping water.

If the clothes have just been picked up out of the washing tub and there is a lot of water:

Water is running off the clothes.

If you are deliberately manipulating the clothing to force water out:

Water is being wrung from the clothes.
Comment: ...and a garment made of a non-absorbent fabric, so that the water runs straight out when it's hung up and it needs little or no ironing, is described as _drip-dry_.
Comment: Thanks a lot! Really appreciate it.


Opposite of "The traffic is busy."

Question: I'm looking for the sentence which is the opposite of "The traffic is busy."
The sentence I want to make is, "The traffic to the downtown is usually very busy during rush hour, so we should leave very early around 5 o'clock when the traffic is light/ the traffic is empty / the traffic is smooth / the road is empty.   Which sentence is the most natural English to say? Or if there are other sentences, could you tell me? I've checked it myself, but I'm sitll not sure which is the appropriate sentence.
Comment: "Traffic is light"
Comment: "The traffic is heavy" seems more idiomatic to me, but _busy_ works, in a more literal sense. (But that's why "the traffic is light" is the opposite.)
Comment: In most American cities, the traffic is heaviest between 7:00 AM and 9:00 AM, and between 4:00 PM and 6:00 PM.  This example suggests leaving "early around 5 o'clock when traffic is light."  This implies that the author is talking about 5:00 AM.
Answer: I've never heard or used "busy traffic" in this context. Rather, the roadway is what is busy with traffic. So I would use: "The traffic is usually heavy during rush hour," which would make the opposite "light traffic."
Comment: @kitty - The _roads_ are **busy**; the _traffic_ is **heavy**.
Comment: In my country, I often hear the non-native speaker reporter saying "It's very busy now" in response to question like "What about the traffic condition now?"
Answer: I think "traffic flow is smooth" is how you say it in English
Comment: In American English, a complete sentence (based on factual knowledge of what is happening now) would be "Traffic is light." or "Traffic is flowing smoothly." In the context of the original example, "when traffic is light" or "when traffic flows smoothly" would be correct, because the sentence is talking about what is likely to be true "around 5 o'clock".

Opposite of "The traffic is busy."


File filtering_Python 3.2

Question: I'm trying to write a short file filtering code in Python that will find my desired string.
I've got it worked out logically, but my Command Feed is sending me an error message for the print statement. This is how it works as of now:
filename = input('give file name: ')
n = input('give desired string: ')
f = open
line = f.readline()
while line:
    if n in line:
        print line
    line = f.readline()

Error Statement:
Traceback (most recent call last):
  File "<string>", line 7, in <fragment>
Syntax Error:         print line: <string>, line 718

I know this is a simple problem but the answer is not obvious to me. please help.
Answer: print is a function in Python 3. Use print(line) instead.

File filtering_Python 3.2


In Spelljammer, would the Necklace of Adaptation magic item let you survive in the airless parts of space?

Question: Recently an article was published regarding Spelljammer and what items or races could be used to survive in the airless confines of realm space. Amongst the items, the Necklace of Adaptation was not listed. The item allows you to be able to breathe in any environment, so wouldn't that allow you to survive in the airless parts of space?
Comment: Are you talking about this article from DND Beyond: [Building Your Character to Survive Spelljammer Adventures](https://www.dndbeyond.com/posts/1285-building-your-character-to-survive-spelljammer)?
Comment: Welcome to RPG.SE! Take the [tour] if you haven't already, and check out the [help] for more guidance. You mention Spelljammer so this is about D&D, but what edition are you asking about? Do you have a link to this "recent article"? (I'm guessing it's about D&D 5th edition; is that correct?)
Comment: I've added the [dnd-5e] due to the recent publishing of the article mentioned above, and the upcoming Spelljammer setting for D&D 5e.
Answer: A Necklace of Adaptation does, indeed, allow the wearer to "breathe normally in any environment". This GM sees no reason to believe that it wouldn't allow the wearer to breathe normally in the airless parts of space (or airless parts of planets; ie., under water), nor can I see an interpretation that would preclude its use.
My supposition is that the necklace is a well-known item (it exists at least as far back as 3.5, which is where I started playing); as such, it's a fairly obvious solution - for players with a high degree of system expertise - to the "airless" problem. It's also a straightforward solution where the article, if Thomas Markov's comment is correct, focuses on less-obvious options (a friendly plant creature, petrification, and a very slightly cheeky reading of how a cap of waterbreathing and a bucket of water interact). That is: the list isn't meant to be exhaustive, but to remind players that there are options other than "play a race that doesn't need to breathe" and to think outside the box for those solutions.
... says the player rocking a 3pp not-quite-Warforged in a Spelljammer campaign that's just started, not least because of the whole "doesn't need to breathe" thing they get ...
Comment: The *Necklace* seems to have originated in AD&D1e, where its description says "... even exist in airless space for up to 7 days."
Comment: @Nat: that could be a whole 'nother question. But: real-world, it works that way because that's the way it says it works; in-universe, perhaps the magic mixes the air from the environment into the bubble, allowing the wearer to smell (and be smelled!), but also allowing a lower-concentration dose of the gases and vapors in.
Comment: It's confusing that it says **"_you have advantage on saving throws made against harmful gases and vapors_"**; shouldn't wearers have full-immunity to those things already?  I mean, those sound like some of the mildest hazards.
Answer: Technically, you're never exposed to vacuum in Spelljammer.
In Spelljammer, objects in space hold an envelope of air around them, and the size of the envelope is based on the mass of the object. That's how you can have spelljammer ships that aren't airtight; the air just sort of sticks to them.
The same holds for a creature that falls off a ship. They take a little bubble of air with them, and if not rescued, the air will become unbreathable in a short time. They'll eventually suffocate, but the body will still have a little cloud of what the rules refer to as "foul" or "deadly" air (but what we would call carbon dioxide) around it. I'm sure there are extraordinary circumstances where the normal rules don't apply and you can end up out in raw vacuum, but that's not how it generally works.
Under normal circumstances, whether a necklace of adaptation would work in the void of space just doesn't matter, because it would be the bubble of increasingly foul air around you that it allows you to continue to breathe without ill effects.
Comment: @AnnaAG I imagine that's what DP means by "foul" - in the context of caving, foul air is any air that has a too-high concentration of carbon dioxide (or other unbreathable gasses) or a too-low concentration of oxygen. It doesn't matter if it smells bad; in fact, that's worse because you may not realise the air is dangerous until it's too late to escape it.
Comment: In 2e Spelljammer, and I assume in the 5e version (haven't read it yet), 'foul' is the term they use for air that's all breathed out.  Yes, we're talking about carbon dioxide poisoning but mentioning specific chemical gasses isn't appropriate for what is still a quasi-medieval milieu, so the term is 'foul air'.
Comment: Why would the air become "foul" by breathing it? All that would happen is that the concentration of carbon dioxide would raise
Answer: It works in water, where there's effectively no gas (for lung creatures, versus gill creatures).  It works in cloud kill.  It's magic.  I can't imagine CO2 is somehow worse than cloud kill (unless CO2 IS cloud kill).
Comment: Where did CO2 come into this? The question is whether it will let you survive in a vacuum.


How to get better at sight reading and what are the benefits of being good at it?

Question: I've been practicing my sight reading for a while and was wondering if anyone had any techniques that I can use to improve at it. I'd also like to know if there are any bad habits to avoid. Also, what are the benefits of getting good at it? Will I be able to learn any piece easily and quickly just by seeing the notes?
Comment: Regarding your first question, you may find [How can I improve my piano sight reading?](https://music.stackexchange.com/q/142/21766) helpful.
Answer: You get good at it by doing it a lot!   Like anything else, it helps a lot to have a REASON to sight-read.   Your friend is studying singing and needs an accompanist.  There's a hymn to play on Sunday.  Etc.
Getting good at sight-reading lets you do these things!  That's why.
No, sight-reading won't let you learn ANY piece quickly.   But when a piece is within your technical level, and its musical language is familiar, sight-reading means sight-playing.
There are different levels.  There's sight-reading getting EVERY note right.  Or there's sight-reading where you play the essence of the music - 'enough to get by'.  We're all guilty of this at times :-)
Sight-reading isn't a magic art.  It's just like sight-reading a book.  It's a natural result of familiarity and experience.   But you won't become a fluent reader - of words or music - if you only open a book once a week!
Answer: Sight reading is a combination of four skills.  When they all come together and are at their relative apex, your sight reading skill will progress. In other words, you can have one without the other but you will eventually hit a wall and go no further.
The first thing you need is an ergonomic technique.  If your arms can't play what is written in front of you, having spent decades practicing to sight read won't help. Like buying a car but it doesn't come with tires, it isn't going anywhere.
The second skill is rote which comes with playing a lot of songs.  When you play, if you have the ergonomic technique to effortlessly play what is written in front of you, having muscle memory on HOW to play scales and arpeggios will enable you to just  play what you think you see in front of you without thought, leading to . . .
The third skill is having a knowledge of music theory. As you read these sentences, you are not looking at every letter.  Your brain is seeing key letters and filling in the gaps.  Once your brain can instantly recognize scales, chords, progressions and patterns, coupled with technique, your brain will be able to read ahead and make educated guesses.  You'll see but not see, you see?
Finally, it requires a trained ear.  You must be able to read a score away from your instrument and know what the score sounds like.  As you read unknown scores, your ear will lead you.  You will know what is coming next.
So combining those four skills will quadruple your reading skills.  None in isolation will serve you.  It is like never being taught to read or sound out letters.  You will be able to speak but the written page would be a struggle.  Music has its own vocabulary.  Each note, chord or scale is part of that vocabulary.
So the next time you are sight reading and stumble, stop and analyze why.  Were your hands unable to get to where they needed to be?  Did they not know where to go?  Did you ear not know where you were going?  Were the notes just individual dots or are they like vowels and consonants forming a pattern and you didn't recognize what it was?
You can't get better by "just doing it."  It must be based upon knowledge, effort and skill. If you are not learning something WHILE YOU PLAY, then you may as well just go watch TV.  Why play what you know, you already know it.  Growth comes from analyzing mistakes and fixing them through knowledge, not repetition.  Practice doesn't make perfect, perfect practice . . .
Now, the benefits?  You'll know when you achieve it.  Like telling a child not to touch a hot stove.  They won't learn why until they do it.
Answer: There are many questions here already - this will probably be deemed a duplicate. Please read through those questions and their answers.
One of the main benefits is that, when you get really good, there's hardly a need to 'learn' pieces as such. You'll be able to sight read them as if you had learned them. yes, that's quite a distinct possibility. I play with people who've never seen a piece before, and play it, first time, as though they'd practised it forever. But it's taken them years to reach this point.
Comment: This takes me back to my session days - some players could read fly-sh… er..droppings on toilet paper, but were stiff as old boots. At the other extreme were the total guessers who could barely read at all, or not even that, but they could sing/play like a bird after one run-through. The ones who could do both were rare as rocking horse [oh, we're back to that word again]
Comment: "You'll be able to sightread them as if you had learned them". If you think that all there is to music is playing all the right notes in the right order (to paraphrase Eric Morecambe) then that is definitely true. If you think there is more to music than that, then not so much.
Comment: @BrianTowers - I've seen and heard and been in the middle of it happen, many times. Not just playing the right notes, but playing the dynamics too. I just wish I could do it. it's not that unusual in certain situations. Very similar to reading something from a book out loud - many people don't find that difficult, so why should sightreading music be any different?
Comment: @Tetsujin - oh, so true. Most people fall into one camp or the other. I've played with several who belonged to both camps, and - what a pleasure! But sadly, it happens infrequently... I'm in the heard it once, let's go, camp, which works in some situations - but certainly not all, malheuresement.
Answer: Two questions are asked here, how? and why?  I'll address the why first.
"what are the benefits of being good at it?" (okay so not a literal WHY).  There are many benefits.  The first and most relevant is work.  If your goal is to be a professional musician then the better you are at reading the more work will exist for you.  Studio work, theater work, etc.  For these types of gigs you may have to walk in cold are read a score in front of an audience or producers.  We almost always get music before for rehearsals but at the very least you'll need to adapt on the fly to conductors revisions.  Also, the better you are at reading the less effort you need to prepare for such gigs.  Even though you get the score in the mail months ahead of time do you want to spend 8 hours a day for 4 months preparing or a few hours a week?
The next advantage is simply having fun reading.  If your reading skills are very bad it might take months to even learn a song whereas if your reading is good you will be able to read through a new tune in the first sitting (it will be messy) and then you can spend more time polishing the work rather than trying to figure it out.
More options for things to play.  I see you tagged piano.  Guitarists are notorious for being illiterate.  TAB is king for young guitar players.  I once auditioned for a big band orchestra when I was in my 20s that hadn't had a steady guitarist for a while.  The conductor said "I cant' wait to see this".  After the audition (and I got the gig) he smiled and said "Holy crap, a guitarist who can read, now I've seen it all".  Guitarists these days love TAB so much they refuse to see the value in reading.  I always bring up Charlie Parker.  Wouldn't you want to play that?  Their response is almost always, sure but I can wait for someone else to turn it into TAB.  If you can read you can be that person who arranges music for your instrument that no one else plays.
Now to the how?
The best way to get better at sight reading is to do a lot of it.  Commit to reading something every day as part of your practice session.  I don;t know what it's like for piano players but there are specific issues guitarists need to work through.  Be sure you are picking exercises that are not so difficult that you get frustrated but difficult enough to challenge you to focus.  Be sure you work from a graded curriculum.  I would know exactly what to look at for a guitarist but not a pianist.  There are 2 types of reading.  If you can figure out the music from SMN then you CAN READ but probably not well.  Challenging yourself to read through an exercise with the metronome one and just lay out when you screw up and jump in when you can is a very important training exercise.  This is stressed in the guitar curriculum.  So if you have already had formal training I'd start by reviewing your old method books otherwise look for something, anything to work out of.  If you know how to read but want to get better, get your hands on the greatest variety of sheet music possible and commit to reading a little every day.


A co--ection of images

Question: What movie title from 2002 is hidden below?
Comment: Please could you confirm that the number in the cell four along and three down is 6.
Comment: @DanielS yes 6 is correct
Answer: The hidden 2002 movie is:

 ICE AGE

To understand why, it's best to consider the solution in several steps.
Step 1:
First, identify all of the images.

 There's a helpful hint for each, in that the number in each box indicates the word length:

 Row 1: POWDER, ROOT, HAND, SEA, CROSS, UNIT
 Row 2: PIE, FRUIT, STREET, MEDAL, CHEESE, COLD
 Row 3: CLOTHES, PAPER, STAR, RUBIK'S, CIRCLE, ALE

Step 2:
Now look at the colours of the numbers.

 Each colour is used 3 times across the puzzle. Let's group these images in terms of their colours in common:

 Blue: POWDER, MEDAL, STAR
 Dark red: ROOT, UNIT, RUBIK'S
 Grey: HAND, CROSS, CLOTHES
 Slate blue: SEA, STREET, PAPER
 Orange: PIE, CHEESE, ALE
 Red: FRUIT, COLD, CIRCLE

Step 3:
Next...

 ...find a word that connects each triplet, by forming other words or phrases when placed before or after them:

 Blue = BRONZE: Bronze POWDER, Bronze MEDAL, Bronze STAR
 Dark red = CUBE: Cube ROOT, UNIT Cube, RUBIK'S Cube
 Grey = IRON: (govern with an) Iron HAND, Iron CROSS, CLOTHES Iron
 Slate blue = WALL: SEA Wall, Wall STREET, WallPAPER
 Orange = CREAM: Cream PIE, Cream CHEESE, Cream ALE
 Red = STONE: Stone FRUIT, Stone COLD, Stone CIRCLE

Step 4:
Now notice the border colours of each boxes. Specifically...

 ...note that each set of boxes - whether yellow-bordered or lilac-bordered - comprises a set of three of the categories we just found.

 i.e. Yellow bordered boxes comprise all Dark red, Orange, and Slate blue groups; Lilac bordered boxes comprise all Blue, Grey, and Red groups.

 Now, the connections we just found in Step 3 for these two trios of groups can themselves be linked in exactly the same 'before-or-after' way:

 Dark red (CUBE) & Slate blue (WALL) & Orange (CREAM) = ICE: Ice CUBE, Ice WALL, Ice CREAM.

 Blue (BRONZE) & Grey (IRON) & Red (STONE) = AGE: BRONZE Age, IRON Age, STONE Age.

Step 5:
Put these together, and we have our answer!

 ICE AGE

As for the title...

 We are supposed to infer that this isn't just a coLLection of images, but that this puzzle also involves the coNNection of images!
Comment: This is co--ect :) Great job!

A co--ection of images


Visual Studio 2012 - Coded UI Test Wont Run

Question: I'm trying to create a Coded UI Test in Visual Studio 2012. When I add a new test VS will automatically start the recorder.  I then do some basic clicks around in the WinForms application I want to test.  I end the recording and generate a script.  When I try to run that script it complies fine but I get the runtime error

"Message: Unit Test Adapter threw exception: Method not found: 'Void Microsoft.VisualStudio.TestTools.Diagnostics.NonVSSqmClient..ctor(UInt32)'.."

How do I get my scripts to run?
Answer: The only versions of Visual Studio 2012 that support Coded UI Testing are Premium and Ultimate.
http://www.microsoft.com/visualstudio/eng/products/compare
Those versions should be able to run your scripts.
Answer: After recording, when you give the method name for recording you have to call that method in another CS file.  Next go to Test list Editor and select the CS file where you have called the test method and right click that method and run the application.
I think this will help you.


etcd on GCE-load balancing and health checks

Question: I'm trying to set up a secure etcd cluster on CoreOS on top of GCE.
I want to distribute load between several etcd nodes with some kind of load balancing. I want a load balancer that would have an external IP(to make etcd cluster reachable for other purposes from anywhere) and which would be able to distribute load to the pool of nodes. It seems that GCE Network load balancer meets all these criteria but there is a problem-its only able to use legacy HTTP health check to verify working nodes.
Also, there is an internal regional load balancer, but as its' name says-it gives only internal IP address to a LB, so the cluster would be unavailable from outside.
Are there any known workarounds? Maybe there is some way to host /health for etcd with insecure HTTP. Maybe there is some way to attach HTTPS health check to Network load balancer? Maybe there is some kind of proxy, which is able to check /health and then report it via HTTP? Thanks!
Answer: After contacting etcd team, it looks like I have an answer to my own question =)
They will add a separate /metrics on insecure port
I think it just a matter of time now. Waiting for next release


Where to store my data?

Question: Am developing software in VB.NET that needs to store related information of Contacts etc. I can't use MS-SQL or MySQL as Database because if I do that, then if I've to install on another PC, I'll also need to install MS-SQL on that PC. Isn't there any "built-in Database" in VB.NET?
Answer: You can use DataSets. Have a look here.
Answer: Based off your use case about needing to store relational data but not being able to install a full-fledged database server product, it sounds like your application benefit from using an embedded database.
There was a previous question about this here
Answer: I would recommend XML with Datasets. You need not to install any software, and there are tons of guides on how to read/write from/to XML files.
Another solution would be SQL Compact; it's kinda like SQLite (doesn't require installation)
SQL Compact: http://msdn.microsoft.com/en-us/data/ff687142.aspx
XML Solutions Samples:
http://www.codeproject.com/Articles/13854/Using-XML-as-Database-with-Dataset
http://www.daniweb.com/software-development/csharp/threads/343670/use-of-xml-file-in-c-instead-of-database
Answer: If your are dealing with a significant amount of data, a database is the appropriate solution. SQL Express is free, works well with VB and is, well, moderately easy to package as a pre-requisite with your msi file when you build the installer.

Where to store my data?


Is it possible to install WSL with no internet connection?

Question: The Windows Subsystem for Linux (WSL) is installed using the "Turn on or off Windows features" wizard. After turning this feature on, when invoking Bash For Windows for the first time, it claims to be downloading software from Microsoft Store. Is it possible to create some bundle containing all necessary files for WSL installation and make Windows install WSL using these files in an environment with no internet connection? If so, How?
Comment: Use this app from GitHub [LxRunOffline](https://github.com/DDoSolitary/LxRunOffline).
Comment: @Ramhound: That's kind of the point of OP's question, though. Does it require Internet access _specifically_, or can it be fed the same files through another way, pre-downloaded?
Comment: According to https://www.slightfuture.com/technote/lxss-lxrun , the subsystem (and some .ico file) is downloaded from Microsoft. I wonder if I can trick the system to download from a localhost server holding those two files, using the HOSTS file, maybe.
Answer: Installing a Linux Distribution without internet connection
You can (1) download the installer from the Windows Store or (2) download a distribution file and install it using tools such as lxRunOffline. If you have the distribution file you can make the installation copying the files using a USB drive or something else.

Downloading the installer from the Windows Store
You can download the installers from the Windows Store using Powershell. For instance, you can download the Ubuntu 16 version using the following command
PS> Invoke-WebRequest -Uri https://aka.ms/wsl-ubuntu-1604 -OutFile Ubuntu.appx -UseBasicParsing

In the above command, the output file is Ubuntu.appx. It must be named in that way. You can run that application to install the Ubuntu.
PS> Ubuntu.appx

Using LxRunOffline
First, you must download some distribution file. There are many distribution files available in the lxRunOffline wiki.
For instance, to install the same Ubuntu 16 from the Microsoft Windows Store, you can download the file at
https://lxrunoffline.apphb.com/download/UbuntuFromMS/16

Then, you can install the linux distribution using lxRunOffline
# lxrunoffline install -n <name> -d <folder> -f <distribution file>

C:\wsl> lxrunoffline install -n copy -d c:\wsl\copy -f 16.04.2-server-cloudimg-amd64-root.tar.gz

To run the distribution, you may use the same lxRunOffline
C:\wsl> lxrunoffline run -n copy -w

Using a DistroLauncher
You can use some DistroLauncher. There are many versions based on the Microsoft example to create custom linux distributions for WSL. For instance, you can use the Yuk7 version.
You must download a distribution file and the launcher.exe. You must rename the distribution file to rootfs.tar.gz and the launcher to the distribution name you want. Later you must run the launcher as an Administrator (I got errors running it as a normal user)
PS> ren launcher.exe mydistro.exe
PS> ren .\16.04.2-server-cloudimg-amd64-root.tar.gz rootfs.tar.gz
PS> .\mydistro

The first time you run the launcher, it installs and run the distribution. The next time, it runs the linux distribution.

After installing, you can manage the distributions using the wslconfig or the lxrunoffline commands.
Answer: After you setup Windows for WSL, you will need to install a suitable WSL Linux distribution.
You will find instructions on off-line installations of WSL Linux distributions in the WSL docs at https://learn.microsoft.com/en-us/windows/wsl/install-manual.
Note, however, since a WSL distribution comes as a Windows Store app package, you will need a license to activate the app. If your computer does not have an internet connection, the app will not start when you attempt to run it, as Windows cannot acquire a license. The Windows event log will contain an error event giving you details.
Essentially, you will need both the APPX package and a license file to do a true off-line installation and activation of a WSL Linux distribution. This requires a Microsoft Business account, from which you can obtain the required app license file. To install WSL and activate it, you should not use the PowerShell cmdlet Add-AppxPackage, but the cmdlet Add-AppxProvisionedPackage with the option -Online, while providing both the package and license file.
A workaround for a true off-line installation, is to not install a WSL distribution app package, but to setup and export a WSL instance from a computer with Internet connection, and then import the image on the target system. For details, see https://learn.microsoft.com/en-us/windows/wsl/enterprise#creating-a-custom-wsl-image.


problem in printing floating point

Question: hi I am using IAR c compiler, I am trying to print floating point value like
printf("version number: %f\n",1.4);

but I am always getting like below in console
version number:ERROR

help please
thanks in advance
kudi
Answer: The error is probably due to your dlib configuration. Because of the focus on embedded targets with resource restrictions the behaviour/feature set of the iar c library (dlib) is configurable.
Look at Project/Options/General Options/Library Options.
From the docs:
CHOOSING PRINTF FORMATTER
The printf function uses a formatter called _Printf. The default version is quite
large, and provides facilities not required in many embedded applications. To reduce the
memory consumption, three smaller, alternative versions are also provided in the
standard C/EC++ library.
The #define _DLIB_PRINTF_SPECIFIER_FLOAT is available if printf knows floats.
Answer: The format string for the printf function can specify floating point representations with a more explicit string:
printf("version number: %3.1f\n", 1.4);

I think this is the cause of the error message.
The '%3.1f' tells printf to use 3 characters, with one after the decimal place. The output should be
version number: 1.4

EDIT: Kudi, it seems the printf() function in the IAR compiler is quite different from the K&R printf() function.
This link is just one example which leads me to think that my copy of K&R is going to be no help at all. Sorry about that.
Comment: thanks for fast replay ,i tried what u said the output was like below
version_number:ERROR1f
Comment: I noticed that you said IAR c compiler. I was referring to 'The C Programming Language' by Kernighan and Ritchie. Maybe there's some difference in syntax. Actually, looking at that very old book, it's not clear that %3.1f would be acceptable. I suggest you go back to just %f and leave out the \n

problem in printing floating point


Phone is discharging extremely fast.. How to stop this?

Question: I'm a moto gen 2 user, my phone is discharging extremely fast.. Just switches off overnight even with >50% charge .. But I'm able to charge properly.. Takes long, but its fine..
Tried the factory reset but both the soft and external reset not working. Please help. Customer care is a big task.
Answer: I was having this issue today, apparently something wrong happens with Google Play Services last update.
Go to Settings -> Apps -> All -> Google Play Services and click on uninstall updates. Some google apps will crash but after that everything will be normal again.
Hope it help, at least it works on my MotoX
Answer: Try to see if in the options menu, under "synchronize accounts" is everything fine.
Once I had the same issue due to three gmail accounts that were in conflict.


WhatsApp images in photos

Question: Hello I have Lumia 730.... First I had 8 GB micro SD card and all my data including images ,songs etc were in it.i installed several apps like WhatsApp Facebook etc on my phone memory and my phone were detecting all the photos inside the photos app which is given from windows... Even there was a separate album named"WhatsApp"inside that photos app..... But then I changed my micro SD from 8 GB to 32 GB.. And I transfer all my old micro SD data to the new micro SD... But the problem is now my p phone is not showing separate WhatsApp album.. Infact it is not even showing photos in"photos" app... What should I do...
Comment: Did you tried transfer only the photos to the new Whatsapp's folder? I mean, don't copy the entire folder, just the contents.
Comment: WhatsApp photos are in the WhatsApp folder... But they are not visible as separate WhatsApp album in photos in built app.. Probably I have mentioned in the question itself.
Comment: Same Problem with my Lumia 525, where i replaced a 4gb card with Samsung 16gb card
Answer: Try a soft reset, then wait for the photos app to sync all of your pictures. I had the same trouble when I switched my phone off for couple of hours, it's now working fine.
Also, when you change SD cards always tap on safely remove the SD card.
Answer: Solution:

Connect your phone to your PC via USB
Go to "SD card\Pictures"
Select the WhatsApp folder and rename it to WhatsApp1 or WhatsApp2 or whatever you want
Now open WhatsApp on your phone and download any picture from there
Now check your Photos app, a WhatsApp folder is created and the picture you downloaded will show up there
Now go to the folder you renamed earlier and copy all its contents to this new WhatsApp folder

WhatsApp images in photos


How to plot this problem? From Greek Exams

Question: Let's have $a_0$, $a_1$, $a_2$ complex numbers which are on the circle $(x-2)^2 +y^2=1$ (so for all of them the abs$\leq 3$ $\left|a_0\right|\leq3$, $\left|a_1\right|\leq3$, $\left|a_2\right|\leq3$). Let's have $v$ another complex number, and suppose that $v^3+a_2v^2+a_1v+a_0=0$. We must prove that $\left|v\right|<4$.
The mathematical solusion is easy:
$$\left|v^3\right|\leq3(\left|v\right|^2+\left|v\right|+1)\implies\left|v^3\right|-1\leq3(\left|v\right|^2+\left|v\right|+1)-1\implies\dots\implies\left|v\right|-1<3\\
\implies\left|v\right|<4$$
I'm asking if there is a way to plot the curve $v^3+a_2v^2+a_1v+a_0=0$ and show with the plot that $\left|v\right|<4$ in all cases.
Thanks for your time
Comment: @artes When I went to school we actually hand-plotted things when doing math. So plotting doesn't necessarily imply Mathematica. But we may give the OP the benefit of doubt. I'd appreciate some kind of acknowledgment by the OP that this question is indeed to be answered in the context of the Mathematica program.
Comment: What do you mean by the curve `v^3+a2*v^2+a1*v+a0 = 0` ? To plot all the three curves (three roots of the equation depending on `a0, a1, a2`)? If so then it should be a three-dimensional submanifold, not just one-parameter curve.
Answer: Since there is no straightforward approach to plotting "curves" depending on three parameters one can use Manipulate with three controls. We have three complex numbers a0, a1, a2 but since they lie on an appropriate circle we can parametrize them by three real parameters u1, u2, u3. Next we have to express solutions to the equation v^3 + a2 v^2 + a1 v + a0 == 0, we can do it with
Root[#^3 + (2 + Exp[I u3]) #^2 + (2 + Exp[I u2]) # + (2 + Exp[I u1]) &, 2]] where we substitute a0 by 2 + Exp[I u1], a1 by 2 + Exp[I u2] etc.
Now we have
Manipulate[
   Show[
     ContourPlot[{ (x - 2)^2 + y^2 - 1 == 0, x^2 + y^2 - 16 == 0},
                 {x, -4, 4}, {y, -4, 4}, Axes -> True,
                 ContourStyle -> {{Thick, Blue}, {Thick, Darker@Green}},
                 AxesStyle -> Arrowheads[0.07]],

     Graphics[{
       Table[{k[[1]], PointSize[0.02],
                      Point[{2 + Re[Exp[I k[[2]]]], Im[Exp[I k[[2]] ]]}]},

             {k, {{Red, u1}, {Darker@Green, u2}, {Darker@Orange, u3}}}],
       Table[{k[[1]], PointSize[0.03], Point[{Re@#, Im@#} &@
              Root[#^3 + (2 + Exp[I u3]) #^2 + (2 + Exp[I u2]) # + (2 + Exp[I u1]) &,
                   k[[2]]]]},
             {k, {{Blue, 1}, {Magenta, 2}, {Darker@Cyan, 3}}}]}]],

              {u1, 0, 2 Pi}, {u2, 0, 2 Pi}, {u3, 0, 2 Pi}]

Now this becomes evident that all the solutions represented by blue, magenta and cyan points satisfy Abs[v] < 4, in other words they lie in the green circle.
Comment: Thank you very much for your help.
Comment: @lafkasd If you've asked this question consider registering your account and merge it with user7851. It hasn't been obvious if this question regarded `Mathematica` programming or you just plotting certain mathematical object (so how to plot it ?). Therefore they have sent it here.
Comment: Could this method verify that |v| cannot actually exceed 3? This is merely conjectured (with proof for |v| < 3.0154).


Leaflet Spiderfier/MarkerCluster - Automatically spiderfy dynamic markers

Question: I'm building an online version of a boardgame using Leaflet as the viewport.
My source: https://github.com/edenLOL/gotta-chug-em-all/tree/master
What I'm trying to achieve, is a way to spiderfy/spread out markers that land on the same square as each other, including when they move past each other.
I'm using https://github.com/jawj/OverlappingMarkerSpiderfier-Leaflet to Spiderfy the markers, which appears to work when clicking the markers.
However, I need these markers to be spiderfied always, without requiring a click event. So I set keepSpiderfied: true for the spiderfier object (oms).
var options = {  //**spiderfier
   keepSpiderfied: true,
   nearbyDistance: 120
};
oms = new OverlappingMarkerSpiderfier(map, options); //**spiderfier

But this doesn't work. I can't seem to load the markers in a spiderfied state, it always requires a click to spiderfy them.
For context, markers are generated dynamically during a prompt before the user sees the map.
('#playerIcons > table > tbody > tr > td').on('click', function(){
    pokemonSelected = $(this).attr('class');
    if ( !$(this).hasClass('pokemonSelected') ){
        playerArray[pokeCounter].pokemon = ''+ pokemonSelected +'';
        playerArray[pokeCounter].marker = L.marker([playerArray[pokeCounter].coords[0], playerArray[pokeCounter].coords[1]], {
                                                icon: window[pokemonSelected]
                                            }).addTo(map);
        oms.addMarker(playerArray[pokeCounter].marker)  //**spiderfier
        pokeCounter += 1;
    } else {
        return false;
    };
});

I've also tried using Leaflet/Leaflet.markercluster. This works to an extent, and spiderfies the Markers at defined zoom levels, however the markers don't move, and stay stacked on top of each other.
What am I missing here that could be causing these issues? I don't mind using either Spiderfier or MarkerCluster, as both should be able to provide the solution I'm looking for once either issue is fixed.
Spiderfier: Markers need to spiderfy automatically
MarkerCluster: Markers don't physically move when spiderfying out of cluster
Note: If you decide to open index.html, be aware the Pokemon theme song will autoplay in the background on page load (until the map is drawn), so check your volume :)
Comment: "_be aware the Pokemon theme song will autoplay_" thanks for the notice :-), but it would probably be more helpful (for others hence for you to get support) to provide an [MCVE](https://stackoverflow.com/help/mcve). Besides posting your code in your question, also consider reproducing your issue in an online editing tool, like Plunker or JSFiddle for example.
Answer: I solve the problem like this, using fire('click') аfrom leaflet.
scope.spiderMarker - the marker, i want to spidrefy. In your case i think its playerArray[pokeCounter].marker
    try{
       scope.spiderMarker.fire('click')}
       catch (e) {
       console.log(e);
       };


How to monitor or kill a process which has been started by cron?

Question: I have some bots, which are run by the System scheduler at given time interval. But sometimes due to some logical error I have to stop these bots manually. How can I find these processes run by the scheduler and kill them?
Comment: Down that path lies Madness.  Don't work around bugs by scheduling process killers, fix the bugs.  What happens when the process killer has a bug, doesn't kill the desired process, and hangs itself?  WIll you write a killer killer?
Comment: Questions - which system, which scheduler? cron?
Comment: @Danny yeah Cron.
Comment: @Bruce thats right, if the bug is a runtime or a compile time error the process will kill itself...but what about the logical error which will keep running in a infinite loop...that what i want to break..
Answer: You can kill processes by name. For example, on Linux, *BSD and Solaris, pkill myprogram kills all the processes whose name contains myprogram (use pkill '^myprogram$' for an exact match). If you run it as a non-root user, only that user's processes will be killed, and there are further options to control matching (see the manual on your system for details).
If you want to specifically target processes started by the scheduler, and you're killing the processes manually, you can run ps f (Linux only) or pstree (Linux only) or ptree to display the processes in a tree, and see which processes were started by cron.
If you want to be able to kill these processes automatically in a homemade method, make them store their process ID in a file. This kind of file is called a pidfile when it's used to only have a single instance of the process running (which may or may not be something you want). If you want multiple instances, store the PIDs in separate files in a common directory; here's a shell snippet that does this:
pid_dir=/var/run/myprogram # must have been created e.g. at boot time
myprogram &
pid_file=$pid_dir/$!.pid
touch "$pid_file"
wait
rm "$pid_file"

A better solution, if you have hard criteria to detect runaway processes, is to use a general monitoring program, or in simple cases just put a limit on how long the process is allowed to run. You may find these links helpful:

"Monit can start a process if it does not run, restart a process if it does not respond and stop a process if it uses too much resources."
I need help with a cronjob to watch for runaway processes and kill them
How to limit resource usage to save CPU+RAM for a certain process?
Is there a way to limit the amount of memory a particular process can use in Unix?
Answer: I'd suggest popping their PID ($$) into a file after you spawn them. You can then use this to kill the process.
Answer: A basic try/catch branch in most programming languages to find infinite loops or other cases of errors should work. Possibly an inactive/unresponsive timer on the processes to watch for hangs.


How to kick user to Login Screen Activity passing all other app Activities in the stack?

Question: Lets say you have a web app related Android app that requires the user to login in order to use it. The user logs in, in the Login screen activity and then proceeds to other activities. Each time the user starts an Activity, the app checks his login credentials again (The credentials are stored in a central database somewhere).
As the user jumps from one activity to another, lets pretend that the user's login credentials are revoked from the service. The next time the user visits an Activity, the app will see that he no longer has access. The app should now kick the user back to the login screen Activity.
But since there is already a stack of Activities that the app has created as the user used the app, how do you get the login screen. Do you kill/destroy all Activities until you reach the login screen Activity (which should be the Activity at the bottom of the stack for the app)?
Or do you start a new Login Screen Activity and go straight to that?
Or should I call the Login Screen Activity with the FLAG_ACTIVITY_CLEAR_TOP passed through the intent?
After the user is able to login the second time (lets say he got his credentials reinstated), if the Activity is now the only one in the stack, pressing the back button will take him out of the App, as opposed to going back to what he was doing before having his credentials revoked. What is the best approach to this?
Comment: There's not a single answer to your question. It very much depends on a lot of design decisions.
Comment: Yeah I realize that now. I wasn't sure if there was a best practice that people use for this or not.
Answer: My personal choice is to set up all of your activities (besides the login activity, of course) to check the user's credentials in onResume() (I do this by inheritance, with all of my Activities inheriting from an abstract AuthorizedActivity, but do what works for you).  If the user does not have credentials (either because they don't have them or they've been revoked) then I startActivityForResult() the login activity. If the LoginActivity returns a valid user, all is well.  If the user is a valid but different one from who was logged in before, I take them to my root activity with FLAG_ACTIVITY_CLEAR_TOP.  pressing the back button from the loginActivity does them no good, as the app will bounce them straight to home.
I find that the approach gives me flexibility in deciding when and how I will check/revoke credentials, even if they leave (briefly) the application.
Comment: Thanks. You mean `FLAG_ACTIVITY_CLEAR_TOP` I assume?
Answer: Login screen activity with FLAG_ACTIVITY_CLEAR_TOP will work but will remove all of the user's history.  Do you care if they renew their credentials and then press back?  Should that preserve their history?
You may consider FLAG_ACTIVITY_SINGLE_TOP and FLAG_ACTIVITY_NO_HISTORY for the login activity.
If you want all previous tasks to redirect to the login screen, you'd make sure to do the check in onResume so that they can't go back through the stack after having permission revoked.
Keep in mind that you can also set these flags on the <activity> element in the manifest.


CSP error in a node.js application

Question: I've a node.js application with a home page in angularjs. This page contains a 'search' box and has corresponding search.js script which runs and makes a server side query call. For security I added 'csp' in my node.js application with following csp configuration.
const csp = require('helmet-csp');
app.use(helmet());
app.use(csp({
directives: {
  defaultSrc: ["'self'", 'https://my.domain.com'],
  scriptSrc: ["'self'", "'unsafe-inline'"],
  styleSrc: ["'self'"],
  imgSrc: ["'self'"],
  connectSrc: ["'self'"],
  fontSrc: ["'self'", 'https://fonts.googleapis.com'],
  objectSrc: ["'none'"],
  mediaSrc: ["'self'"],
  frameSrc: ["'none'"],
},
setAllHeaders: false, // set to true if you want to set all headers
safari5: false // set to true if you want to force buggy CSP in Safari 5
}));

But with this change, I started getting following errors in chrome browser.
Refused to load the stylesheet 'https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800|Roboto+Slab:400,100,300,700' because it violates the following Content Security Policy directive: "style-src 'self'".

prefixfree.min.js:17 Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self'". Either the 'unsafe-inline' keyword, a hash ('sha256-47DEQpj8HBSa+/TImW+5JCeuQeRkm5NMpJWZG3hSuFU='), or a nonce ('nonce-...') is required to enable inline execution.

I don't understand what these error means. How do I fix these errors. I need to use fonts from google as part of my style.css file which has following entry,
@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,300,700,800|Roboto+Slab:400,100,300,700);

Is this right way to set csp? Any help is appreciated.
Comment: I guess the message it's pretty clear. style-src 'self' doesn't allow this style to be applied, and you need to add 'unsafe-inline',
Answer: Somehow the address to googleapis was flagged due to csp policy. I solved this problem by,

downloaded required fonts from Google webfonts helper site
removed @import from CSS
removed googleapis from fontSrc and kept only "'self'" instead.

CSP error in a node.js application


How to edit a downloaded cdf textbook example or prevent someone from editing my notebook?

Question: I have downloaded from https://www.wolfram.com/cdf/uses-examples/textbooks.html the textbook example and I have opened it. I am trying to make some edits but I cannot. I opened the option inspector and all the Editable options are on True. Can anybody tell me how to edit it or, oppositely, how to prevent someone from editing my notebook?
Comment: thanks, so with regard to preventing me and others to edit a notebook when it is believed to be in the final version a good way would be using Option Inspector and untick editable?
Comment: everything depends on your goals. Which CDF you what to edit and why? Do you want to use nice snippets for your own code?
Comment: I was more concerned on learning how to "block" a code and text so that it cannot be changed. I noticed that the options of the abovementioned downloaded cdf were on true (editable) so I was wondering if there was some other trick
Answer: This should do:
nb = Import["path/to/BriggsCochraneCalculus.cdf"];
nb = NotebookPut@nb;
SetOptions[nb, Deployed -> False, Editable -> True]

You can now save it as .nb somewhere.

Why Options Inspector does not work? I must say I don't know but here's a guess.
One could expect that
nb = NotebookOpen @ "path/to/BriggsCochraneCalculus.cdf"

SetOptions[nb, Editable -> True, Deployed -> False, StyleDefinitions -> "Default.nb"]

should make it possible to edit the notebook, those options itself are applied (can be confirmed with Options).
The only one thing that comes to my mind is Notebook Signature.
Each cdf contains a footer similar to:

(* NotebookSignature 7KNa5d9r5bEV5L5WXOW32XP4 *)

The signature is used by the FrontEnd to check whether a CDF was edited outside mathematica.
Additionaly it stores information about what a given notebook is possible to do. That is, the FrontEnd will know whether this is an Enterprise Signed CDF ("Target" -> "PlayerPro"`) or just a simple standalone FreePlayer document.
This can affect things like cell evaluation so I'm assuming this notebook signature contains a flag for a FE that this NB is not editable.
I don't recall any way to do this but maybe there was available for authoring.
Again, that is a guess, maybe I missed something.
At the end, it is still just a text file which we can easily adapt but keep in mind that this may be against the terms and agreements.
Comment: This is great! thanks
Comment: could you comment why this is working? I opened the Option Inspector and both Deployed and Editable are already False and True in the original file
Comment: @AndreaG Ok, edited, I hoped for more too :) sorry.


eCryptfs headers errors

Question: I'm getting the following error on a server where a partition is encrypted thru ecryptfs.
[3440851.003561] Valid eCryptfs headers not found in file header region or xattr region, inode 22545087
[3440830.026081] Valid eCryptfs headers not found in file header region or xattr region, inode 22553905

After unmounting the encrypted partition and the ext4 partition below, I have performed a fsck that gave me the following result:
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
/dev/sda3: clean, 65092/72302592 files, 54219978/289200384 blocks

I am a bit clueless to understand what happen. We're using the same setup on several instances, and we observe this on only one of them.
The solution may be to change the underlying disks! But I would like to understand what happen, in order to eventually detect and prevent that kind of incident.
Answer: I have seen this happen when the system was not shut down cleanly. In particular I have seen it happen when the encrypted data was stored on a USB device where the connection between host and USB device was a bit unreliable. But I believe that other non-clean shutdowns while files are being written to could cause it as well.
Searching by inode as suggested in the answer by Giovanni can indeed be used to find the problematic file. Since ecryptfs preserves the inode numbers of the underlying file system, that command can be used to find both the encrypted and unencrypted path to the file.
Searching for the file on the underlying file system this way is significantly faster than searching through the ecryptfs file system. My measurements on one system showed a slowdown by a factor of 8 between the two with cold caches and a factor of 350 difference with hot caches.
Because of that overhead I suggest you first find the encrypted file on the underlying file system. For example in the default configuration on an Ubuntu system this command could be used:
find /home/.ecryptfs -inum 22545087

This should find the path to the encrypted file, which includes the name of the home directory in which it was found. Then when searching for the unencrypted file name, you can immediately limit the search to just one home directory:
find /home/username -inum 22545087

If the user has so many files that this is too slow, you can take advantage of the inode numbers to look up one directory level at a time. For instance if the encrypted file name was
/home/.ecryptfs/username/.Private/ECRYPTFS_FNEK_ENCRYPTED.AAAAAA/ECRYPTFS_FNEK_ENCRYPTED.BBBBBB/ECRYPTFS_FNEK_ENCRYPTED.CCCCCC

You can first run
ls -i /home/.ecryptfs/username/.Private/ECRYPTFS_FNEK_ENCRYPTED.AAAAAA

This will give you the inode number of the outermost directory. You can then look up the unencrypted version of that directory name:
ls -i /home/username | grep $INODE_NUMBER_FROM_LS

You can repeat this for each level in the directory hierarchy to get the unencrypted path without having to use as much CPU time as required to decrypt every single file name in that home directory.
Answer: Discover which file is causing this via:
find / -inum <inode number>

You will probably find a truncated file, and that's the reason why ecryptfs is raising that warning.
Try to read the file with cat, and rm it to fix the warning.
Comment: How this file can be truncated?

eCryptfs headers errors


How can I install Voice Search on Cyanogen 6 RC3

Question: Whenever I try to install Voice Search I get "install failed" error in the notification bar. Supposedly it has something to do with signatures but I know better than to ask Cyanogen about it. Any ideas?
Answer: I spotted this advice on the post on the Google Mobile Blog announcing the new Voice Actions. At least one person in the comments claimed success.

Just run the following commands to
  uninstall the old system apps if you
  use a custom rom.
adb remount
adb shell rm /system/app/GoogleQuickSearchBox.apk
adb uninstall com.google.android.googlequicksearchbox
adb shell rm /system/app/VoiceSearch.apk
adb uninstall com.google.android.voicesearch
Then they will install just fine from
  Market (from the US Market).
  MarketAccess set to TMO US will allow
  you to find them.
Comment: Okay, that worked. Had to install "Voice Search" and "Google Search" from the market after deleting and uninstalling per the directions above. For those that don't know you need to get the SDK, install the Android USB Driver, and turn on "Debug Mode" on your phone so you can run ADB commands from the command prompt in the tools directory. I guess if you have Cyanogen you know all that already. Nevermind. But I did have to delete the search gadget and then re-add it to my home screen. BAM! Voice Search heaven. Can't wait for it to fail when I show my iPhone friends!
Comment: I was afraid of that . . . not a big fan of commands like "adb shell rm /system/app/VoiceSearch.apk" but I'll try it. Worst case is I have to wipe and start over, right?!
Comment: Well, that is the risk when you root and install custom ROMs, innit? I'm glad it worked out, though.


How to visualize a Schrödinger cat state?

Question: I recently read about Schrödinger cat states, which are basically a superposition of two coherent states $|\alpha\rangle$ with opposite phases, that is,
$$
|\mathrm{cat}\rangle = |\alpha\rangle \pm |{-\alpha}\rangle
$$
which gives us an even Shcrödinger cat states with only even parts and an odd cat state with only odd parts,
\begin{align}
\left| \mathrm{cat}_\mathrm{even} \right\rangle & \propto 2 e^{-\frac{|\alpha|^2}{2}} \left( \frac{\alpha^0}{\sqrt{0!}}| 0 \rangle + \frac{\alpha^2}{\sqrt{2!}}| 2 \rangle + \frac{\alpha^4}{\sqrt{4!}}| 4 \rangle + \dots \right),
\quad\text{and}
\\
\left| \mathrm{cat}_\mathrm{odd} \right\rangle & \propto 2 e^{- \frac{|\alpha|^2}{2}} \left( \frac{\alpha^1}{\sqrt{1!}} | 1 \rangle + \frac{\alpha^3}{\sqrt{3!}} | 3 \rangle + \frac{\alpha^5}{\sqrt{5!}} | 5 \rangle + \dots\right).
\end{align}
My question is, how can I visualize something like this? I've seen a few pictures of density matrices and Wigner functions, but I'm not exactly knowledgeable about those. Is there an easier way to understand this/plot it myself? I'm thinking of something similar to the probabilities for a coherent state, which is basically a Poisson distribution. Or do I explicitly need Wigner functions and such?
Answer: The visualization method you choose is directly and completely determined by the information you need to see regarding your state. For the states of a single bosonic mode, there are multiple different visualization methods, and they all have their pros and cons. In particular, there is a direct trade-off between the amount of information you can display on a plot and the work you will need to put in to understand the plots. Simply put, plots which are easy to understand won't depict the states in sufficient detail.
Thus, you might want to plot

the photon-number distribution, which is completely insensitive to the phases and therefore cannot distinguish between coherent superpositions of those number states and incoherent ones;
the position- and momentum-space probability distributions, which are insensitive to the phase of the wavefunction in those spaces and therefore do not convey where the state is moving towards, or whether the state is pure or mixed;
the position- and momentum-space wavefunctions, which are only applicable to pure states and for which momentum and position encodings can be hard to unentangle;
the phase-space based functions (i.e. the Wigner function as well as the Sudarshan $P$ and Husimi $Q$ representations), which graphically and explicitly depict the entire phase-space dependence of the state, and which take all of about ten minutes to understand.

If you really want to properly understand a state like a coherent-state cat superposition, there really is no way to get around a phase-space-based approach, because you are specifically selecting the states you superpose based on their phase-space characteristics.
This leaves you with the Wigner function, which isn't that hard. In particular, if you integrate over vertical (horizontal) strips, the resulting marginal distributions are exactly the position-(momentum-)space probability distributions. This is fairly easy and intuitive to display graphically:

Mathematica source via Import["http://halirutan.github.io/Mathematica-SE-Tools/decode.m"]["https://i.stack.imgur.com/32PpE.png"]
The variables on the plane are position (horizontal) and momentum (vertical). Each cat-state coherent-state component is a blob which rotates once around the origin over the oscillator period. In between any two such cat "eyes", you get a "smile": a fringe pattern along their separation. These fringes are precisely where the information about the superposition is encoded, and they are crucial to get the correct interference between the two components.
In particular:

When the two blobs are spatially separate, you integrate across the fringes, and the result is essentially zero, so there is no probability between the blobs.
When the two blobs overlap spatially, then they must interfere because they have different phase profiles. Here the Wigner function fringes are integrated over longitudinally, so the positive regions give you constructive interference and the negative regions account for the destructive interference.

It should be easy to see how this can account perfectly naturally for mixed states, i.e. states where the coherence of the superposition is less than perfect. The two blobs will remain - they represent the population at each $\alpha$ - but the contrast in the interference fringes will go down, which means that the amplitude of the "smile" will also decrease. Easy!
Comment: I gotta say, in my book you are becoming notorious as the Physics SX user with the most profound answers. Hasn't been the first time you answered a question of mine in such detail!
Comment: _"plots which are easy to understand won't depict the states in sufficient detail"_ — do you mean that Wigner function doesn't depict some details? Or is it merely not "easy to understand" for the purpose of the statement I quoted?
Comment: @Ruslan if you think Wigner-function plots are simple objects, I would suggest that maybe you've spent a lot more time working with them than the average undergrad.


How to get the hostname within a Visual Studio Workflow (SharePoint 2013)

Question: it sounds very trivial but it actually isn't: For a Visual Studio Workflow on a list item I need the current hostname. I've got the relative List URL (like "/sites/SiteCollectionName/Lists/Listname", I've got the web URL (like "https://host.name.tld/sites/SiteCollection/") but I actually just need the host...
Since a lot of functionality like the URI class or string functions like regular expressions are not available in SharePoiunt workflows it's not as easy as I thought.
Is there a way to get the hostname directly from SharePoint via REST somehow?
-thx
Answer: As far as I know it's only possible to get the web URL not just the host name but once you have that you could just trim the URL using Regex to get only the host name.


running asp.net website

Question: I have a server 2003 dc running IIs. I want to bypass using my IIs server when accessing external websitees that I do not host, such as http://www.haifa.muni.il/haifa/Pages/homepage.aspx.
As of know, when I access the site, it takes a few mininutes to load every time.  On another server running server 2008 that is a diffrent domain, and does not have the IIs role, the site loads quickly.  I can't remove the iis role on the 2003 server, because it is being used by others.
Any help is appreciated
It seems that the external site is useing IIs, since if I change the IIS asp.net exstension to prohibit on the server.  The external site does not work.
Answer: IIS server is not used when accessing external sites. IIS is not a proxy server. The problem lies elsewhere.
You could try checking the Network tab in Internet Explorer Developer Tools - that would show what takes up the time.

running asp.net website


Why won't the water pour out?

Question: A couple days ago I was at a restaurant drinking my cup of water through a straw. I childishly put my finger on top of the straw in the cup of water, and I pulled out the straw. I noticed that the water was not pouring out from underneath the straw. I found this very confusing since I only covered the top of the straw, the second I uncovered the top of the straw the liquid then poured out the straw. Can someone please explain why this was the case?
Answer: the reason that the water would not run out of the tube is that because of the surface tension of the water and the diameter of the tube, it did not support two-phase flow (in which water runs out the bottom of the tube while air simultaneously runs in the bottom of the tube). if you tried this with progressively larger diameter tubes, eventually you get the case where the meniscus at the bottom end of the tube will evert and water will run out while air runs in.
You can also elicit this response by breaking the surface tension of the water with some detergent. A tube diameter which does not support two-phase flow with pure water will if the water has a little detergent in it.
this is an important design consideration when designing (of all things) turkey basting bulbs. a properly designed basting tube has a diameter inside the tip which does not allow two-phase flow, so if you slurp up a full load of juice off the bottom of the pan and lift the tube free of the pan, the liquid stays put in the tube. If the tube diameter is too large, then the juice runs out and air runs in and you spill the contents of the baster.
this same principle is used to control the dispensing of water out the nozzle of a watering tube, as used for hamsters and mice. if the nozzle is too big, water will run out the tube (and air will run in) without an animal licking at it.
Comment: Also, googling on "pipette" will reveal another application of this principle...
Answer: This is a result of atmospheric pressure. With your finger over the top of the straw, there is no air there, and so atmospheric pressure only acts on the bottom end of the straw. The pressure is large enough to counteract gravity - atmospheric pressure is equivalent to the pressure exerted by about 10 meters of water. Once you lift your finger, there is air on top of the straw. The pressure at the top and at the bottom cancel, and the water escapes thanks to gravity.
You can read more about this by Googling for 'barometer'. The system you describe is a simple barometer.
Answer: There is air in the straw between your finger and the fluid level in the straw. If only a few drops of liquid come out of the straw before it stops flowing, then, by the ideal gas law, the air in the head space will have expanded, and its pressure will have dropped to a little lower value than atmospheric.  Basically, you have formed a slight vacuum in the head space.  The difference in pressure between the bottom of the liquid column and the top of the column is enough to support the weight of the liquid.

Why won't the water pour out?


iOS third-party keyboard with functionality to swipe down on letters to enter numbers/symbols?

Question: On some Android keyboards (for example), the main display is a full QWERTY keyboard with numbers or symbols under the letters. You can either press directly on a letter to type it, or swipe down on the letter to type the associated number/symbol. This allows you to enter numbers/symbols much faster than if you had to switch to a separate numbers/symbols pane. Is there any third-party iOS keyboard with this functionality?
Answer: FancyKey by Pinssible Labs allows for this, and is the best replacement keyboard for iOS I've used. Setup is simple, and turning on Swype is as easy as switching to the FancyKey Keyboard, tapping the gear icon, and tapping the "Swipe input" switch on. Your keyboard with default to the custom keyboard until you change it by tapping the globe icon.
Answer: Not exactly what you are asking, but the MessagEase keyboard from Exideas allows you to type numbers by holding down the corresponding virtual key. The keyboard itself is a 3x3 swipe keyboard where each "button" naturally corresponds to a number.

The image shows me typing the number 3 by holding down my finger on the i symbol.
(You can switch to an explicit number keypad by tapping the 123 symbol on the right.)
Swiping between two "keys" selects the corresponding symbol, as indicated by the small legends suggesting the swipe direction, and a tap on one of the keys selects its main symbol. This makes much better use of the limited real estate on a small mobile screen, and is much more generous with how precisely you have to position your fingers. It obviously takes a while to learn (in my case I would estimate maybe three weeks, but it was many years ago that I switched over).
It's still somewhat imprecise; I find myself producing an e instead of a space a lot, and some swipe combinations are slightly unergonomical (left parentesis can be a drag, and I kept writing "nurber" a lot above); but I would estimate that it has reduced my keyboard swearing by 80%.
Unfortunately, the keyboard seems to crash several times per day, and the authors no longer seem to respond to support emails or their Twitter. Still, I never want to switch back to the QWERTY keyboard on my phone.


MPMoviePlayerController fullscreen lockup

Question: I have a strange bug regarding the MPMoviePlayerController.  If I do a reverse pinch gesture, (move two touch locations apart), while a video is playing (landscape), the video switches to portrait mode, broadcasts a MPMoviePlayerWillEnterFullscreenNotification and a MPMoviePlayerDidEnterFullscreenNotification, and is then stuck.
No touches seems to be registered after this point and the video is 'stuck' playing until it has finished.  Upon relaunching the MPMoviePlayerController, video fails and I am presented with a black screen.
I have tried forcing the video to leave fullscreen mode as soon as it received a MPMoviePlayerWillEnterFullscreenNotification without any luck.
I have also tried to implement a UIPinchGestureRecognizer on the player's view, but was unable to capture any gestures...
Answer: Have you tried changing controlStyle property to MPMovieControlStyleNone?


Communication between three NodeMCUs such that one in in AP mode, second one in AP+STA mode and the third NodeMCU in STA mode

Question: I am able to establish a connection between first and second NodeMCU, but unable to do so for the third nodeMCU. I used the IP  address to establish connection.
Should I assign a different IP to each nodeMCU so that communication can take place?
In the code that I had written, i have taken the same IP for all three NodeMCUs, so   communication was possible between 1st nodemcu(in AP mode) and 2nd nodemcu(in STA+AP mode).
For the 3rd node mcu the IP taken was different. Can any one suggest what to do next.
Answer: The two network interfaces (station and SoftAP) of the middle esp8266 must have different IP address range. If the top esp8266 has SoftAP with 192.168.4.x, set for the SoftAP of the middle esp8266 IP for example 192.168.5.1. Because with same IP address ranges the esp8266 doesn't know to which network do you want to connect a TCP socket or send an UDP message.
Comment: does it mean that the IP should be same for first and second nodemcu  is same?Also, the IP should be same for second and third nodemcu? Do I need two different IPs for the second nodemcu?
Comment: you have no clue about IP addresses? the STA must have the IP in the range of the AP it connects to. no matter if the AP is a box or a esp8266


GRAP pre-processor doesn't seem available for groff on macOS Monterey?

Question: The groff language is a bit of a legacy UNIX program for generating post-script documents with graphics and all kinds of other handy text formatting. If you run it with the help option on macOS 12.5 Monterey, you're informed that it supports the following options:
usage: groff [-abceghijklpstvzCEGNRSUVXZ] [-dcs] [-ffam] [-mname] [-nnum]
       [-olist] [-rcn] [-wname] [-Darg] [-Fdir] [-Idir] [-Karg] [-Larg]
       [-Mdir] [-Parg] [-Tdev] [-Wname] [files...]

-h  print this message
-v  print version number
-e  preprocess with eqn
-g  preprocess with grn
-j  preprocess with chem
-k  preprocess with preconv
-p  preprocess with pic
-s  preprocess with soelim
-t  preprocess with tbl
-G  preprocess with grap        # <--- here
-J  preprocess with gideal

Unfortunately, it seems that as soon as the grap pre-processor is included, I'm greeted with the following:
% groff -G -p -Tpdf -mspdf grap.ms > grap.pdf
groff: couldn't exec grap: No such file or directory

Is the groff binary incomplete, or missing some extensions? Looking around turns up almost nothing other than some mailing list discussions from 2005. For what it's worth, other extensions like eqn and pic work alright.
Answer: At least on Ventura, groff isn't part of macOS any longer.
To install groff and grap, use Homebrew and run brew install groff grap.


Use parametrized quantum circuit output amplitudes for training in tensorflow

Question: I am trying to train a quantum neural network in tensorflow_quantum (tfq). Using cirq.Circuit I have set up my circuit. I now need to wrap it in a keras model for training. For this I must embed the circuit in a tfq.layers.PQC layer (according to the documentation: "this layer is for training parameterized quantum models"). However, when using PQC, I must specify a value for the parameter operators, which must be a cirq.PauliSum or Python list of cirq.PauliSum objects. I am unsure how to obtain the amplitudes via these kind of operators, but since I am dealing with a simulator I think it should not be necessary. Is there a way to train my circuit using the amplitudes of the circuit output? Thanks in advance.
Answer: Using tfq.layers.State() you can directly access the state amplitudes and you do not need operators.


what is the difference between sample method and sample and hold method

Question: I want to know what is the difference between sample method and sample and hold method ,and why are these two methods important to study analog to digital conversion and its reconstruction back to analog signal,
and what is the effect of different sampling frequencies on the reconstructed signal.
Comment: It is unclear what you mean by the "sample" method, especially when contrasted to the "sample and hold" method. Your question doesn't make sense. Give a example of your sample method.
Comment: I have a question which is a home work problem and I do not know what is sample method I am doing home work for some one else and the question is analog signal  to digital coversion and its reconstruction back to analog signal
Comment: I have been able to solve the problem real problems are like this only very little information and answers expected and I am not an electronics guy or a DSP guy this is sample hold method http://en.wikipedia.org/wiki/Sample_and_hold sample method is not on wikipedia it some thing same as answer below
Comment: Although the question doesn't make it plain, the OP is basically asking why do we have a hold. Dave below explained it, so I think this should be reopened.
Answer: The basis for sampling of signals is the concept of the "unit impulse" function, which is defined as a pulse at t=0 of infinitesimal width and infinite height that has an area of exactly 1. The integral of the unit impulse is the "unit step" function, which is 0 for t<0 and 1 for t>0. These two functions have some useful mathematical properties that can be taken advantage of in general signal analysis.
When we talk about "sampling a signal", what we mean is multiplying the signal by a train of unit impulses that repeat at some sample rate. This produces a train of infinitesimal pulses whose height (and area) now varies based on the original signal's value at those moments in time. Much of the work of people like Shannon and Nyquist is based on the characteristics of a signal sampled in this way.
However, in practice, it's difficult to build an electronc circuit that can process such an impulse signal. In particular, we often want to digitize each sample, and this generally takes some non-infinitesimal amount of time. Therefore, we build what are called sample-and-hold circuits, which convert the modulated unit impulses into a series of rectangular pulses that have the same width as the sample period and the same area as the impulses, which means that the heights of these pulses still represent the values of the original (unsampled) signal, but now in a range that can be easily measured by an ADC.
For a more comprehensive discussion of this topic, you might consider posting a followup question in DSP.StackExchange.com.
Comment: Thanks for pointing out the link actually I am not an Electronics or Electrical Engineer but a CS guy some one gave the above problem to me I have been able get it solved now.


Can I pay money in USA to buy property in India?

Question: I currently reside in the US (on H1B Visa) and I plan to buy property in India. The current owner of the property also resides in the US. I was wondering if I could make part of the payment here in USD legally? If yes, is there a limit on the maximum amount I can pay?
Answer:
I was wondering if I could make part of the payment here in USD legally?

Although not directly illegal ...
From an India tax and FMEA point of view this would be a bit complicated.

A NRI Seller cannot repatriate the proceeds from sale of house unless he had purchased this from an NRE account, and repatriation is only possible for the original purchase amount. For the gains, the Seller has to apply for repatriation of funds.
A NRI Seller has to pay taxes on gains, and this transaction should not look like facilitating a tax fraud, in case the NRI Seller does not pay his taxes.
As a Buyer, if you make the purchase from your NRE account [i.e. Move US funds into India into NRE Account], it will ease you ability to repatriate funds in future.
Depending on the property value and PAN card availability of seller, you have to deduct 1% to 30.12% tax from the value and deposit this with Income Tax India.

PS: It is recommended that you consult a Professional CA to help you with modalities.
Comment: Sounds like something better handled by hiring an experienced professional.
Comment: @keshlam Agreed. A professional service is required to manage this.
Answer: The RBI master directions on "Acquisition and Transfer of Immovable Property under Foreign Exchange Management Act" has all the information on this:
https://www.rbi.org.in/Scripts/BS_ViewMasDirections.aspx?id=10196
As per it, you can't pay for it outside India. It states:
"NRIs or OCIs may make payment, if any, for transfer of immovable property out of funds received in India through banking channels by way of inward remittance from any place outside India or by debit to their NRE/ FCNR (B)/ NRO account".


Possibility of buckling in non-slender member?

Question:
The above diagram is misleading. In reality, both the length and thickness are equal to 8mm.  As this is from a past paper (one notorious for awkward questions), I'm not sure if it's a typo (an 8m length would be much more straightforward).  Is there any possible outcome/plane in which this pipe would indeed buckle?
Comment: I'm pretty sure this is a typo and should be L=8m.
Comment: Kinda random question, but why would you care about buckling in this example?  The question was clearly made for thermal expansion and is low on details to really bother figuring oit other stuff.
Comment: Well, thermal expansion of a pipe with constrained ends will induce a compressive stress in the pipe (the constrained ends resist the tendency  of the pipe to expand by heat, and so the thermal strain is countered by an equal compressive elastic strain, which in turn requires a compressive stress). Whenever dealing with compression of slender members, buckling should always be kept in mind.
Answer: It is not necessarily a typo, but you wouldn't normally call a thin walled cylinder 8mm high and 100mm diameter a "pipe".
However, the formulas for Euler buckling are most definitely not valid for a structure with those dimensions. The appendix of this rather old report http://www.dtic.mil/dtic/tr/fulltext/u2/a801283.pdf gives some basic theory and graphs for "hand calculation". Such problems would now be solved by computer modeling, of course.
In real life, the critical load will be very sensitive to the exact boundary conditions.
Since the OP's diagram looks as it if came from a rather old textbook, most likely it is a typo, but since the length as shown in the diagram is apparently less than the "obvious" typo of 8m it is not very clear what the "correct" dimensions for the numerical part of question should be.
Deriving a general formula for a pipe of length L, diameter d and wall thickness t is a sensible exercise, though.


How to calculate the number of positions in chess?

Question: For  layman, can someone explain how you calculate the number of available positions in a chess game, and how do you get the huge number of 10^120 or 10^46?
Comment: https://github.com/tromp/ChessPositionRanking shows how to get an accurate estimate (roughly 4x10^44) of the number of legal chess positions.
Comment: @JohnTromp nice work
Answer: We can easily get a reasonably good upper bound on the number of positions. At any point in time, each player has 16 pieces of which the 8 pawns can perhaps be promoted to a knight / bishop / rook / queen. Consider all captured pieces to be off the board but part of the position (this would increase the number of positions but that is fine because we only want an upper bound). Thus in each position the number of combinations of pieces each player has is less than 58. Place the kings on the board first. There are less than 642 ways to do that. Line up the 30 other pieces in any order and place them one by one on the board or off the board (captured). There are at most 6330 ways to do that. This gives a total of less than (58)2×64^2×63^30 < 6×1068 positions. Double that to include whose turn it is. I had ignored castling rights; you can check that it is negligible by similar calculations.
This bound is very much smaller than what you gave in your question, even though it is an extremely loose upper bound, because you had a misconception. The number of possible positions is not at all the same as the number of possible games. For example, there are less than 642 positions with just the 2 kings, but at least 2100 possible games starting from any such position (under the 50-move rule but ignoring 3-fold repetition rule for easy estimation). Moreover, the 10120 estimate is assuming the game lasts 40 moves (2 plies) and each move has about 1000 possibilities. The real total number of possible games (including stupid ones) is obviously way more than that, since we already have 2100 possible KK games alone!
Comment: "Line up the 30 other pieces in any order and place them one by one on the board or off the board (captured)." With this, the calculation 63x62x...x34 gives a number that is too small (and thus it is not an upper bound), because the "captured" position can be chosen multiple times and thus does not reduce the number of possibilities for the next piece to select from.
Comment: @shashankshekharsingh: To get your intuition working better, consider a simple 'game' in which you have three cells in a line and one piece in one of the cells, and you just move the piece to an adjacent cell on each move. Then there are only 3 possible positions, but 2^k possible games that last 2k moves.
Comment: @StanleyF.: Gah you're right. Let me just use the simpler obvious upper bound of 63...
Comment: "The number of possible positions is not at all the same as the number of possible games." that's something knew. i didn't know that. It would be a good idea to give the number of possible positions from any particular opening such as the sicilian or grunfeld. then there won't be a problem of calculating the number of games and it would be a good example if anybody seeks to calculate some other opening. thanx
Answer: One way to do it is think about what the smallest computer encoding of a chess position (in bits). The maximum size for a given encoding provides an upper-bound on the number of chess positions. For some really tight upper bounds check out https://codegolf.stackexchange.com/questions/19397/smallest-chess-board-compression/19446#19446. This gives an upper bound of 2^160 (10^48) positions, which is a bit high, but not that much higher than the true value.
Answer: Assume that only checkmate or stalemate ends the chess game. It implies that every legal position in the classical chess remains legal. Then, the number of legal positions in chess does not exceed 53005918951815626260641171706639462843262017900515420, please see Lemma 16 in
http://ssrn.com/abstract=3978669
The upper bound in Lemma 16 is not minimal because takes into account many positions which are impossible to achieve in a game.
For every p \in {0,...,8}, any position with p white pawns cannot contain 2+8-p white bishops on the squares of the same colour.
For every p \in {0,...,8}, any position with p black pawns cannot contain 2+8-p black bishops on the squares of the same colour.
If the white king is in check then Black cannot have a move.
If the black king is in check then White cannot have a move.


MMO Player Position Update

Question: I have been looking at the development of MMO games for a while and have got stuck up on one thing. Player Movement. If we have an area with 10 players, each player needs to be able to see the orientation and position of other players. But when players start moving I need to update the ten players locations simultaneously. If I were to use an MYSQL database it would be slow and laggy to send coordinates and get coordinates from the database everytime a player moved. What would be the professional and proper (more efficient) way of doing this?
Answer: You wouldn't store the positions of any currently ingame-players in a MySQL database. Databases are for data at rest, not for data in use. You would use a database to persist the state of player-characters when they go offline and retrieve it again when they come online again. Data in use (anything which is relevant for current gameplay) should be in the game-server's memory for fast access.

MMO Player Position Update


Describing exclaimations from a group

Question: My character, an old woman, has been knocked down, injured and can't get up. There is a crowd of people, spread across a park, who all witnessed the accident. From her view, at ground level, she is aware of a movement across the park, people turning towards her - but how to describe what she hears? - various exclaimations blurred into one. I'm trying, in one sentence, to put the reader down on the ground with her, before help arrives. I appreciate all suggestions.
Comment: What is the problem you're having exactly? For example, is this a question about the formatting for having several lines of direct speech into a single sentence? Do you not know what their reactions should even be? Something else?
Comment: My question was poorly written, I have edited the question.
Answer: Your viewpoint character will perceive very little of all the crowd's reactions.  Think of what the character will see and hear and describe it.  The gabble of indecipherable talk, the exclamations of grief or shock or glee or what have you.
From the point of view, just declaring that the crowd exclaimed over it would convey much of it.
Comment: Thanks Mary. Yes, I am trying to describe what she hears. I edited the question to explain it better but just that process has been very helpful.
Answer: This isn't all in one sentence, and is probably not the answer you're looking for, but when I write exclamations from strangers in a large group, it looks something like this:
"Oh my gosh!"
"What just happened?"
"What is that?"
Of course, these are very vague exclamations because I don't know exactly what happens that is so surprising to everyone---and it's not in one sentence like you asked for, either. But if you're really stuck on using one sentence, I suppose you could say something like:
Exclamations of (horror and/or shock?) erupted around the park as _________.
Or something like that.
Comment: I have edited the question, my first question. Thank you for your time Izzy - I appreciate your two suggestions but that style of phrasing is what I am trying to avoid.
Answer: First, think about all the different ways people might exclaim in such a situation. There will be some screaming in terror, others will laugh with unbelief because they didn't completely see what happened and mistake it for something staged or funny, there will be some calling for others to get an ambulance, some will silently run to the accident to help, yet others will shout orders what to do, and so on.
Next, think about the different ways you might summarize that. You can list it, as I did. You can describe the general effect of many different exclamations at the same time. You can try and describe the general mood of the exclamations (shock) or the behavior that accompanies it (tumult) .
From the function this scene has in your narrative, try and understand which kind of description most serves that function. Is there a character inside that situation? What effect does the situation have on them? etc.
Finally, simply try and write what you think works best and evaluate it on the next day. Revise as you see fit.
Comment: Thank you Ben - I did evaluate and rewrote the question to make it clearer - probably just a few words would cover it all. At least now I have a better idea of what I need.
Comment: @JanineC I think you already have the foundation for a good solution there: "... she is aware of movement across the park, people turning towards her, various exclaimations blurred into one ..." Maybe specify what kind of exclamations, what emotions. One adjective might be enough (e.g. "anxious exclamations"), maybe an additional phrase (e.g. "people calling for help"). I'm not a native speaker, you'll probably find better words.

Describing exclaimations from a group


SHA256 checksum different than source

Question: I downloaded kali Linux 32-bit ISO and verified the sha256 checksum and they weren't the same. Totally different checksums and the file is fully downloaded. Any ideas? I used a reputable VPN and performed DNS leak tests to verify the connection was secure. Additionally, how difficult is it for someone to display fake checksums if a malicious user has access to your operating system or physical hardware and installed software with bad intentions? Thanks!
Comment: How are you calculating checksum at your end?
Comment: Using 7-zip built in checksum. I have downloaded it three times and when I discovered the checksums weren't right for the first two downloads and I downloaded it for a third time I got the correct checksum for the .iso telling me that something is wrong with the other two.
Comment: I can post the files with the source checksum (and official link to verify) as well as the .iso files and their checksums as well so you can take a look at the checksums to also see they are incorrect. Would that help? Thanks!
Answer: A different checksum only means that the software on your computer is not the same as the official version of the software. It does not necessarily mean that an attack is taking place.

A transmission error may have corrupted the data in transit.
Your download mirror may have inserted something benign to the software distribution, such as a thank-you or a request for donations.
Your download mirror may have given you the wrong version of the software, for example if they are slow about updating the software on their website.
Someone may have inserted a malicious program into your distribution.

If you've eventually gotten a version of your software that matches the officially published checksum then I wouldn't worry too much.
A few other observations:
Checksum values are not stable- small changes in the software can lead to totally different checksums. The fact that your checksum is radically different doesn't mean anything.
It would be exceedingly difficult for an attacker to display a fake checksum on your machine. They'd need to know what program you're using to calculate checksums, and they'd need to somehow install a malicious version of that program. If they're able to do that, then they've already got administrative access to your machine, making the purpose of further attacks a little unclear. In my mind it'd be more likely for them to hack into the software author's website and change the official checksum listed there.
Many sites use a download link that sends you to a random mirror as a simple way to provide load balancing for their mirrors. The fact that you've gotten three different checksums is not necessarily a red flag in my mind.

SHA256 checksum different than source


Will deleting a photo on device, also delete the synced photos on Google?

Question: My SD card and internal storage are full, and I want to free up some space. Is it safe to delete photos if the photos show that they are being synced to my Google account?
Answer:
Google Photos synchronize your photos to your online storage (your online storage is limited to 10Gb if you choose synchronizing the original size of the photos ,and unlimited if you choose the high quality upload size , this setting can be edited under Photos >> settings >> backup and sync >> upload size ) now when Photos app synchronize you photos you end up with two copies, one on your local storage (sdcard) and the other one on your google photo storage so deleting the local version of the photo will not delete the one on your google Photos online storage.
However if you had chosen the high quality option under the app's settings the app will not synchronize the original size of the photo
but it will re-size it and then upload it so in this case you have
two copies of the photos one with the original size on your SDcard
and one re-sized on the server deleting the local copy will make
you lose your original photo but your re-sized photo will still be on
the server.
Saving space on SD cards is one of the purpose of Google sync photo.


Change color of selection in Tmux

Question: I'd like to change the background color of selections in Tmux. Which variable do I change for this?
Answer: There's more than one "selection": tmux has selections for its paste, etc, while the terminal has its select/paste which tmux knows nothing about:

For the former, that's tied to the default colors which tmux uses, and there is no special configuration feature that lets you color it differently (see for example Turn off color inversion for marked pane in tmux).
For the latter, that is terminal-dependent and not all terminals let you color the selection specially (see for example xterm highlighting always white, not reverse).
Answer: You can change the styling of the text selection in tmux's copy mode by setting the mode-style option.
As of tmux version 3.2, the mode-style option has a default value of bg=yellow,fg=black.
I prefer my text selection to use the reverse video style (my terminal's configured default foreground and background colors reversed).
To achieve that styling for the text selection within tmux, I have the following line in my tmux.conf:
set -g mode-style 'reverse'

Answer: In most terminals the selection color is generated by reverse video. This implies that you cannot set it. It is just swapped background and foreground color.
It is probably the responsibility of the terminal application, you use to set up the colors for the the contents. The exception is of course what tmux renders for its own elements (bars, borders, its own prompt, etc).
Look up background and foreground properties for your terminal and set them up in your ~/.Xdefaults file. On non-X terminals the termcap or certain environment variables files can be used for this.

Change color of selection in Tmux


Transparency of UISearchDisplayController

Question: Lately I've noticed a strange thing in my app. While I tap on UISearchBar and UISearchDiplayController starts its tasks you can see relics from the regular UITableView. It wouldn't be so annoying as the regular UITableView is freezed but when I use custom pull-to-refresh controller like SSPullToRefresh it's placed in inset of UITableView so it's always visible.

Also, it wouldn't be so eye catching if the status bar would be transculent but it's transparent and you can clearly see what's under the UISearchBar and Status Bar.
So my question is: Is it possible to make UISearchBar and Status Bar opaque?
In latest version I'm using AMScrollingNavBar so this custom pull-to-refresh view has moved to the Status Bar but I guess if Status Bar is set to be Inferred it's the issue with UISearchBar.
Comment: try self.navigationController.navigationBar.translucent = NO;
Comment: @Basheer_CAD I've already done that and nothing happened.
Answer: Set UISearchBar style to Black.
Set StatusBar to Black.