Using terms for clarity in first person

Question: When writing in 1st person POV, if your story's universe or your main character uses made up values of measurement or doesn't have a term for something like eyeliner or traffic lights, how do you clarify what's happening to the reader?
Answer: Show it.

"I'll take 40 nargs of milk," Jon said, carefully counting out the
  gime needed to purchase it.
Stan's eyes went wide, and Jon waited for him to ask why he would need
  so much, but instead Stan pushed his hat back to look at the little
  cart he was hauling and said, "How you going to carry all
  that?"
"I'll manage somehow," Jon said. It turned out to be a bit more of a
  balancing act than he'd counted on, and one of the jugs fell out as he
  hit a hole in the road, but none spilled and he placed it back on.

You can get more descriptive than that. We don't need to know exactly how much a measure is, but you can give people a rough idea.
Tell it.

In the market they sold colorful silk fabric by the el. Will used to
  joke that an el in Drubinshire was longer than an el in Frisinki,
  because in Frisinki they used the king's personal part as the measure, and here
  they used the mayors'. She found herself missing Will's vulgar
  inaccuracies, even though she never could buy silk without thinking an
  el was overlarge if that's where the measure came from.

Still doesn't give us an inch for el measurement, but for the purposes of your story, you know that it's a measure of length, and it's longer than um...and this also tells us something about the characters.
You say that the character:

doesn't have a term for something like eyeliner or traffic lights

In this case, I take that to mean that they might be experiencing eyeliner or traffic lights for the first time (although eyeliner...that's really, really old or at least the idea of lining or darkening around your eyes is--sailors did it back in the day). So they either don't have a concept for it (traffic lights) or they do (eyeliner probably). If they do, it will remind them of something--a person with eyeliner or eyeshadow might remind them of sailors or pirates and that can be ever so much fun!!
Play with that--that they have things like it (history really does repeat itself and you would be surprised what your person might have seen in a different context) but that the context or meaning is totally different! Maybe only high priestesses darken round their eyes, or people with plague to mark them--or, or, or.
As to a never-before seen thing, like say a traffic light-- @FraEnrico's example is perfect, and I can't improve on it. It's situational though, depending on how observant the character is--they might not notice until after they get run over, and if they are walking might be more likely to notice the little walking man icon and the hand, along with the pedestrian flow.
Answer: We should have more details about the story you are writing, its setting and themes.
But generally speaking, I think about two scenarios:
1) the character talks about things that are unusual to their world, but known to the reader (i.e. a streetlight). In this case it is enough to describe it, and the reader can quickly grasp it.

Ex.: Walking down the street, Julius noticed how the vehicles moved
  according to the changing green and red light suspended above the
  crossing. It was like watching a religious rite, where a silent but
  authoritative priest would command his coloured orders to the obedient
  crowd of machines below.  [Julius never saw a streetlight, we
  perfectly know what it's about]

2) the character talks about things that are common in their world, but unknown to the reader (i.e. a specific habit or lingo). In this case, the reader must accept the world as it is described by the characters. This is how the worldbuilding takes form.

Ex.: Julius jumped on the driftapan, which promptly moved on at the
  safe speed of 10 burgius per minute, as all the other transportation
  systems that were abiding by the nebularian laws. [i.e. we have no
  idea what a driftapan is and what is a burgius unit, but it's clear
  that we're talking about a vehicle and a measurement]
Answer: I would do what people actually do, and call it something descriptive. Here is an Online Etymology Dictionary that can tell you when and how various words in the English language originated and evolved, where they came from. It can be very helpful in giving you ideas for how to make up replacements.
You will find that most words are actually rather plain, shortened versions of metaphors or descriptions, or just trace to representative nouns: The word "line" comes from "linen" which comes from "linum", the Latin name of the flax plant from which linen fibers are extracted. "Flax" itself is a different name from a different language; and our word "flaxen" refers to the yellow blond color of the plant. Perhaps you can use a variation on "flax" for "line", or in your made-up language try to see this thing you must describe as if you have never seen one before, and decide what words might be used as shorthand.
This can be influenced by culture: Look up "traffic" and you will see it relates to trade or commerce, with the same root as "trans-", meaning "across", plus "fricare", for "friction". In fact a traffic light means a "signal to cross / not cross", both for cars and pedestrians, to reduce "crossing friction" (collisions).
Speaking of "signal" it comes from "sign" which meant "gesture".
Speaking of "Cross", it is from the latin word "crux" the name of the device upon which a crucifixion is accomplished.
A synonym for "crossing" is "intersection", your "traffic light" could be an "intersection manager".
The origin of words is obviously very idiosyncratic, based on other words and whatever concept happens to take hold first. But whatever the language, the procedure of finding a new name for an invention is seldom just an arbitrary made of set of sounds: It is descriptive. In "traffic light", "lights" were already often taken as a symbol: Remember in the midnight ride of Paul Revere, it was lanterns hung in a tower, "one if by land, two if by sea".
We are still not 100% settled on what to call electric lights: What we call "electric light" is probably an extension of very early distinctions between "candle light" and "day light" and "torch light", but we could have easily come to call them electric "lamps", "torches" or lanterns". In fact, electric flash lights are still called "torches", and "lamp" is now most commonly used to mean an electric lamp: It once referred to a wick/oil lamp, but now we almost always call that a "lantern".
It is better to root your made up words (or descriptions) in some history to make them more plausible, and also to reduce the burden of memorization on the reader.
Also, realize that for any ideas or objects we refer to frequently, we humans have a tendency to shorten for efficiency in speaking and writing. For example, "Crossing against the light" or "running the light", as phrases in isolation, are hard to make sense of, without the prior concept of a traffic light that manages an intersection to minimize the risk of collisions.
If possible, you want your made up words, coins, dress, behaviors, etc to be alternate versions of things we have: The reason we can translate most words in one language into another is because we humans have largely converged on a consensus of important concepts to be represented by language, and we differ only on the details of forming sounds and grammar.
So when you need words for "eyeliner" or "traffic light", treat them as a translation, and etymology (how the word came to me) can provide some fodder to help give you ideas of alternative ways a word might have plausibly evolved.
If your POV character just needs to describe (once) the function of a traffic light they have never seen before, exploring the etymology can help you get the idea of "painting the borders of the eyelids for contrast" or the idea of "managing a crossing to prevent collisions".

Using terms for clarity in first person


Conjectures that are false for very large numbers

Question: Hi I would like to teach my students about false conjectures and computer approaches to them. I need references and/or direct examples of statements of the form $(\forall n \geq n_0)P (n)$ where $P$ is a relatively simple property (e.g. of elementary number theory) such that the smallest number $m$ for which $P (m) $ is false is ridiculously bigger than $n_0$.
Comment: See also https://mathoverflow.net/questions/15444/examples-of-eventual-counterexamples
Answer: A popular example is Mertens Conjecture: $M(n)=\sum _{{1\leq k\leq n}}\mu (k)$
where $\mu(k)$ is the Möbius function; the Mertens conjecture is that for all $n > 1$,
$$
\left|M(n)\right|<{\sqrt  {n}}.$$


Does Microsoft Hyper-V Server 2008 R2 take less resources then Windows 2008 R2 with the Hyper-V role instaled?

Question: How much more resources (if any) will a full blown Windows 2008 R2 Server running just the Hyper-V role take over Microsoft Hyper-V Server 2008 R2?
Comment: Well one would assume all the other features that come with it would be running. I don't think this is a fair question, nor one that can be easily answered.
Answer: I've had conversations with the Windows Team and the difference between the two isn't so much in resources, it's in security and licencing.  A full Windows Server 2008 R2 with Hyper-V only and less then a dozen VM's shouldn't need more then .5 GB of RAM for host/parent OS, Up to 1GB if you're running more, and I've never seen a "stock" host OS affect performance in any way... that is until till people do stuff on the parent OS like add backup agents, AV agents, monitoring agents, etc.  which will happen the same when you do that in Hyper-V server or server core.
In my conversations with SMB clients and enterprises about the decision of "Hyper-V Server" vs. "Windows Server" the questions we use to help make the decision are never really about performance in this world of 16 core's and 128GB of RAM.:

do you admins have skills in supporting Servers without GUI's (i.e. wmi, powershell, etc. as this tends to be the single biggest factor that moves most shops to buying full Windows Server, they don't have time to train staff how to manage servers remotely or through cmd line)
do you have specific security requirements that justify the need for Server Core (security office mandates it for any virtualization platform to reduce risk of jailbraking into guests)
do you need features that would require a full Windows Server OS (does all your add-on management software support the server-core GUI-less console of Hyper-V server)
Is your licencing setup where you need to run Windows Server Enterprise on the parent OS in order to take advantage of the 4 included guest OS licenses (or Datacenter for unlimited guests)

I know this doesn't specifically answer your question, but if the answer was "hyper-v 300MB" and "Windows Server 500MB" then I didn't want you to take that as a decision to pick one over the other.


Todo list that allows uploads and review closed tasks

Question: I've been trying out a few todo lists lately and I'm not sure I have found what I'm looking for yet.
My criteria:

Mobile/Windows/Linux capable
Can be a free or paid web application.
Prefer it to be hosted or self hosted so I can centralize my checklists.
Access history in case I need to review an issue that came up previously
Hide completed tasks Share lists with spouse (I work with with her also)
Individual checklists for work/personal/etc
Attachments - Need to be able to add attachments such as pdfs, markdown files, config files, images, etc.
Priority Oriented
Notes on each todo list item

Nice features to have:

Subtasks
Google (or any) Calendar integration
be able to log events with date and time in the individual notes of each item

I'm in the IT field and I was keeping my todo lists in Toodledo. I started having issues with attachments and too many notes so I moved to a local system. I need it accessible from home/work/phone/etc since I use it for personal tasks also.
I know most of these features are covered by a lot of Todo lists out there but I need something a little more involved than a basic todo list. Maybe a different approach? I don't know, maybe you guys have an idea?
Answer: I am using Asana.  It is available on multiple platforms, which means it is in the cloud.  It has all the features you are looking for.
I use the free version, which is single user.  For your case there will be a charge, unless you use the same login.  It handles tasks, lists, projects, subtasks etc. You can tag the tasks with dates, priorities and users.  Completed tasks are still viewable.
Comment: ty I'll check it out!


Can software vendors add a ToS that would give them monetary privileges over things created by their software?

