How can I trigger scripts (lock screen) when leaving a specific WiFi on OSX?

Question: I dimly remember hearing about an OSX application that let you, for example, enable password lock when leaving the current WiFi, but I can't find it anymore. Does anyone know how it's called? Thanks!
Comment: Long shot...[MarcoPolo](http://www.symonds.id.au/marcopolo/), or its "successor" [ControlPlane](http://www.controlplaneapp.com/feature-list/)?
Answer: I believe that you're actually looking for a setting in OS X:
System Preferences → Network → Advanced
Comment: Not exactly… this setting only prompts you with a password dialog when changing networks. What I'm actually looking for is a way to require a password to login only on the go while granting free access at home. Sorry for not being clear enough.
Answer: I'd be surprised if this exists.
Typically when you walk out of/into a wifi network's range your mac will be turned off, which means nothing can run while you're crossing the boundary. Unlike iOS, there is no API on OS X for running code when you enter/exit a specific location even while the device is turned off. This is a feature that needs hardware support, and Macs don't have it.
Scripts executed by utilities like ControlPlane will not run until after you actually wake your mac up again, and by then it's too late to change the wake-from-sleep behaviour.
It might be possible with some deep hacks into the system, but I'd be surprised.
Comment: Yeah, you're right.
Answer: I have a feeling you may be thinking of Sidekick.app
http://oomphalot.com/sidekick/
Answer: Months later, but I came across this post so thought I'd share my findings. ControlPlane is a free alternative to Sidekick, and does exactly what you're asking. By default, you can have your screensaver password enabled, and disable only when meeting certain criteria, such as joining a particular wifi network, identified by SSID or BSSID.


Persistent flag from LocalBridge.exe program

Question: I am getting a persistent flag from a program in the path Microsoft.MicrosoftOfficeHub.../LocalBridge.exe .  The gist of the flag is "... incorrect parameter ..." but there is no evidence of any other software malfunction.  What should I do to stop the flag from occurring?  Would it cause a system problem if I delete the LocalBridge program?
Comment: What are you doing when you get that? Where do you see it? When it is doing what exactly? PLease clarify what you are asking with more detail and be more clear.
Comment: You can remove the app using `Get-AppxPackage Microsoft.MicrosoftOfficeHub | Remove-AppxPackage` in PowerShell.
Answer: The error flag was associated with MS Office 365 apps.  I corrected the problem by booting in safe mode and repairing the Office app.  The flag has not occurred since.
Comment: ditto. I was unable to achieve any meaningful operation Safe Mode (??) but still did the MS Office online repair and the error has not returned
Comment: there was a duplicate Microsoft Office entry in the Settings | Apps list that was removed without incident. that may have contributed to the solution (along with the online Office repair) but it's unclear
Answer: I ran across a computer that was receiving an error (Windows 10, 1809)
The customer had local admin and had installed updates manually through Windows 10 and had been upgraded to 1809 (most of our machines are on 1803 at this time)
<code>"c:\Program Files\windowsapps\Microsoft.MicrosoftOfficeHub_18.1910.1283.0_x64__8wekyb3d8bbwe"
"C:\program files\WindowsApps\Microsoft.MicrosoftHub_18.1910.1283.0_x64..\" "The Parameter is Incorrect"
</code>
Repairing and reinstalling Office 365 (click to run) did not help.
My customer had installed Office applications through the Microsoft store and had Office 365 (2016 ver 1902) through SCCM.
I was able to resolve the error by removing the office apps from the Microsoft Store.


Is there any *objective* genre-like categorization of musical works?

Question: I'm looking for objective criteria for classifying musical works.
Formal metadata (like artist, title, length, publication date, language etc.) doesn't help in saying something about the actual kind of music; categorization in genres can help, but I guess they are typically subjective.
Is there some genre-like categorization that is not subjective?
No matter if computers (via audio analysis) or humans do the work, the important point is that

there can be no discussion if or if not a musical works belongs to one or several of the categories, and
each category is "useful" to a human, for learning something about the music, for finding similar works, etc.

Use case: Think of a huge database of musical works which should contain only verifiable metadata. Formal metadata is great, but it doesn't help for grouping/finding similar works. Genres don't work because they often lead to discussions.
Comment: Nothing is going to be purely objective and discussion free for the simple fact that sound creation is not an injective function and, even if it were, we cannot create perfect recordings.  Can you attempt to categorize music based on, say, tempo (one of the most easily analyzed aspects)?  Yes.  Will any human or computer algorithm for detecting tempo be perfectly accurate and exactly the same as every other algorithm?  No.
Comment: @MatthewRead 1) You were speaking about measurement error exclusively on that comment. 2) It's not impossible, it is already being done at some degree, and as DSP evolves more and more things are becoming possible. 3) Even if it was impossible for a computer, it would be possible for a human, based on a set of very well defined and standardized definitions, to group music based on those shared characteristics.
Comment: @MatthewRead But that potential of error in measurement is found in exact sciences too, and has nothing to do with the objectiveness of the definitions.
Comment: @JCPedroza OP *specified* "no discussion" which means no error.  Besides though, I'm not just talking about measurement error.  It's impossible to decompose a combined waveform into its constituent parts without knowing exactly what those constituent parts are.
Comment: @MatthewRead That comment seems to be very close to a good *answer*
Answer: there's no objective categorisation possible with genres anything like the ones we have now. What genre a song is is a matter for judgement, not measurement, and there's no central authority to arbitrate on the matter.
A few reasons why it's difficult to label songs accurately by the genres we know and love:
Genre labels are usually behind the times. In most cases, the first instances of songs that retrospectively come to be regarded as part of a genre weren't described as such at the time of their release, as the genre name hadn't been coined yet. And usually, early songs are not archetypal examples of a genre, but crossover works showing some elements of extant genres, and some novel elements.
Genre labels get re-defined. Look at what r 'n' b means now, compared to 50 years ago.
Genre labels are hierarchical - some genres are definitely subsets of others; yet others arguably so (and people will argue - look at the talk page on any Wikipedia page about a genre). This gives yet another dimension for disagreement.
...and yet they are not truly hierarchical either, because some overlap without one being a subset of the other (maybe 'Punk' and 'New Wave', for example)
Genre labels describe completely different dimensions of musicology. Looking at https://en.wikipedia.org/wiki/List_of_popular_music_genres...

some relate where the music is from ("K-pop");
Some are descriptions of the techniques used ("Dub") and the technology ("Electronica");
some have cultural references ("Christian country music");
Some relate to how seriously the music is intended to be taken ("Novelty music");
Some are named after record labels ("2 Tone", "Motown").
Some relate to how the music is listened to ("Dancehall").
...etc.

