A pretrained model for mathematical equations characters detection

Question: I am working on a project to convert equations to LaTeX code. After segmenting out the characters, I got stuck on the detection part and was looking for some pre-trained model that could detect characters of the equation for later conversion to LaTeX. Is there any such pre-trained model available on the internet that could be used in Python to identify characters. If not then can somebody share some source to find a dataset to train such kind of model in Keras? I was able to find one on GitHub but It doesn't detect symbols accurately.
Answer: Detexify is a service that recognizes LaTeX symbols from handwritten figures. Their training dataset is freely available on Github.
Comment: @Saqeeb Sure, I understand that you don't want to spend time on getting your dataset to work. However, most people don't, but have to do so anyway (e.g. [data scientists would rather not, but have to](https://datascience.stackexchange.com/questions/48531/)). The reality is that collecting data is tedious and it cannot always be provided on a silver platter even if those collecting the data try their best to do so. Of course, as I said, you may be lucky and find that someone else has done the work, but this is not guaranteed.
Comment: A dataset can be used in any language, as long as someone (most likely you) can program a way to read the data. Judging from [the example](https://github.com/kirel/detexify-data/blob/master/example.json), the data seems to be a not too complicated json format. I'm sure you'll be able to find a library to read .json in python, and reading the problem will probably be a bit of work, but that is often what has to be done. You could also search a bit more for references to this dataset, if you're lucky you may find someone else has already written the code you need.
Comment: can I use it in python?
Comment: which libraries would be required to train the model?
Comment: Detection is not the prime subject in our project. That's why I don't want to spend much time on it. Isn't there any pre-built model in Keras/tensorflow available that would be PnP to use in code. Be it only for the detection of basic arithmetic characters and digits.


What are the rules of the game Senet?

Question: I tried searching the game, but all I got were complicated instructions. So in basic rules, how do you play senet and what do the different symbols mean?
Answer: The original rules have been lost. There are two competing interpretations about how the game might have been played. These rules are usually used when the game is reprinted these days. One version is R.C. Bell , the other is Kendall. Both rules sets can be viewed here.
Both rule sets believe that this game was a precursor to backgammon. The game was originally played with 4 sticks that were marked on one side. You would move a single pawn 1-5 squares (one for each mark, or 5 for no marks) along the backwards S-path. Two pawns could not occupy the same space. Your own pawns block your movement, and landing on an opponents pawn either swapped (Kendall) or removed (Bell) the piece(s).
The Bell rules:

Is played with 10 pawns, five for each player.
Players add pawns to the board at the specially marked squares based on their roll, or
Move a pawn already on the board.
Special squares are "safe" from attack.
Landing on an opponents piece removes it from the board, your own pawns block your movement.
Landing on the last, upper-left square scores that player 5 points and sets the ending alternating pattern.
The first player go get all their pieces into the alternating end squares gets 10 points, and one more point for each additional turn their opponent takes.
Pieces in end squares cannot be attacked.

The Kendall rules:

Is played with 10 pawns, five for each player.
Pawns start already on the board in an alternating pattern.
Landing on an opponents square swaps positions, your own pawns block your movement.
The next square marked with the Ankh is where pawns go that fail to make their rolls to get off the board.
The special squares at the end require specific rolls to exit, or send you back to the Ankh.
Winner is the first to get all their pawns off the board.

From (left) - House of Beauty (or Good), House of Humiliation (or Water), House of Three Judges (or Two Truths), House of Two Judges (or Ra-Atum), House of Heru (or Horus).
Comment: This is a good answer, but do you have a source for this. A source will let you have proof. More proof means more up votes for you and to me!!!
Comment: Proof for what, that the original Papyrus rules from ancient Egypt don't exist, proof that Kendall / Bell came up with their best guess at the rules set? I think if anything, my answer could be shortened. The OP is asking how it is played (like backgammon), this could be covered by how the.pieces are moved, win conditions, etc. They also want to know the meaning of the symbols (need to flesh out the 5 symbols at the bottom, what the symbols are, and what they mean).
Comment: The answer itself is good what do the squares do?
Answer: Try watching this video:  http://www.youtube.com/watch?v=6R2bxk5K4J0
I hope it helps!
Comment: Hello and welcome to BCG.  Could you expand this answer?  If that video ever gets taken down this answer won't be very helpful; we try to aim for answers that stand on their own.  Links are fine, but link-only answers are kind of fragile.  Thanks.

What are the rules of the game Senet?


How would I run a java process as a Windows Server 2003 service?

Question: I'm looking for the best way to run a java app as a Windows Server 2003 service. What are my options, and what's the basic general process for going about doing this? Thanks much.
Answer: One thing you could try is the Tanuki Wrapper:
http://wrapper.tanukisoftware.org/doc/english/download.jsp
This software basically wraps up the Java executable into something that can be invoked by the service console.
Comment: I think that the license is now a little bit more restrictive.
Yet Another Java Service Wrapper, http://yajsw.sourceforge.net/, is a good alternative, really free-to-use and supports 64-bit environment.
Answer: One option would be to use procrun.  The only downside to this method is documentation is kind of slim.
The basic idea is simple.  You grab the procrun.exe (which is also the tomcat.exe) available from http://tomcat.apache.org and then pass the exe parameters to install the service.  The available parameters are listed at http://commons.apache.org/daemon/procrun.html
Another option is java service wrapper from: http://wrapper.tanukisoftware.org/doc/english/download.jsp, but I haven't had very good luck with it in the past.
Answer: There's the JavaService.exe by OW2 consortium. I have seen a software vendor use this  to deploy their commercial Java product as a Windows Service. It is very easy to install the Windows Service: a simple command issued to the JavaService.exe utility. Below is the sample command they provide on their web site:
JavaService.exe -install "My Service" c:\j2sdk\jre\bin\server\jvm.dll -Djava.class.path=c:\app\classes.jar -start com.my.ExampleClass -err c:\app\stderr.txt


Forwarding messages from my Facebook account to my Gmail account

Question: How do I forward messages from my Facebook to my Gmail account.
When I go to messages, it opens in my Messenger account.
Answer: Forwarding messages to email, now this feature is not available on Facebook (Facebook has disabled this feature).
To get all your messages on email turn on the email notification:
Settings -> Notifications -> Email address: select All notifications, except one you unsubscribe from.
By enabling this you will get email for all the activities on Facebook. Anytime you can unsubscribe any notification from email.
Comment: This is the best possible option though the actual messages are not shown in the email, only a link to open Messenger is provided with the notification telling you that you got a new message.
Answer: I don't think Facebook allows that anymore. A year ago or so Facebook would send notification for messages with a part of message shown in the email but now even though you have email notifications turned on for messages all you get is a link to open the Messenger conversation with the person who sent you the message and for whom you got the email notification.
In the past Facebook apps could read user's inbox which made it possible for third-party services to setup a service that could read your inbox and then send it over to your email inbox but the feature was removed in Graph API 2.4 and no longer available since then and it is quite certain it will stay that way.
Reference:
https://stackoverflow.com/questions/31393889/is-there-any-way-to-use-the-facebook-api-for-reading-user-messages
By default Facebook provides no such option, neither does Facebook allows apps to read user's inbox.


Can refer a detailed low level explaination of the OSI model at operating system level?

Question: I understand the function of each layer in OSI model but I can not comprehend the inner working at the operating system level. I can't mentally picture the life cycle of data from application layer to physical layer.
Comment: an issue is the OSI model is not use in any (current) operating system I'm aware of. What is actually used is the TCP-IP model.
Comment: OSI model vs an Operating System model is not the same as OSI model vs networking protocols. If the question is allowed the answer would speak about operating systems features highlighting the concept or model of a kernel vs the OSI model.
Comment: @RonnieRoyston, host OSes are off-topic here. The linked answer is about what is on-topic here. If the OP has a question about a host OS, the question of that can be asked on the SE site appropriate to the host OS, such as [su], [unix.se], [android.se], [apple.se], etc.
Comment: The plain fact is that none of the OSes actually implement the OSI model. The IP Services model is much closer to what is implemented in the real world, but even that is just a model, and not everything follows it.
Answer: There is no specific "operating system level" in the OSI model. Most commonly, layers 3 and 4 are covered by the OS, but that may vary: functions are offloaded to the NIC (traditionally responsible for layers 1 and 2 only) and augmented by additional protocol handlers.
How the layers interact and work together is well covered in this question and answer.


Is it possible to calculate the 'overall' redox potential of a system?

Question: For a solution where many redox reactions occur (e.g. cytosol, soil solution), can we consider anything as 'overall' redox potential of a system? Is there a formula to quantify it in relation to the amount of each of the constituents?
Comment: I think this is a good question, especially the environmental and biological chemistry aspects of it. One issue (in real life and in simulation): you have to draw the line somewhere for your system boundaries, otherwise the answer(s) is/are ill-defined.
Comment: Related: https://chemistry.stackexchange.com/questions/124988/is-redox-potential-a-valid-term/125026#125026
Answer:
Is it possible to calculate the 'overall' redox potential of a system?

No, it is impossible. You can have a situation where a cellular compartment contains a high ratio of $\ce{NAD+:NADH}$ (i.e. favoring oxidation) and a low ratio of $\ce{NADP+:NADPH}$ (i.e favoring reduction). This is advantageous for the cell because it can run oxidation of some metabolites in parallel with reduction of other metabolites, just by employing enzymes with distinct co-factor requirements.
This is different from pH. A solution is either acidic or basic, not both. The difference arises because acid/base reactions are usually fast, and water acts as acid or base, "communicating" acid/base status across the solution.
Comment: related: https://chemistry.stackexchange.com/questions/124988/is-redox-potential-a-valid-term/125026#125026
Comment: The question came to my mind while I was conducting a heme protein dithionite titration. I obtained a solution of photosynthetic bacteria chromatophores with redox mediators and constructed a cell using a platinum electrode.
If nothing as 'redox system potential' exists, then what exactly is responsible for the resultant potential of such half-cell? In a solution of so many compounds as a solution of biological origin, it is probably impossible to pinpoint a single reaction that would solely determine it.
Answer: Before answering i would like to mention what I was able to interpret from your question:
You want to know that is it possible to find the redox potential of a mixture basically (anything which has multiple non reacting constituents such as soil solution).
I think it is plausible to do so by using the same method which is employed to find out the redox potential of any cell i.e. to write down the cell reactions individually for each reacting species and then writing the overall cell reaction and then calculating the Cell potential keeping into consideration the individual changes in electron in each reaction.
At any instant only one cation and anion would be discharged so when one substance is used up then the lesser reacting substance will get a chance such as the case in aqueous solution of any salt where Hydrogen gas is liberated first and then the cation (if the are difficult to liberate as gases). Hence at different instances different cell reactions will be there and different values of redox potential will be obtained.
NOTE
I have tried to answer the question as per my understanding of Electrochemistry but as i was fairly recently introduced to the subject in case of any mistakes in my arguments I would deeply appreciate any form of advise or correction.


Webform event registration confirmation email

Question: We are just starting to use Webform to register users for a specific event. When the confirmation email is sent, we would like to have the event information (name, date, location) in the email. Can this be done using tokens or will it have to be hard-coded? This is not anything the user submitted. It would be pulled from the event in Civi.
Comment: is this email going from webform, or from civievent?
Comment: @petednz-fuzion the email would be coming from webform. I'm going to play the dummy card here, if the user is registering for a civievent using a webform, is there a way to send them the standard civievent email instead of the webform email? We are actually trying to get the webform email to look like the civievent confirmation email.
Comment: i thought default behavious with w_c was that registering for an Event triggers the civievent receipt/confirmation - but i could be wrong (I practice lots)
Answer: I've gotten as far as event name and date (and time, optionally) by setting Title Display to "Title + Start-Date-Time" for example, and ensuring that the confirmation email that sends to registrants includes the token [submission:values]. If you want to exclude the submitters' details and just the event info, under Webform > E-mails, you can go to "Included e-mail values" and uncheck everything but "Event".
Answer: There may also be a way to do that with webform features but you may want to have a look a the extension "Custom Event Communication" which allows you to define specific emails for each event.


What exactly is the fireball caused by a nuclear bomb?

Question: This seems like a pretty simple question, but I can't seem to come up with a satisfactory answer. When a nuclear bomb is detonated a large fireball forms. What is the fuel that drives this fireball? Or is it not a fire in the traditional sense (i.e. requiring fuel, oxygen, and a spark)?
Comment: It seems like a better comparison is not to *combustion*/fire, but to the *flame* you see with a fire. There are other Q&A here that address what a *flame* is, like https://physics.stackexchange.com/questions/23469/is-fire-plasma/ (even though the title asks about fire).
Comment: Friendly reminder: please use comments to clarify and improve the question. To post a brief answer, post an answer.
Answer: A fireball marks the radius at which the plasma - ionised atoms and free electrons from the air, the ground (if detonated near the ground) the bomb casing and the nuclear explosive - become transparent to visible radiation. It is a "fireball" because visible radiation is produced by hot plasma (a few thousand Kelvin and upwards) via a number of processes involving electrons interacting with ions or recombining with ions. The visible radiation escapes to us from the outer part of the fireball - a bit like the photosphere of the Sun.
The plasma is made hot by material absorbing energy in the form of radiation (predominantly gamma and x-rays and the kinetic energy of reaction products) released in the initial fission or fusion explosion and then kept hot from absorbing its own radiation thereafter. Ultimately, the energy arises from the potential energy of the strong nuclear force that binds neutrons and protons together, which is millions of times greater than the atomic chemical potential energy associated with normal "burning".
Unlike the solar photosphere the fireball from an explosion evolves rapidly - expanding and cooling as it does so - because there is nothing like the gravity of the Sun to constrain the hot plasma.
Comment: @JEB how is that disagreement? Who's talking about milliseconds? A visible fireball is at 1000s of K - as I say in my answer, precisely because of opacity.
Comment: Note that this makes the fireball something that only shows up for an atmospheric detonation.  Set off a bomb in space, and the only material available is the bomb itself, for a "fireball" that's a brief flash a few tens of meters across.
Comment: https://www.amazon.com/Physics-Shock-High-Temperature-Hydrodynamic-Phenomena/dp/0486420027 disagrees, saying the 100,000's kelvin fireball is shielded by the opaque heated to luminescence air at the shock front. It also describes the first milliseconds as X ray diffusion, propagating much faster then any shockwave.
Comment: @JEB That's actually the second effect that leads to a fireball. Both, the radiative and the shock wave fireballs exist, and they swap places after a while. As an observer, you only ever see the outer fireball which is radiative as ProfRob describes at first, but then turns into the shock front fireball as the shock wave emerges from the surface of the radiative fireball. I've added this as a separate answer, because it's indeed missing from the other answers.
Comment: My [answer to the 'directionality' question](https://physics.stackexchange.com/a/108976/25301) of the nuclear explosions says ~4000 K as the temperature of the reactions, but seeing how it was nearly a decade ago that I wrote it, I have no recollection of the source of that information.
Comment: I was really wondering, why isn't the fireball a different color since it is hot as hell? It does look like "regular" fire in some clips or is it white but the quality of the clips is bad ?
Answer: The fireball is not itself burning in the sense of combustion, but is instead the superheated remnants of the atmosphere, ground, water etc. near the point of detonation, which has been turned into a plasma by the enormous temperatures generated by the bomb.
Wikipedia describes a nuclear mushroom cloud as follows:

Initially, the fireball contains a highly ionized plasma consisting only of atoms of the weapon, its fission products, and atmospheric gases of adjacent air. As the plasma cools, the atoms react, forming fine droplets and then solid particles of oxides.
Answer: Like ProfRob says, the surface of the fireball is where the cold translucent air turns into hot radiating plasma. However, there are two distinct ways in which the fireball is formed:

Air is heated by hard radiation (gamma rays and particles). At first from the bomb material, but later also from the growing fireball.

Air is heated by compression when the shock front reaches it.

At first, the radiative heat transport is faster. However, as the surface temperature of the fireball drops, the surrounding air takes more and more time to reach fireball temperatures. That is why this radiative fireball is eventually overtaken by the shock front which is itself strong enough to form a fireball. Obviously, the shock front gets weaker the further it travels, and at some point it stops being strong enough to turn the air into a radiating plasma. At that point the fireball stops growing quickly while the shock front continues to move outwards to do its destructive work.
Comment: +1 for the important mention of the growth as a shock wave. However, do you have some citation for these two fireballs? The sources I can quickly find, albeit old, talk about radiative growth gradually transitioning into shock expansion. E.g., Brode (1968) https://doi.org/10.1146/annurev.ns.18.120168.001101 or Brode (1964) Fireball Phenomenology https://www.rand.org/content/dam/rand/pubs/papers/2006/P3026.pdf  It should also be noted that after some time the shock wave separates from the fireball and the fireball will cease to expand while the shock wave travels to very large distances.
Comment: @VladimirFГероямслава I've also added two sentences concerning the detachment between shock front and fireball. Thanks for pointing out that this was still missing from my answer.
Comment: @VladimirFГероямслава My source is a German book by Wilhelm Schraml, also quite old (1969). But good science does not get old, does it?
Answer: The main channel of energy transport from the nuclear reaction to the surrounding environment is x-ray radiation. This is intense enough to ionize any matter in the vicinity. The fireball is the resulting plasma.
Answer: When you heat material up enough it becomes Plasma.  Plasma is quite opaque to light, because it has a large number of free electrons - and free electrons interact with a broad spectrum of light.  Plasma is also hot.
Hot things emit radiation as black bodies.
So when you dump enough energy into a bunch of matter, you get a ball of plasma.  This ball of plasma acts a bit like an ideal gas -- PV=nRT -- the high temperature causes the pressure to skyrocket, which in turn causes the volume to expand and the temperature to drop.  The plasma also radiates light - above the ground, into the transparent air.  This transparent air heats up, which can in turn turn it into plasma.
Higher energy particles -- be they photons or not -- also penetrate the plasma, and collide with the air.  This is the initial source of energy to heat matter up to a plasma, and at least for some period will outpace the plasma radiation itself.
So you have 3 "waves" of energy:

The direct high-energy products of the explosion (photons, neutrons, alpha and beta particles, high-energy nucleons produced by fission).  You could easily describe this as more than 1 wave, as some of it move far closer to c than other parts.

The hot plasma itself radiating black body radiation.

The hot plasma expanding and colliding with the surrounding material.

None of this is "fire".  Fire that you know of is rapid oxidation -- it is a chemical reaction.  Fire can make things hot enough that they become a partial plasma and hot gas (this is what flames usually are), so that is why the ball of plasma looks like a "fire"ball.
The glow of the black body radiation from the plasma is what you are seeing.  And the edge of the fireball is the point at which the air (and other material) hasn't heated up enough to turn to plasma, so is mostly transparent to the light.  Once it heats up enough it in turn glows and you can no longer see the plasma behind it it -- the "fireball" grows.
The surface of the sun is also a plasma.  It glows like a nuclear bomb does.  Unlike a nuclear bomb, most of it is being held down by gravity (lots of particles escape, but little compared to what remains).  The sun's surface is kept hot by heat radiating from deep inside the sun, where nuclear fusion is providing the energy to keep the sun glowing.
But, if you where to take a chunk of stellar surface matter and put it on the surface of the Earth, it would behave a lot like a nuclear bomb.  Without gravity holding the plasma down, the plasma expands, and the black body radiation of the plasma also blasts in front of it.
You'd lack the "type 1" energy deposit in my list above, but that is just what gets the fireball started.


languageEmbedding=always, but language is removed manually from url still works

Question: I had configured "languageEmbedding=always", it works well, however, when the language was removed manually from url bar of browser, it won't redirect or add the language back, here is an example:
http://app.local/de/index -> good
http://app.local/index -> still available,
but not match requirement, we hope it should refresh and change url to http://app.local/de/index or current language.
The url MUST ALWAYS with language.
Here is my current link manager configuration
<code><add name="sitecore" type="Sitecore.Links.LinkProvider, Sitecore.Kernel" addAspxExtension="false" alwaysIncludeServerUrl="false" encodeNames="true" languageEmbedding="always" languageLocation="filePath" lowercaseUrls="true" shortenUrls="true" useDisplayName="true"/>
</code>
How to do it?
Comment: Why do you actually want a redirect? Is a canonical on your page not sufficient?
Comment: @Gatogordo The requirement is from my co-worker, he is in charge of SEO optimists, the website is with canonical, I have no idea what is the benefit of this requirement....
Answer: The language embedding and your link provider is to create the links, not to resolve them.
If you want te verify the language in the url and redirect when it is not there, you could add a processor to the httprequestbegin pipeline and put your logic in there. http://insitecore.tumblr.com/post/37734162227/sitecore-httprequestbegin-pipeline-in-detail
Comment: Is it easier to solve this issue by configuring IIS?
Comment: Don't think so.. if you get a url without language, IIS won't know to which language it should redirect.
Comment: If someone enters a URL without a country code the URL should rewrite to the correct version.
Comment: In that case you should add a processor as in the answer.
Answer: Like Gatogordo said, the languageEmbedding setting is used by the LinkManager when rendering item urls. The site will always resolve to the default language without the language code in the url. We ended up doing the redirects in the load balancer because we already had some redirect login in there to begin with.
Comment: so you had done that always keep language in URL by setting load balancing? I have never configured it, is it complicate by doing like that? Maybe I can ask our IT dept.
Answer: I Solved this requirement by the following hard code
<code>    var mustHave = "/" + Sitecore.Context.Language;
    var isWithLanguage = HttpContext.Current.Request.Url.AbsoluteUri.Contains(mustHave);
    if (!isWithLanguage)
    {
        var urltmp = Helper.GetUrl(Sitecore.Context.Item.ID.ToString(), Sitecore.Context.Language.ToString());
        Response.Redirect(urltmp);

    }
</code>
This condition code I put in the layout page, so it will be validated each time page load.


Breaking relationship with someone

Question: Assalamu alaikum brother, I've heard that prophet swaw has said that if any Muslim doesn't talk any other Muslim brother for 3 days none of his good deeds are acceptable. Does this apply to all situations.
I mean to ask let's say a Muslim's sister got raped or murdered by another Muslim or did something worse than this. Is that Muslim brother still obligated to talk to him.
Answer: Assalamualaikum waramatullahi wabarakatuhu
Forgiveness is something that our prophet tell us to always do as he said that
Abdullah ibn Amr reported: The Prophet, peace and blessings be upon him, said, "Be merciful to others and you will receive mercy. Forgive others and Allah will forgive you." (Musnad Ahmad),
So I don't think the idea of not talk to some because he did something wrong is good, because verily by you talking to him may let him repent and asked Allah forgiveness for all his sin and we always need to pray for someone like that because this maybe the people that will distory our society
Wasalamu alaikum
Comment: With the case of wahshi bin Harb (r.a) the massager of Allah forgive him and do not what to be remembering the death of his uncle when ever he saw wahshi do that is why the prophet said "I should not see you till the day you are resurrected"
Comment: Man! the example he mentioned is : "I mean to ask let's say a Muslim's sister got raped or murdered by another Muslim" and you speak about forgiveness! how about the Prophet not talking with the one who murdered his Uncle Hamaza even after he entered Islam!

Breaking relationship with someone


Who is the blessed man to whom the Lord does not impute iniquity (Psalm 32:2)?

Question: Psalm 32:2 NASB95

How blessed is the man to whom the Lord does not impute iniquity,
Comment: It is David, yes; and every sinner who has believed on the Lord Jesus for the forgiveness of sins.  It is every believer, everyone who has repented towards God, and trusted in the shed blood and finished work of Christ.
Answer: Quite simply, "the man to whom the LORD did not impute iniquity" (or, "the man whose sin the Lord does not count against him" NIV; or, "the one whose rebellious acts are forgiven" NET) is none other than King David.
Here is what commentator [Constable][1] has to say about this Psalm:

Students of this penitential psalm have often linked it with David's
adultery with Bathsheba and his murder of her husband Uriah (2 Sam.
11). While that identification seems probable in view of the content
of the psalm, the connection is not indisputable. Psalm 51 was David's
prayer for pardon for having committed those acts. If Psalm 32 looks
back on the same sins, David probably composed it later than Psalm 51.
Psalm 32 stresses God's forgiveness and the lesson David learned from
not confessing his sin quickly.

David, as with many of us, found out the hard way that refusing to confess his sin took a terrible toll on his life, both physically and spiritually. He realized that to confess his sin meant he had to uncover it and call it what God called it. Moreover, David refused to rationalize his behavior and make excuses for whatever sin he had committed.
As a result of his confession, David was forgiven by God and was relieved of guilt.
[1]: https://netbible.org/bible/Psalms+32
Answer: Normative Description
Such sentences are neither interrogative nor describing a particular individual in mind. They are normative description of a generic blessed man. This Psalm exalts the righteous blameless man, and someone whose sins are forgiven. Compare the Beatitudes in Matthew 5.
A substantive is a word that functions as a noun, including nouns, pronouns, adjectives, participles, and articles. Substantive nouns are often used to describe general concepts or ideas, rather than specific individuals. The author can even use "I" as such an indefinite, generic substantive. (Gal 2:18) For if I rebuild what I tore down, I prove myself to be a transgressor.
[Ps 32:1-2, 10-11 ESV]

Blessed is the one whose transgression is forgiven, whose sin is covered. Blessed is the man against whom the LORD counts no iniquity, and in whose spirit there is no deceit.
(10-11) Many are the sorrows of the wicked, But he who trusts in the LORD, lovingkindness shall surround him. Be glad in the LORD and rejoice, you righteous ones; And shout for joy, all you who are upright in heart.


How many vanishing point does 2 point perspective can have

Question: I'm trying to learn perspective from a book and it says that 1 point perspective can only have 1 vanishing point, so I'm assuming that 2 points can have more than 2 vanishing points.
Comment: Can you walk through your logic of how you came to that conclusion?
Comment: I was reading a book and it said that you can have an infinite amount of vanishing points, but the only exception is the one-point perspective it can only have one vanishing point. That's why I was wondering if 2 points can have more than 2 vanishing points.
Comment: well actually there is just perspective and 1 point, 2 point and 3 point are just special cases. if your scene consists of anything other than colinear cubes then you will in fact have infinite wanishing points
Answer: Part 1
If 1 point perspective has one vanishing point.
Don't you think it is logical to assume that 2 point perspective has 2 vanishing points? So, in this case, no. The point of a two-point perspective is to have 2 vanishing points so you can focus on learning 2 point perspective. (The other axis will be parallel)
A 3 point perspective has 3 vanishing points.
Part 2
The concept of a 1 or 2 or 3 point perspective is to facilitate our understanding of a more or less constructed world. Architecture, furniture, city blocks. It is a  simplification of a world constructed around orthogonal axis. You align a rectangular table to be parallel to a wall with a ceiling parallel to the floor with walls at 90° of the other walls.
But in reality, every single line has it own vanishing point. It turns out that if another line is parallel to this line, they share the same vanishing point (VP), except when it does not share it anymore. When you turn a table, now they do not share the same VP as the walls, so you now have new VP for each group of lines of the table.
Take a look at some related questions.
Finding the possible vanishing points in a landscape
At what point does 1 point perspective become 2 point perspective?


Dracaena marginata help

Question: Bought my Dracaena marginata less then a month ago. It was doing great with the occasional loss of a leaf or two. I went out of town for the holidays (5 days) and came back to my plant in complete crisis mode. What is my best chance of saving this baby?
Comment: Did you leave the plant sitting in water? My take is the plant likes it dry, and a month of no water in the Winter would be nothing to the plant.
Answer: If you noticed no particular problems before you went away, this might just be drought. The soil in the pot looks very dry, did anyone water it while you were away? How much and how often were you watering prior to going away? I note also that the soil level in the pot is very high, which would encourage water to simply run off the top without much of it penetrating the soil, and there are obvious roots visible in the holes at the bottom of the pot. It needed repotting into a larger pot with drainage holes, with a half inch gap between the rim of the pot and the top of the soil.
That said, as all the leaves will now inevitably fall, if the soil is really dry and the pot feels light when you pick it up, immerse it in a bucket of water, weighting the top down with something so the water covers the soil at the top. Leave it for an hour or two, then lift it out and let it drain down freely. Cut back a bit the tops of the stems (I think I see a hint of blackening on some of them, so cut down to healthy wood if there is) using clean, sharp secateurs to see if they are moist inside or whether they are dead and brown; if they look dead, cut down lower in hopes you'll find live wood. If it's just drought and you were only away five days, hopefully  the stems are not dead and you won't need to cut much off, but regardless, you could, in theory, cut them down really low and they would still grow if alive.
Assuming the stems are alive, pot on into something bigger, using fresh potting soil, water to moisten the new soil, then stand it somewhere out of sunlight but with daylight, and away from heat sources. Do not water again until the soil at the top of the pot feels  pretty dry while it's got no leaves, then water well and allow to drain. If and when it starts producing foliage again, you may need to water more often, but always wait till the soil at the top feels dry to the touch, then always water thoroughly when you do water, always allowing the excess to drain away freely - empty any outer pot or tray after 30 minutes or so to  make sure the pot is not left standing in water.

Dracaena marginata help


Particle collision and mass relation

Question: Is mass important in calculations when two particles are collide? or is only the charge that matters? is collision in microscopic world the same with macroscopic world?
Comment: please note that at the level of nuclear and particle physics it is special relativity and quantum mechanics that hold. One uses the four vectors of special relativity to define masses.http://hyperphysics.phy-astr.gsu.edu/hbase/Relativ/vec4.html
Answer: Momentum is important in the calculations involving collisions/interactions. For isolated systems, i.e., systems which you can ignore any impulse transfers into or out of the system during the time frame of the collision, the total momentum of the system will remain constant at every instant.  For matter particles (not photons), the momentum depends on the mass.
If there is no outside influence on the system, i.e., nothing is doing work on the system, then the total energy will remain constant, but the kinetic energy may change if there is permanent deformation of any of the bodies (among other possible things such as internal work changing the temperature of one of the bodies). Changes in temperature or kinetic energy are also mass dependent.
For both macroscopic and microscopic collisions, momentum and energy are important and are conserved and possibly constant within the particle system, but the interactions of the bodies are different.  For near-elementary particle or nucleus collisions (alphas, heavy ions), the interaction may be electromagnetic or nuclear or weak. For macroscopic collisions, the interaction is electromagnetic but we simply say "contact."
Bottom line: Yes, mass is important in collision calculations.
Comment: thanks for the answer...does this apply also on gold foil experiment ?
Comment: @adosar Yes. The forces in Geiger-Marsden experiment are Coulomb forces.  But the gold atoms are trapped in place because gold is a crystal, so effectively the momentum looks like it's not conserved (but it really is).  Angular momentum remains constant and KE+PE remains constant.

Particle collision and mass relation


Passing object into smart contract?

Question: How would I go about passing a user input into a smart contract? Say I want to pass a token name via user input and set it as the token name inside the smart contract. How would I do this?
Answer: If you are new to this, then I'd suggest starting with the Solidity documentation. You'll get an understanding of how smart contracts work from there.
After that, I'd move onto creating your own contracts using the Online Solidity Compiler.
In your specific example, play about with the contract below to get an understanding of how you'd pass a token name to a smart contract.
pragma solidity ^0.4.0;

contract TokenSample {
    address creator;
    string tokenName;

    function TokenSample(string _tokenName) public {
        creator = msg.sender;
        tokenName = _tokenName;
    }

    function setTokenName(string x) {
        tokenName = x;
    }

    function get() constant returns (string) {
        return tokenName;
    }
}

In remix:

Once you understand the above, I'd start looking at the Web3 JS API as mentioned in another answer.
Here you'll be able to provide an interface for users to interact with your contract, as well as deploy it.
tokenContract = eth.contract(contractAbi);
token = tokenContract.new(constructorParam1, {from:eth.accounts[0], data:contractCode, gas:3000000})

From there forth, you'll just be mostly using standard web development practices to continue development. i.e. JavaScript, HTML, CSS
Answer: Assuming you already have developed such smart contract with a function that receives a parameter and assign that value to a state variable, you would have to build a front-end, which could be a web developed with Javascript.
You would have to use the Web3 JS API to instantiate your deployed contract and execute its functions: https://github.com/ethereum/wiki/wiki/JavaScript-API
You can also use a framework such as Truffle to make the compilation, deployment and usage of the smart contracts easier: https://github.com/trufflesuite/truffle
Comment: I'm wondering how to do this with Web3
Comment: @JorahFriendzone what have you tried so far?
Comment: I'm able to link the contract to Remix via web3, I'm just unsure how to pass data into the constructor

Passing object into smart contract?


Two transits in Schengen area

Question: Do I need a transit visa if I am travelling from Marrakech to Oakland, California, with connections in Oslo, Norway and Barcelona, Spain. I have a 12-hour layover in Oslo and a 2-hour layover in Barcelona. I am a Moroccan passport holder and I am a US permanent resident.
Comment: Oslo is definitely not in Sweden.
Comment: You need a Schengen short-stay visa, that is, a type C visa, because you will pass through Schengen entry controls in Oslo and Schengen exit controls in Barcelona.  An airport transit visa (type A) is insufficient because it does not allow you to pass through passport control; type B transit visas were abolished some years ago.  If you could fly directly to Barcelona, you would not need a visa because you would not need to enter the Schengen area.  You would also save a lot of time!
Comment: @dda that assertion was the result of a faulty edit, not a mistake on the part of Allal arroud.
Comment: @Giorgio please be more careful when you edit questions.
Answer: Your problem is that the flight between Oslo and Barcelona is a Schengen internal flight which from an immigration point of view is treated like a domestic flight. So you will have to enter the Schengen area in Oslo and leave it in Barcelona.
An airside transit visa is no use to you because you have to enter the area. The Schengen area no longer issues landside transit visas. Therefore you will need a regular short stay Schengen Visa.

Two transits in Schengen area


Rendering wrongly in screw modifier

Question: Hi I wanted to create the following structure. I have created a single edge and used screw modifier to create this. I used freestlye option to display the edges. However when I render, I am seeing this extra edges! These are not visible in viewport or camera displays.
How to avoid it?
Answer: It renders all edges, even the ones that are made by automatic triangulation during rendering. Maybe you marked the faces instead of edges. You should only mark the edges and also set the render settings to render only marked:

Rendering wrongly in screw modifier


boost graph library: Merging undirected graphs

Question: it is my first post on Stackoverflow. So please don't be to hard on me if I violate any posting rules by accident.
I am fighting with the BGL. For a project at my university I need some graph related stuff. Therefore one important function that I need is to merge two undirected graphs.
I have already searched for related questions and found these topics:
Merging graphs using boost graph
copy a graph (adjacency_list) to another one
The first one doesn't work for me since I am always getting an "out of range" error within the copy_graph function. I am sure that the code is not the problem by my attempt to adopt it to my program.
The second one did merge the two graphs (related to the vertices) but the edge information of the new graph wasn't correct.
This code shows how I define my graph. It's an undirected graph with vertex properties (no edge properties):
<code>struct m_vertex_properties {
Element* element;
Strip* strip;
};

typedef adjacency_list<vecS, vecS, undirectedS, m_vertex_properties,no_property> MyGraph;
typedef MyGraph::vertex_descriptor NodeID;
</code>
Based on the second link I posted I used the following function:
<code>*static*/ void Fracture::merging(MyGraph & g1, NodeID v_in_g1, MyGraph & g2, NodeID    u_in_g2) {       // EDGES ARE NOT CREATED CORRECTLY!!!

typedef map<NodeID, size_t> IndexMap;
IndexMap mapIndex;
associative_property_map<IndexMap> propmapIndex(mapIndex);

int i=0;
BGL_FORALL_VERTICES(v, g2, MyGraph)
{
    put(propmapIndex, v, i++);
}

copy_graph( g2, g1, vertex_index_map( propmapIndex ) ); //means g1 += g2
}
</code>
As I mentioned: The resulting graph (g1) does contain all vertices (in my test scenario 2+3) but for some reason only 3 edges.
I hope that for someone being much more advanced than I am the mistake is easy to find. Honestly I don't even understand everything the function does. Thank you guys!
Comment: A [SSCCE](http://meta.stackexchange.com/questions/22754/sscce-how-to-provide-examples-for-programming-questions) might help.
Answer: If vertices are copied from g2 into g1, it sounds very weird that edges were not copied. Probably somehow the edges were not there.
You can try to print the source graphs and the resulting graph using the following code:
<code>#include <boost/graph/graph_utility.hpp>
std::cout << std::endl << "graph g2" <<std::endl;
boost::print_graph(g2);
</code>
(and similarly for g1 both before and after the function call).


Discover linked email from steam account

Question: I have an account from a long time ago and i want to login again but the steam guard is blocking me from logging in, i cant bypass it because forgot my steam email account. Anyone know how to find it ?
Answer: Not unless it is recorded somewhere. This prevents people from being able to easily scan for email addresses to steal so that they can then steal the Steam accounts.
The next best thing is if you still have the phone number that Steam Guard was attached to. Recovery through that should be just as easy as with the email address.
If that fails you can contact support for help, but you'll need to have some info. For example the login name, numbers from a credit/debit card that's been used to make a purchase, or a retail Steam key (e.g. from a boxed game). They may also take info like the original phone number attached to Steam Guard, and the official support article above mentions "bank transfer" as one of the pieces of data they accept.
Comment: Ohh ok, thanks maybe i just gonna give up on that account


Is there evidence that some non-human species perform sexual selection based primarily on intelligence? How do they do this?

Question: I'm a biology amateur, but it seems like sexual selection is almost always performed based on physical characteristics, the outcome of physical contests, or some sort elaborate courtship. But do any non Homo-Sapiens perform sexual selection based on intelligence factors, like problem solving abilities? If so, how does the species accomplish this? I know natural selection as a whole would definitely favor intelligent individuals, but I'm curious if any species actually takes this into account when choosing mates.
Comment: Alas, selection based on intelligence is often absent in *Homo Sapiens*...
Comment: Super question.
Answer: Very intresting question. The problem is that animal intelligence is hard to measure not only for scientists, but probably also for the potential mate. Paradoxically, that is why selection for intelligence, if it occurred, may be very strong. One has to be smart in order to recognise smart behaviour, so preference and preferred feature are strongly connected. But that's only my opinion.
Boogert et al., 2011 1 reviews the current knowledge about animal preferences for cognition skills. They conclude that there is very little data on this subject. The given examples are:
1) Preference for elaborating birds songs (as songs are not inborn and have to be learned)
2) Spatial abilities:

In meadow voles (Microtus pennsylvanicus), males with better spatial learning and memory abilities were not only found to have larger home ranges and to locate more females in the field (Spritzer, Solomon, et al. 2005 2) but were also preferred by females in mate-choice tests, even though the females did not observe males' performance on spatial tests (Spritzer, Meikle, et al. 2005 3).
In guppies (Poecilia reticulata), males that learned faster to swim through mazes to gain a food reward were found to be more attractive to females (Shohet and Watt 2009 4). However, females were not able to see the males' performance in the mazes. Although male learning ability was weakly correlated with saturation of the orange patches on his body (a sexually selected trait (...)), orange saturation surprisingly did not correlate with female preferences. Thus, the cues leading female guppies to prefer faster learners are unknown.

It is possible, that females base their choose on some factors that correlates with cognitive skills or on total wellness, what may depend on intelligence.
3) bowerbird's abilities to build bowers (courtship constructions):

Comparative studies across bowerbird species have shown that relative brain size is larger in species that build bowers than in closely related nonbuilding species (Madden 2001 5). In addition, relative brain size increases with the species-typical complexity of the bower (Madden 2001 5), and a comparative study on the relative size of specific brain regions showed that species with more complex bowers have a relatively larger cerebellum (Day et al. 2005 6).

4) foraging performance

A recent experiment by Snowberg and Benkman (2009) 7 using red crossbills (Loxia curvirostra) showed that, after observing 2 males extracting seeds from conifer cones, females associated preferentially with the more efficient forager of the 2. The authors were able to exclude female choice for correlated traits by experimentally manipulating foraging efficiency, such that fewer seeds were available in the cones of one of the males. The males were also swapped between treatments (i.e., slow vs. fast forager) so that male identity could not explain the females' preferences for the most efficient forager.

Another way that intelligence may be favored by sexual selection is "cheating" during courtship. For example most frog species call to attract females. But this signal may also attract aggresive rivals or predators. Some males, especially the weaker ones, do not call  but stay near calling individual.  This allows them to avoid confrontation and wait for approaching females [8]. The successfulness of this strategy may depend on how "smart" the individual is (only my opinion).
[1] Boogert, N. J., Fawcett, T. W., & Lefebvre, L. (2011). Mate choice for cognitive traits: a review of the evidence in nonhuman vertebrates. Behavioral Ecology, 22(3), 447-459.
[2] Spritzer MD, Solomon NG, Meikle DB. 2005. Influence of scramble competition for mates upon the spatial ability of male meadow voles. Anim Behav. 69:375–386.
[3] Spritzer MD, Meikle DB, Solomon NG. 2005. Female choice based on male spatial ability and aggressiveness among meadow voles. Anim Behav. 69:1121–1130.
[4] Shohet AJ, Watt PJ. 2009. Female guppies Poecilia reticulata prefer males that can learn fast. J Fish Biol. 75:1323–1330.
[5] Madden J. 2001. Sex, bowers and brains. Proc R Soc Lond B Biol Sci. 268:833–838.
[6] Day LB, Westcott DA, Olster DH. 2005. Evolution of bower complexity and cerebellum size in bowerbirds. Brain Behav Evol. 66:62–72
[7] Snowberg LK, Benkman CW. 2009. Mate choice based on a key ecological performance trait. J Evol Biol. 22:762–769.
[8] Bateson P. 1985. Mate choice. Cambridge University Press. 181-210
Answer: I know nothing about biology however I did watch an amazing PBS documentary on cuttlefish that I think is fairly relevent.
From http://www.pbs.org/wgbh/nova/nature/kings-of-camouflage.html

NARRATOR: During mating, males outnumber the females, sometimes 10 to
  one. And they're all looking for the chance to pass on their genes.
  While a female lays eggs beneath a rock, a big male tries to
  monopolize her, staving off the other hopeful suitors.
Sometimes intimidation alone won't work, and the competitors hurl
  themselves into a violent and bizarre looking wrestling match.
Like an octopus, they'll squirt out an inky smokescreen when it's time
  for a hasty retreat.
But size and strength aren't the only ways to impress the ladies.
Thanks to the cuttlefish's skin morphing talents, the smaller males
  have a clever trick up their sleeve.
MARK NORMAN: The really interesting thing in this system is actually
  far less obvious, and when you first dive with them, you don't see it.
  It takes a while before you realize what's going on.
The small males, who have no chance in a contest with a big male, are
  actually doing something completely different. They're effectively
  cross-dressing. They're dressing up as a female, by pulling in their
  webs and putting on this mottled color pattern and gliding past these
  big, aggressive male, pretending to be a female, and will come in to
  the female underneath.
And what happens is, as another big male comes in and a potential
  conflict between these big guys starts up, the sneaker males start
  mating with her, successfully mate with the female, while the big guy
  isn't even aware of it.
NARRATOR: The cross-dressers' success is all the more impressive
  because the females often play hard to get, as Roger Hanlon has seen
  firsthand.
ROGER HANLON: These females are very picky. They reject 70 percent of
  approaches for mating. Yet they only reject 30 percent of the
  cross-dressing males. So this trick gets them in the door, so to
  speak, past the fighting male, and they're accepted by the female.
Comment: Sounds a lot like humans to me. Explain why females pick jerks rather than normal guy with money. If guys with money approach females, they got beaten up by stronger males with anti prostitution laws. Then some guy just seduce, and it works. Maybe it's how we are set up.
Comment: @JimThio I think Cracked has an answer for that here. http://www.cracked.com/article_18804_the-6-wrong-questions-men-love-to-ask-about-women.html


How to understand that Higgs does not imply circular reasoning?

Question: From what I understand about Higgs (boson/field) it gives mass to subatomic particles. When it interacts a lot with the fields it gets a great mass (like a top quark) and when it interacts a little it gets less mass (electron of even a photon). But when I try to figure out why an electron is interacting with less than a top quark with the Higgs field I tend to think that it is because of their mass. That probably isn't correct by making circular reasoning but why are particles interacting differently? What property of a particle makes that difference?
Comment: Irrespective of the technical explanation which I hope you will receive, don't over-think the standard model. All it is, is a bunch of fits to what has been measured (modern epicycles, if you like). Some things have to be in there for symmetry reasons and some mechanism to pick up mass has to be in there because the theory starts with massless fields. The Higgs field, for what it's worth, is one of the most simple of the possible mechanisms of how the massive fields can be constructed from a massless theory. Nature plays ball with the idea... and little has been learned by seeing the Higgs.
Comment: Don't overthink circular reasoning either. To an extent, everything in physics is circular - we use observations to form hypotheses to predict observations in the future which either add or remove credence from the hypotheses in turn. We do not know the fundamental rules of the universe, so we can't work from first principles. The key point is to *never count the same evidence twice* - that's where the harm of circular reasoning comes from, the magical feedback loop that inflates evidence. As long as you follow this, multiple ways to get the same result *add* to confidence.
Comment: If they aren't using circular logic, why are all the particle accelerators giant circles?
Answer: The mass of a particle depends on the strength of the Yukawa coupling between the Higgs field and the quantum field for that particle. In the Standard Model the Yukawa couplings are free parameters i.e. their values have to be put in by hand to match the observed particle masses.
You ask why the electron interacts with the Higgs less than the top quark, and there isn't an answer for this apart from saying its Yukawa coupling is smaller. At the moment we have no way of explaining why the various Yukawa couplings have the values they do.
Comment: This is a fair and accurate answer, and I appreciate the irony that comes from the answer being basically a restatement of OPs confusion with "mass" replaced by "Yukawa coupling." It subtly highlights that we don't (and probably can't) know "why" the masses of particles have the values they do.
Answer: Since in Standard model this problem - why there is the hierarchy between fermions masses - is unsolved (but we may just state that the hierarchy exist, and the reason isn't relevant; this question is like the question about the nature of chiral structure of the Standard model), we may ask ourself: is this hierarchy natural? On the language of quantum field theory, this means following. Suppose we start from the bare electroweak theory parameters, precisely, Yukawa couplings $y_{j}$ of higgs doublet to fermions, defined from the interaction lagrangian,
$$
L_{\text{Yuk}} = \sum_{j = \text{fermion doublet}}y_{j}\bar{L}_{j}HR_{j} + h.c.,
$$
for which there is hierachy; i.e, for example, the coupling  $y_{e}$ to electron-electron neutrino doublet $L_{e} \equiv \begin{pmatrix} e \\ \nu_{e}\end{pmatrix}_{L}$ is much smaller than the coupling $y_{t}$ to top-bottom quarks doublet, $L_{t} = \begin{pmatrix} t \\ b\end{pmatrix}_{L}$.
Then these bare parameters $y_{e}, y_{t}$, defined from the experiment, will get quantum corrections because of nontrivial interaction. The question: do these corrections preserve hierarchy, or, more precisely, are corrections for given fermion mass (or, equivalently, for given Yukawa couplings) are of order of this fermion mass? If yes, such theory is called natural theory. If no, theory is unnatural.
For the case of fermions the answer is yes, since there exist symmetry which protects their mass from getting huge corrections. Such symmetry is called chiral global symmetry.  If it is unbroken by anomaly, then at high scales, where the mass parameter is much smaller then the given scale, then it possesses the fact that corrections to the bare mass is suppressed by powers of this mass. I.e., this fact directly provides the statement that corrections to fermions masses are proportional to these masses. So hierarchy is naturally preserved in Standard model.
For Higgs doublet there are no such symmetry (the scale symmetry), so at quantum level it may acquire corrections which are larger than the Higgs boson mass. In this sense Higgs mass parameter isn't natural in SM.


Asymptotics of $3n$ coin flips

Question: Suppose we throw a coin $2n$ times. The probability of $n$ times heads (and therefore $n$ times tails) is $$P(\text{"n times heads"}) = \frac{1}{4^n}\binom{2n}{n}.$$
We can use Stirling's formula to get the asymptotics $$\frac{1}{4^n}\binom{2n}{n} \sim \frac{1}{\sqrt{\pi n}} $$
as $n\to \infty$. Now I want to throw the coin $3n$ times and look at the probability of the event $$P(\text{"twice as often heads than tails"}) = \frac{1}{8^n}\binom{3n}{2n}.$$
Is there any "nice" asymptotics for this too? I tried using Stirling's formula again, but it does not seem to be as nice as it could get.
Comment: I'm sure Stirling works just as well.
Comment: @LordSharktheUnknown. It must just as you wrote !
Answer: Simply use that $$ \log {3n \choose 2n} = 3n\log(3n)-3n -2n\log(2n)+2n-n\log(n)+n +O(\log(n))  = n\log\left(\frac{27}{4}\right) $$ implies that
$$ P("\text{twice as often heads than tails}") \sim \frac{1}{8^n} \frac{27^n}{4^n} = \frac{27^n}{32^n} \ll 1 $$
Comment: Oh, I see. Thanks!
Comment: The end result is not correct, the $O(\log n)$ term does matter. See my answer below.
Comment: Can you explain how you obtain the logarithm identity?
Comment: I simply use the logarithm of Stirlings formula: $ n! \sim n^n e^{-n} \sqrt{2\pi n}$ implies that $\log n! = n\log(n) - n + O(\log(n))$.
Comment: It is correct, precisely in an asymptotic sense. The symbol $A\sim B$ as $n\to \infty$ is defined (!) as $\lim_{n\to \infty} A(n)/B(n)=1$. The additional factor you added is helpful, because it is one order higher in the expansion but it does by no means imply that my result is false. The OP was just asking for an asymptotic expression, which I have given.
Answer: Suppose that we toss a fair coin $N$ times. What is the probability that we get $p N$ heads and $(1-p)N$ tails? It is $2^{-N}{N \choose pN}$. Now,
$${N \choose pN} \approx 2^{-H(p) N},$$
where $H(p)$ is the binary entropy function, defined as $H(p) = p \log_2\frac1p + (1-p) \log_2 \frac{1}{1-p}$ (see also https://en.wikipedia.org/wiki/Binary_entropy_function). Thus, the probability of the desired event is approximately $2^{(-1 + H(p)) N}$.
Plugging in $N = 3n$ and $p = 1/3$, we get that the probability is approximately $(27/32)^n$.
Comment: +1 for the binary entropy function, I didn't know it yet.
Answer: Using Stirling's approximation you get
$$\begin{align}
P(\text{twice as many heads})
&= {3n\choose 2n}(1/2)^{3n}\\
&= \frac{(3n)!}{(2n)! \ n!\ 2^{3n}}\\
&\approx {
(3n)^{3n}\ e^{-3n}\ \sqrt{6\pi n} \over
(2n)^{2n}\ e^{-2n}\ \sqrt{4\pi n}\
(n)^{n}\ e^{-n}\ \sqrt{2\pi n}\
2^{3n}}\\
&= \sqrt{3\over 4\pi n}\ \left({27\over32}\right)^n.
\end{align}
$$
Numerical precision is quite good ; for $n=50$ for instance
$$
\begin{align}
P(\text{twice as many heads})&= {3n\choose 2n}(1/2)^{3n} =0.0000141031
\\
\quad\text{and}\quad \sqrt{3\over 4\pi n}\ \left({27\over32}\right)^n&=0.0000141306.
\end{align}
$$

Asymptotics of $3n$ coin flips


Why a coin feels a force when it is put on a rotating horizontal disc

Question: Suppose we have a disc which is placed in horizontal plane and have radius R. Disc is rotating and rotation axis is passing through center of disc and in vertical plane .
Now we place a coin a on disc and disc instantly feels a force and come outward. Now if we are observing it from outside the disc then there is no force which is acting on coin but why it is coming out.
Comment: Is the disc smooth ?
Comment: Yes disc is smooth
Comment: It is easy it would stay still you can see that from it's fbd.
Answer: I would take the liberty to point out that there will be no 'force' the way you expect on the coin when you drop it on disk , as you've mentioned , the disk is smooth so if you are going to put it on the disk without a prior velocity in the plane of disk , the coin is just going to stay there still and the disk will keep on rotating beneath it. Smoothness of disk settles the fact that no frictional interaction should be there between disk and coin and the only other forces being normal forces act in a perpendicular direction to plane have no effect on the coin's outward journey.
After saying all this I am just trying to imply that for the coin to move out like the way you describe , there must be friction on it. Now , when you place the coin on the disk ,friction speeds it up and the coin starts moving in circles , when the tangential velocity is high enough the centrifugal force on the coin surpasses the force of limiting friction between the coin and disk and as a result ,the coin slides outwards.
Comment: What will happen if disc is not smooth . in daily life we see it throw outward but why it will happen
Comment: the above explanation is exactly for a non-smooth disk
Comment: the second paragraph


What happens if you knockback Warwick while he ults?

Question: If you knockback an ulting Warwick, does it cancel the ult or does he just stand where he lands clawing the air?
Comment: If memory serves properly he just stands where he lands clawing the air. It's been too long for me to be sure enough to post this as an answer however.
Answer: Anything that interrupts the channel of a suppression ult will end the ultimate prematurely. This applies to Warwick, Malzahar, and Urgot, and any method that breaks a channel will likewise interrupt the ultimate, primarily: knockback/up, silence, and stun.
Originally, when warwick's ult was broken prematurely, he did continue clawing the air, but that behavior was patched out some time ago.


Can I disable the auto power off on my Nikon SU-800

Question: Can I disable the auto power off on my Nikon SU-800 so it stays on for longer?
I need to use it in a different way.
Comment: You might want to ask the more specific question related to what you want to do, and why you think this setting might help.
Answer: SU-800 go automatically in standby mode in two cases:

The SU-800's auto power-off function and camera's  exposure meter-off
function
With a camera body that is compatible wi th TTL auto flash,
the SU-800 goes into  standby mode when the camera's exposure meter
turns off. Without a camera body, if the SU-800 is not being used for
approx. 40 seconds,  the standby function activates and automatically
turns the SU-800 off to  conserve battery power. •  No indicators are
displayed on the LCD panel in standby mode. •  When in standby mode or
when the exposure meter is off, the SU-800 comes back on  again when:
The [ON/OFF] button on the SU-800 is pressed. The camera's power is
turned on

I did not find any way to change this behavior
Reference SU-800 manual, page 57


Short Story Anthology: stories that were made into movies

Question: I used to have a book that was all short stories made into movies.  I know the story for Death Race 2000 and I think The Running Man were in there.  Does anyone remember what it was called.  I would like to get it again.
Comment: Do you possible remember when the book was published as *"The Racer"*, the story Death Race was based on, was published in a few anthologies.
Comment: [One of these?](http://www.isfdb.org/cgi-bin/titlecovers.cgi?96327)
Comment: http://www.isfdb.org/cgi-bin/pl.cgi?35472?
Answer: I guess it's one of these anthologies containing Ib Melchior's story "The Racer" aka Death Race 2000. (That story is in a few other anthologies, but these are the ones on the made-into-movies theme.)
They Came from Outer Space: 12 Classic Science Fiction Tales That Became Major Motion Pictures (1981) edited by Jim Wynorski:

Reel Future:The Stories That Inspired 16 Classic Science Fiction Movies (1994) edited by Forrest J. Ackerman and Jean Stine:

Science-Fiction Classics: The Stories That Morphed into Movies (1999) edited by Forrest J. Ackerman:
Answer: You're probably thinking of Reel Future

Reel Future is an anthology of stories on which films were made, including:

"The Racer" (Death Race 2000) by Ib Melchior
"Eight O'Clock in the Morning" (They Live!) by Ray Nelson
"Who Goes There?" (The Thing) by John W. Campbell, Jr.

And others. Each story had a little blurb about how it came to be made into a film, and I recall there were some black & white photos from the films as well.
The Running Man was based on a novella by Richard Bachman (a.k.a. Stephen King), which seems to have only been published with other books by "Bachman".


Boolean Difference failed - Give me an alternative

Question: I often model separate pieces and modify them with boolean operations to get to a final result.  I'm stuck with a quarter of a cone intersecting with a hollowed cube (think of an inverted tray). My goal is the union of the cone and the smaller portion of the cube/tray. In other words the cone is larger than the diagonal of the tray.  I'm not getting desired result in Blender 2.77, but I really think I'm missing a step somewhere.  If you don't have and answer for that, how about a link to  steps to manually do it? It really is simple, but I'm afraid I've been away too long.
Thanks for your thoughts.
Looks like it worked - Nope
Answer: The problem is that your mesh is non-manifold, meaning you have holes on its surface, it can't boolean properly. To fix that, go in Edit mode, select the whole mesh, go in the Mesh menu > Clean Up > Fill Holes. Also you should recalculate the normals with a ctrlN even if it seems to work with bad normals. Then boolean with the Union mode and it works.
Comment: I used the "clean up" options in several different passes during the path to this point. Your observation is that one should use those tools just before doing a boolean modification.  Is there a required order?  Did "fill holes" take care of the problem or did you have to apply patches individually?
Comment: Thank you for responding. I'm off to see if I can replicate.
Comment: I don't understand what you mean, what I've done is simply select your object, go in edit mode, Mesh > Clean Up > Fill Holes, then boolean, and it works, so if you tried the same thing and it didn't work I don't know the reason
Comment: Sorry for confusion.  I had earlier tried "Fill Holes" but apparently had other errors which kept the boolean from working.  Following your suggestion, I went to "Clean Up" and then every option on its menu and it worked.  I'm not suggesting it is a bug; I'm confessing that I'm not methodical in my work flow.  Thanks again.
Comment: I'm not sure but sometimes it looks like there are some bugs with booleans, but in your case it looks like when you fill the holes it works perfectly... your mesh is a bit messy though, but it's another problem  ;)


in multi-site do you set base url for each sites settings?

Question: Have just enabled security review module and it's alerting to base url not being uncommented and set. This is a multi-site so do I need to set the base url in each settings file for each site? I set the base url in settings for the root site but the alert still came up for subdomain of multisite where have not changed its settings file.
Answer: To be more secure you should set the base url for each site, yes.
Setting this helps protect against a phishing attack where a malicious user manipulates Drupal's use of the host request header to make the site provide incorrect links.
Comment: I think it's actually only relevant for the "sites/default/settings.php" file, right? This should probably be turned into an issue for the module.


Unity3d how to show an image downloaded from HTTP

Question: I am bit new to Unity3d. I am fine with any solution either of the scripts.
Can we render an image in unity3d (which we have to download from HTTP path)? If yes then how or do you have any reference?
Thanks
Vandana
Answer: You should be able to download images using HTTP with WWW.texture
WWW.texture
Should be straight forward. Just provide the path to an image and apply the texture to a material.
Answer: I recently faced the same problem. I was creating an scrollable image gallery in Unity, where images are downloaded in real-time from the a web server. On iOS devices I was reaching very fast the memory limit (with consequent app crash). That was caused due to a very big number of www objects leaved in the memory and never deleted or released. Also a very big number of Texture2D objects leaked.
The main misunderstanding is considering a Texture2D like a variable of an object that self-contained the image information. Texture2D only point to a referenced asset so we need to create one before assigning to our GUI object. Without creating one we will overwrite the referenced asset in our project, leading to very crazy behaviour.
So this the code that works for me on iOS and just use the minimum of memory
<code>    public void DownloadImage(string url)
    {
        StartCoroutine(coDownloadImage(url));
    }

    IEnumerator coDownloadImage(string imageUrl)
    {

        WWW www = new WWW( imageUrl );

        yield return www;

        thumbnail.mainTexture = new Texture2D(www.texture.width, www.texture.height, TextureFormat.DXT1, false);
        www.LoadImageIntoTexture(thumbnail.mainTexture as Texture2D);
        www.Dispose();
        www = null;
    }
</code>
A brief comment:
You receive a url you will download the image from.
Start the coroutine that manage the download
Create the www object in the local scope
yield waiting the download to complete
Create a new Texture2D object/asset with parameters and assign to your final object mainTexture or what do you want
Use the "www.LoadImageIntoTexture()" function to COPY the image inside the created asset (this is the fundamental part)
Dispose and set to null the www object to prevent memory leaking or orphans
Hope it helps who will face the same problem.
An interesting lecture is this website where they implement a WebImageCache system to avoid re-downloading the same image many times.
http://studiofive27.com/index.php/unity-cached-web-images/
ADD-ON
Also try to avoid the direct assignment like:
<code>myGameObjectMaterial.mainTexture = www.texture;
</code>
Unless you are conscious that you want to overwrite your asset and you don't to do this inside a loop or update.


Hotkey for selecting edge loops doesn't work in XFCE window manager

Question: I'm using Blender 3.2 with the XFCE window manager on Xubuntu Linux. For some reason, when I try to select edge loops using the default hot key of Alt+Mouse select, it doesn't do anything.  I've checked to make sure I have emulate 3-button mouse turned off in the settings and that I'm not using this combination for anything else.
Answer: The XFCE window manager has a setting under the "Window Manager Tweaks" -> Accessibility settings called "Key used to grab and move windows". This is set to "Alt" by default and that interferes with the Alt+mouse select hotkey under Blender. If you'd like to use the default edge loop select hotkey, you'll probably want to change this setting to "Super" or something else. I'd recommend Super, which is the Windows key on most keyboards
Under XFCE I normally use the Super key for most window manager type operations such as change desktop, maximize, etc. 25 years of window manager tweaks have led me to this conclusion. Since I'm answering my own question I should point out that I encountered this problem because I started using Blender under a new account where I hadn't made that change in the XFCE settings yet.


Searching for users/images using MySpace API

Question: Anyone have an idea about searching for users/images in MySpace using their corresponding APIs ? From the site they told that  by using their API allows you to search for people, videos, images, music.But is it possible now?
Answer: it think these wiki might help you
http://wiki.developer.myspace.com/index.php?title=Albums_MySpace_v1
it shows how to fetch user images.cheers !!!


Exception "The target principal name is incorrect" on long-running Azure Web role

Question: I've got an Azure Web role that has developed a problem in the last few days. Without changing anything or re-deploying the role or the database, the Web role lost the ability to connect to its database. It throws this exception:
<code>System.Data.SqlClient.SqlException: A connection was successfully established with the server, but then an error occurred during the login process. (provider: SSL Provider, error: 0 - The target principal name is incorrect.)

at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
...
at System.Data.ProviderBase.DbConnectionPool.TryGetConnection(DbConnection owningObject, UInt32 waitForMultipleObjectsTimeout, Boolean allowCreate, Boolean onlyOneCheckConnection, DbConnectionOptions userOptions, DbConnectionInternal& connection)
...
at System.Data.SqlClient.SqlConnection.TryOpenInner(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.TryOpen(TaskCompletionSource`1 retry)
at System.Data.SqlClient.SqlConnection.Open()
</code>
Restarting the Web role or the role's VM has no effect. Republishing the Web role via Web Deploy, even without making changes, stops the problem from occurring for a while, sometimes as long as a day.
I'm going to redeploy the entire package to see if that helps.
The only thing that I can see might be an issue is that we use a DNS alias for the SQL Database server. Instead of "abcd4567.database.windows.net" for the connection string, we use "our.fqdn.com".
Again, though, the Web role performs perfectly and makes all kinds of database connections...until it stops.
We're not hitting a throttle, either, because the database in question isn't heavily used, maybe a few dozen connections per hour.
Any diagnostic ideas would be helpful.
Comment: The problem seems to have resolved itself. So Adam was probably right (duplicate DNS entries) but it was Microsoft's dodgy DNS that they fixed.
Answer: This error is sometimes caused by duplicate DNS entries. Have you added an identical DNS entry to your domain recently?
You can test that this is the cause by changing your application to use "abcd4567.database.windows.net"
Comment: We can take a look at that, but the domain is an Azure directory. This is an Azure Web role talking to an Azure database. If it persists, we might go back to the Azure FQDNs
Comment: This was my issue! Thanks, @adam. Check DNS entries: `nslookup abcd4567`
Answer: When generating DBContext using the Scaffolding, if you are getting the error while connection "provider ssl provider error 0 - the target principal name is incorrect"
use this parameter for the connection string: TrustServerCertificate=true
AS the server connection is based on the certificate errors.


Mass administration in Linux

Question: I am curious if Linux have anything close to what PowerShell can do when come to managing servers in Enterprise? For example, retrieving server's information on a big scale and also making changes.I knew that Posh is getting in into Linux territory but I am not sure how much can it do to Linux Also,can Linux return it data in a more structural way in the form of objects and etc?
Comment: Hi, I think it will be hard for other users to give you a good answer to this question. Would you mind outlining a little what you are trying to achieve?
What I mean is: Is the question related to infrastructure automation or compliance or is there an entirely different background.
Always remember: People will be more likely to give you a precise and helpful answer the more precisde your question!
Answer: PowerShell is just a scripting language. By itself it is no more powerful or useful than any other scripting language or tool.
IMHO You're mistaking the (power of that) tool with the convenience and power that a single management domain such as Active Directory provides.
But yes, Linux systems can also be integrated in a single management domain, in AD even but there are also (Open Source) alternatives. And yes Linux provides tooling to use such management domains effectively for the large scale management of systems.
https://en.wikipedia.org/wiki/List_of_systems_management_systems
https://en.wikipedia.org/wiki/Comparison_of_open-source_configuration_management_software
https://en.wikipedia.org/wiki/System_Security_Services_Daemon
https://github.com/puppetlabs/facter
Comment: You maybe right on that POSH is only as good as the existence of AD. But POSH do offered extensive accesibility to each classes like GWMI (yeah kerberos authentication or similar is needed).  I am sure one of the links you given might have what I need.  Thanks
Answer: To manage linux servers in bulk I personally use pssh (parallel ssh), as well as configuration management (CM) tools like puppet/ansible/chef to administrate machines in bulk. CM tools are kind of like manifests (this file should be here, that program should always be running, etc), and parallel ssh is just like running single bash commands, except on a large number of machines at once. There's probably a lot of other tools for doing the same thing, with linux there's usually many good ways of doing anything (except reading html email from the command line).
While bash and the linux userspace tools do not have a concept of objects, their text and data processing capabilities are fantastic and it has close to no size limitations. Additionally quite literally everything usable from the command line is designed to be used in bash scripts as well. The end result is extremely powerful.
Comment: That maybe the closest of what I am looking for. But like you said, you probably get a bunch of strings. Can you elaborate more about the text and data processing capabilities? I appreciate your feedback
Comment: You can sort an unlimited amount of data (as far as i can tell), deduplicate, tokenize - split it up based on characters or columns both smart and dumb, substitute words, search or substitute based on regex (a sort of search/replace/etc language), feed it to any command line tool as input or parameters, compress repeating characters, and more - pretty much any other sort of data manipulation you can think of.

There's even this tool called diff that given quite literally any two files will tell you the minimum number of changes to turn file1 into file2.
Comment: Like the ability to feed data to other tools in millions of ways is really useful too. You can pipe the output of a cli command to a tool that stores everything in the clipboard. You can make the command line treat the output of a command like a file... i mean the possibilities seem pretty much unlimited.
Answer: I use Ansible and love it. What really hooked me at first was the ansible_facts. One simple playbook would return a scathing amount of information about a given system. Early on I just saved the output and grep'd it for the key:value pair I wanted. There's probably a better way to do that.
In the simplest configuration example, you keep an "inventory" of hosts you want to run Ansible on. It's something like:
[my_hosts]
host1.mydomain.com
host2.mydomain.com
...

Then you can run an Ansible "playbook" on my_hosts and it will hit every host you have configured in that block. A playbook is just a YAML configuration containing commands, variables and formatting which Ansible understands. It's not a shell script. It's a "way" to tell Ansible what to do on a host. It took me a while to wrap my head around it.
Again, for simplicity sake, you can make a playbook that runs a shell command and run that playbook on every host. Here's an "uptime" playbook I used often.
---
- hosts: all
  gather_facts: false

  tasks:
    - name: uptime for host
      shell: uptime
      register: output

    - debug: var=output.stdout_lines

    # print a formatted line for grep/sed mining
    - debug: msg="grepme {{ inventory_hostname }}:{{ output.stdout_lines}}"

Things get way more involved that this but it's daunting to first get started. Keeping things simple with just shell commands can get your feet wet but once you get beyond simple things, you should look into more "Ansibly" ways of doing things which are more complex and harder to work with, but they do pay off.
Comment: Hows the output like ?I heard Ansible is pretty useful in linux
Comment: The output isn't one-line-per-host type of thing you easily `grep` or `sed` but when you have a need for that, you just print out the formatting in a `debug` task. I'll update my answer with and example.

Mass administration in Linux


2004 Toyota Sequoia Limited with seperate immobilizer ecu and key programming

Question: I have a 2004 Toyota Sequoia Limited that has the independent immobilizer unit behind the dash cluster. I am a technician myself but I usually dont deal with systems like this as I work with Heavy Duty and typically chevy 350 engines. Basically I know there is like 3 different types of vehicles 1 of which is a foreign vehicle which mine is and they say you need to pull the immobilizer, unsoder the cpu for it, flash the BIOS with the new key information so that the immobilizer can recognize the key. Now the dealership has said that the process is a little different that it gets programmed through the OBD2 port, as a technician I have the tools but not the knowledge to do it. Can anyone shed some insight as to how to get the immobilizer ecu reset so that I can get a key registered to the unit? I have an obd2 cable with laptop access but again toyota other than basic engine repair isnt usually my specialty.
Comment: Welcome to Motor Vehicle Maintenance & Repair! While I'm not sure *exactly* how it would be reprogrammed, in order to do the deed I'm sure requires special software which isn't just available anywhere. Two places can usually reprogram keys (if reprogramming is what is caleld for): the dealership; a locksmith. The reason it's this way is so not just anyone can come along and reprogram it. I highly doubt a resoldier is in the works. Most everything post OBD2 implementation is done via programming, not something physical.
Answer: Vehicle immobilizers come in various configurations; non chipped ignition keys with a separate remote for dual purpose use of locking/enabling factory theft deterrent and unlocking/disabling theft deterrent, chipped keys without a remote, and remotes broadcasting 24/7 for keyless entry/unlocking without pressing a remote button and locking without pressing a remote button with button presses always optional. According to online info, your Toyota should allow you, the owner, to program new chipped and cut keys, yourself. This is just one video; https://www.youtube.com/watch?app=desktop&v=HpsHhNOaDe. If I'm mistaken and this video does not help you in programming a replacement key(s), reply and I will delete this from disseminating misinformation. Basically, you should be able to buy replacement uncut chipped keys wherever its sold, bring it to key cutter with your original key, have it cut, then follow procedures for diy programming of the new chipped key to have the electronics learn a new chipped code in addition to your key. Some manufacturers allow between four to six keys for spares. Beware of dealers spouting disinformation about older immobilizer systems that have to be programmed by a dealer for new keys..... There's a world of electronics related to vehicle immobilizers and I haven't begun to describe them.
Answer: I am a locksmith and regularly make keys for Sequoia's.
Your immobilizer ecu is indeed behind the instrument cluster. Its a black box about 2inch x 2inch with a white label on it.
There is NO obd2 access to the immobilizer. You must either have a current working MASTER key or the immo box must be removed and the memory read directly from the eeprom chip. Once the memory is read you can manipulate it to add new master keys or extract current master key data or even return it to a virgin state.
This video I made is for a Avalon ECU but programming keys for the immobilizer box on sequoia is the same process. The only difference is that it uses a DIP8 eeprom instead of a soic8 eeprom and a different transponder chip.
Virgin file install : (will require a second procedure after on the sequioa's)
https://www.youtube.com/watch?v=y1aG67hqvXg
Extract current key data:
https://www.youtube.com/watch?v=Z2sJtWd63s0


Bananagrams on Shabbos

Question: Is there a problem with playing Bananagrams on Shabbos because of Borer or any other reason?
Answer: Playing Bananagrams isn't a borer issue since you choose pieces for immediate usage.  This is within the category of Derech Achila- normal consumption/usage.  Even at the beginning of the game when the pieces are separated, this is normal immediate usage.
Kesiva (writing) isn't a problem since there is nothing to unify the letters (like a frame).
In some circles, adults (over 13) refrain from games and other mundane actions on shabbos.
Comment: Any source or name of rov?
Comment: @SimchasTorah- Standardized halacha is Shulchan Aruch 301:2 (http://hebrewbooks.org/pdfpager.aspx?req=40431&st=&pgnum=412).  Many ared against it because shabbos should be reserved for holier matters.  Each situation needs to be judged individually.  If this person would not be playing, what would he be doing instead (besides witholding from his Oneg Shabbos)?
Comment: Another thing from what I have seen in Seforim the some circles seems to be Standardized Halacha they seem to say you must not and in Fact you should train your children past a ceartin age so if you could name an alternate source that the other circle relies on I would appreciate it
Comment: @SimchasTorah The _isur_ of adult people playing games on _shabas_ is mentioned in a mini-_t'shuva_ from Rav Moshe in the back of _Halachos of Muktzah_, in the section "questions the author asked Rav Moshe". (Sorry for the imprecision. This is based on memory.)
Comment: @ST- which halacha are you concerned about that you would like a source or Rav?  I understand I should bring sources, but it would help if you could be more specific in your concern.
Comment: Yup, sure is *derech achila*.

Bananagrams on Shabbos


Simulink sim of rician channel ber process

Question: I'm learning simulink and I want to use the rician channle block from the communications blockset. I'm told I need to change the format format. Would anyone have some sample code where they used the rician channels in simulink to model a bit error rate process?
Answer: MathWorks appears to have a tutorial on the subject.  Have you taken a look at that?


Return result only if multiple strings exist in a file

Question: Is there a Linux utility which will return the name of a file only if it contains multiple specified strings?  Not necessarily on the same line.  Obviously grep can "OR" but I'm looking for "AND".
Answer: For simple things you can use grep or awk, for more complex things you will need a programming language. Probabely the best is start with a scripting language like: python, perl, php, javascript.
The grep command can be used for OR:
ls|egrep 'first_pattern|second_pattern"

Or to match both patterns:
ls|egrep "first_pattern.*second_pattern|second_pattern.*first_pattern"

To understand better how to write RegEx patterns, see: https://en.wikipedia.org/wiki/Regular_expression
Really complex parsers can be written with a parser generator like ANTLR
Comment: The "Or to..." solution was exactly what I was looking for although I'm not sure I understood it at first.  When I looked recently I realized the significance of the '.*' meaning any number of other characters.


Bikes power is iffy

Question: Hi I have a 03 katana and for some reason the bike won't power on anymore...I turn the key and nothing no lights nothing. I'm not sure if it's the battery or what. What should I do to trouble shoot the problem
Answer: Put a multimeter on the battery or take it to an auto parts store and have it tested. If it's dead, charge it.
If it's not dead, start tracing the power. A wire could have burnt up at a switch or perhaps there is a fuse that has died.
Answer: First thing you do is check the battery with a multi-meter (as mkaatman said). If the battery is good, it will have a reading well over 12.5vdc. If it is below this, put it on a charger and get it to 100%, which while sitting should be around 13.1vdc or more. I suspect the power level of the battery is going to be much lower than this and believe your battery is the main culprit here.
If you personally cannot figure out if the battery is good, take it somewhere like AutoZone or Advance Auto and have them load test the battery.
If the battery checks good, you need to check to ensure you don't have any corrosion on the battery leads (where the cables connect to the battery posts). If you do, this will prevent the battery from charging correctly.
If this, then, does not prove any issues, you'll need to make sure the alternator on the bike is charging correctly. This is going to be a little more tricky. If you get the battery recharged (or back to a state where the bike will start), you'll put a multimeter on the battery while it's running. The voltage should read in the 13.8vdc+, but should not be over 14.5vdc. If your initial reading is at battery voltage (~13.1vdc), but slowly decreases, this is a sign the alternator is bad and will need to be replaced. I'm not exactly sure on a bike how the charging system works (size of alternator, where it's exactly located, etc), so will leave it at that. Needless to say, if the battery is not recharging, your battery will not stand up.

Bikes power is iffy


What's more important, keeping Shabbat or Kibbud Av V'em?

Question: In a situation where these two conflict, which trumps the other?
Comment: The question is valid in a case where the parent would be *nisbazeh*.
Answer: Shabbat.
Leviticus 19:3:

Every man shall fear his mother and his father, and you shall observe My Sabbaths. I am the Lord, your God.       גאִ֣ישׁ אִמּ֤וֹ וְאָבִיו֙ תִּירָ֔אוּ וְאֶת־שַׁבְּתֹתַ֖י תִּשְׁמֹ֑רוּ אֲנִ֖י יְהוָֹ֥ה אֱלֹֽהֵיכֶֽם:

Rashi cites the Talmud, Bava Metzia 32b:

"Although I have admonished you regarding the fear of your father, nevertheless, if he tells you to desecrate the Sabbath, do not listen to him."        וְאֶת־שַׁבְּתֹתַי תִּשְׁמֹרוּ: סָמַךְ שַׁבָּת לְמוֹרָא אָב, לוֹמַר אַף עַל פִּי שֶׁהִזְהַרְתִּיךָ עַל מוֹרָא אָב, אִם יֹאמַר לְךָ חַלֵּל אֶת הַשַּׁבָּת, אַל תִּשְׁמַע לוֹ, וְכֵן בִּשְׁאָר כָּל הַמִּצְווֹת (בבא מציעא ל"ב):

Thus the verse means "honor your parents, but what's even more important, keep Shabbat."
There can be shades of grey if it's a conflict between, say, the parents' needs and something preferred by halacha about keeping Shabbat; if someone needs to take care of a parent they might have to pray at home and miss synagogue, for example; often something can be worked out to accommodate both. (See more here.) But when push comes to shove, if the parent demands a black-on-white violation of Shabbat, the answer is "no."
Even then, it's important to try and maintain a respectful relationship; "I'm sorry but I can't do that", not "I'm so much smarter than you and you're a terrible sinner."
Answer: The Talmud says that if you must choose between doing two mitzvot, do first the one that recurs more frequently:

תָּדִיר וְשֶׁאֵינוֹ תָּדִיר — תָּדִיר קוֹדֵם  [Berakhot 27a and 51b, Pesachim 114a, Megillah 29b, Sukkah 54b, Horayot 13, and Zevachim Mishna 10:1]

For example, we put on tzitzit (that is, the tallit) before we put on tefillin, because tzitzit recurs every day, but tefillin recurs every day except Shabbat. [Sefer Ta'amei Haminhagim Umkorei Hadinim]
As @Shalom said, you don't violate Shabbat because a parent asks you to.  However, if you have to decide which commandment to follow first, I would conclude that you must first tend to the needs of your parents, because that commandment is always present, but Shabbat is only one day out of seven.
Comment: What does it mean to keep shabbos 2nd? Besides that, the gemara kiddushin says if you have a mitzva to do and your father gives you a command, you do the mitzva first since you and your father are commanded in that mitzva.

What’s more important, keeping Shabbat or Kibbud Av V’em?


Can quantum measurements be the origin of thermodynamic arrow of time?

Question: We can practically consider that the microscopic interactions are symmetric with respect to time(as we can neglect weak force for many cases which is the only interaction that can violate $T$ symmetry). So I thought that the asymmetry might be due to the irreversibility of quantum measurements. But this is only applicable for interpretations where wave function collapses like Copenhagen etc. What is the answer to this question in Many-worlds interpretation, Consistent histories, etc? Also in this page, they gave that the initial conditions of the universe are the reason for $T$ asymmetry in the 2nd law of thermodynamics. But I am not sure what they mean. Do they mean that the universe had a very low entropy at the beginning?
Comment: Even in classical thermodynamics and statistical mechanics there is a themodynamic arrow of time.  It is also famously observed on pool tables and in teenagers' bedrooms. It has to be something separate from wave function collapse.
Answer:
Do they mean that the universe had a very low entropy at the beginning?

Yes, the universe had a very low entropy immediately after the Big Bang. It was filled with a very uniform distribution of very energetic (very "hot") fundamental particles. Due to the effect of gravity, this uniform distribution is actually a highly improbable state, and so has an extremely low entropy. So the universe started in a low entropy state, and its entropy has been increasing ever since, following the second law of thermodynamics.
The natural follow-up question, which is very interesting, is why did the early universe have such a low entropy to start with ? Was this inevitable, or is it an unusual and unlikely feature of our particular universe ? Since we have no other universes to compare ours with, this is a very difficult question to answer !
Answer: No, because "measurements" and "wave function collapse" are not part of the system modeled by QM; they're interpretations. As such, no physical phenomena can be effects of them.
Answer: Entropy is Macroscopic
As RogerJBarlow mentions in a comment, there is no need to invoke QM to explain the "arrow of time".  To use the exact analogy, consider an "ideal billiard table" with the standard collection of 15 balls.  Now, the macro state in which all balls are arranged in the starting triangle is very improbable, because there are only a few "micro-states" (permutations and rotations of the balls) which correspond to this macro state.  Further, with typical energy inputs to the table, there are many ways to move from this macro state to other macro states, but not very many ways to move from other macro states to this one.  That makes it a "high entropy" state.
On the other hand, if we consider the macro state "every pocket has at least 2 balls closer to it than any other pocket", we see that there are very many micro states in this macro state.  There are also many transitions which lead into this state, and the sheer number of micro states means that many transitions will cause you to never leave this macro state.  Thus, this is a "low entropy" state, and one of the more likely outcomes in a typical game of pool.
There is no entanglement, superposition, tunnelling, wave function collapse or any other QM phenomenon required to analyze the entropic behavior of this system, or to guess between a sequence of snapshots which direction indicates the arrow of time.  Replace the billiard balls with gas molecules, and you start to look much like thermodynamics.