Question: Imagine that a software user typed an original novel into a word processor (e.g Microsoft Word or Google Docs). Imaging that the software vendor added something to the terms of service (ToS) saying that anything created by Microsoft Word or Google Sheets became the property of Microsoft/Google. Could Microsoft/Google then demand to be paid a cut of each novel sold by the author/software user? Would this be enforceable in front of the courts?
Answer: Under your proposal, the author cannot effectively use the software at all, much less sell his creative efforts. The EULA clearly states that copyright is automatically transferred to the vendor when a document is created. The author gets started, writes "It was a dark and stormy night" then has a moment of writer's block, saves and closes, takes a walk, then tries again. The author has transferred copyright in the work to vendor, and needs vendor's permission to make revisions. So you have to tweak the EULA to grant automatic permission to author to create derivative works (revisions), and to distribute. A more effective strategy would be to impose a revenue-sharing formula on any commercially-exploited work created using the software, rather than attempt to directly seize the intellectual property.
The CC "NC" license attribute is a distant version of what you are looking for - it prohibit any money-making use of the software. What you would add to that is a condition that the software can be used commercially, provided a certain compensation be rendered. You would of course have to be very clear in advance about what was actually agreed to.
Comment: Perhaps the question I indended to ask is **Would be possible to impose a revenue-sharing formula on any commercially-exploited work created using a piece of software?**
Comment: unlikely, as such a class could be seen unconciounable.
Answer: Such a clause would be unconscionable
Unless such a clause is negotiated for specifically in advance for any particular contract, it would be an unenforceable clause. That means, no reasonable person would expect that clause, and without indicating such a clause is in the software before, it can be declared void by courts.
In some jurisdictions, it could even be illegal: each of the copyright transfers to the software seller has no consideration given to the author, which might require full compensation for any work taken by the seller.


receiving AM radio station on UHF frequency

Question: I'm studying for my Technician license, and listening in to HF, VHF and UHF bands just to get a feel for how to work with frequencies, squelch, antennas, etc.   Had something happen today that I couldn't explain.  I was doing a scan through the 70cm band, running from 400MHz to 480MHz, and at 450.040 I picked up a local AM radio station.  I checked the radio station website and they only broadcast on 1520 KHz.  How did I receive that signal on such a different frequency?  I wasn't even working with a very powerful antenna, just a Baofeng UV5R.  My first thought was that perhaps the local signal was just so powerful it overcame my radio reception.  But if that's the case, why did it happen just on that one frequency?  I was scanning other frequencies through the day and didn't have it happen on any other frequency. I also checked to see if we had any nearby repeaters at that frequency but we don't; nearest frequency for a regional repeater is 444.9750.   Thanks.
Comment: Maybe you received a UHF FM link from the studio to the transmitter site.
Comment: Juancho makes a good point.  Were you receiving the signal with AM or FM?
Comment: FM receivers can't detect AM. You may be interested to know that AM receivers *can* detect FM by slope detection (https://www.somerset.net/arm/fm_only_lowtech.html)
Comment: I picked up news talk 1080am of Hartford, CT on my baofeng uv5r+ tuned to 161.755 today. Which led me to this write up...I'm still confused
Comment: Probably mixing of frequencies in the receiver - for example the UHF studio link with a image of the IF frequency the output of which coincides with the frequency you are listening to...
Comment: Was the transmission on 450.04Mhz was continuous? I have already seen something similar when listening to POCSAG pager transmissions, I was able to hear FM stations originally at 102Mhz on 460Mhz. I don't know the reason for this (potentially intermodulation) but it could potentially help.
Answer:
at 450.040 I picked up a local AM radio station

I am sure you picked up a transmission

just a Baofeng UV5R

But not with that radio, or at least not AM
You either:

Picked up a signal which is indeed AM, but then it would not be very distorted as the radio you are using only has FM (de)modulation.

or:

Picked up something else.

If the audio received was not distorted (so then it must be FM), and clearly the same 'program' as the said AM station on 1520 KHz. Then it is very likely this is a "studio to transmitter link/feed" that you picked up. (as detailed in the comments already)
But to give you the official answer:
You are not picking up an AM transmission originally on 1520 KHz, on 450.040 MHz with an Baofeng UV5R radio. That would be quite impossible
:-)
Comment: Thanks for the replies. My radio has three bands - VHF, UHF and FM.  I was on the UHF bands when I received the signal.  We are positive it was a commercial radio station because we listened for over 10 minutes.  Heard several songs, several commercials, and the station ID at least twice.  We looked up the station online and they're only licensed to broadcast on that 1520 AM freq. I'll call the radio office and ask about whether they were broadcasting from a remote location,or if perhaps they use a different transmission frequency between the broadcast booth and the antenna.
Answer: I was trying to research some info and I came across your thread.
My guess is they took the audio output from the 1520 kHz tuner and fed it in the input of a 450.040 MHz transmitter. That's why it can be heard in the UHF region. In this way, FM or AM or frequency doesn't matter, because its only an audio feed from an 1520 kHz tuner. You could have listen to a 1520 kHz tuner and a 450.040 MHz tuner at the same time. There should be a delay between the two tuners, I would guess.
Answer: The 450-451 MHz band is often used by news media, broadcast TV and AM radio. They use it for communications between the station and the news vans, or between the station and the traffic helicopters. In addition, they use it for something called Interruptible foldback which is a stream containing the programming and occasionally commands from the studio to the "reporter on the scene". I hear these often, and it's just minutes and minutes of broadcast programming that suddenly stops.
I Googled and found some exact listings for the Boston media market - your area will have different frequencies but used for a similar purpose. http://scan-ne.net/wiki/index.php?title=Media_and_Fire_Buff
This can be handy to listen to, if you get traffic reports direct from the helicopter during rush hour!


Why do Force Users speak what they want people to do when they use Force Persuade?