So not every word that is a the name of a music genre is even talking about the same quality of the music - or even talking about a quality of music at all.
Comment: But what you describe are flaws with the definitions of the genres, and not a counter-argument for objective categorization. You might not be able to use those definitions to objectively categorize, but you can still build your own definitions based on objective criteria, and categorize music through them.
Comment: I don't know if not one genre in the history of music has been defined objectively (as you claim), but even if that was the case nothing is stoping you from objectively defining one. Genre and subjectiveness are not inherently tied, and subjectivity is not a requirement for a genre definition.
Comment: You could objectively measure a great many characteristics of musical pieces, and place each piece at a point (or perhaps covering a range) on the spectrum of each characteristic. If you could somehow create some kind of broad agreement on what characteristics to measure, then you might be able to define some spaces within that n-dimensional matrix, and maybe agree on some labels. So yes, I agree that you could categorise music objectively. But not a single 'genre' we have is objective like that; so objective categorisation would have to be very different to *genre-like* categorisation.
Comment: Actually the label-based ones like 'motown' could be close to being objective, though people would still lump in similar music. @JCPedroza I do totally agree with you that objective categorisation is possible, so it's purely a question of how we're interpreting the word 'genre-like' and how we're weighting that word's importance in the question. Not really a substantive disagreement..?
Comment: I've softened the language a bit to make it clearer what I mean - hopefully!
Comment: Yeah it pretty much comes down to our interpretation of "genre-like". We essentially agree in both interpretations.
Comment: @JCPedroza `nothing is stoping you from objectively defining [a genre label]`. BTW I think that's the minor point where we differ in our interpretation - I'm considering an essential characteristic of a 'genre' label to be that it's commonly understood by music fans, so if I arbitrarily define my own classification label, it's still not a *genre* as such. A minor point and if 'genre-like' was not in the question title, my answer would be very much like yours.
Answer: As MatthewRead already mentioned a bit, music is art and art is the product of a free and creative human spirit. This can not fully be categorized or reduced to a few groups of genres.
We humans are able to create that much more different styles, that it is just impossible to find objective rules.
You can maybe distinguish a classical song from a rap, but even between those entirely different genres, there exist cross-over songs. You can mix everything and create a new genre out of it. All our modern western (pop, rock, disco, electro, jazz, rap, reggae) music is derived from the Blues (which has its roots in the spirituals and worksongs of the African slaves in North America in the 19th century) anyway, so they ARE very similar.
Answer: Yes, you can categorize music objectively based on objective characteristics and patterns of a song. Two songs that share something can be grouped together.
Objective characteristics and patterns of a song include the tempo, rhythm, key, progression, instrumentation, timbre, harmony, melody, among others. If a genre has an objective definition, you can objectively determine wether a song belongs to it.
One problem is that genres are not always defined objectively, there's often a lot of subjectivity going on. Here there are no definitive answers, no one is necessarily wrong or right. But that doesn't mean that you can't categorize music, it just means that some definitions are not very useful, that you have to change or ignore them.
So, if you want to implement an objective categorization, you'll have to find purely objective genre definitions and/or build your own. It can be done.
Comment: @ByteCommander But that doesn't mean that it's impossible to objectively categorize music. It might be not possible to do through some specific definitions, like your Pop example, but nothing is stoping us from implementing an objective categorization (maybe a different one, maybe one based on subjectively-defined genres). You don't have to use Pop as a genre definition, you can change it, you can ignore it: you can build a catalog of objectively defined patterns.
Comment: I don't think it is possible to create good objective categories. Two songs with equal speed, instrumentation etc can still sound completely different. For example they can induce entirely different emotions (aggressive, relaxed, happy, sad) for different listeners too, so that _important_ attribute would also not be a good objective pattern. You can categorize music in defined and measurable categories, but in my opinion, they will not tell you much on how people will react on the song.
Comment: Music transports emotion. This is a fact! There are sad songs, happy songs, scary songs, aggressive songs, ... Whether a song is happy or sad is much more important for the listener than the speed or rhythm.
Comment: But genres are mixing, developing and newly forming. Most songs can't be just assigned to a specific genre, as they cross-over many genres. And some genres are defined very broad, like pop music. Most songs would somehow fit there...
Comment: Now you are starting to confuse me. My opinion is that the art of music is not coverable by a set of categories. Music is more than we can objectively measure and therefore we can not really describe it objectively. It is possible to analyze a bunch of songs and compare some structure data to predict which ones of them might be more successful (mainstream), but we can not just create some categories and distinguish songs by them. They will be not important for the actual listeners! Only for statistics maybe, but nothing more. My opinion.
Comment: @ByteCommander Emotion is irrelevant to the question. Can music be objectively categorized in genres? Of course. Which are the limits of that categorization? That's another question.
Comment: @ByteCommander I'm not saying that you are wrong, I'm saying that it's not important or connected to the answer.
Comment: It is important and relevant for the answer! `each category is "useful" to a human, for learning something about the music, for finding similar works, etc.` The emotion of a track is far more important and useful for listeners than any measurable or statistical data.
Comment: @ByteCommander I think you completely missed my point then. We'll have to agree to disagree on that one.


Plumber welded or soldered copper pipe in basement, what would be a typical charge for 45 min of work?

Question: I recommended a plumber to my friend and she's a bit concerned he charged too much. SHe had a couple of leaks in a copper pipe (probably a hot water line) approx 1" diameter, and he turned off the water and then soldered or welded several sections of pipe together I think three sections of pipe were welded. I have no idea what plumbing repairs cost so Im asking you guys. He charged $200 he was there about 45 min. This is in MD suburbs of washington DC. Do you think that a fair price?
Comment: VTC as prices and how jobs are paid for vary. However sounds like a good job by the plumber.
Comment: The only way to know is to get several plumbers out for quotes. Now that the work is done, you won't get anyone out there, and if you pretend that it's still a problem, you'll probably get exorbitant quotes so you never call them again. If you felt that the plumber did a good enough job at a good enough price to recommend him to your friend, then you should be able to reassure your friend that she got a good deal.
Answer: For time spent and travel, materials and supplies used, (solder, propane) and the expertise to diagnose the problem and repair it as well as having the needed tools and insurance....$200 is a deal.
Keep that plumbers' number.
Answer: A house call where a plumber does nothing is $100. This guy identified multiple leaks in the same pipe, fixed it all in 45 minutes, and charged only $200.
I would say your friend got a really good plumber.
Would she rather the contractor dragged it out over a week and bill her $1,000? Don't look at the time it took; look at the results.


Split FTP and web traffic for VPN/Local Connection

Question: Not sure if this is possible but hopefully someone knows... I connect to a VPN to gain access to multiple web servers via FTP. The VPN is over a sluggish line and refreshing pages in the browser every few minutes is time consuming. Can I route FTP traffic through the VPN, but web traffic and e-mail etc through the local connection? I'm on Windows 7 Home Premium. PC is connected via ethernet to router. I have a wireless adapter too if I can use that and two routers, both wireless but only one internet connection. Can go through VPN via one router, and local internet over the other router maybe?
Answer: It is very hard to understand exactly what you are asking, and without knowing a lot more specifics (IP addresses/sites), it is impossible to give you a guide on how to do this.
That being said, to prod you in the right direction, you need to look at manually editing routes and when you are connected to the VPN, you just need to route some addresses to go via your other network.
Comment: Thanks William. I can't give specific IP addresses due to client confidentiality sorry. I've tried unticking "Use default gateway on remote network" but of course then I'm connected to the VPN but everything including web and FTP routes via my network and then I'm blocked from their firewall for FTP I guess because I haven't been provided with a local IP on their network from their DHCP? Can you tell me where I would edit the "routes" please?
Answer: Your vpn server gives you a local IP like 192.168.1.x. All you need to do is to create a static route to route this network (192.168.1.0 in the case above) to the adapter connected to the vpn and let the default route pointing to the gateway on the local connection (as when you're not connected to the vpn).
Not sure about other VPN servers but on openvpn you can configure the server to send the needed static route automatically to the client and to not redirect the default gateway to the VPN by removing (commenting) the line redirecting the gateway like this ;push "redirect-gateway"
To add static routes:
route ADD network MASK subnet_mask  gateway ip
for example:
route ADD 192.168.1.0 MASK 255.255.255.0 192.168.1.1
Where 192.168.1.1 is the vpn server IP (inside the VPN - not the public one you use to connect)
Comment: When I'm connected to the VPN, my IP (this time) is "192.168.11.67". My IP for the local network is always "10.0.0.103", gateway "10.0.0.1". My other router is at "192.168.254.1". Unfortunately I have no access to the VPN server (approx 400 miles away) and they won't change anything so I need to do something locally if possible. I've seen something about static routes on the router... is that what you mean? Or static routes on the VPN server?
Comment: I mean static routes on your own machine. This way your machine will direct all 192.168.11.0/255.255.255.0 to the VPN server and all other trafic to your 10.0.0.1 normal gateway. Just commented the case on changing server config if you were controlling it because it is easier. The only thing you need to discover is the 192.168.11 network gateway IP or you add the route to the adapter connected to the VPN instead of the gateway (I don't remember how to do it in windows but should not be hard)
Comment: You can also add the static routes on the router if you prefer or if you have many machines connecting to the VPN as you would need to configure only the router instead of each machine.


Square number as a sum of two number.

Question: Is it possible to find three number $a, b, c$ such that sum of any two gives you a square number? For example $6+3=9=3^{2}$. And what is the formula to find these numbers?
Answer: Yes, an example is $(10/54/90)$
The following PARI/GP program finds some triples :
<code>? for(a=1,60,for(b=a+1,60,for(c=b+1,60,if(issquare(a+b)*issquare(a+c)*issquare(b
+c)==1,print(a,"  ",b,"    ",c)))))
2  34    47
4  21    60
5  20    44
6  19    30
16  33    48
?
</code>
There is also a constructive way :
Choose the squares $k^2,l^2,m^2$, such that $0<k<l<m$ and $k^2+l^2>m^2$
Then, the triple $$(\frac{k^2+l^2-m^2}{2}/\frac{k^2-l^2+m^2}{2}/\frac{-k^2+l^2+m^2}{2})$$ does the job.
Comment: The smallest triple with distinct positive numbers is $(6/19/30)$.
Comment: How can I find for these numbers?
Comment: I found it with a computer program, to be honest.
Comment: what is that program?
Answer: It is quite easy to find a formula giving you all possible triples:
$$
a={x^2-y^2+z^2\over2},\quad
b={x^2+y^2-z^2\over2},\quad
c={-x^2+y^2+z^2\over2}.
$$
The sum of the three squares must be even, so $x$, $y$ and $z$ must be all even, or one even and two odd. In addition, for $a$, $b$ and $c$ to be positive  $x^2$, $y^2$ and $z^2$ must respect the triangular inequality: each of them must be less than the sum of the other two.

Square number as a sum of two number.


Current relationship with different light bulbs

Question:
I have a circuit in where there are 3 different bulbs (circular, oval, and rectangular, the circular is the dimmest, the rectangular is more brighter, and the oval is the brightest. Now , I am wondering is the current the same through the whole circuit and is it different at each bulb? Or how does the current in each bulb compares to the current through the battery?
Answer: Current is an amount of charge flowing every second. No new charge suddenly comes into existence during the circuit, so charge flowing from the battery must be shared.
The current can be equal in all of the branches (through all light bulbs). But what if one light bulb resists charge passing through a bit more than the others? Then the others have more charge passing through. You can set up Ohm's law for each light bulb:
$$U=R_1I_1\\U=R_2I_2\\U=R_3I_3$$
They all have the same voltage (potential difference) across them, because they are all directly attached to the battery ends. So if one has a higher resistance than another, $R_1>R_2$, then the current has to decrease to still makes Ohm's law fit, $I_1<I_2$.
Larger resistance reduces the amount of charge that passes through, if the "pressure" or "push" on the charge (the voltage) is unchanged.
Comment: okay so you are saying that the current will decrease through each light bulb since there is a different resistance for each one?  & what do you mean by " directly attached to the battery ends"?  Also can we say that the current flowing trough the battery is the same ?
Comment: @Dee 1) Yes. 2) "*directly attached to the battery ends*" means that each light bulb has a wire going straight to the battery ends (without any other components in the way that would reduce the voltage). 3) No, not necessarily. Clip the wires, and *no* current flows; remove all the resistances and an *enormous* current flows (maybe high enough to melt the wires).
Comment: Alright that makes sense , now what would be the difference between the current passing is each bulb versus the current through the battery? If you don't mind explaining ?
Comment: @Dee Good question. All the resistors correspond to *one* resistance, which the battery feels. And Ohm's law still holds for the battery with this equivalent resistance,$$U=R_{equivalent}I$$If you can find $R_{equivalent}$, you can find the current $I$ "through" the battery. And $R_{equivalent}$ can be calculated in steps: Are the resistors in **series** (one after another on the same wire), you add them up directly,$$R_{equivalent}=R_1+R_2+R_3+\cdots$$ Are they in **parallel**  (your case), you add them up **reversely**,$$\frac1R_{equivalent}=\frac1R_1+\frac1R_2+\frac1R_3+\cdots$$
Comment: Alright so then what can we infer about the current in the battery? Would it be that the current going through the battery also decreases since it feels the resistance that is add up from all the 3 bulbs?
Comment: 1/R = conductance which adds,  not resistance for parallel. So current adds.
Comment: https://en.wikipedia.org/wiki/Electrical_resistance_and_conductance
Comment: No they dont. They increase the parallel Conductance 1/Req. R is always reduced with more in parallel //
Comment: @TonyStewart Oh, I see your point. Thank you for the correction. I'll remove the incorrect comments I have made.