Question: This question is pretty straight forward. Why do Jedi or Sith say something when they uses Force Persuade/Mind Trick? One example from Episode IV: "These are not the droids you're looking for." I know that Force users lift their arms and stuff to help them concentrate, but I don't think that speaking would work the same way, because they are not exerting very hard to persuade someone. Yoda in Episode II had to make a great effort to catch the pillar before it fell on Obi-wan and Anakin. Ben Kenobi isn't seen to need to make such a great effort in Episode IV.
Comment: I don't know if anything is detailed about the Jedi mind trick in the EU, but I don't think it gives you any telepathic powers, so if you want to compel someone to do something, you have to *tell him what you want*.
Comment: Out of universe explanation - it makes it easier for the viewer to understand what is going on.
Answer: The Jedi Mind Trick (or Force Persuade) relies on a light touch upon the mind, and therefore is more akin to a powerful hypnotic technique.  Much like hypnotic suggestion, the Mind Trick clouds judgement, making the target susceptible to suggestion from an outside source (thus the suggestion has to be made subsequent to the initial clouding of the mind).
The suggestion is almost always spoken (although theoretically I suspect it might work on some visual cues, such as pointing in a specific direction).
The Mind Trick is not really a Light Side use of the Force.  Instead, its use tends to be in the grey area in between.  During the Thrawn Trilogy, Luke expresses some concerns over continued use of the Mind Trick, as, at its basis, it is subverting the will of the victim, which skirts dangerously close to the Dark Side.
Indeed, it isn't too far of a stretch from the Mind Trick to Mind Control, which is a Dark  Side power, and extends the power to full domination of the mind.  The insane clone Jedi Master, Joruus C'baoth (who had embraced the Dark Side) used full Mind Control to dominate entire fleets of Imperial soldiers, to improve their coordination in battle, and also demonstrate his power to Admiral Thrawn.  When doing so, C'baoth did not have to speak, or even be within sight of the victims of his dominance.  Instead, he simply manipulated the Force to directly control their thoughts.
The distinction between a light touch to cloud thoughts, and full dominance, is why Jedis must speak or otherwise provide external commands, and Sith and Dark Jedi may skip the intermediary step of external commands altogether.
A Jedi may have the ability to skip external commands, but doing so would be a gross violation of another sentient being's will (as opposed to the a minor violation reserved for only situations where the greater good demands it), and therefore squarely on the path to the Dark Side.
Comment: @DampeS8N considering Luke eventually turned to the Dark Side for a while (iirc), maybe he was right after all :p
Comment: Also, it is often easier to concentrate on something if you speak audibly. If it required concentration on the part of a Force-user, speaking would help in that area as well.
Comment: Luke also [force chokes people](http://customstarwars.x3.hu/holokron/grip_luke.jpg), so maybe we shouldn't entirely trust his thoughts on the line between the light and dark side.


File in Trash cannot be deleted, not even with sudo rm

Question: Ever since Dropbox updated its software a few months ago, and advised all Mac users to update in order to continue having the same facilities, a folder in my Dropbox Cloud was apparently corrupted and could not be read. I tried to salvage what I could and deleted the folder directly from the Dropbox site. It, however, appears in my Trash and cannot be deleted. I get: "The operation can't be completed because the item <> is in use". (All other items do get deleted from Trash.)
I have tried sudo rm commands from Terminal, using all possible parameters (-R, -ri, -rf etc.) to no avail. I have tried to erase it before Dropbox gets loaded at startup, again to no avail. I have erased ".Trash", but again the stubborn file pops up in the Trash.
I am using MacOS Monterey 12.6.6 on a Mac Pro (Late 2013). Help will be much appreciated. Thanks.
Comment: Did you try `sudo fs_usage | grep [path_to_folder]` in order to ensure that Dropbox is the only process which is using the folder ? It could be another process. Alternatively did you try rebooting in safe mode to make the operation of emptying the trash ?
Comment: Thanks for your prompt answer. Rebooting in safe mode did not help. I have just tried your sudo fs_usage suggestion and I get the following response that I cannot understand: 20:46:25  getattrlist       /Users/enahmad/Library/CloudStorage/Dropbox/.Trash/España                      0.000018   fileprovider
20:46:25  open              /Users/enahmad/Library/CloudStorage/Dropbox/.Trash/España                      0.000034   fileprovider
20:46:25  openat            [-2]//Users/enahmad/Library/CloudStorage/Dropbox/.Trash/España                 0.000011   fileprovider
What should I do?
Comment: with that response you can know fileprovider is a process that uses some files inside .Trash. Perhaps trying to force quit these processes would help. But this process is a system process, that is probably launched by a master process
Answer: I had a similar problem.  The solution was to move the item to /tmp and reboot.  (Reboot deletes everything in /tmp)


What is the name of the operator that translates from $X\rightarrow(Y\rightarrow Z)$ to $Y\rightarrow(X\rightarrow Z)$?

Question: Is there a standard name for the operator that takes a function $f:X\rightarrow(Y\rightarrow Z)$ and returns the function $f':Y\rightarrow(X\rightarrow Z)$ that satisfies, for every $y \in Y$ and $x \in X$, $f'(y)(x) = f(x)(y)$?
Answer: The function $$\lambda f.\lambda x.\lambda y.f\;y\;x$$ of type $$\forall X. \forall Y. \forall Z.(X \to Y \to Z) \to Y \to X \to Z$$ is often called flip. This is the case in Haskell (see here), and in some OCaml libraries as well (see here). According to wikipedia, people call this function (or combinator) $C$ in the context of combinatory logic (that name sounds pretty random though).
Comment: And the function $\forall X Y . X \times Y \to Y \times X$ is usually called the *twist* or *swap* map.
Answer: Given the tag combinatory-logic, the answer in combinatory logic is C, i.e. "the C combinator". Obviously, this name is not self-documenting or going to be obvious in even a slightly more general context.


projective module which is a submodule of a finitely generated free module

Question: Let $P$ be  a projective module over a commutative ring $R$ with unity. Then for some free $R$-module $M$ , $M=P\oplus Q$, and we can think of $P,Q$ as submodules  of $M$. Now let $N$ be a finitely generated free submodule of $M$ such that $P \subseteq N$; then is it true that $P$ is finitely generated ? I know that if I can show that there exists a surjective module homomorphism of $N$ onto $P$, then we are done, but I am unable to show that. Please help. Thanks in advance
Answer: A different way to see the same thing in Eric Wofsey's answer is that if you have $A\oplus P=M$, then $(A\cap N)\oplus P=N$, so that $P$ is a summand of $N$, and is hence finitely generated.
Answer: Let $\pi:M\to P$ be the projection given by the splitting $M=P\oplus Q$, so in particular $\pi(p)=p$ for all $p \in P$.  We can then restrict $\pi$ to $N$, and it will still be surjective, since $P\subseteq N$ and $\pi$ is the identity on $P$.  Thus since $N$ is finitely generated, $P$ is finitely generated.


My employer REFUSES to give me a copy of my signed contract

Question: I signed an employment contract back in September 2014, after signing it my employer explained that we were not allowed to have copies of our own but we could take a look at it whenever under supervision.
June 2014 I have requested one via email and they have refused to give me a copy but say I owe them money for breaking the contract. Is this legal for them to deny me a copy? This is in the state of Texas.
Comment: You signed the contract in future "September 2014" ?
Comment: I'm a bit skeptical that this is within the bounds of workplace.SE, as it seems to be a legal question.
Comment: That sounds unbelievably fishy.  Were you in unsupervised custody of an unsigned copy at any time before you signed it?
Comment: This is a legal advice question so it is off topic. However what I would do is tell them that I do not remember signing any contract that would have bound you to pay them anything.  But that if they can provide you with a copy of the signed contract, that you would be happy to comply with the terms of a properly rendered and signed contract.  Then consider getting the advice of a lawyer.
Comment: Why did you sign a contract without retaining a copy?
Answer: I am not a lawyer nor have any specific knowledge of Texas employment laws, but a reference to this newsletter indicates that they are not required by any law (in Texas) to provide you with or even allow you to view the contract again as part of your personnel file. The relevant section is the first Q/A in the "Mailbag" section of the article:

The short answer is no, not if her job was located in Texas and if
  you're a private (not government) employer. Under Texas law, personnel
  files are employers' property and employees have no legal right to
  either see them or copy them. That is not true in a number of other
  states, or if the employer is a governmental employer.

Given that this is a Q/A rather than a legal document, it would still behoove you to retain legal counsel. However, if they intend to collect any debt from you or pursue any action against you, they will have to provide basis for it and evidence to that fact which will mean supplying a copy of the contract in question.
Comment: Good lord how can a contract be valid if both sides don't have a copy!
Comment: @Pepone: The contract is always valid regardless of who has the copy, but it can't be enforced unless the copy is produced. Enforcement will require the employer to produce their copy, however, without a corroborating copy by the employee, there's no independent party to verify the legitimacy of any clause that may have been added after the fact.
Answer: I am not a lawyer, but my wife is a paralegal, and I thus know some of the mechanics of the courts.
This is not legal advice, and I do encourage you to engage a lawyer.
If you told them that you did not believe you owed them money, and that they should take you to court to collect it, or if you took them to court over unpaid wages, the company would have to produce that contract to the court as part of their case.  Your attorney (and thus you) are provided a copy of all filings.
However, anyone who won't give you a copy of your contract is not someone you want to do business with.  Run.  Run and don't look back.


Are there any programming languages that support state machines in their standard library?

Question: State machines are a fundamental computer science concept and in many senarios they are the simplest way to implement a process or program. However, most programming languages don't support them natively. Is there a technical limitation to do it? And if not, are there any programming languages that do support state machines in their standard libraries?
Comment: In a programming language that supports mutable state (Jave, C/C++, Python, ...) the program itself is a kind of state machine. The state is the state of its variables, and the transitions are described by the program itself. So we do not really need a separate library, just good support to define datatypes that directly represent states (so that we do not need to encode them with something silly, such as strings or integers).
Comment: I am assuming you are studying CS, or have studied. Please be careful with assuming all formal concepts around computing being taught in CS is directly useful in programming, they are not. They are however useful gadgets for making proofs. A professor I once took some courses under, and who was fond of pop culture quotes, offered me the following wisdom when I asked him about some issues I had with implementing RegExp using state machines; he sighed and said "Stop trying to hit me, and just hit me", meaning stop trying to simulate the solution to your problem, and just compute it directly.
Comment: There isn't really much to implement for a state machine
Comment: @AndrejBauer I am surprised you haven't mentioned Haskell's `foldl` and `scanl`. The way I see it, they exist to simulate finite state machines.
Comment: @RodrigodeAzevedo: you make a good point. Notice that I was talking about how *mutable state* is essentially an automaton, so it doesn't make so much sense to mention folds in that context. But you're always free to make your own comment or answer, in which you explain how state machines are manifested in declarative programming.
Comment: @AndrejBauer I was not criticizing you, but merely commenting that your comment did not agree with my expectation, which made it interesting.
Comment: If you're asking about UML/Harel statecharts, I'm not aware of any language which has that built in, but Wikipedia gives some libraries: https://en.wikipedia.org/wiki/SCXML
Answer: A state machine is basically a loop around a switch case construct, which exists in pretty much almost every language I know in a form or another.
So I'm curious of the one languages you found out that do, according to your wording, implement state machines natively, since to me most of all do so.
Answer: All imperative code is a state machine. The current state is called the program counter or in high-level languages the line number.
It's possible to construct an explicit state machine so that the state corresponds to some variable in your code, and the transitions are specific blocks of code. You can write this yourself, but it's a reasonably common transformation as it allows you to interleave the execution of different pieces of code.
The feature which uses this transformation - the ability to interleave the execution of different pieces of code - is often called "coroutines". C++ coroutines are implemented this way. However, coroutines can also be implemented using stack switching, which does not construct a state machine. Lua coroutines are implemented this way - although since the stack in this case is part of the interpreter state, from the perspective of outside the interpreter you can see them as explicit state machines.
Answer: In a language with Proper Tail Calls, implementing a State Machine is trivial: each state is a subroutine, each transition is a subroutine call, choosing the transition is done using the programming language's builtin feature for conditions (e.g. switch in ECMAScript).
In an OO language (or any other language with dynamic ad-hoc polymorphism) with Proper Tail Calls, we can go one step further and make the message dispatch algorithm implement the choice of transition for us.
In a language with flexible syntax, we can typically get very close to a formal state machine syntax. In a language with programmable syntax, we can not just get close, we can make our syntax identical to a formal state machine syntax.
All of this can generally be done in a few lines of code, without the need of any special language features. It is generally preferred to make languages powerful enough that the programmer can provide their own abstractions, instead of the language designer having to provide the abstractions for the programmer. (This at least applies to general purpose languages. Domain-specific languages are a different beast. In DSLs, restricting the programmer's capabilities is often a good thing.)
Lots of languages actually provide regex as part of the language and/or the library. Regex are supersets of regular expressions, and can thus directly express State Machines operating on character strings.
Answer: Suppose that you have a (finite) list of Boolean values and that you would like to count the number of occurrences of True. This (infinite) state machine's state-transition function is
$$ f (x, u) := \begin{cases} x + 1 & \text{if } u = \texttt{True} \\ x &\text{if } u = \texttt{False} \end{cases} $$
Suppose further that the initial state is $x_0 = 0$ and that the input sequence is
$$[ \texttt{False}, \texttt{True}, \texttt{True}, \texttt{False}, \texttt{True} ]$$
Hence,
$$ 0 \xrightarrow{\texttt{False}} 0 \xrightarrow{\texttt{True}} 1 \xrightarrow{\texttt{True}} 2 \xrightarrow{\texttt{False}} 2 \xrightarrow{\texttt{True}} 3$$
In Haskell,
type State = Integer
type Input = Bool

-- initial state
x0 :: State
x0 = 0

-- state-transition function
f :: State -> Input -> State
f x True  = x + 1
f x False = x

-- sequence of inputs
us :: [ Input ]
us = [ False, True, True, False, True ]

-- compute sequence of states
xs :: [ State ]
xs = scanl f x0 us

After having loaded this Haskell script on GHCi,
λ> xs
[0,0,1,2,2,3]

However, if you only want the final state, use (left fold) function foldl instead of (cumulative left fold) function scanl, as follows.
λ> foldl f x0 us
3


Words that only differ in tones

Question: In indoeuropean languages the words that sound similar often denote related concepts. Is the situation similar in tonal languages? Are there languages that use a different tone to make an adjective out of a noun, for example?
Comment: Tones sometimes are used for inflection; derivation is another matter.
Answer: Bantu languages are particularly known for exploiting tone pattern as  morphemes, so just as two words (noun versus adjective, past versus habitual) can be indicated by segmental affixation, grammatical differences can be signalled with just tone differences. For example, in Logoori, [vákáráange] means "that they fry" (a verb form) and [váꜝkáráángé] is "frying (ones -- people)", an adjective. Usually, though, category-changing derivation is in part signalled by a segmental affix, but in this case there is a tense suffix /ɪ/ that happens to be the same as the adjectival suffix /ɪ/ (and you can also use /ʊ/ for adjectives, which has no verbal equivalent).
Answer: In Croatian which is a Slavic language (so Indo-European also) and is tonal too, there are some words that are written and spoken same, difference being only the tone of the vowel.
For example (note the signs above letter u which indicate type of tone, they are normally not written in a text except if there is ambiguity):

lȕk (IPA: /lûk/) 'onion'
lȗk (IPA: /lûːk/) 'arch'

The two grave accents above u (ȕ) indicate short falling stress.
The arch above u (ȗ) indicates long falling stress.
There is also another example:

sȃm (IPA: /sâːm/) 1. 'alone, sole' 2. 'unaided, by myself'
sȁm (IPA: /sâm/) first person singular present tense enclitic form
(short form, full form is jesam) of biti ('to be')

This gives rise to interesting sentences, for example:

Ja sam sam. 'I am alone.'

This one can appear very often so usually there is no ambiguity, but nevertheless in written texts (formal - books, subtitles and similar, not SMS, IM, forums, etc.) they will usually be written like this:

Ja sam sȃm.

Note the second sam with a small arch above a, it indicates that this sam means 'alone' in this case. You can also drop pronoun ja (because the form of the verb itself indicates that it is a first person) so you have a perfectly valid sentence (note that the order of sams is now reversed):

Sȃm sam.

You can also have something like this:

Sȃm sam napravio. 'I did it by myself.'

This indicates that the first sam means (in this case) 'by myself'. The pronoun ja is dropped because it is not needed since form of the verb already indicates it is a first person.
There are some more examples where the tone of a vowel can change the meaning of the word, but they are actually very rare in (Serbo-)Croatian. To be honest, this two (and one more which I didn't write about) are the only ones I could think of right now.
Comment: Well, *be* isn't the future tense, it's the bare infinitive (as well as the imperative and subjunctive form) and the convention in English is to use the infinitive (with or without *to*) rather than the third person singular present indicative (which is what *is* is) as the citation form of a verb.
Comment: @Miztli These two pairs - yes. They are (long and short) falling in both cases. But in the language, there are actually 4 different accents: short vowel with rising tone (è, IPA: [ě]), long vowel with rising tone (é, IPA: [ěː]), short vowel with falling tone (ȅ, IPA: [ê]), long vowel with falling tone (ȇ, IPA: [êː]). Mind you, this is a pitch accent system or simple tone system, so it is not very complex. I thought of one more example which differs in tone (and length): vȉla (IPA: /ʋîla/, short falling) - villa, mansion and víla (IPA: /ʋǐːla/, long rising) - fairy.
Thx for the edit of answer)
Comment: In this case, the minimal pairs you give are actually distinguished by length not tone.
Comment: (why do people always say "verb *to be*" rather than the "verb *is*" for example? Why future tense with *to*?)

Words that only differ in tones


Does using GMAKE, no longer make it possible to license my software under BSD?

Question: If I create from scratch a software tool, but I want to use GMAKE (vs FreeBSD "make") to build my tool from source, does using GMAKE prevent me from license my tool under a BSD license since my tool is built using must use GMAKE vs FreeBSD make?
Comment: *Using the tool to compile your own application* versus *using the tool source code in your own application* are two completely different things.  The GPL is meant to cover the latter.  So long as you're not distributing any part of GMAKE itself, there is no problem using it to create your final product.
Answer: IANAL (and the GPL has no clear legal precedents on what constitutes a derived product), but you should be able to license your product however you like (at least wrt gmake), provided it's not a derived product of gmake. Unless you, for some reason, link to the gmake source code or something similar, you should be fine, and could ship both source and compiled code.
On the other hand, if you want to ship gmake bundled with your software, you must follow the distribution parts of the GPL. Afaik this includes some notes in your documentation and supplying a copy of the GPL. Any modufications you were to make to gmake would also have to be released under (I believe) the GPL.
Comment: Eroen, what do you mean **"and the GPL has no real legal precedents"**. GPL has had numerous legal precedents.
Comment: I was thinking specifically about the boundaries between derived and non-derived products (and linking). As far as I know, all legal verdicts have been pretty clear "copy everything and change stuff / don't tell anyone" cases. I should have been far more clear.
Answer: Unless you are actually using gmake as a part of the final project (as in, its source code, its documentation, or its letterhead), then it is not a derived work, and so you can license it however you want.
Think of it this way, a derived product is a product which takes a substantial portion of its parentage from the product it is derived from. Ice Weasel is derived from Firefox (clearly, as Ice Weasel is little more than a skinning). On the other hand, if a tool is used for a project, even if the very existence of the product is rooted in that tool being able to work, it is not necessarily derived — most of my work (these days) is done on a Mac, that does not mean that Apple owns my software.
A compiler is a tool, not a parent. While you may build something which depends on gmake exclusively, it would still not be derived as someone else could then come along and write gekma (an anagram for gmake) which behaves exactly the same but shares none of the code base (Linux/Unix much?), and your software would work with that too.
Now, if you were to create gmake2 which took gmake and added the ability to, say, automatically turn on the coffee machine while compiling (after all, compiling is work! You might get thirsty!), then that is derived as you are still using gmake as the basis of the project. No matter how many gekma's and kemag's are created, your source code will still include the gmake source (unless you remove it).
For more information, you can also look at derivative work in US law.
Comment: Your description of the implications from the software being a tool is misleading. It is quite possible to have a tool whose license demands (i.e.) royalties to the tool's copyright holder on the final result after the tool is applied, in which case the final product could not be freely licensed. This, however, is not an issue with GPL'd software or gmake afaik. Neither is it an (developer) issue if distribution happens before the tool is applied.
Comment: @Eroen Really? Is that legal in the US?
Comment: While I don't live in the US, MPEG does it (albeit by power of patents on methods, which are licensed).
Comment: But think of it this way, a compiled program includes a lot of code from libraries shipped with the compiler. It is (in principle) no less fair that the compiler factory recieves royalties on them than that the manufacturer of the required environment or operating system does, especially if it's all delivered as a single package.
Comment: @Eroen I think you'll have difficulty getting that interpretation to hold up with US law (which is where gmake was made).
Comment: Then take a look at the licensing of the Unreal Engine, they generally take 25% of wholesale income to the developer studio. I assume you agree libraries and compilers are in the same category. ( http://www.gamedev.net/page/resources/_/technical/apis-and-tools/unreal-development-kit-upgrade-overview-r2817 )


If A is a matrix of full rank, then will it be true for rank(AB)=rank(B) always? or does it depend on the field?

Question: Let $F$ be a field of characteristic zero. In Wikipidia, it is given that if $A\in M_{m\times n}(F)$ is a matrix of full rank, then rank(AB)=rank(B) for any matrix B in $M_{n\times p}(F)$ conformable for multiplication with A. But taking $F=\mathbb{C}$, I have counter example namely $A=\begin{pmatrix} 2 & \dfrac{1+\sqrt(3/5)i}{2} & \dfrac{1-\sqrt(3/5)i}{2}\\ 1 & 1 & 1 \end{pmatrix}$ and $B=\begin{pmatrix} 1/2 & 1\\ \dfrac{2}{1+\sqrt(3/5)i} & 1\\ \dfrac{2}{1-\sqrt(3/5)i} & 1  \end{pmatrix}$. See that rank(A)=rank(B)=2, But rank(AB)=1. Is the result not true for $F=\mathbb{C}$?
Comment: Can you add a link to the wikipedia article?
Comment: [WolframAlpha](http://www.wolframalpha.com/input/?i=%7B%7B2,+(1%2Bi*sqrt(3%2F5))%2F2,++(1-i*sqrt(3%2F5))%2F2%7D,+%7B1,+1,+1%7D%7D*%7B%7B2,+1%7D,%7B2%2F+(1%2Bi*sqrt(3%2F5)),+1%7D,%7B2%2F+(1-i*sqrt(3%2F5)),+1%7D%7D) says that your product has rank $2$. Are you certain of your calculations?
Comment: Wikipedia says that $\text{rank}(CA) = \text{rank}(A)$ if $\text{rank}(C)$ is the number of columns of $C$.
Answer: "Full rank" is a potentially confusing phrase, and it has confused you. Let $A$ be an $m \times n$ matrix, meaning $m$ rows and $n$ columns. Then

$A$ is injective if $\mathrm{rank}(A) = n$ and
$A$ is surjective if $\mathrm{rank}(A) = m$

It is true that, if $A$ is injective, then $\mathrm{rank}(AB) = \mathrm{rank(B)}$ and, if $B$ is surjective, then $\mathrm{rank}(AB) = \mathrm{rank}(A)$.
I have seen "$A$ has full rank" used by various people to mean that $A$ has rank $m$, has rank $n$ or has rank $\min(m,n)$. Your matrix $A$ has rank $2 = m = \min(m,n)$, so you might or might not want to say it has full rank. But it is not injective, so $\mathrm{rank}(AB)$ need not be $\mathrm{rank}(B)$.
The field $\mathbb{C}$ is not important; you can see the same phenomenon with $A = \left[ \begin{smallmatrix} 0 & 1 \end{smallmatrix} \right]$ and $B = \left[ \begin{smallmatrix} 1 \\ 0 \end{smallmatrix} \right]$.


Bayesian Modeling Understanding Metropolis Sampling

Question: I'm working through a book called Bayesian Analysis in Python. The book focuses heavily on the package PyMC3 but is a little vague on the theory behind it.
Say I'm looking at a model like this

My understanding is as such:
To fit the model means to find parameters for "Y~ Normal(mu,sigma)" aka to find good estimates for parameters mu and sigma.
To find each the algorithm samples (randomly) from the prior distributions (for mu that's Normal(M,S), sigma it's HalfCauchy(G))
The metropolis algorithm then decides whether or not to accept it based on (and here is where my understanding gets fuzzy) some likelihood ratio, which i am kinda taking as being the likelihood of the sampled value showing up in distribution y (aka Normal(mu,sigma).pdf(sampled_value)). This however doesn't make sense, as the probability of mu showing up in that distribution is determined by mu itself... so clearly i'm missing something.
Can someone clarify what is going on in this step?
Questions:

Am i correct in saying that the algorithm sample randomly from the prior distribution and not from the observed data itself?
How does the algorithm decide whether to accept or reject the sample?

Bonus points for specific example and/or pseudo code.
Here is the example given by the book for reference:
data = np.array([51.06, 55.12, 53.73, 50.24, 52.05, 56.40, 48.45, 52.34, 55.65, 51.49, 51.86, 63.43, 53.00, 56.09, 51.93, 52.31, 52.33, 57.48, 57.44, 55.14, 53.93, 54.62, 56.09, 68.58, 51.36, 55.47, 50.73, 51.94, 54.95, 50.39, 52.91, 51.5, 52.68, 47.72, 49.73, 51.82, 54.99, 52.84, 53.19, 54.52, 51.46, 53.73, 51.61, 49.81, 52.42, 54.3, 53.84, 53.16])
with pm.Model() as model_g:
    mu = pm.Normal('mu', mu=53, sd=2)
    sigma = pm.HalfCauchy('sigma', beta=10)
    y = pm.Normal('y', mu=mu, sd=sigma, observed=data)
    trace_g = pm.sample(1100)

Answer: If you aim at simulating from a product distribution
$$f(\theta)\propto f_1(\theta)f_2(\theta)$$
and use simulations $\theta'$ from the density proportional to $f_1$, the Metropolis-Hastings acceptance ratio reads as follows
$$\rho(\theta,\theta') = \min\left\{1, \frac{f_1(\theta')f_2(\theta')}{f_1(\theta)f_2(\theta)}\times\frac{f_1(\theta)}{f_1(\theta')} \right\}=
\min\left\{1, \frac{f_2(\theta')}{f_2(\theta)} \right\}$$
In the case $f_1$ is the prior and $f_2$ the likelihood, the acceptance probability is based on the likelihood ratio, indeed.
Comment: what are theta and theta prime in this case?
Comment: and what specifically is the likelihood function (say in the above model)


Georeferenced TIFF to Google Earth?

Question: I have aerial view images (.TIFF) which I have georeferenced using ArcMap 10.4. What I am trying to do with the images is export them with the georeferenced data attached and import them to Google Earth Pro. What would be the best way to go about this task?
Answer: This Google Earth support page explains how to achieve this. Basically you need to make sure that your imagery is on WGS 1984 projection and follow File>Import steps. You may be asked to create a Super Layer, which will be a KMZ version of your imagery.
Another option is to use Layer to KML tool in ArcGIS. You need to be careful as setting the "Output Image Properties" parameter to have a decent output, though.

Georeferenced TIFF to Google Earth?


The process cannot access the file because it is being used by another process

Question: When I start my .net console application from a bat file e.g.  start myapp.exe
myapp.exe then tries to write a file to its current directory, although I get a .net runtime error claiming that the file is in use by another application (there is nothing else running)
https://i.stack.imgur.com/XLmnR.png
Although when I launch it normally with out a batch file e.g. double click on it, it functions fine and outputs the file fine. I thought it might be something to do with privilages, although tried running the batch file as an administrator and I got the same error "File is in use..."
Could anyone shed any light on this?
Code:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;

namespace FileSearcher
{
class Program
{
    static void Main(string[] args)
    {
        string dirPath = "C:\\";
        FileSystemWatcher fileWatcher = new FileSystemWatcher(dirPath);
        fileWatcher.IncludeSubdirectories = true;
        fileWatcher.Filter = "*.exe";
        // fileWatcher.Filter = "C:\\$Recycle.Bin";
        //  fileWatcher.Changed += new FileSystemEventHandler(FileWatcher_Changed);
        fileWatcher.Created += new FileSystemEventHandler(FileWatcher_Created);
        //  fileWatcher.Deleted += new FileSystemEventHandler(FileWatcher_Deleted);
        //  fileWatcher.Renamed += new RenamedEventHandler(FileWatcher_Renamed);
        fileWatcher.EnableRaisingEvents = true;

        // updated code

        Console.ReadKey();
    }

        static void FileWatcher_Renamed(object sender, RenamedEventArgs e)
        {
            Console.WriteLine(e.OldName + " was renamed to " + e.Name);
        }

        static void FileWatcher_Deleted(object sender, FileSystemEventArgs e)

        {
            Console.WriteLine(e.Name + " was deleted");
        }

        static void FileWatcher_Created(object sender, FileSystemEventArgs e)
        {

            using (StreamWriter fileWriter = new StreamWriter("process.lst", true))
            {
                var data = true;
                fileWriter.Write("C:\\" + e.Name + Environment.NewLine);
            }

        }

        static void FileWatcher_Changed(object sender, FileSystemEventArgs e)
        {
            Console.WriteLine(e.Name + "");
        }
    }
}

Comment: Post your code which writes to file.
Comment: Have you tried using [Unlocker](http://www.filehippo.com/download_unlocker/) to determine what other process is using the file?
Answer: It looks like from your batch file that you are sending stdout (1>) to the same file (process.lst) that you are writing to within your application.  You can do one or the other, not both.
For example, this application works fine when run by itself:
static void Main(string[] args)
{
    StreamWriter writer = File.CreateText("process.lst");

    Console.WriteLine("Writing to the file.");

    writer.Write("Testing 18.104.22.168");

    Console.WriteLine("Finished.");
}

But, when run from the command line like myTestApp.exe 1> process.lst yields the same exception that you have:
The process cannot access the file 'process.lst' because it is being used by another process.
Comment: ahh thanks, so I should take out all Console.Writeline references?
Comment: No, keep them.  Just don't redirect stdout in your batch file.
Comment: Ah I see what you mean, though I am not redirecting sdout input, I am simply launching the file e.g. start program.exe
Comment: Your image shows the execution of the app being E:\... 1>process.lst.  It's 1>process.lst that needs to be removed.
Answer: Try doing your process after the OnCreated event has finished. Maybe starting a short timer and writing the file when the timer ticks (remember to stop the timer)
Comment: http://social.msdn.microsoft.com/forums/en-US/winforms/thread/43daf8b2-67ad-4938-98f7-cae3eaa5e63f/
Answer: The event that a file has been created is fired immediately, even if the file is not written yet. You should always try to open the file and wait a little bit, when you get the IOException. You can find a solution here: http://bloggingabout.net/blogs/jschreuder/archive/2006/07/06/12886.aspx


Partitioning a file for parallel download

Question: I want to make a multi-threaded downloader (in Python) and I need to tell each thread where to start and how many bytes to download. For that I get the remote file size and divide it, for example, to 2. Now, let's say that the remote file size is 5: when I divide the number to 2, I get 2 as result. Now I can start the download but I will lose a byte (because 2*2=4, not 5). I can't use float numbers because I can't download half of a byte. How I could divide that number and to get a list with [2, 3], for example?
Answer: Use divmod:
>>> divmod(5, 2)
(2, 1)
>>>

This tells you, that 5 divided by 2 is 2, remainder 1, so the last piece will be 2 + 1 = 3.
>>> divmod(12345, 6)
(2057, 3)

Here, you'll have 5 chunks at 2057 and a last slice at 2057+3.
This algorithm will also work for cases, where division is without remainder:
>>> divmod(12345, 5)
(2469, 0)

Here, you'll have 4 chunks at 2469 plus a last slice at 2469+0.
So, your chunk sizes could be computed as:
def chunk_sizes(filesize, num_chunks):
    d, r = divmod(filesize, num_chunks)
    result = [d] * num_chunks
    result[-1] += r
    return result

Answer: If you want to get the size of each chunk, you can simply add the remainder of the division to the last element:
>>> file_size = 11
>>> no_of_chunks = 3
>>> chunks = [file_size / no_of_chunks] * no_of_chunks
>>> chunks[-1] += file_size % no_of_chunks
>>> chunks
[3, 3, 5]

You can also modify that to distribute the remainder across all chunks, so that the size of the chunks deviates by at most 1:
>>> for i in range(file_size % no_of_chunks):
>>>    chunks[i] += 1
>>> chunks
[4, 4, 3]

Answer: Special case the last thread -- assign it to get however many bytes are left.


Implicit conversion: when does it hurt performance a lot?

Question: I know that when data types are the same it is good and it hurts performance when they are not.
But sometimes it seems to have very little impact and basically a waste of time to fix it. Other times it will have a huge impact and performance gets a lot better.
Of course there are many scenarios, e.g. a insert select where the data type of the select is not the same, but compatible, with the insert column. Or it could be on the join predicates.
Where does implicit conversion hurt the most?
Also it seems that one also gets an implicit conversion when the lengths don't match, e.g. joining varchar(10) with varchar(20). How big a deal is these scenarios when we are only dealing with the length of the columns and not their type?
Basically I would like to know when I should worry about the compute scalar operator in the execution plan. How can I know if removing it will have a significant impact?
Comment: It's hard to answer such a broad question.  The biggest issue, though, would be when the conversion is being done on an indexed column that then prevents the index from being used.
Comment: Implicit Conversions that cause Index Scans
https://www.sqlskills.com/blogs/jonathan/implicit-conversions-that-cause-index-scans/
Comment: How expensive are column-side Implicit Conversions
https://sqlperformance.com/2013/04/t-sql-queries/implicit-conversion-costs
Answer: As Justin implies, the when it's a problem will vary from query to query and execution plan to execution plan. There's no definitive list of scenarios that guarantee you'll experience performance issues as a result of implicit conversion.
One way to tell if a query facing implicit conversion is experiencing performance issues is to check for cardinality estimate issues, generally the two go hand-in-hand when the implicit conversion is causing performance issues. You can do so by checking the Actual Number of Rows vs the Estimated Number of Rows for each operation of the query's execution plan, and if there's a large deviation between the two (generally an order of magnitude or more), then there's cardinality estimate issues. Generally you can look for the operations involved with the thickest lines to quickly spot which operations you can start checking cardinality estimate issues for. As Justin also mentioned, generally this is when the implicit conversion is happening on one of the indexed fields, specifically in a predicate (JOIN, WHERE, or HAVING clause) of the query.
But not all implicit conversion warnings are worth a grain of salt, and if you see such a warning but your query is running optimally, then you likely no need to spend time debugging it, especially if the execution plan doesn't also have cardinality estimate issues.
Comment: Comprehensive answer, the conversion I am always looking out for is an nvarchar parameter/variable being compared to a varchar column - as this conversion is only lossless one way from varchar to nvarchar, therefore SQL will end up converting all the rows to match to a single parameter or variable
Answer: There are two main issues which cause implicit (or explicit) conversion to make a big difference to the query plan:
The main point of problems is where a join or filter predicate, or an ordering or grouping, is over a converted column. Note also that this applies equally to any function on a column used in such a context. A column which is just selected has far less impact.
This means firstly, that the compiler cannot use an index lookup to get the data, nor can it rely on the conversion output to be in the correct order for operations such as a Merge join or Stream Aggregate.
This particular point is far more insidious than some realize. With some conversions, for example int to float, the compiler understands these to be order-preserving. But conversions such as varchar to nvarchar have no such semantic.
Therefore often, when joining on say varchar and nvarchar column, it is necessary to decide which table will be the one to be seeked, and therefore often an explicit conversion is better.
The second issue is the more well-known one: no statistics. The compiler has no understanding of what the result of the conversion implies, therefore it cannot use statistics to determine estimated rowcounts and densities. This can often affect the whole plan, and often makes a bigger difference the deeper in the plan it is.

If the conversion or function is only in the select (and is not predicated in outer parts of the query), then there is far less impact, even though the same warning occurs. In this case, normally the conversion will happen just before the row is output from the query, it does not normally affect anytthe query plan.
Two cases where select can make a difference are:

Conversions to much larger types, such as the LOB max types. it is beneficial to ensure that the conversion happens as late as possible.
Very complex nested string functions, that are passed to each other via CROSS APPLY. Here, the opposite is true: do the calculation earlier, and prevent the compiler trying to nest the whole thing as one big Compute Scalar. OUTER APPLY is your friend, it seems to give an optimization-fence effect.
Answer: I always keep attention to data types for implicit conversion.
This is because maybe in the current query it is something that do not affect the performance.
But in future reviews and chages to that query, the dormant implicit conversion will rise again.
An example:
SELECT * FROM table WHERE varchar_filed = 2

In this case sql server is doing an implicit conversion of 2 to varchar. A quick scalar compute.
But anyone in a future may change this query; he can eventually replace the filter with a join, without seeing that the varchar_filed is not an int and so generating a possible issue.
my2cents


I want to replace a car dash cam battery with a capacitor

Question: My car dash cam (G1W) has a weak battery. When it dies the camera will not function at all. I have already replaced it once. The original battery was 200ma, but I found a 320ma one that would fit. It lasted about the same as the original - a year. The newer models (G1W-C) of the camera have a capacitor as original equipment, but I can't get any information from the Chinese manufacturer(s) except that it's a super capacitor. How do I calculate the necessary capacity? It only powers the camera for about 10 seconds so that it can save the recording before the camera shuts down.
Comment: Is that a rechargable battery in the camera? Or is it one which is supposed to provide, like, 500 shutdowns and then be replaced?
Answer: There are two electrical relationships that are useful for approaching this problem. First, current is the amount of charge per time (one Amp is one Coulomb per second):
$$I=\frac{Q}{t}$$
Charge is measured in Coulombs and literally represents a quantity of electrons. \$6.241x10^{18}\$ electrons, to be exact. So if you were controlling current flow through a wire and could magically see the electrons flowing by, you would achieve exactly 1 Amp when exactly \$6.241x10^{18}\$ electrons were flowing through the wire every second.
Second, capacitance is the amount of charge per volt (one Farad is one Coulomb per Volt):
$$C=\frac{Q}{V}$$
The capacity of a capacitor is measured by the amount of charge (Coulombs) it takes to change the voltage across the capacitor by 1V.
It's easy to see the relationship between the two equations:
$$Q=I*t=C*V$$
Rearranging, we get:
$$C=\frac{I*t}{V}$$
Now we have an equation that tells us the capacitance necessary to support a given current flow for a given time, given a desired change in voltage across that capacitor.
For example, let's say the capacitor was initially charged to 5V while the camera had power. Let's assume the camera can operate down to 3V, so we can afford to lose 2V during those 10 seconds. We'll also assume the camera draws a constant 100mA during that time.
$$C=\frac{I*\Delta t}{\Delta V}=\frac{100mA*10s}{2V}=0.5F$$
So you'd need a 0.5F capacitor in this example. Do not assume any of these numbers actually apply to your specific camera.
An important thing to note. In this example, I assumed a constant current flow which makes everything nice and linear. In reality, as the voltage across the capacitor drops, the camera will draw less current, which will reduce the rate at which the voltage drops, etc. To properly solve the equation, you need to form it into a differential equation. The end result is actually an exponential decay curve. That said, if the change in voltage is relatively small, performing a linear approximation as above is "good enough" for a rough estimate.
Comment: If the camera's internal power supply is a switcher, as the capacitor/battery voltage drops it will draw _more_ current, not less, to keep the device supplied as internally it will be drawing that 100mA at a set (regulated) voltage which the switcher will have to work harder and harder to keep up.
Answer: The main difference between a battery and a capacitor is that the battery maintains the voltage while it sources current, while the voltage of a capacitor will decrease linearly over time.
So, let's say your battery has 3V, and the cam would just switch off if the voltage drops below 2.5V. Also, 3.5V would be an over voltage and could damage your device (These are just random numbers, to find out the upper limit, you would need a few cams...). Further more, let's assume your cam sinks 100mA for 10s. You have to charge your capacitor to 3.5V, and after 10s delivering 100mA (Charge: Q=100mA*10s=1As), it still needs to have 2.5V. It is
$$ C=\frac{\Delta Q}{\Delta U}=\frac{1As}{1V}=1F$$
So you need a 1F capacitor, which is quite huge. Even if you find one, it has to be charged to 3.5V.
You did not say if your cam recharges the battery, but even if, it will for sure not try to charge it to 3.5V
And there is still plenty of charge in the capacitor at 2.5V.

To use a capacitor of reasonable capacitance, you would need a circuit which charges the cap to a high voltage like 12V from the car and then a voltage converter to 3V. There are voltage converters on the marked which give you 3V from lets say 0.8V to 12V with >80% efficiency. (Yes, they also boost a lower voltage to a higher.)
As you can see, it's not just plug-and-play. It now depends on how much effort you want to put into it.
Another way is to use the un-switched (i.e. always-on) 12V from your car, regulate it to 3V, and put this into your cam. But make sure you do not drain the battery and also use fuses, as there's a lot of power behind the 12V in a car.
(Again: The numbers were just exemplary, I have no idea what the real numbers are. I also doubt that 100mA could be a far to low guess.)
Comment: "maintains the voltage while it sources current" I would love to have such a battery, mine always drop voltage when I attach a load, and open circuit voltage gets lower all the time too after use.
Comment: Of course. But looking at a cap, this still is somewhat constant, eh?
Comment: The curves have different shapes, and due to usually having lower power density than batteries, same sized caps deplete much faster, but for the total amount of stored energy there is a surprisingly large overlap between batteries and capacitors these days.
Comment: +1 for suggesting a 12V-to-3V DC converter; you can find those remarkably cheaply online ([random example](http://amzn.com/B00F439F3Q)), or probably in your local auto supply store.
Answer: What kind of measuring equipment do you have ?
Have you tried to create a charging circuit of your own , supplying enough power (amps !) bypassing the original circuit ?
Not being specific, but it seems to me, that the charging circuit of the battery (capacitor ?) was not well dimensioned from the start. Or is this a "new / modern" way of emptying your pockets ?
Any short circuits ? ( I don't think so, but I just have to ask ).
Kris Norway
Comment: Kris, this answer is better suited as a comment. It would be better to remove your answer and re-post it as comments to the question above.
Answer: This is a 2.5F Supercapacitor assembly, that is good for up to 5.4V, which is typically used as a direct replacement for internal prismatic lithium ion polymer cells:
http://www.amazon.com/Mobius-Action-Camera-Super-Capacitor/dp/B00JG7CRYU
The unit is quite small, and will fit into a variety of dash cam units (not just the Mobius), and can be parallelled with additional units to increase the overall C.  The major advantage gained, here, is that the Supercapacitor arrays will better withstand the typical high temps developed in a vehicle, during the Summertime months, than do the lithium ion polymer cells that you're having short service life issues with (LiPo cells hate heat).
Now, to give you an idea of the successful implementation of this particular supercapacitor, the Mobius utilizes a LiPo cell of 820mA/h capacity, with a nominal terminal voltage of 3.7V (full charge terminal voltage is 4.2V).  The above indicated supercapacitor assembly, having a capacitance of 2.5F, is sufficient to soft power down the Mobius unit, allowing it to close the video file current at the time of power down, preserving the recording successfully, while maintaining sufficient charge to maintain the internal clock function and parameter settings for several days.
I believe that you will find this to be a satisfactory solution for your needs, in this instance.


Why does Higgs field have 4 components and written in a doublet?

Question: I'm studying the Higgs field and I encountered some problems. My book says that the Higgs field has four components which are conveniently arranged into a two-component vector as:
$$\phi=\binom{\phi^{+}}{\phi^{0}}=\frac{1}{\sqrt{2}} \binom{\phi_{3}+i\phi_{4}}{\phi_{1}+i\phi_{2}}$$
My question is that why does Higgs field have 4 components? If it has 4 components, why don't we just write it like:
$$\phi=\begin{pmatrix}
\phi_{3}\\
\phi_{4}\\
\phi_{1}\\
\phi_{2}
\end{pmatrix}$$
A more genral problem I've been having is that how do I know if something can be written in a multiplet and what kind of multiplet should I use to represent a state?
Comment: I answer the exact same questions here: http://physics.stackexchange.com/a/267503/84488
Answer: To encapsulate the SU(2) properties of the Higgs field, it is convenient to choose a 2D representation, since the fundamental representation of SU(2) is of that dimension. This is how you get the complex 2-component vector, which means we have two independent complex fields. This is 4 independent real fields.
In your suggestion of a 4-component vector it would be harder to write down matrices for SU(2) transformations.
Comment: @Daniel a field can't be invariant under SU(2). A Lagrangian can. And SU(2) is one of the fundamental symmetries we *observe* in nature, particularly when considering the weak force (W+, W- bosons). Their Lagrangians are invariant under SU(2) transformations.
Comment: So how do I know that the Higgs field is invariant under $SU(2)$?
Answer: If you were to read Frank Close's amazing history, THE INFINITY PUZZLE, it  details the torturous discovery of the Higgs, (et al.) mechanism. So, why does the Higgs field have 4 components?  Why are they arranged in a 2x2 matrix?  I think because it allowed physicists to prove that the electroweak theory is mathematically consistent; to show why the W & Z have a mass; and to show why the Higgs Boson exists at all.  The point is, we observe nature, but at first we don't understand it.  Then, Physicists work like crazy to "figure it out".  A theory that explains observations also predicts something crazy no one has every seen...like the Higgs Boson.  Group theory was a big idea, and ultimately, SU(2) solved the problem of the weak interaction. But it was certainly LESS than obvious to even the greatest minds. There's a good reason it's hard to understand--you're asking a question that the legendary Richard Feynman grasped but couldn't answer!  This was not a problem for some Eisenstein working in solitude. Many physicists labored many years and went down many theoretical dead-ends. My recollection is that it took (among many others) Nambu, Gell-Mann, Yang, Mills, Schwinger, Anderson, Brout, Englert, Guralnik, Hagen, Higgs, Kibble, Glashow, Salam (dubious), Weinberg, Ward (unsung hero) and a grand finale by 't Hooft, to understand Gauge Invariance, the Higgs field, spontaneous symmetry breaking, the weak interaction and its renormalization.  Jeffry Goldstone threw a monkey wrench into the process of understanding with his theorem that predicted unobserved (and unwanted) Goldstone Bosons implied by theories of electroweak spontaneous symmetry breaking.  But after much consternation, it turned out that Goldstone Bosons observable in the breaking of global symmetries, are NOT directly observed in the spontaneous breaking of LOCAL gauge symmetries.  In the weak interactions, the Goldstone Bosons combine with mass-less gauge bosons (the W and Z) to create a zero-momentum minimum energy--that is "mass".  This effectively HIDES the Yang-Mills gauge invariance we would expect to observe if the Higgs 4-component field did not exist.   Much pain & suffering was required to give birth to the concept of the 4-component Higgs Field!  But before that, infinite probabilities cropped up when earlier physicists, like Feynman, tried to introduce a mass term by hand into the normally mass-less Yang-Mills theory (which had so beautifully described the local U(1) symmetry  of the electromagnetic field).  In summary, a 4-component 2x2 complex-valued matrix is used to represent the Higgs Field because...it works:  3 components lend a minimum energy to 3 bosons, and the 4 component is observable by itself as the Higgs Boson.


Face warp application

Question: I want to create a "face warp" application, like the one for mobile phones but for a pc desktop application instead. I have search the net for a library that does that but found none.
I want to create images like this one: http://moblog.net/view/178542/sony-ericsson-k800i-camera-phone-review-face-warp-2
Does anyone know if there is an existing library that does this, preferably in c#?
Or any image processing lib that is possible to use?
Regards Anders
Answer: Emgu CV may greatly help you. AFAIR, it supports face detections and some transformations.

Face warp application


Joomla Change Modules in Sidebar on diffrent Pages

Question:
I'm using Joomla 2.5.7 and want to ask, how I can change a bunch of modules in sidebar, when I change to another Page. An example to clarify my question:
I have 3 Links at the navigation bar:
Events
Shop
Blog
and a Homepage as index.html (logical).
Now, I want display in Events the modules "Where to go" and "About Location" in the sidebar.
In Shop I want to display the modules "About Dealer", "Shipping" and "Images" in the sidebar without the modules "Where to go" and "About location".
In Blog I want to display the module "About Author" in sidebar without the modules above (Where to go, about location...).
So, I know I can do this (or similar):
<?php if ($this->countModules('sidebar-a and sidebar-b and sidebar-c')): ?>
<jdoc:include type="modules" name="sidebar-a"   />
<jdoc:include type="modules" name="sidebar-b"   />
<jdoc:include type="modules" name="sidebar-c"   />
<?php endif; ?>
SIDEBAR-A: "Where to go" and "About Location"
SIDEBAR-B: "About Dealer", "Shipping" and "Images"
SIDEBAR-C: "About Author"
But that is not my plan!
I want just the position "sidebar-a" and that the modules getting hidden (like in countModules) if they are not for this page.
I see this method on the granty framework:
<?php /** Begin Main Body **/ ?>
<?php echo $gantry->displayMainbody
'mainbody','sidebar','standard','standard','standard','standard','standard'); ?>
<?php /** End Main Body **/ ?>
You see just simple code, but with other variables.
So very easy in the index.html but this won't work If I do copy and paste ;)(logical)
I don't know how to do it. I do not prefer to get this framework, just for this single sidebar. But there must be a way like this granty framework, but I can't understand the code very well...I'm just an amateur on php. I guess there must be a JavaScript file, which hide and display this diffrent modules.
You can see a live demo here of the single sidebar with lots of modules, which getting hidden and displayed on each page: http://app.ohanah.com/demo-v2/rt/index.php
Have someone an idea how to run this sidebar?
Thanks for reading and helping!
Comment: I don't understand you can do this through Joomla!'s administration interface without coding...
Comment: What about using an extension like Advanced Module Manager ?
Comment: Thank you for solve my problem.
Never thought that this can be easy done with just simple 'clicking'.
Answer: In the Joomla backend, go to the Module Manager, open the module you want to change, and in the bottom left, you can assign the module to specific pages. This should be what you're looking for and it will save you having to hard code it.
Answer: You can , for better handling, use the Module Everywhere extension , look for it in JED.
It helps you a lot assigning modules not only to menulinks, but even to articles.


How long is the first sync supposed to last?

Question: I've been running Geth (latest version) for around 12 hours and it's still not finished.
The command prompt shows this :
INFO [05-21|12:05:00] Imported new chain segment               blocks=1  txs=9   mgas=0.748 elapsed=40.047ms   mgasps=18.687 number=3742904 hash=f8fd6e…fce9f8

INFO [05-21|12:05:29] Imported new chain segment               blocks=1  txs=2   mgas=0.044 elapsed=16.018ms   mgasps=2.741  number=3742905 hash=04b0be…3d64cd

INFO [05-21|12:05:38] Imported new chain segment               blocks=1  txs=66  mgas=2.851 elapsed=95.126ms   mgasps=29.971 number=3742906 hash=157014…c50cc5

By the way, my Internet speed isn't that bad, check it out

Is this normal ? Should I try using another client such as Parity ?
PS : I've run Geth using this command line : geth --fast --cache=1024
Comment: Last time I tried it took 2-3 days.
Comment: Then you are done. Check against etherscan.io
Comment: Do you know which number I'm supposed to reach ?
Right now I'm at "number=3743185"
Comment: Another day, I executed the synchronization with the command `geth attach` that dont work out today.  So, I tried `geth --fast --cache=1024` and this is working.
Comment: For your information, at this moment (2018-11-29), I tried `--syncmode=full --gcmode=archive`. After about 18 hours I reached block 2702327. The highest block is 6799556.
Answer: Do following steps to check the sync state:
1.) open a new geth instance and type in geth attach
2.) now type in eth.syncing
This shows you the "currentBlock" and the "highestBlock".
Comment: They should be close to each other. In other words, run `100 * eth.syncing.currentBlock / eth.syncing.highestBlock` to get the percent completed. When it is close to 100, you are synced.
Comment: Fun fact: `geth attach` is actually a complete JavaScript environment! If you're looking to repeatedly print out the percentage on a timed loop, you can simply run `(function percentage() { console.log(100* eth.syncing.currentBlock / eth.syncing.highestBlock); setTimeout(percentage, 10000); } ());`
Comment: What does that even mean? Should they be the same, or near each other?
Comment: If eth.syncing is false, it's already sync and you can check `eth.blockNumber` against a block explorer if you want to double-check. [Source](https://ethereum.stackexchange.com/q/6525/23349)
Comment: So it should be CLOSE or EXACT the same number of block? It's crucial

Because I'm 99.99335% synced and I'm wating for hour still on the same block. I wonder am I synced or not yet.
Answer: I think you should edit the question to ask, "How do I know when geth is done syncing?"
The question you asked was vague, but I believe this is the answer you were after:
Geth will continue running forever. Once it is "done", it will just sit there and wait for the next block. The "numbers" you refer to are block numbers, and they shall increment for all of eternity. Once your current block reaches the highest block, you are all synced up. As mentioned by 5chdn, the highest block  can be determined by checking someplace such as etherscan.io.
I let Geth run for hours thinking that I was waiting for it to "finish" when in fact it had been done for a long time.  As of this writing, the highest block is 3854270
Thanks to 5chdn's comment which was really the key to the answer.
Comment: So do we just stop it once it's in sync? Wouldn't that put it out of sync because it wouldn't have the latest blocks?
Comment: It will be in sync until the next block is released. You can stop it, but yes that means that you will fall out of sync eventually. If you want to always stay up-to-date, then you can leave it running. The point being, the app is never "done", per se. But it does come to a point where it is all "caught up", for the time-being.
Answer: Assuming you are using a Linux flavoured OS, you can check the sync status as well (run this as the user under which geth is running):
$ geth --exec eth.syncing.currentBlock attach
3991639

If it's not syncing, it will only display 'false'.
Or, if you want to get a little more fancy and see how many blocks / second are syncing, here is an idea:
A=$(geth --exec eth.syncing.currentBlock attach)
while true; do
  echo "Currently at block ${A}"
  sleep 1
  B=$(geth --exec eth.syncing.currentBlock attach);
  echo "Reached block ${B}"
  echo "$B-$A"|bc; A=$B
done

Answer: If you start geth with "--verbosity 5", it will print out a bunch of debug info. It won't speed things up, but it will let you know that geth is not hung.
I think what people do is run geth. It starts churning on something. They wait and wait. And then they kill geth because it appears hung. If you do that, geth will just have to start that long process over again taking it even that much longer to sync.
Verbosity 5 lets you have the patience to let it run until it finishes because you can see that it's not hung.
Comment: Well the numbers keep increasing, right now I'm at "number=3744194". So I don't think it's stuck. Thanks tho, I'll remember that option next time I launch geth :)
Comment: verbosity level 5 will significantly slow down your import process. do not change it, just check the import status with javascript console
Comment: You can turn verbosity on and off. I'm suggesting you turn it on during the DDos attack so you know that the node is not hung. If you constantly kill the node because you think it's hung, it's going to restart on the same transaction that it was processing previously and take that much longer.
Answer: INFO [05-22|08:14:16] Imported new chain segment               blocks=1   txs=2    mgas=0.067  elapsed=11.000ms  mgasps=6.104   number=3745188 hash=9b8973…920c7e

Has been running for about 32 hours. Ran Geth with geth --rpc --fast -cache=1024
Ethereum folder size: 17.9Gb
Comment: Note, fast is deprecated and also now default. `--syncmode` is the new switch for sync behavior.
Comment: Thanks! I'll remember that. And I also noticed that I had -cache instead of --cache. Restarted the sync last night and up to number=3753194.. Alot better.
Comment: I could be wrong here, but I believe my blockchain is up to date and I didn't realize until I compared where my geth client was at compared to the network status for Eth.
So I'm up to here:
INFO [05-29|23:07:27] Imported new chain segment               blocks=1   txs=8    mgas=0.168   elapsed=19.999ms  mgasps=8.400   number=3786778

And checking https://ethstats.net/ I can see I have the latest and am even one block ahead.
So I'm basically ready to start mining now. I believe I was actually up to date a few days ago but didn't know being new.
Answer: I personally prefer using Parity because of the snapshot feature they have. Using a GCE cloud instance I was able to sync the full chain in 30 minutes.
Here is an explanation of how it works :
https://github.com/paritytech/parity/wiki/Warp-Sync-Snapshot-Format


Celery - What pool should I use for windows heavy cpu process and redis backend for status tracking?

Question: I am running python 3.9, Windows 10, celery 4.3, redis as the backend, and aws sqs as the broker (I wasn't intending on using the backend, but it became more and more apparent to me that due to the library's restrictions on windows that'd I'd be better off using it if I could get it to work, otherwise I would've just used redis as the broker and backend).
To give you some context, I have a webpage that a user interacts with to allow them to do a resource intensive task. If the user has a task running and decides to resend the task, I need it to kill the task, and use the new information sent by the user to create the new task.
The problem for me arrives after this line of thinking:
<code>Me: "Hmmm, the prefork pool is used for heavy cpu background tasks... I want to use that..."
Me: Goes and configures settings.py,
  updates the celery library,
  sets the environment variable to allow windows to run prefork pool -
    os.environ.setdefault('FORKED_BY_MULTIPROCESSING', '1'),
  sets a few other configuration settings, etc,
  runs the worker and it works.
Me: "Hey, hey. It works... Oh, I still can't revoke a task DESPITE RUNNING THE PREFORK POOL!?!?!
Oh, that's okay... I can just set a session variable to let me know if the user already started a task,
and if they have, just have celery tell me if the task that they started is finished
before I allow the user to request to run a task again."

Me: Goes and configures django sessions,
configures redis,
updates the views to include the session variable, etc,

Me: "Great! Everything is working, so far..."

Me: Runs a test to see if the redis server returns the status...
Celery: "PENDING"
Me: "Yo! Is my task done, yet!?"
Celery: "No - PENDING"
Celery: "PENDING"
Celery: "PENDING"
Celery: "PENDING"
Celery: "PENDING"
Celery: "PENDING"

Me: Searches stackoverflow for why its only pending...
Me: Finds out that you must use --pool=solo for the worker...
Me: Dies on the inside.
</code>
Ideally - I'd like to be able to use the prefork pool to do intense processing and to kill the task if need be. The thing is that everything that I read tells me prefork is what I want, but solo is the only way I can think of to get it to work.
Questions:
How bad is it for me to compromise these desires and just go with solo, expecting that I will be using heavy cpu for the tasks and many users? Assume 100s if not 1000s at once submitting tasks.
What other solutions should I consider?
Answer: In my experience on windows I cannot use anything other than --pool=solo
What other solutions should I consider?
The way I do it is I use 1 pool for windows development and more on production (linux) at least in my case using solo pool for development is fine.
Comment: So you wouldn't know how glorious prefork is compared to solo... I think I'm going to give dramatiq a try... https://dramatiq.io/motivation.html ... Thanks for the response!


What norse mythology books do you recommend for young children?

Question: My children have norse names due to my and my partner's interest in norse mythology. My oldest child (6) is becoming more and more interested in the origins of his name and about Odin, specifically. Are there any books that would be age appropriate to help him better understand the history here.
Answer: I found D'Aulaires' Book of Norse Myths quite effective at that age.
Answer: "The Magnus Chase and the Gods of Asgard" from Rick Riordan.

"
Magnus Chase has always been a troubled kid. Since his mother's mysterious death, he's lived alone on the streets of Boston, surviving by his wits, keeping one step ahead of the police and the truant officers.
One day, he's tracked down by an uncle he barely knows - a man his mother claimed was dangerous. Uncle Randolph tells him an impossible secret: Magnus is the son of a Norse god.
The Viking myths are true. The gods of Asgard are preparing for war. Trolls, giants and worse monsters are stirring for doomsday. To prevent Ragnarok, Magnus must search the Nine Worlds for a weapon that has been lost for thousands of years.
When an attack by fire giants forces him to choose between his own safety and the lives of hundreds of innocents, Magnus makes a fatal decision.
Sometimes, the only way to start a new life is to die...
"
The author is an ex mythology teacher, he also wrote Percy Jackson.


What should I do if the residuals of my ARIMA models are not normal?

Question: My data is about the number of earthquakes with magnitude greater than or equal to 7 that have occurred from 1912-2013. The Jarque-Bera test shows that the residuals of arima models are not equal. What should I do? I am using E-views to analyze my data. Below is the descriptive stat of ARI(4,1)
Answer: From my perspective you have already picked data that tends to be not normal as you are focussing on somewhat extreme cases. How do the residuals look if you include the number of earthquakes of all magnitudes?
Additionally you could think about control variables that capture some of the structure in the residuals.
Another thing I would recommend you to do would be a closer analysis in which way the resdiuals deviate from normal. Are the skew? Do they have heavy tails? You can make a time-series plot of your residuals in order to see, whether there is a general structure in your data that your model does not cover. You can create a qqplot in order to look for heavy tails and you can plot a kernel density estimate of your residuals against a normal distribution with $\mu=0$ and $\sigma^2$ equal to the variance of your residuals in order to get some general impression how your residuals deviate.
I you can't get rid of the non-normality of the residuals you still can interpret the parameters but you should be very carefull with making inference and interpreting the p-values.
Comment: Thank you for your answer! I've read that one of the important elements of model diagnostic is to make sure that the residuals of the candidate model are random and normally distributed. So what will be the effect of non-normality in interpreting the results?
Comment: The main consequence for your analysis is that you cannot trust the p-values and the test-statistics since they are build on the assumption of normality. The data looks somewhat bimodal. Have you already looked at the outlier(s) that have the value  greater than 3?
Comment: I suppose seismometers have become more sentitive since 1912 so including earthquakes of all magnitudes probably do not make sense.  There is no reason to expect a normal distribution in this case, so maybe try a glm ...


Can melting ice be done stylishly or done with Command Blocks?

Question: I am making a small river in a snowy biome (Extreme Hills to be precise) and it has been freezing often. I put glowstone underneath to melt it, but it still has been freezing. This is not for a farm, but for decoration. Do I have to change the biome somehow?
Comment: If it's within your know-how (as one of the answers states) change the biome with MCEdit or Worldedit would be much easier.

You only need to change the biome for the river, the surrounding blocks can be left alone probably.
Answer: Well, you have a couple options..
Option 1
Change the biome, using a tool like MCedit. Any biome that isn't "cold" or "mountainous" will melt ice.
The "Mountain+" or "Hills+" biomes only melt ice above a specific y+ level, which leads us to the second Option, if needed.
Option 2
Lower the river's elevation. In "Extreme Hills", snow forms and water freezes at and above y+92. If your river is below this, no more ice forms!
Option 3
Use /gamerule. /Gamerule randomTickSpeed 0 will prevent ice from forming.
However, because of the effects of randomTickSpeed, the result will additionally affect other things. If this gamerule is set to 0, leaves will not decay, crops won't grow, grass won't spread and more.
Option 4
Use a Plugin, like Worldguard to disable water freezing in a certain area.
Option 5
High-intensity Light should prevent ice from forming.
Any block of water with light source of more than 11 will not form ice, but this is hard to do underwater because water decreases light-spread twice as fast as air.
Example: light travelling one block in air goes from 15-14, but in water it goes 15-13.
If your river is more than a few blocks wide and you don't want to put lights nearly every other block permanently underneath it, this may not work for you.
Option 6
Finally, you could just have a repeating command block that constantly does a fill command replacing ice with water. fill X Y Z X2 Y2 Z2 minecraft:water -1 replace minecraft:ice.


How can I access the name of the current route in meteor when using meteor-router?

Question: I'm building an app using meteor and meteor router, and I would like to make a template helper for checking if the route is a specific one ({{#ifRouteIs login}}{{/ifRouteIs}}).
Comment: Note that as of 2015, meteor-router has been deprecated in favour of iron-router, and other routers exist too (react-router, flow-router).
Answer: According to meteor-router's README, you can get the current page with Meteor.Router.page(), so the helper might look like this:
Handlebars.registerHelper('ifRouteIs', function (routeName) {
  return Meteor.Router.page() === routeName;
});

Answer: I had the same issue. Building on your answer, I found a working solution. It needs to go in the client side of Meteor.
Handlebars.registerHelper('ifRouteIs', function (routeName, options) {
  if (Meteor.Router.page() === routeName) {
    return options.fn(this);
  }
  return options.inverse(this);
});


Do I need pre-stain?

Question: I posted a question a couple months ago trying to understand the staining/finishing methods for a butchers block that I will be using as a desktop for my standing desk. I ended up buying BEHR Water-Based Stain & Poly in One - Bombay Mahogany | Gloss B6354. After reading the instructions on the back, it calls for pre-stain. I've never heard of someone pre-staining something. I thought that was what staining and finishes were for? Is it necessary that I pre-stain? What is the purpose of pre-stain?
Answer: Prestain helps the wood to more evenly absorb the color of your finish stain.  It is important on wood that has very open grain that would become very dark quickly.
On many wood types for even and consistent absorption of water based stain it is a vital step.   You could test how the butcher block takes the stain on the backside of your tops to see if you are satisfied with the color saturation.
This behr pre-Stain wood conditioner is recommended
Comment: The product does not need to be clear coated. You may be able to brush additional clear coats on for more durability and slicker finish
Comment: Excellent. I appreciate the advice. I know this isn't exactly relevent to the question, but because I have "gloss" in my BEHR stain, do I need to apply a clear finish coat? I'd like for the shine to be present and have that nice smooth finish.

Do I need pre-stain?


How do I get my cash back into dollars in Nicaraua?

Question: Suppose I sell my house and get a pile of cash. The USA government wants to get some or all of my money if I try to move it to another country. That's not fair. It's mine and I already worked for it and paid income tax on it. I want ALL of my home money. Can I put it into bitcoin in the USA and visit Nicaragua and get my money out a bit at a time, as needed, there?
Comment: Is there a way? Probably. Is there a legal way? Doubt it. P.S. don't add signatures in your post.
Answer: Bitcoin has no concept of borders.
There are many trades in which the buyer doesn't know the seller and vice-versa (or both, like in a dead drop where neither knows anything about the other).
So it is entirely plausible to cash out bitcoins in a foreign country without any other parties other than you and the seller knowing about the transaction.
Your example describes where you have a "pile of cash".  It doesn't matter if the cash is from the proceeds after selling a house or whatever, those funds can be converted to bitcoins in any number of ways.
So yes, bitcoin is like cash, and can be traded for cash.  Where it differs from cash is that it can be transported across borders physically, electronically, or in no form other than words you keep in your brain.
Because bitcoin transactions are traceable, those preferring to transact privately can employ method called "mixing".  This gives bitcoin user-defined anonymity.