Can one pretend to sin in order to save his life?

Question: If someone is attempting to coerce a Jew into committing a sin publicly - aside from the three major sins - and his desire is just that he should violate the Torah - not for a personal gain - would he be allowed to pretend to sin?
Comment: If the pretending is done in public, and the viewers don't know he is pretending, how isn't it a desecration of G-d's name? Otherwise why would it matter that it was in public, if he wasn't pretending?
Comment: Gittin 57B by the story of chana and her seven sons, the last son had an option to pretend to do a sin and he gave up his life instead. https://www.sefaria.org/Gittin.57b?lang=he
Comment: Have also wondered about this often. Like practically speaking, one who pretends to become a Christian. I guess in this case though it would be required to do certain acts of worship which in themselves are considered Avodah Zara whether or not he truly intends. However, I understand your question as applying to any sin like in a time of Shmad...
Comment: After answering I re-read your question and am now wondering if you are saying that the idolator is trying to get him to sin, but not davka to violate _Torah_? I'm not sure what the difference would be if so, but I just want to clarify?
Comment: There are different parameters crucial to answering the question: in front of 10 people or not, time of shmad (religious persecution) and what type of sin (of the three 'big ones' or not). Are you asking about all permutations?
Comment: Please give an example of pretending to do a minor sin?
Comment: @Chatzkel very interesting. How would you understand this though, in light of Sefer HaChinuch 28 וְאֵין פֵּרוּשׁ הַכָּתוּב לֹא תִּשְׁתַּחֲוֶה עַל מְנָת לַעֲבֹד i.e. it _is_ a sin to bow, pretending or not? We are not allowed to daven Amidah in front of a mirror (see KSA 18:8), because of the incidental bowing to an image (Radbaz 4:107)
Answer: The gemara that deals with this is Sanhedrin 74a:

א"ר יוחנן משום ר"ש בן יהוצדק ... כל עבירות שבתורה אם אומרין לאדם עבור
ואל תהרג יעבור ואל יהרג חוץ מעבודת כוכבים וגילוי עריות ושפיכות דמים
Rabbi Yoḥanan says in the name of Rabbi Shimon ben Yehotzadak: … all
transgressions in the Torah, if a person is told: Transgress and you
will not be killed, he may transgress and not be killed, except for
avodah zara, arayot, and murder.

Later on, it clarifies the limits of this:

כי אתא רב דימי א"ר יוחנן לא שנו אלא שלא בשעת גזרת המלכות) אבל בשעת
גזרת המלכות אפי' מצוה קלה יהרג ואל יעבור
When Rav Dimi came he said Rabbi Yoḥanan said: this is only when it is
not a time of [religious] persecution. But in a time of persecution,
even about a minor mitzva, one must be killed rather than sin.

This circumstance is discussed in its own question here.
These halachot are codified in the Mishneh Torah Yesodei HaTorah 5, and Shulchan Aruch Yora Deah 157. They add that, in a case of an individual idolator trying to get a Jew to davka transgress (rather than just for the idolator's personal benefit), one should give up his life over a small mitzva, but only if it is in public, (which in this case means in front of 10 Jews).
If it is in the case of a time of anti-religious legislation (aimed at persecuting Jews - Rambam, Beit Yosef), it is much stricter and the rule seems to be one should do so even if it is an individual idolator coercing him for the idolator's own personal benefit, and even if it is not in front of other Jews.

There seems to be at least one case where one can pretend to sin, and that is to pretend to be an idolator:

אסור לאדם לומר שהוא עובד כוכבי' כדי שלא יהרגוהו
It is forbidden for a man to claim that he is an idolater so that they
will not kill him.

The Rama goes on to clarify, based on Trumat HaDeshen 197, that in a situation of sakana, if it is possible to not use direct language, or in some other way one is able to trick the idolators into believing that he is an idolator without actually saying it, so they will not come after him, it is permitted (in times of persecution - Gra).
Even though this provides an example to say "yes" to the title, and is in the context of avoiding a chillul Hashem, this is a bit of a cop-out of your chillul Hashem question, as it is an "avoidance strategy", rather than a heter.
The Sefer HaChinuch 296 adds these words to his explanation of the mitzva of dying al pi kiddush Hashem:

ואף על פי שלבו תמים באמונתו ביראת השם, אף על פי כן נצטוה שיהרג ואל
יעשה המעשה הרע ההוא ולא יתן מקום אל המעביר לחשב שהוא כפר בשם
Even though his heart is pure in his faith with the fear of God,
nonetheless he is commanded that he be killed and not commit this evil
act, and not give room to the assailant to think that he has denied
God.

The assailant's impression seems intrinsic to the mitzva, so pretending doesn't seem to help. Further research is needed.
Comment: I'm not sure of a precise example, but that seems to me to be what the OP is asking about: "would he be allowed **to pretend to sin**, or would that also be a desecration of G-d's name?"
Comment: But what about if he's not actually sinning, but pretending to do so
Comment: @JoelK can you give an example?
Comment: @JoelK gotcha, how's my edit?
Answer: Let's clarify please. If someone is able to "coerce". Then it means Jew is under danger? So he is saving his life basically.
So Jew sinned enough in his life for small enjoyments and NOW he is under danger, his entire life and not sinning? So he sinned for small enjoyments and question is to sin or pretend to sin to save his own life?
Quote and great answer from Gemara provided above for it, yes.
BUT!
If we really understand in deep details how reward and punishments work then if sin is committed, it doesn't matter pretended or not, if I have understanding later that sin was a sin, TRULY understand, recognize and TRULY not able to commit it then sin is forgiven.
I am not able to make a sin on my own free will, but if it's made under pressure, danger of life or I'm sleeping and not aware of a sin and etc.
Sin is flushed out. Only because I always have understanding in front of Him, before and after sin
Before it was impossible to happen cause I was not able to.
After it is also impossible to happen cause I have understanding also.
Why?
I don't have sin in my mind and I don't have a desire to make a sin, so I don't have it neither here or in Etz Khaim and I have an understanding of a sin - proof, that I am not able to make it. Even if sin is physically committed not under my free will and desire - it can not be a sin for 2 reasons:

I am not able to do it in past and future!
After sin is committed in present I have an understanding that it was a sin and recognize it in front of Hashem, sin is forgiven, why? Cause that is the purpose of the time that I have in my life to recognize and fix sins, if it's done, then there is no any punishment for it, cause it's fixed in Etz Khaim. It does NOT belong to me.

Conclusion:
If I understand and not committing sin - there is no punishment for a sin.
If It was committed not matter how and why, I recognize in front of Hashem with full of my existence that I am not able to commit it - there is no punishment also.
P.S. Aside from the three major sins
idolatry, sexual immorality and murder
During idolatry group of sefirot are trying to go under "something", but everything comes down from HIM, so it's a violation.
During zivug (זווג) of sefirot group it always stamps who by who/what by what and there are a forbidden zivugs (sexual immorality): next to next (close relatives) and zivug from above to below (man and animal, man and tree etc) and same and same - man with man, woman with woman. And when someone has a wife/husband, there is attached line of continuous zivug, so if wife/husband go to others it breaks previous line and make new one and if he/she is back it breaks again and make again - forbidden both.
Murder - leaves stamp/reason in Etz Khaim "who by who"
Important to mention an exception: if Jew does not have desire to kill but someone takes his hand and kill someone, Jew didn't have desire to kill, so "who by who" is a killer who had a desire, not a Jew, even if his hand is involved


Could a human with a regenerative factor use (and get addicted to) drugs such as alcohol, narcotics, stimulants, etc.?

Question: I'm working on a sci fi story with bio-punk elements in it (such as gene manipulation). This has brought up a problem with one of the sub plots, however, as I am unaware of whether or not an extreme healing factor would make the effects of certain drugs null and void. The main character has a healing factor that can heal him from everything except specialized venoms and EXTREME bodily harm. He acquired this healing factor by a combination of nanobots and a genetic alteration in the form of a injection that simply added genes to him (specifically the regenerative genes of the axolotl). Any help would be greatly appreciated.
Comment: Being so dependent on your design choices, we really shouldn't be doing this here. I will offer that it essentially comes down to how he metabolizes things. If every pathway in his body is otherwise normal, addiction is possible. If the wrong uptake factors are fast, addiction is more likely. If his kidneys and liver are working overtime, he may not be able to benefit from some, or any, drugs. I have an ex wife who seems to be immune to all but the most powerful classes of opioid painkillers, and they exit her system strangely fast - like, no sign they were there.
Comment: Is there a reason you believe there is exactly one answer to this yes/no question?  It really depends *entierly* on what you feel like your gene manipulation and nanobots should do.  If you want them to protect from a list of drugs, include the genes/nanobots to prevent the effects.  If you don't want them to protect from a list of dugs, don't include any genes/nanobots which affect those drugs.
Comment: Addiction woul work exactly the same, but the detoxification/withdrawal would process would be less dangerous.
Comment: On a macabre note, this creates a unique form of torture suited to your character's strengths - repeated forced addiction and detox.  /shudder
Answer: The challenge you face here is that you're not really using science to define these properties.  You are using magic, and giving it a thin skin of science to make it look like science.  It is important to admit this, because the real answer is that you need to make a decision about your magic, and if you believe the science has defined an answer for you you will find yourself constrained.
Let's say you want your magic to not mess with drugs and alcohol.  You define it as such, and now it is true (within your world).  Now you have to skin this as science.  Simply don't have the nanobots recognize the effects of drugs and alcohol as something worth "healing."  Perhaps the developers of this capability were friendly, and decided to identify the effects of compounds that are "generally recognized as safe" and not trigger healing on them.
Let's say you want your magic to mess with all drugs and alcohol.  You define it as such, and now it is true (within your world).  Now you have to skin this as science.  Have your nanobots identify any compound which exists outside of normal life scales and neutralize it.  Want the painkilling capabilities of endorphins while still being unaffected by morphine?  No problem.  Simply have the nanobots recognize the emission of endorphins and mix it with their own signal which says "let these signals through."
Want your magic to have a list of drugs which don't affect your main character?  You define it as such, and now it is true (within your world).  Now you have to skin this as science.  Simply have the nanobots recognize those drugs, and neutralize them.  Instead of focusing on maintaining a "normal brain state" as you would for neutralizing all drugs/alcohol, have tailored capabilities which identify the drugs and neutralize them directly.
Comment: I'm confused as to how any of it is magic. I'll give you that nanobots aren't even a possibility yet, however the way nanobots function in my story is that they simply travel through the blood stream and into the heart and brain to give off electric shocks whenever it detects any electronic abnormalities. Genetic engineering (even to a degree almost as exact as that) has been done in the real world, just to a smaller scale. We have even created goats that produce spider silk in their milk. However, maybe I'm just blinded by something and can't see it, so please tell me exactly what was magical
Comment: @Devon The magic part is having super-human regeneration which can heal him from virtually anything.  That's magic.  Perhaps it's Arthur C. Clarke's magic ("Any sufficiently advanced technology is indistinguishable from magic.")  The point is, don't limit yourself to what you think science says.  Science doesn't say anything about this particular case.  Honestly, if it does, it would be quick to say that healing abilities like you describe are impossible without magic. (a reality based version would have to deal with things like *massive* amnesia if you took a large blow to the head
Comment: ... due to the loss of information during the impact.)
Answer: Yes, addiction is possible
Addiction drugs or alcohol don't often start as a physical need for the chemical.  Usually, there's some kind of psychological need that chemical fills.  People often drink to forget.  Junkies get high to escape their circumstances or to compensate for some other mental health issue.
Being able to quickly heal from physical trauma isn't going to save this person from Post Traumatic Stress Syndrome or the loss of a loved one.  The psychological trauma will still be there. Self-medicating with alcohol and drugs is a very common thing to happen.
Unless the nanobots and genetic alterations are specifically designed to sweep drugs and alcohol from his system, he's going to feel the physiological and psychological effects of those chemicals.
Answer: When you say certain drugs I assume you mean heroin and cocaine, not viagra.  This premise opens the door to some cool things.
Suppose the main character misses the feeling of being altered / other / not in control - the feelings conferred by some of these drugs.  The drugs now do nothing to him.  It is much like an addict who must push to higher and higher doses to get the desired high.
To get the edgy out of control feeling he craves he must take things to a greater extreme -  to situations his healing factor can correct, but not easily or immediately.  Maybe things like immolation or electrocution, or pushing a knife through his eye into his brain.  Just as an addicts metabolism ramps up to deal with ever greater amounts of drug I could imagine his nanobots can learn and so the third time he grabs the live wire - nothing.
Answer: Since it is unlikely every physiological system and component would be included in the regenerative processes, it would be necessary to develop a small amount of detail as to what is or is not so affected.  This is of particular importance when dealing with chemicals such as dopamine, etc. and the receptors and inhibitors in the brain which govern such activity.
In other words, does this regeneration cover brain synapses, etc.?  If not, addiction would likely flourish in similar fashion with or without the regeneration.
Regarding usage (could they get high?), consider the same argument but also add speed of regeneration into the mix for affirmative responses to brain regeneration.  If the regeneration process was fast enough, it may be possible to negate the intoxicating effects of some or all narcotics.
Answer: Yes, maybe.

It is likely that any substance that would have a physical effect on
him would be lethal to anyone else.  It would have to be exotic and,
as you pointed out a "specialized venom."  That would mean that
someone would have to target him specifically and that they would
then have a lot of control over him since there would only be one
source for his fix.
Anything can be psychologically addictive.  If french onion soup
brings back vivid memories of good times with his dead wife, he
might not be able to function without his french onion soup.


Limits on Short selling

Question: When back testing an algorithm that relies upon short selling certain stocks, how to limit the short selling so that the back-test results still remain reliable? What kind of controls are generally put on such algorithms during actual trading and how to simulate such controls while backtesting?
Comment: In most cases asset pricing anomalies such as momentum are strongest among small companies in which it's impossible to go short. Further, transaction cost for these smaller stock are tremendous. In light of this, you might wonder how relevant the cost of short selling are.
Answer: You should make your borrow cost sufficient to dissuade unlimited short selling.  In practice, each short would require you to borrow shares from your broker.  This is usually handled when computing transaction cost.  You should account for this in your trading algorithm or in the factor model itself.  A simple method would make shorts some N% more expensive than longs.  In practice, this could kill your projected returns.  You could probably estimate this factor by looking at historical short interest on the stock.  If everyone is trying to short it, the cost to borrow is going to be high.
http://www.investopedia.com/terms/s/stock-loan-fee.asp

Limits on Short selling


Traditional machine learning often makes an assumption that both the training and test data are drawn from the same distribution?

Question: It is said that traditional machine learning often makes an assumption that both the training and test data are drawn from the same distribution. But it isn't clear what this means in a practical sense. For instance, what would this mean in the case of image data, such as people's faces for facial recognition? In that example, why would one set of images of people's faces be "drawn from a different distribution" than another set of images of people's faces? I am looking for an explanation that connects this mathematical language of "drawn from the same distribution" to practical, real-world examples.
Comment: which ML textbook says there is an assumption that both the training and test data are drawn from the same distribution? And for which ML algorithms?
Comment: @develarist Chapter 1.1 of *Transfer Learning* by Sinno Jialin Pan, Qiang Yang, Wenyuan Dai, Zhang Yu.
Comment: I'll comment this as an answer
Answer: It means that the test data look like the training data. For example, if your facial recognition system was developed in China, it might work well in China, but not if you try to use it in a country where people look different.
The "drawn" part means that the data is sampled at random from some population of interest. For example, the population could be everybody in China, and you assume that everyone has an equal chance of being in your training data. This might not be true, but it could be close enough to have a reasonable useful model.
The "distribution" part is what I called the "population of interest" in the previous paragraph.
This assumption is crucial when you try to evaluate the model. Usually this is done by splitting off a part of the data, chosen randomly, and using it to test the model. But if the model is evaluated in this way, then in the future it needs to be applied to data that looks like the data which was originally put into it, or else any claims about the model's performance will be misleading.
For example, it could be that your facial recognition system is 90% accurate when applied to Chinese faces, but only 50% accurate when applied to Russian faces. But you wouldn't have known that in advance, because your test data consisted only of Chinese faces.
In the case of facial recognition, it's fairly obvious what will go wrong if you apply it to unseen data. But this problem also happens for other models, often because future data doesn't look like past data. For example, banks have to re-do their credit risk models every year. This is a huge project which provides employment for a lot of people. But (as an auditor once said to me) if the models work, why do they have to be re-done every year? And if they don't work, why make the effort to build them at all?
Answer: It is not an assumption.
The careless statement Pan makes is not an assumption since no other data scientist seems to generally assert it given how large a field ML is.
What he is trying to say, and should be corrected, is that ML performs best when the test data is similar to the training data. This makes much more practical sense, and would be corroborated by others. From a probabilistic perspective of ML, this corrected statement translates to the test data having the same distribution as the training data. Stipulating the conditions under which a family of procedures works best under is by no way an assumption


Simple encryption app

Question: I need to send passwords to other people. Is there an app (cross-OS if possible) that allows me to send them in a secure way ? Maybe a simple private/public keys system.
Thanks !
Comment: What kind of OS are you talking about (desktop / mobile)? Secure communication also needs something called a "trust relation" between sender and receiver. What is your authentic (= guaranteed to not be tampered and guaranteed to be with the intended person) communication channel? Can you at some point before the transfer meet the recipient in person? Can you call them over a phone? ...?
Answer: GPG (free replacement for PGP) has clients for Windows, macOS, Linux, android, iphone... virtually every operating system used in the last two decades. Just search the OS's software repositories / app store / the web, etc.
If your friends want to create & upload their own keys, you can send them messages only they can read. Or if you can share only one password with them, you can "conventionally encrypt" messages for them to decrypt with that password.

Encryption should either be strong and "work", or it's just a toy and you might as well just send messages in Pig Latin or ROT13
Answer: WinZip can make an encrypted file. However, the customer needs a password to open the file.
But the system doesn't need a password it just needs a password hash. So the customer, if provided with an application, could make their own password and then send in the password hash. Then when the password is input into the system, the system just checks to see if the input produces the correct hash.
The customers could make their own password and password hash with KBH Password System or with KBH Crypto Clearing Application. However, the system would need to be running the same application to check the password input against the password hash. I suppose that the applications could be available as dll's for use by the system. Well, the first input into the applications is a set parameter for this purpose, the second input is the customer's password, and the output is the password hash. The parameter and the hash are relatively public while the password is secret.
Comment: @S Spring, you seem to recommend KBH applications a lot. If you are affiliated with KBH, you need to disclose that. See https://softwarerecs.stackexchange.com/help/promotion

Simple encryption app


Encode probability distribution in single cell of table

Question: Is there any mechanism for storing all the information of a probability distribution (discrete and/or continuous) into a single cell of a table? If so, how is this achieved and how might one go about making queries on these cells?
Comment: Why do you need a single cell, exactly? Storing multiple values in a single cell is a bad idea, since it's going against the most basic 1st normal form, rendering many SQL operation useless and making queries much more weird and difficult. Also, please elaborate further on "all the information about probability distribution", what info that includes? Multiple pairs of (value,probability) or something more, or something else entirely?
Comment: Its not that I need a single cell, I was just hoping to minimize storage. As there are several families of distributions, I suppose they would require as much information as necessary. As arkascha mentioned below, I am quite happy to know that a reference to a distribution can be stored and there are ways of querying such objects.
Answer: Your question is very vague. So only general hints can be provided.
I'd say there are two typical approaches for this (if I got your question right):

you can store some complex data into a single "cell" (how you call it) inside a database table. Easiest for this is to use JSON encoding. So you have an array of values, encode that to a string and store that string. If you want to access the values again you query the string and decode it back into an array. Newer versions of MariaDB or MySQL offer an extension to access such values on sql level too, though access is pretty slow that way.
you use an additional table for the values and store only a reference in the cell. This actually is the typical and preferred approach. This is how the relational database model works. The advantage of this approach is that you can directly access each value separately in sql, that you can use mathematical operations like sums, averages and the like on sql level and that you are not limited in the amount of storage space like you are when using a single cell. Also you can filter the values, for example by date ranges or value boundaries.

In the end, taking all together, both approaches offer the same, though they require different handling of the data. The fist approach additionally requires some scripting language on the client side to handle encoding and decoding, but that typically is given anyway.
The second approach us considered cleaner and will be faster in most of the cases, except if you always access to whole set of values at all times. So a decision can only be made when knowing more specific details about the environment and goal of an implementation.
Comment: I added some general notes. But it cannot be stressed enough that these are very general considerations. You would have to post more specific details about what it is you are trying to do for us to offer more specific help. About JSON being "ugly"... Look at it this way: statistical data is easiest stored in some sort of dictionary or array. How else would you do that? And if you have a dictionary or array, then what is "ugly" in using such structure to store the data? Obviously other formats do exist, but they offer no real alternative, only different coding. `JSON` is the de facto standard.
Comment: Thanks for such valuable general hints. Is the second approach preferred because its easier to code and/or understand? I've found the JSON data structures to be somewhat ugly due to the fact that they are just deeply nested dictionaries.
Answer: Say we have a distribution in column B like:

and we want to place the distribution in a single cell.  In C1 enter:
=B1
and in C2 enter:
=B1 & CHAR(10) & C1

and copy downwards.  Finally, format cell C13 with wrap on:


Django: handling browser's BACK button in file uploads

Question: I'm making a site that has a 3-step form process.
Step 1: let me know how many files you're uploading
Step 2: generate # of forms depending on the # of files, and allow upload
Step 3: payment
Suppose some guy goes to step 3, but then changes his mind and goes all the back to step 1.
Step 1 is easy enough, all I have to do is put a variable in the session and then just update the existing record if there's an active order happening (instead of creating a new one).
Step 2 gets difficult. Say the guy went back and changed Step 1's # of files, changing the # of forms displayed on Step 2. Also say that he decides to change several of the files he uploaded.
The only thing I can think of here is to completely delete all the files the guy originally uploaded in his first time through the site, delete all the database records associated with those files, and just start from the beginning. If I don't do that, I run into some weird problems of comparing the new files he uploaded to my old files to see if they've changed... that just seems like a lot of hassle and more time consuming than simply deleting them.
In the same vein, if the user clicked on "browse" again to upload a new file, is there a way for me to know they've changed that field? If the name of the file is exactly the same then you'd have to compare the new one with the old one.
But if I just outright delete everything it's gonna create problems for the user. If he originally uploaded 10 files, but now decides that he wants to upload 12 files, except he wants to keep the 8 out of the original 10 files and all the associated information the same then upload 4 new files - he ends up having to do all 12 files from scratch again.
I suppose I could pre-populate Step 2 with what I've got in the database so far, but then I still run into having to compare the new files vs. the ones I have right now.
Is there a better way to do this? Never realized how big of a pain the BACK button is....
Answer: Why you want to allow user to go from step 3 to step 2?
Anyway, you shouldn't compare files! Just write new ones. And files, that are not bounded to user - can be deleted in background.
Comment: Is it common practice to disallow going backward in these multi-step forms? Or maybe I should just raise a warning on the page saying if you click the BACK button and change things then you'll have to enter all the stuff all over again... ?
Comment: Disallow to go backward - simple solution. Also you should think about NoJS user.


Fast Search managed properties text as integer

Question: Im trying to search on the managed property numcomments. This property is the number of comments stored for a blog post. The proprty is a text field which means if im also sorting by it, 11 comes before 2.  Ive tried to create a new manage property mapping to comments but storing it as an integer. No results are showing in search when i search by this new managed property term.  Is there a way to store text data, in an integer search managed property. I think the reason why ows_comments is a text field instead of a integer might have something to do with it being a lookup column. I really need to call a keyword search in code and sorting by numcomments correctly. Can anyone suggest anything?
Answer: You have to use a pipeline extensibility stage which reads the text based property and writes it back to a new crawled property of type int, which you can map to an int based managed property.
I've done the same for date <meta> tags in web pages which are interpreted as text, but you want them as dates.
I have a powershell prototype sample here which you can use as a basis to test this: http://techmikael.blogspot.se/2011/03/prototyping-pipeline-stages-in.html


Boot into Ubuntu hanging intermittently

Question: I have an 8 year old desktop system with dual boot into Ubuntu 19.10 (default) Windows 10, or Windows 7. I've not made any changes recently, but it has begun intermittently failing to boot into Ubuntu. I get a black screen, I don't see the grub menu or any error messages, and it sounds wrong - it normally starts noisy with fans blasting and disks running up, then quietens down after about 5 seconds as it starts to boot. When it doesn't boot the racket goes on, the disk lights flash repeatedly, then the disk activity seems to stop. I've left it for up to 15 minutes but there is still no activity. Hitting Del when I start it up has no effect. I have to hit reset maybe 6 or 7 times and eventually it boots.
I assumed at first that it was a disk or boot sector problem, but I had a look for the boot logs in Ubuntu, and each failed boot had a log, so it was getting through grub and was trying to start Ubuntu. I couldn't find any errors in the logs that looked relevant - there were a lot of ACPI errors, but I've been seeing these for a long time and online searches seem to suggest they are not serious. Each failed boot log was much shorter the logs for the successful boots, but each stopped at a different point, with no errors being flagged, just normal looking activity, then suddenly the end of the log.
The problem does seem to be happening more often over time, which I guess might indicate hardware, but I don't understand why I'm seeing a black screen instead of the grub menu at the start when it doesn't boot.
All I can think of to do is to change the boot order to boot it into Windows as a default, and see if that helps, but if anyone has any other ideas, they would be much appreciated!
Answer: Your hard drive may be getting a bit old. Try running fsck from a live session to disable bad blocks.
Comment: I understand what you're saying, but I'm nervous about running fsck in case I lose everything on the disk. I do have a much newer and larger internal disk that is just storing data, though, so maybe I should look at moving everything over to that.
Comment: I don't think you're likely to lose data that isn't already inaccessible by ordinary means. Maybe specialized data recovery software can help you with that. The little personal experience that I have with `fsck` is quite positive.
Answer: Well, as the failures were getting more frequent I did consider running an fsck, but my partner happened to remember having a similar problem, which went away when he replaced his CMOS battery. I tried doing the same, and the machine is now booting OK every time. That's over the last 48 hours - I can't guarantee it's a permanent fix but it looks like a good thing to try if you have the same issue.

Boot into Ubuntu hanging intermittently


Greek - Arabic language relation

Question: Is there a valid, known link (academic source or even speculation) regarding the Greek and Arabic language, when it comes to syntactic- grammatical or morphological cohesion? I ve only come across Kees Versteedh "Greek elements in Arabic Linguisting thinking" which only impies a connection especially with Aristotelian logic.
Comment: In the Early Islamic era, there were lots of translations from Greek to Arabic. I would not be surprised when some Greek is "shining through" in these translations, and I cannot exclude an influence of the Greek-derived translationese on the evolving Arabic literary language. There are also Greek loan words in Arabic (I am aware of the word for astrolabe). Unfortunately, I have no references on this, so it is only a comment and not an answer.
Answer: Speculated, yes. Accepted, no.
Most linguists agree that there is no relationship between these two languages. Greek is Hellenic which is Indo-European; Arabic is Semitic which is Afro-Asiatic. And while many people have posited links between the IE and AA language families, the idea has never gained widespread approval.
The most common form of this is called the "Nostratic Hypothesis", and also posits links to the Kartvelian, Uralic, Dravidian, Altaic, and Eskimo-Aleut families. But again it's a very fringe theory; I've never met a linguist who actually believed it. The evidence is scarce at best.
And even if the Nostratic hypothesis were true, the relationship between Greek and Arabic would be distant enough that any apparent cognates are more than likely coincidence. Sound changes would have long since erased any similarity at the surface level.

Greek - Arabic language relation


Continuously Measure 3-Phase Motor Current

Question: What methods are there for continuously monitoring the current in a 3-phase servo motor for a CNC machine and giving an alarm when the current is less than some value?
Answer: You need a current transformer (or three).

If you connect a resistor to the transformer's secondary winding a current through the sensed wire will cause a voltage across the resistor. The voltage is proportional to the current so will be a sine wave.
If you'd rather like a DC output proportional to the current you can use an i-Snail-V current transformer. It's self-powered and the i-Snail-V10 version for instance gives you 5 V out for 10 A. Other versions with other sensitivities exist.
Comment: The i-snail-V that @stevenvh suggested looks like a good option.  If you use a plain current transformer (CT), make sure that its output is never open circuited since dangerous voltages can result on the open terminals (to the CT and/or user).  If the CT is unloaded/open, then it should always be shorted.  Special shorting terminal blocks are typically used to connect to a CT to allow a meter to be removed/changed.  see: http://www.metersusa.com/Transformers/Data/ShortBK.htm
Comment: @madrivereric - I think the i-Snail-V is a great product, but it's not cheap. Since OP talks about CNC this is probably not a hobby project, and maybe he can afford it :-)
Answer: A variety of current sense techniques exist.
Hall effect sensors are nice for measuring large currents through a wire at high voltages. Some have analog out, eating up one of the analog inputs on your microcontroller. Others have an integrated internal ADC, with digital pins that directly connect to your microcontroller. A few also have an integrated power FET driver, and are smart enough to unconditionally turn off the FET when it measures over-current.
Perhaps you could somehow use that output to drive an alarm instead of a FET.
The Allegro Hall effect sensor chips look nice.
Related: How can I sense the motor's current?


Can wheels turn if the engine died when in gear (automatic transmission)

Question: Lets say an automatic transmission vehicle is going downhill and stopped in traffic. And suddenly engine died. Is it possible for the wheels to turn (turning the transmission, torque converter) and vehicle to go forward?
Answer: If the engine stops while in gear (and brakes not pressed) it IS still possible for the vehicle to roll or continue rolling. Brakes will require additional foot pressure to maintain the same amount of braking power.
If moving: The wheels will continue to rotate, however on some vehicles it will create an 'engine braking' effect and the resistance of the engine will slow your car down. This "engine brake" effect does not apply to modern automatic transmission vehicles. They will continue to roll without resistance.
Just a note: You'll also lose power steering and 'powered' braking. If key is turned to full "off", the steering column will lock too. However, you cant turn key to full "off" while in-gear.
Comment: "however it might create an 'engine braking' effect and the resistance of the engine will slow your car down." Modern automatics do not do this
Comment: Thanks, I was testing this today. You're correct. I figured there would be some cars that have the 'engine brake' effect, but since most will not (unless its a motorcycle, etc.) I have removed that portion of my answer.
Comment: Automatics are hydraulic, so if the engine is not running to drive the front pump, then nothing is engaged, so it cannot turn the motor.


Track down process that has notty

Question: I have a Linux server (Red Hat 2.6 kernel) which had a spike in load due to an Rsync process which seems to have forked many times, but the process was run by rsyncuser@notty I didnt see any cron job scheduled for that time with an rsync that is run under that name, and I assume if there were it would have a tty.  How do I track down what the actual command which caused these processes was?
Comment: Do you have the commandline arguments with whch rsync did run? Looked at log files? If rsyncd running with owner rsyncuser? Does rsyncuser have login credentials? It is a bit of a broad question without some extra details
Comment: I searched for rsyncuser in logs and saw nothing really useful.  I did su -l rsyncuser and checked the crontab to find nothing.  Nothing in root's crontab using su to execute command as that user.  The ps output showed no rsync arguments that I could see other than the process was rsync itself, no visible switches.  I am not even sure if this server was the src or dest for the rsync.
Comment: That is why in my answer I indicated the cause might be external. Does the rsyncuser have a `~/.ssh` and authorisation files? Is an `rsyncd` running?
Comment: No rsyncd, but there are 2 authorized hosts in rsyncusers auth hosts file.
Comment: Maybe you track who inserted those and when, or look at the remote machines if something triggered this.
Answer: Starting with the assumption is probably too restrictive. You should generate a list of possible causes of the spike and try to invalidate them based on whether their prerequisites are met and/or resulting effects are available or not.
Without knowing your exact setup there seem to be at least the following possibilities that might have caused them

the cause was local, in which case you should search for entries in the log files. You did not see a cron job scheduled, not in the Logs? Or did you look at rsyncuser's crontab? Or also at the daily/hourly etc cron jobs. root's cron.
the cause was external. To check if that is possible, check if the that user happens to run the rsync daemon (if you have it, via /the init mechanism). Or if someone could remotely login to the account and try and start copying files (which should also have left traces in the log files).

I would probably also investigate whether the rsyncuser account has a password and/or ssh public keys to see if someone could login to that account. And if anybody with root access could have started these.
Answer: OK you have a problem
Step 1
WEBSITE: they have access logs and Error logs
did a hacker activate a request that directly impacted
the database Backend ?
Not a WEBSITE:
run wireshark to observe traffic related to rsync
On 1 site I noticed that the time server was a little more
than 15 ms out. (because some "duffus" decided to remove the
hardware that ran the time service 1 system at a time until
the last time server was decom'd.
The database system's thought they were out of sync and that
mandated a resend for backups and each system backed up to
ALL the other databases - because they backed up each other.
           I once saw a system backup fail because the MTU was too big
           for the network. a Solaris system with internal connections
           using 9k packet size tried to do backups to an outside backup
           and it was so slow, eventually they made the MTU less than
           512 bytes (512 -32) I think was the solution. The network in
           question was a link out to a service organisation that swore
           there would be no problems with backups. Apparently that was
           just in the 1 case where the outside client had (512 - 32) as
           the MTU value. Basically the main issue was the internal
           Manager - never checked things out prior to making the
           contract and paying heaps for a slow service.

There are other issues, to consider but ... there are many other issues.

Track down process that has notty


Symmetry and Tic Tac Toe

Question: How would one find the number of unique tic tac toe states taking into account rotational equivalence between states?
Comment: First of all, compute the number of possible outcomes without taking into account the rotational equivalences. Look at symmetrical cases as a separate case, because they are not counted multiple times. Then divide the case of the non-symmetrical outcomes by 4 because you can rotate the board 4 times 90 degrees until it's in it's original state. Finally, add those two numbers you got.
Comment: @GuusPalmer so that's what I was thinking at first, but does this take into account the two positions of having an X or O in the center?
Comment: Sorry, I noticed it at the moment I posted the comment:-]
Comment: There are cases when finishing in 5, 6, 7, 8 or 9 moves. When not considering symmetry it actually becomes bit more difficult because e.g. starting a game in the upper left could give the same outcome as starting in the mid right. Also, if you only consider best games, where each player is only performing the best possible moves, you get way less possibilities. Btw, do you consider endgames or also mid-states where there's only a circle and a cross for example?
Comment: Related to https://math.stackexchange.com/q/2476469/265466, which takes all symmetries into account.
Answer: This question can be understood in many different ways. There are a lot of ways to define a "tic tac toe-game". Below is a little summary of possible assumptions you can make.
$$\text{What is a unique move?}$$
        (1) Choice of first player is distinct and every board position is distinct.
        (2) Choice of first player is arbitrary and every board position is distinct.
        (3) Choice of first player is arbitrary and board orientation is arbitrary, but once the board is oriented every position is distinct
        (4) Choice of first player is arbitrary and only distinct player choices are distinct moves.
$$\text{What moves are allowed?}$$
        (1) Any open square.
        (2) Players must make three in a row if possible.
        (3) Players must make three in a row if possible, otherwise must make a blocking move if possible.
$$\text{When is a game over?}$$
        (1) When either player makes three in a row or the board is full.
        (2) When the outcome of the game is fully determined.
$$\text{The most logical answer would be 23,129 possibilities.}$$
For this is the number of games if two games are the same when the players faced the same choices at each move of the game; i.e. considering symmetry at each step of the game. Also, the players don't take meaningless steps and the game is ended when 3 in a row is achieved by one of them. Look at http://www.mathrec.org/old/2002jan/solutions.html if you want to see the full explanation of the computations and the game outcomes overall.

Symmetry and Tic Tac Toe


How can a pot allow variable off times in a time delay relay

Question: I have a pellet stove motor that cycles on when an external potentiometer is dialed on. The run/on time period for the motor is always fixed--about 5 seconds, and then it pauses for a period controlled by the pot.  But how? The "off" time varies, according to the pot dial position. I'm a learner so I cannot visualize what is happening inside the timer. From the symbols on the face of the timer, there appears to be two TDRs at work in the timer. I understand a pot changes the R, but how does this translate to shorter or longer "off" periods.
  Could it be that greater R means less current to pull a relay, thus delaying its ultimate closure?
      All thoughts most appreciated. Scott
Answer: A analog timer uses a RC network to create the timer delay, where
$$T (seconds) = R (resistance\space in\space ohms) \times C (capacitance\space in\space farads).$$
So if the potentiometer controls the resistance, it will also control the time delay in a linear relationship.
This RC time constant is the amount of time the circuit takes to charge up to 63.2% of its final value.  A circuit will typically use some sort of comparator to compare this varying voltage to a fixed voltage, and end the "off" timing period.
In your case, there would be a second fixed resistor that controlled the "on" period (or the variable one might control the off period, and the other fixed one control the overall period, on+off).  The two resistors could share the same capacitor, or use separate capacitors, depending on the circuit.  It would toggle between the two using a flip-flop or equivalent.
Comment: Answers always seem to lead to more questions.  From other Q and As, I think I have learned that a cap inherently produces a time delay since the process of charging it is not instantaneous (ie, producing a shift In a motor's start vs run windings to get torque), so why must a resistor also be in an rc circuit? I can see why a variable resistor would control my pellet stove's off time, but what is the function of a fixed resistor in an rc circuit? It seems like the cap wold create a delay all by itself.
Comment: In a related question, could you use a time delay relay, say a recycle type, in place of the cap and resistor, and accomplish the same  delay that an rc circuit would produce?
Comment: @Scott The resistor is necessary to control how long it takes the capacitor to charge up.  Note the equation I gave: T = RC.  Without a resistor, it would try to charge as fast as possible -- not instantaneous, because the capacitor has an internal resistance called ESR (equivalent series resistance).  As I mentioned in my answer, it takes one time constant T to charge to 63% of its value.  It takes 5 time constants (5T) to charge to 99%.  Unless the TDR had some sort of mechanical delay, it probably has an internal RC network.
Answer: Imagine a 555 timer circuit as so:
R1 is a fixed resistor such that the time the output spends LOW is fixed at 5 seconds. R2 is a pot (connected as a rheostat) + series resistor such that the time the output spends HIGH varies from a minimum (set by the series resistor and C) to a maximum (set by the pot total resistance + series resistor and C). Turn the motor on when the output is LOW and off when the output is HIGH.
You can try the calculator at the above link to play with resistor and capacitor values. You would start with the range of timing required for 'OFF' (high) time to find the pot and C value, then pick the series resistor (minimum OFF time) and R1 (fixed ON time). If the off time goes up to maybe 30 seconds try something like 22uF, 47uF or 100uF.
Of course there are many other ways of doing this, from using multiple timers to feeding the pot wiper voltage into a microcontroller and having it calculate and time the on/off times, but the above is a simple one.
Answer: There are two general approaches to build a circuit that does this. In one, a current which is controlled by the pot charges a capacitor up to a fixed voltage. As the pot changes, the current changes, and so the time it takes to get the (unchanging) fixed voltage changes.
Alternatively, a fixed current charges the capacitor, up to a threshold which is determined by the pot. As the pot changes, the threshold changes and so does the time.
The 2nd method allows the time to be directly proportional to the pot position which may be desirable in some systems.


Why has my cantaloupe plant wilted within two hours of weeding?

Question: I went out and weeded around my melon and watermelon plants, and within two hours of that, the cantaloupe plant had completely wilted!  I did move some of the vines around to get to the grass underneath them, but I was careful not to disturb close to the roots.  The flowers still look okay, as do the few melons that have sprouted. It's just the majority of the leaves and the stems that seem kind of limp also compared to what they were.  What would cause this?
Comment: You might have destroyed critical roots while you were weeding.  How were you weeding?  Did you notice anything while you were working around your melons? You have to send a picture, please.  We have this dude on our site that is amazingly a melon expert.  Pictures, any and everything you can think to tell us that was changed including your weeding.  If you were being careful that makes this more interesting.  Shule is his moniker
Comment: I don't know that I'd call myself an amazing melon expert, but was it sunny outside while you were weeding (or within the two hours as it wilted)? How close to the cantaloupe were the weeds? How big were the weed roots? Is your soil loose or more compact? How old is the plant?
Comment: How old were the plants?
Answer: I'm guessing stormy is right and the roots were just disturbed by the weeding (and/or an insect); and the sun caused the plant to wilt. Sun will do that to plants with disturbed roots. If you disturb them when it's dark, they're much less likely to show it. Shading the plant and/or removing the large leaves (if they're beyond repair) may help it to survive, if it wouldn't otherwise. Potassium (accompanied by extra water) could help, too. Misting/showering your plant should help some, too.
If you have loose soil, I imagine it's easier to disturb the roots. I've heard people talking about how just walking on the ground by watermelons can cause obvious damage to the roots, but I have no such issues in my soil (which is more compact than most consider ideal for watermelons). People generally prefer looser soil for watermelons, at least. I've had no difficulty growing most muskmelons/cantaloupes in our soil as long as they have enough potassium and rockdust.
Anyway, there are other potential causes, but that's my guess with the current information. I'm waiting on your response to my comments. Others might know more than I do about cantaloupe diseases that might be the culprit.
Comment: It was sunny outside, and stayed sunny and hot.  I was pulling up grass that had pretty much surrounded the plant.  The clumps that came up with the grass roots were maybe golf ball size..  The plant is actually about 3 months old.  It even has a few small melons on it. Not all of the vines wilted, there are 3 or so that still have healthy leaves and flowers.  After waiting 3 days to see if the others came back, I trimmed the dead vines from the plant.  Im hoping the rest survive.
Comment: The soil is pretty compact but was moist when I weeded so the grass came up pretty easily.  I just tried not to get too close to the base of the plant while I was doing it.  I hope I answered everything for you.
Comment: some of them were pretty close, but like I said, it was more grass than weeds.  Its our first garden, so we are having to fight the grass taking over.  My brother tilled the garden a few times before we planted, and ive tried to keep the grass under control.  There is a watermelon plant close, and it is fine, pulling up the grass didn't seem to affect it at all, just the cantaloupe plant.  The stems seemed fine, no breaking or anything like that.  Im beginning to think pulling up the grass just disturbed the roots.  Its weird though that 3 or 4 vines are fine, no wilting or damage at all
Comment: Thanks. How close were the weeds themselves to the plant, and how many weeds were there? It could just be a coincidence that it happened at the same time. Did you check the melon stems for damage? Sometimes they can break on accident.
Comment: Huh. That's pretty wild. I would guess it was just disturbed, or maybe something happened you don't know about. I don't know that there's any way to know for sure right now. Has it gotten any better? Are there nematodes in your area? (If you live in the southern USA, that might be an issue.)
Comment: @Shule  I knew you were the right person to talk about this...stuff I didn't know!  Great answers and comments!!
Comment: Hi Shule, no, all of the vines that wilted I am pretty sure are gone.  The other vines seem to be doing okay.  We are in Kansas, so im not sure about nematodes.  We do have moles!  We actually found a mole tunnel that went under the garden but it didnt seem to be near the melons.  Its possible he took a u-turn that we didnt notice though lol.  If I cut off the dead vines, will they grow back or do you think they are probably gone?
Answer: I often find that my cucurbit plants with long vines wilt in hot sun, so that the outside edge of their large, roundish leaves looks like it's turned down. This summer was especially hot and dry for the UK, and my Hokkaido squash and buttercups frequently looked like this. It doesn't seem to have much effect on the plants that I could tell and some have been quite prolific. It may simply be that by weeding around them you've exposed them to more direct sun.


Can't connect to friend's world

Question: I recently updated to The Better Together Update on my Kindle Fire. My friend has Minecraft for Xbox One, but we cannot connect to each other's worlds. I have no idea what is wrong.
Comment: Any errors? What exactly happens?
Comment: I can't see his world when he is online, but when he invites me i select join. it loads it for about 30 seconds and says "Unable to connect to world." He is on Xbox One and i am on Kindle Fire. @TimmyJim
Answer: Make sure your friend is on the correct version of Minecraft.  You mentioned that they are on the Xbox One.  Currently, there are now two versions of Minecraft on the Xbox.

Minecraft: Xbox One Edition
Minecraft

Image to illustrate difference (from the Xbox App):

The Minecraft that is squared in red is the version that allows for cross platform play.  The Minecraft: Xbox One Edition game does not allow for cross platform play through the Better Together update, and is only available to former owners of this version so not to lose any progress or achievement history (it is no longer able to be purchased).  According to Minecraft.net:

Q: How do I know which version of Minecraft is which?
A: The old version of Minecraft is called Minecraft: Xbox One Edition. The new version is just called Minecraft. You will see the name of the game on the splash-screen when you launch it.
.
.
.
Q: What is going to happen to the old console edition?
A: The old console edition will not be available for new purchases after the full release of Minecraft on Xbox One and Switch. Existing owners will still be able to access and play the old console version and minigames, but those versions will not receive updates after the official release of Minecraft.

Minecraft: Xbox One Edition does not have the Better Together update.  There is an entirely new Minecraft titled Minecraft on Xbox One that does have this update, and as such, this is the game your friend will need in order to play cross platform.
Comment: Hi Timmy Jim, On the day of the Better Together Update his console automatically updated. in-game it said he had access to the Better Together Update, so he has the update. Once again, I can't see his world but when he invites me it says joining... but then says "Unable to connect to world." Is this probably because he might still have the old version? If so, why would i even have the option to join him? Also, when they tried it on the Windows 10 edition with the update, it still didn't work. Confused and thank you for the answer.
Comment: @DanielHoelzeman that's odd.  From what I've seen and read, there are two versions of Minecraft now on Xbox.  Have you and your friend at least tried to connect using the other version (*Minecraft*)?  If so, then it appears you are experiencing generic network issues.
Comment: yes we tried to connect together using the "Minecraft" Application.Since Minecraft PE and Xbox One Edition never had cross-platform, we never tried playing together on that version.
Answer: I found out the problem! My friend's Wifi has a NAT type that is restricted and does not let us play together! Thank you guys for answering me and hopefully, I can get the rest of the problems solved from here on out!
Comment: Can you provide more details or a link to understand this problem? I seem to have a similar issue. Thanks.
Comment: Yeah, he does not know how to fix it, wish we knew.

Can't connect to friend's world