In Buddhism, is Escapism seen as a bad thing to take part in?

Question: In general in Buddhism, is escapism seen as a bad "movement" to involve one's self in? I have seen many posts on SE about separating one's self from one's body, or getting rid of desire, so; would these actions been seen as escapism?
Answer: Escapism does not address the core issue. Say you have X experience which you do not like and you distract yourself with Y experience with you take pleasure in. The solution is temporary as Y ends you are left unsatisfied again.
The case of much of the suffering are the unwholesome roots in craving, aversion and ignorance. Buddhist practice aims to remove them.
Now let's take experiance you like. What happens is you think "Ah, I like this" hence the notion of I arises in your mind. Likewise with many forms of craving and aversions. So if you remove the craving or aversion by being equanimous (and also remove ignorance being aware of the arising and passing nature of phenomena) you stop perceiving a self. There is not separation of self from the body, it is just that you do not perceive a self as an entity. Also any perception of self is a concept or abstraction created by our mind which is never in tune with the true nature of what actually is there. Hence you have to get rid of any concepts about self (which in all cases will be wrong).

Escapism

How is Vipassana different from escapism?

Vipassana is to face the world. No escapism is permitted in Vipassana.

Source: http://www.vridhamma.org/Question-and-Answers#escapism
Comment: What is to define the true entity of phenomenon? If there were nothing to experience the world for eternity, then it may as well not be there. From that logic, wouldn't everyone's perspective be equally acceptable?
Comment: There is not entity just phenomena arising and passing according to the law of dependent origination. This cannot be deduced purely by logic. You need to meditate. Perhaps you can try out a course to get practical experience into this. This will not happen in one course but things will reveal itself little by little. See: https://www.dhamma.org/en/index, http://www.internationalmeditationcentre.org/global/index.html
Answer: here we go..  this Sutta directly addresses escapism

As he is touched by that painful feeling, he is resistant. Any resistance-obsession with regard to that painful feeling obsesses him. Touched by that painful feeling, he delights in sensual pleasure. Why is that? Because the uninstructed run-of-the-mill person does not discern any escape from painful feeling aside from sensual pleasure. As he is delighting in sensual pleasure, any passion-obsession with regard to that feeling of pleasure obsesses him. He does not discern, as it actually is present, the origination, passing away, allure, drawback, or escape from that feeling. As he does not discern the origination, passing away, allure, drawback, or escape from that feeling, then any ignorance-obsession with regard to that feeling of neither-pleasure-nor-pain obsesses him.

full sutta here:  Sallatha Sutta
Answer: i am going to try to answer this.  please let me know if incorrectly rephrased your question, "Is getting rid of sensual desires is a form of Escapism?".
I think it could be.  It is a first step to let go of desires (or 5 hindrances for that matters), when one can let go of them, equanimity remains.  However, equanimity, is also a fetter or higher parts of 10 fetters that a non-returner (Anagami) has to learn to let go.  Equanimity is fetters 6 and 7.  Budddha did not give specific lectures on how to let go of 5 higher fetters.  Once you let go all fetters, then Nirvana is realized.  It may sounds like a cop out, but nirvana is not annihilation nor can be explained logically.
Answer:
Escapism - the tendency to seek distraction and relief from unpleasant
  realities, especially by seeking entertainment or engaging in fantasy.

According to the above definition, 'escapism' is unskillful even by common sense standards.
ex: Listening to songs to deal with your stomachache.
It is not "separating 'self' from body". It is "not taking the body or mind as a 'self'" as neither is qualified to be considered as a self in reality. Thus no escapism involved.
Working to remove desire is the opposite of 'escapism' as desire is the origin of suffering - 2nd noble truth.
Comment: But if you were to remove your being from your body, your body still would be there. You still would have problems that would arise from your life, the only difference then is that you're not with your body, right?
Comment: Being = mind + body. There's no being apart from body except in the immaterial realms. Neither mind nor body can be considered as 'you' or 'yours'
Answer: Escapism is not a principle found in Buddhism. Escapism suggests you are trying to run away from suffering, but in reality we are trying to be changed by suffering. This is a core teaching in Buddhism and circulates around in the term being mindful. By avoiding experiences that are unpleasant, the practitioner does not learn a lesson life is trying to teach them. By grabbing the bull by the horns and facing your problem head on, wisdom and experience begins to unfold.
To no longer have desires is commonly misinterpreted as all desires. There are such things as wholesome desires such as wishing the well-being of all human beings. To say there are no more desires means you no longer have strings pulling you around. You can still enjoy your favorite pizza, go inside if it's to cold outside, stay in bed while you're sick, but that's ok. You're human and you recognize it's going to happen. It means you have accepted whats happening in the here and now; but it doesn't mean you can't enjoy life nor take action to help those in need.


How can I block an IP, if I'm getting many http requests in a second?

Question: If some one tried force burst attack on my website, how can I block them?
Ideally, I want to block an IP if I have many http/Apache requests in a second.
Answer: fail2ban is an easy-to-implement solution in these cases.
Add a block-all-dem-noobs.conf file to your filter.d directory, something like this
[Definition]
failregex = ^<HOST> -.*"GET.*

Translation: a RegExp to find GET requests
Then create a new entry in your jail.conf, something like this
[block-all-dem-noobs]
enabled = true
port = http,https
filter = block-all-dem-noobs
logpath = /var/log/httpd/access.log
maxretry = 100
findtime = 5
bantime = 600
action = iptables[name=HTTP, port=http, protocol=tcp]

Translation: Look through my access.log file, then block for 600 seconds (10 minutes) the IP addresses that made 100 requests in 5 seconds
One major drawback, though, is that this might produce false positives for NATed users, as they'll all appear as one IP address to you.
Comment: After apply your config:

Starting fail2ban: ERROR  NOK: ("No 'host' group in '^ -.*GET'",)

I change the failregex to:

failregex = ^(?P18.104.22.168) -.*GET

See http://serverfault.com/questions/516675/how-to-add-a-jail-for-specific-ips-in-fail2ban
Comment: Is this answer up to date?
Comment: @BrunoPhilipe I believe it is. In my opinion, fail2ban has proven itself to be a timeless solution, like SSH or HTTP themselves. It's fast, introduces minimal overhead, and gets the job done with simple rules. It's probably worth it to check. I've also just fixed the filter since it wasn't extracting the host originally. It should now be working.
Comment: @Adi Indeed it worked, but like @shakaran said, you need a HOST capture group. I fixed mine with `failregex = ^(?P[^\s]+) -.*GET`. Thanks!
Comment: After `fail2ban start` got `fail2ban.actions.action: ERROR  iptables -N fail2ban-HTTP#012iptables -A fail2ban-HTTP -j RETURN#012iptables -I INPUT -p tcp --dport http -j fail2ban-HTTP returned 200`
After replacing `iptables` by `iptables-multiport` it worked (see [https://serverfault.com/a/919822/388334]).
Comment: I don't think fail2ban is the right tool for the job here. See https://serverfault.com/a/761679/301208 for details. Try mod_evasive and/or mod_qos instead.
Answer: fail2ban can be configured to do this. You can configure it to trigger on a regex match in a logfile and if it happens too many times per minute (not sure if it goes to second resolution but just multiply whatever you were thinking per second by 60) and it can drop the client IP into the iptables packet filter or whatever other action you want taken. Or you can use the iptables recent module and adapt what I've done here for SIP brute force attacks to use with your web server:

# Deal with SIP brute forcing
iptables -N SIP_WHITELIST
# home
iptables -A SIP_WHITELIST -s 18.104.22.168/24 -m recent --remove --name SIP -j ACCEPT
# voip provider
iptables -A SIP_WHITELIST -s 22.214.171.124/24 -m recent --remove --name SIP -j ACCEPT
# remote location
iptables -A SIP_WHITELIST -s 22.214.171.124/24 -m recent --remove --name SIP -j ACCEPT

iptables -N SIP_BRUTEFORCE
iptables -A SIP_BRUTEFORCE -m recent --set --name SIP
iptables -A SIP_BRUTEFORCE -p udp --dport 5060 -m state --state NEW -j SIP_WHITELIST
iptables -A SIP_BRUTEFORCE -m recent --update --seconds 30 --hitcount 3 --name SIP -j LOG
iptables -A SIP_BRUTEFORCE -m recent --update --seconds 30 --hitcount 3 --name SIP -j DROP

iptables -A INPUT -p udp --dport 5060 -m state --state NEW -j SIP_BRUTEFORCE

Source: https://web.archive.org/web/20180901235739/http://tracyreed.org/blog/2010/12/26/sip-brute-force-attacks
Answer: You can configure Apache mod_evasive module. This module provides a very basic function by keeping a hash table of IPs and pages requested and when a threshold level is exceeded on a  target page or site it will "block" the IP with a 403 "Forbidden" error. For configuration details you read "How to Stop an Apache DDoS Attack with mod_evasive".


Changing colors of raster images in Illustrator

Question: I would like to change the colors of a Photoshop PSD in Adobe Illustrator. Can a raster image's color be altered in Illustrator?
Answer: As far as I'm aware, the only way to alter the colors of the pixels in a raster image is via Phantasm.
Or by using "tricks"... such as drawing a shape on top of the raster image, filling it with a color, then changing the shape's blend mode.
Ideally, all raster editing should be done in a raster application.
Answer: no "proper" way. You could turn channels separately to bitmaps, save them as tiff and import them in AI.


MHL with Nexus 4?

Question: I know that the Nexus 4 has Slimport technology, which is very close to MHL but draws little/no power. However, is the Nexus 4 still able to use an MHL to HDMI adapter?
Comment: You should edit your question to remove shopping recommendation part. It is off topic here.
Comment: Josia: I just did what roxan correctly suggested, to prevent your question from being closed as off-topic. You can re-edit it anytime if you feel something missing/unclear.
Answer: The Specs at GSMArena mention TV-out (via MHL A/V link), which suggests it should work.
On the other hand, ExpertsReview states:

The micro USB port also doubles up as a display output, though surprisingly it doesn't use the MHL standard that we've seen on numerous recent devices, such as the Samsung Galaxy S3. Instead it supports the new SlimPort standard, which is based upon DisplayPort.

Which suggests the standards are incompatible (other sources I consulted underline this). An even clearer hint you'll find in a review by anandtech:

When I wrote that review it wasn't immediately clear what advantages SlimPort offered over MHL, which has become relatively ubiquitous in the year or so since its introduction. Since then I've acquired the SlimPort microUSB to HDMI 1.4 SP1002 and VGA (D-SUB) SP2002 adapters from Analogix for testing out SlimPort on the Nexus 4.
  ...
  As of this writing, the Analogix SP1002 adapter is available on Amazon for around $30 USD. I haven't seen the SP2002 available online anywhere yet, however.

As this shows, there're SlimPort adapters available which are not that expensive (though not that cheap either), and are probably better fitted for your purpose. As you either yet have to buy the cable, I'd rather go for the right one.
Comment: Good luck with it -- glad I could help! Once you have used it, maybe it would be a good idea to mention in another comment how well it worked.
Comment: Indeed, that is a pretty good idea.
Answer: It seems that MHL is not supported, but its cousin SlimPort is, according to here and explained here.
I have not bought yet, but I guess Chromecast might do the trick anyway for more recent devices.
Comment: We have used the chromecast to cast android application and it was not usable. The refresh rate was several seconds. Now I seek for an adapter.

MHL with Nexus 4?


How to detect if n long messages have encrypted with the same one-time pad?

Question: I have a slight idea on what the attack would be. But my question is: how would one detect if n long messages (n>5) have been encrypted with the same one time pad, K?
Comment: Typically, you'd XOR the messages together pair-wise and see if the resulting bit distribution has some detectable patterns (because it should be the XOR of two plain texts).
Comment: With 5 messages you may simply be able to calculate (most of) the key stream. In that case the solution is easy: check if the plaintext is anywhere near the content you expect it contains. If the plaintext of the (additional) messages is fully random (for you) then - of course - you've got no way to check.
Answer: Specifically, the $K(K-1)/2$ symbolwise difference of the, say $K$, messages should obey the plaintext distribution. If the plaintext is in a natural language, patterns can be detected using various techniques.
If the messages are binary $n=5$ won't be nearly enough. If the messages are in ASCII, $5$ symbols yield 40 bits, so that might be enough, and you'd even rule out key guesses that don't yield printable ASCII characters when XORed with ciphertext.
Comment: I think the OP is asking about 5 (or more) distinct messages, not about messages with 5 symbols each. That said, good answer.
Comment: I thought that too, but also wondered what effect the size of _long_ messages would have. Longer messages should facilitate better statistical analysis of language plain text.


Sadducees and Karaites - same beliefs?

Question: Did the Karaites and the Sadducees believe in the same "Judaism"?
Comment: This is the opposite of your question as stated.
Comment: Can you specify the question? They obviously had disagreements. Are you asking if they agreed on any fundamentals?
Comment: They lived in two historical different time periods.  How did their beliefs differ?
Comment: Why is that so?
Comment: See Igros Moshe volume 9 siman 41:3 of the difference between a Kuti and a Tzeduki
Answer: The Ramabam in hilchos Teffilin 4:3 says that if one wears teffilin on his palm or head teffilin on his forehead then he is doing the practice of the Sadducees. The karaites never wore teffilin at all so that seems to be one difference.
The Karaites claim no connection to them since the Sadducees lived in Judea and they lived in Egypt also the Sadducees lived 700 years apart from the karaites since they ceased to exist. The Karaites claim to hold the same philosophical approach of the Written Torah. They also claim that don't know alot about them to begin with.
Just to add there were different groups(betusim,essens,annaim) that only believed in the written Torah but they all seem to have a different twist on interpretation(some more literal some more liberal in translation)
Comment: I thought Essenes did believe in the Oral Torah on some level?
Comment: We do not know very much about what the Essenes believed.  Much is archaeological evidence from the Dead Sea Scrolls, but Josephus did write a few things about them (IIRC).
Answer: The Sadducees and Karaites are distinct historical movements, though similarities in their approaches to Tanakh suggest they may be related in some sense. This Karaite website, answers this question with

We know very little about the beliefs of the Sadducees. We do know
  however that like the Karaites they believed only in the authority of
  the Tanach and rejected the Oral Law.

Another important difference is that the Sadducees have ceased being a movement centuries ago, whereas Karaites continue to be a functional sect today.
Answer: Well, it depends who you ask.
Rabbi Avraham de Cologna wrote a kuntress about Karaites, called "Kara Ha'gever". In it, he explains about the history and beliefs of the Karaites. According to him, the Karaites are the spiritual descendants of the Sadducees:

"...ומאז יצאו אלה כתות הארורות של מינים, ויקראו בארץ מצרים ובקוסטאנדינא ובקרימאה ובליטא במלכות משך בשם קראים: ושמותם אצל החכמים צדוקים ובייתוסים, והם אשר התחילו להשיב על הקבלה ולפרש הפסוקים כפי מה שיראה להם מבלתי ישמעו לחכם, הפך אמרו יתברך (על פי התורה) על פי התורה אשר יורוך ועל המשפט אשר יאמרו לך תעשה לא תסור מן הדבר אשר יגידו לך ימין ושמאל: כל זה הגיד לנו האיש משה גדול מאד הרמב"ם [ז"ל] בפירושו למשנה ג' במ"ק לאבות, וזה יספיק לנו ללמדנו כי התחילה כת הקראים לפרסם [שמה] בימי חכמי המשנה וראשיהם היו צדוק ובייתוס תלמידי אנטיגנוס"

Translation: "...and since then came these accursed sects of heretics, and they were called in the land of Egypt and in Constantinople and in Crimea and in Lithuania in the Kingdom of Meshech by the name of Karaites. And their names by the sages Sadducees and Baytusees, and they are the ones who began to retort on the tradition [kabbalah, i.e. the Oral Torah] and to explain the verses as they saw fit without listening to the sage, the opposite of what The Blessed [Hashem] said (according to the Torah) You shall act in accordance with the instructions given you and the ruling handed down to you; you must not deviate from the verdict that they announce to you either to the right or to the left. All of this was told to us by the esteemed man Moshe the Rambam z"l in his commentary on the Mishna third [mishna] of the small tractate Avot, and this is enough to teach us that the Karaite sect began to make itself known in the time of the sages of the mishna and their leaders were Tzaddok and Baytus students of Antignos." (pg. 6)
This view was also held by other, later rabbis, such as Rabbi Ze'ev Ya'avetz here.
Rabbi Bernard Revel similarly wrote in "The Karaite Halaka" that this view was that which was held by several Geonim and Rishonim:

"On the other hand, most of the Mediaeval Jewish scholars seem to agree that Karaism was due to a revival of the Sadducees (Abraham Ibn Daud) or that Sadducean elements are prominent in it (Saadia, Juda Halevi). Saadia Gaon...add that the remnants of Zadok and Boethus joined Anan...about two centuries later...the three great lights of Toledo, Judah Halevi, Abraham Ibn Ezra, and Abraham Ibn Daud...and they all assert that Karaism is an offshoot of Sadduceeism...likewise, Maimonides...adds: "In Egypt they are called Karaites, while in the Talmud they are named Sadducees and Boethusians." (pg. 6-8)

Rabbi Revel himself, however, disagrees with this view. He believed that the Geonim and Rishonim held this view out of a need of stamping out what was perceived to be a theologically-dangerous sect of Jews. In reality, as he explains throughout the book, there are vast differences between the Karaite and Sadducee Torah views and in fact, according to him, the Karaite views are much closer to the little we know of the halacha of Philo and the Jews of Egypt, and in many ways, they even agree with the Pharisees. As he writes:

"The only agreement between the Sadducees and the Karaites known to us is their rejection of "water libation", נסוך המים, on the Feast of the Tabernacles...Schechter has established close relation of "Fragments of a Zadokite work" discovered and published by him...with the כתאב אלצדוקיה [Kitab AlZadokiyah] mentioned by the above-named tenth century Karaites. As Shechter himself says: "The term Zadokites naturally suggests the Sadducees; but the present state of knowledge of the latter's doctrines and practices does not offer enough points of resemblance to justify the identification of them with our sect"..." (pg. 44-45)

The book is dedicated to analyzing the differences and similarities between the Karaites and the others sects based on their respective sources.
Comment: In Gemara and Mishna there is a lot of Drashot of Tsdukim who were machmirim more than Perushim
Comment: @kouty Yes, and in some cases, the Karaites are (or at least were) more machmirim than the Rabbinical Jews. There's no perfect match, but there are some sects that, at least according to Rabbi Revel, line up better than others.
Answer: From what we know of the Sadducees, they not only rejected the authority of the Oral Torah, but they also did not believe in the afterlife. To my knowledge, the Karaites do believe in the afterlife.
Comment: Karaim do believe in olam haba and S'char v'onesh, as seen in Chizzuk Emunah where mechaber, Yitzhak mi'Troki, disproves the christian belief of Limbo and shows that the Tanakh does affirm the Afterlife and reward & punishment.
Comment: Can you give a source for this?
Comment: I've heard this too, no source though
Answer: The Sadducees denied the existence of angels, the oral law, and the immortality of the soul and reward and punishment. Karaite did not deny the existence of angels and the eternal soul.

Sadducees and Karaites - same beliefs?


Why is my GFCI receptacle tripping when I add another receptacle to the circuit?

Question: I have 3 receptacles in my garage. One is a GFCI which protects all 3 outlets. I want to connect a new receptacle off the third receptacle (end of run) on other side of wall, and have it protected by GFCI. I connected black to black and white to white. But when I reset the GFCI, it won't hold/reset. When I disconnect the new receptacle, the GFCI holds. I made sure black was attached to brass side, and white is attached to silver side. What am I doing wrong?
Comment: Have you connected the ground wires (green or bare copper)?
Comment: Was anything plugged into the new outlet? I'd test the wiring that you disconnected for a hot to ground short. which will tell you if there's a fault in your wires or the new outlet.
Comment: Thank you for your comments! Yes I connected ground wire to receptacle. And nothing is plugged into any of the outlets.
Answer: Look for a ground fault

Disconnect the wires feeding the new receptacle, at both ends.
Set your multimeter (you do have a multimeter, right?) to the lowest resistance setting, or the continuity setting if it has it.
Touch one probe to the green/bare grounding conductor, and the other to each of the other wires in turn.
repeat this process for every combination of wires (G-> B, G -> W, W -> B).

With the wiring disconnected, you should not get a reading on the multimeter.  If you do, it means you have a short-circuit between that set of wires.  Repeat this process on the new receptacle, touching one probe to the green ground terminal and the other to each the brass and silver terminals.  Again, no combination should give a reading.
Your circuit is too long?
It may be possible that the circuit is just too long, and the resistance in the conductors themselves are causing the imbalance. Try connecting the new receptacle to the previous receptacle temporarily, using short pigtails (CAUTION: Working on energized circuits is dangerous.).  Turn on the power, and try to set the GFCI. Make sure nobody is near the exposed receptacles, and don't touch, or get near them while the power is on.
If the GFCI holds, there is a fault in the wiring to the new receptacle or the circuit may simply be too long.
Warning: I haven't done any calculations, research, or testing on this theory, so it could be completely false.  It's just a thought, but it's fairly easy for you to test.
According to the documentation for the Two-Pole QO®/QOB Circuit Breaker and Ground Fault Circuit Interrupter

NOTE: To minimize nuisance tripping:...

Do not connect circuit breaker to  more than 250 ft. (76 m) of load  conductor for the total one-way run

Is the power on?
GFCI receptacles can only be reset when the power is on. So if you're trying to reset it with the power off, you won't have any luck.
Answer: @TheEvilGreebo has a great answer on this question here including a diagram showing how the wiring should be run.  I would start by verifying that all your connections at the existing outlet and new outlet are correct.


ADF test, PP test, KPSS test: Which test to prefer?

Question: If a time series is tested for Unit Root (by ADF, PP, KPSS,...) problem is detected with some tests and not found by others. Which one is preferred? For example if ADF says us that there is a Unit root and PP says that is not problem. Which one of them would be preferred?
Answer: Generally, if there are multiple statistical tests that apply for the same thing and work differently, then a single significant result leads to rejection. It follows from the logic of hypothesis testing theory that failing to reject means that there has not been enough evidence. This is how normality is often tested.
Answer: I answered two verisimilar question:

Contradictory results of ADF and KPSS unit root tests
What is the difference between a stationary test and a unit root test?
(I summarized the most relevant part of this answer below)

How unit-root test and stationarity-test complement each other
If you have a time series data set how it usually appears in econometric time series I propose you should apply both a Unit root test: (Augmented) Dickey Fuller or Phillips-Perron depending on the structure of the underlying data and a KPSS test.
Case 1 Unit root test: you can't reject H0; KPSS test: reject H0. Both imply that series has unit root.
Case 2 Unit root test: Reject H0. KPSS test: don`t reject H0. Both imply that series is stationary.
Case 3 If we can't reject both test: data give not enough observations.
Case 4 Reject unit root, reject stationarity: both hypothesis are component hypothesis – heteroskedasticity in series may make a big difference; if there is structural break it will affect inference.
Power problem: if there is small random walk component (small variance σ 2 u ), we can't reject unit root and can't reject stationarity.
Economics: if the series is highly persistence we can't reject H0 (unit root) – highly persistent may be even without unit root but it also means we shouldn't treat/take data in levels.
General rule about statistical testing You cannot proof a null hypothesis you can only affirm it. However if you reject a null hypothesis you can be very sure that the null hypothesis is really not true. Thus alternative hypothesis is always a stronger hypothesis than the null hypothesis.


Do I need to pollinate cucumbers?

Question:

I planted a few cucumber plants back in May, and a few weeks ago, they have started to flower and produce fruit, though they have not grown much, perhaps due to the lack of pollination. After doing some research and asking some friends, I received mixed answers as to whether or not I should pollinate the plants. I don't know if the appearance of fruit signifies that they have already been pollinated, still need to be, or maybe the ants crawling around in the flowers are doing the pollinating. Any insight into this would be helpful. Thanks.
Comment: Just wait some more weeks and you will have too much cucumbers.
Answer: Ants pollinate...all insects attracted to flowers pollinate.  Ants are kind of different however. They are looking for real estate to raise a herd of aphids. Aphids are not a big deal...but be on the look out.
Are these cucumbers out of doors in the garden or are they in a greenhouse?
Get a soft water color paint brush.  Dip into 'male' flower and then brush lightly over the pistil on the female flowers.  This link will help you to recognize male from female 'flowers'.  Certainly will not hurt anything and it has been shown that 'helping' pollination produces more fruit.
how to tell a male flower from a female flower on cucumber
Have you fertilized at all?  I am seeing rather chemically deficient plants.
Comment: Great questions!  All purpose miracle grow works just fine.  I am seeing too light of a green color as well as being able to see the veins in the leaves so clearly.  Another application of miracle grow...what 'formula' are you using btw.  Make sure you use NPK where the N is the lowest of the 3 numbers.  Even numbers are ok, more fruit will be produced if the N is lower (2-5-4 versus 5-5-5) . Make sure the nitrogen is not the higher number (percentage within the bag or box).  Such as; 5-4-4.  That will cause more vegetative growth (leaves, stems) versus reproductive growth; flowers and fruit.
Comment: Thank you for responding. The plants are outdoors in a garden. The only fertilizer I have used is all purpose miracle grow fertilizer, though it has been about 2 weeks since I last applied it. I figured since they were growing rapidly, fertilizer was not needed. How could you tell they were chemically deficient? Also, just for my knowledge, does the female flower have to be pollinated before it produces the fruit, or will the fruit appear regardless? Some of the female flowers fell off, so I don't know how I would pollinate those.
Comment: If the flowers that fell off have no baby cucumbers they were probably the male flowers.  Squash does the same dang thing. https://www.reference.com/science/difference-between-monoecious-dioecious-6273de1768bd915f
Comment: Or unpollinated female flowers...

Do I need to pollinate cucumbers?


More air pressure in tyre Vs Mileage

Question: Whenever I inflate my tires to medium/recommended pressure the mileage is better and obviously when it is very low the mileage affected. But I want to know why my mileage affected even if I keep pressure above recommended values.
Answer: Recommended values give you the handling and tire wear that the manufacturer intends for the vehicle.  If you increase above that, the contact patch decreases, giving better gas mileage, but you start sacrificing handling and causing abnormal tire wear.
Answer: When your tyre pressure is lower,there is more rubber in contact with the road, so your engine has to work a little harder to keep you moving forward.
Answer: I've heard folks claim mileage gains by running their tire pressure above the manufacturer's recommendations. In theory, that makes sense: With more inflation pressure, the tire bulges in the center of the tread and creates a smaller, skinnier contact patch with the road. This should mean less rolling resistance and increased mileage. we know under-inflated tires have a negative effect on fuel economy.
Answer: When you turn your steering wheel, even ever so slightly: as the tyres turn the tread on the tyre 'shuffles'. The more your tread shuffles, the greater the tyre wear. The manufactures recommended pressures will give you the optimum performance and wear from your tyres. Under inflation allows the edges of the tyres to take all the load and shuffle-increasing tyre wear on the outside edges. Over inflation causes the tread to be stiffer in the centre of the tread area, allowing the treads central area to take a greater share of the load and increased shuffle-increasing tyre wear to the central tread area. Use the recommended pressures from your vehicles manufacturer for optimum/maximum tyre life, and fuel economy derived from the correct/optimum rolling resistence for the vehicle.
Answer: Cyclists know the answer to this only too well...  They use the maximum pressure the tyre will allow, when racing or time-trialing (say 140 psi) But the ride is so bumpy.
When training they let their tyres down to 80-90 psi for the comfort, and better road-holding, at the expense of more effort required. (i.e. a worse mpg.)

More air pressure in tyre Vs Mileage


Baking Powder in scones

Question: For scones can I mix cold butter with self raising flour and then add the wet ingredients the next day. This is to save time in the morning?
Answer: I do the same as you, Vivien. I find that mixing in the liquids in advance leads to too much gluten development and some outgassing from the baking powder, but that if the butter/flour mixture is kept cold enough it doesn't hurt to mix it the night before.
(Anyway, it takes longer for the oven to heat up than it takes to mix together the remaining ingredients and shape the scones.)
Comment: Outgassing?  You mean you'll get baked pebbles because no rising will happen
Comment: No, nothing that drastic. Modern baking powders don't really do much of the gas production until you heat them up.
Answer: I regularly prep scones completely the night before. As in, I make the entire dough, place on a baking sheet, and put in the fridge until morning. So you can even go a step further and add the wet ingredients too the night before to save even more time in the morning.
Comment: You want to make sure you're using 'double acting' baking powder if you do this.  (most of it these days is ... but it someone's trying to stay away from aluminum or only shops at health food stores, it might not be).  Double acting powders produce gas when they're moistened and again when they're heated.

Baking Powder in scones


What role does the ideology Khomeinism play in modern day Iran?

Question: I know that Khomeinism is the founding ideology of the Islamic Republic of Iran based on the political ideology of  Grand Ayatollah Ruhollah Khomeini. What I want to know is how much influence does this ideology have on the modern people and politics of Iran, if any?
Comment: Doesn't the article you link to have a giant section on "legacy"? What else are you looking for?
Comment: I guess I am looking for more specific policies and rulings followed by modern Iran that are influenced by Khomeinism. While legacy is helpful, it doesn't really mention many specific policies created by or inspired by Khomeinism and their direct affects on the people of modern Iran. Some sections of legacy just give scholar options on Khomeinism, the beliefs of Khomeini and how they changed during the revolution, or how Khomeinism affected historical events in Iran - not modern Iran.
Answer:
A religious "supreme leader" https://en.wikipedia.org/wiki/Supreme_Leader_of_Iran
Execution of gays. https://www.dw.com/en/iran-defends-execution-of-gay-people/a-49144899
Ongoing terrorism  https://www.brookings.edu/blog/order-from-chaos/2019/01/24/the-iranian-revolution-and-its-legacy-of-terrorism/
Incitement against the United States. https://www.reuters.com/article/us-iran-usa-embassy/iranians-chant-death-to-america-to-mark-u-s-embassy-seizure-idUSKBN1XE0KK
Exporting the revolution  https://www.memri.org/reports/goals-second-phase-islamic-revolution-iran-next-40-years-%E2%80%93-part-three-irgc-commanders-speak


google play services is not supported by kindle fire

Question: I installed google play services on my kindle fire 6. Except whenever I try to launch it, it always crashes. And when I try to launch another app, YouTube for example, it says "Google Play Services, which some of your applications rely on is not supported by this device. Please contact manufacturer for more information."
I've tried rebooting, re-installing, installing another version, and installing from another website. I have google accounts and google framework apk installed. And my device is in very good condition. I don't know what to do. Please help.
Comment: Take a look at http://android.stackexchange.com/q/26243/1465
Comment: I tried but that post is out dated. I am using a kindle fire 6.
Comment: Did you just install the play store? If so, you need to install the framework and services. What I suggest is to uninstall it and then follow the steps here --- Best regards, The Doctalex
Answer: Use this version. My Fire was working perfectly until this week so the solution seems easy: to move to GPServices previous version.
Google Play services 7.0.99 (1809214-038)
Good luck.


Efficiency of solving LP relaxation

Question: I'm building a mixed-integer programming model, and the solver is experiencing a very long run time. So I tried to solve the LP relaxation to the MIP, and I get a similarly long solve time, which surprises me. I was wondering what might make an LP take a long time to solve, without any integrality constraints.
Comment: Hi Yinan, welcome to OR.SE.
I'm not sure whether you want information about your particular problem/model or seek answer to the more general question "examples for helpful LP-relaxations"?
If the first is true, then please give some more information on your model (maybe even the precise formulas/constraints) and how exactly you tried to solve it. If the latter is true, then you should rephrase your question.
Comment: Yinan, I edited your question based on how I interpreted it. Please see whether it's OK, and if not, feel free to edit it back. It would also be good if you can comment on the answers that have been posted so far to indicate whether they are answering the "right" question.
Comment: Two other questions: (1) What solver are you using? (2) Are you sure that the running time is coming from the *solver*, and not from the modeling language (AMPL, PuLP, whatever) in the process of *building* the model?
Comment: @Yinan, can you provide us with more details, ideally a log file? I expect that you can see that you have (or have not) numerical trouble with your model and/or a lot of degeneracy the solver cannot cope well with (do we see a lot of stalling etc.).
Comment: @LarrySnyder610 Hi Larry, thank you very much for editing it, it helps clarify my question. The solver I am using is gurobi, and I implemented the model by Matlab library Yalmip.
Answer: If solving the LP relaxation is taking as much time as solving the corresponding MILP formulation to optimality, I would assume one of two things:
1) Most of the work done by the MILP solver consists of solving the LP relaxation. Solving the LP relaxation is usually a step to solve any MILP with a general-purpose solver. In other words, there is probably no branching going on and preprocessing is not taking much time. That also means that the solution of the LP relaxation satisfies the integrality of the binary variables, which is often a good thing. However, if it is taking too long, I would assume that the formulation is too large. In such case, I would wonder if it would be possible to formulate the problem in a different way, in which the LP formulation is not as strong and probably the solution does not satisfy the integrality of some variables, but that allows you to solve the problem faster either by relying on the solver or implementing your own strategies on top of it. For example, problems with a lot of symmetry might be solved faster with orbital branching than with a formulation having lots of symmetry-breaking constraints. It could also be the case that your current formulation is actually very good, but you are solving problems that are too big.
2) Another possibility is that the MILP solver is spending a lot of time in preprocessing, for example by removing redundant rows and simplifying your formulation. In that case, the fact that solving the LP and the MILP takes the same time is more of a coincidence, and you should probably be able to improve your formulation in order to avoid a lengthy preprocessing step.
You can probably check if either of these cases is happening by looking at the solver output while solving your MILP formulation. For a more specific answer, we would need to know what is the formulation that you are trying to solve, how big are the inputs, and what the solver is reporting to you during the process.
Comment: +1 for the preprocessing suggestion. I'd disable that first, as ill-conditioned problems tend to give solvers some headaches during preprocessing.
Comment: Hi Thiago, Thank you very much for answering my question. It is very helpful. I think the second assumption would explain my concern. I'll test on other formulations and keep you posted.
Answer: If LP takes a long time to solve, you can check a couple of things:
1) How large is the problem? Large LPs (>1 million variables/constraints on a ballpark) can take a long time.
2) How large is the range of coefficients in the objective function and constraints? Having a large range of the coefficients typically hurts computational performance.
Comment: I'd add 3) how dense is the problem? Size alone is not that big of a problem, if the constraint matrix is sparse.
Answer: Highly degenerate LP's can be very hard to solve using the simplex method and much easier to solve using an interior point method.  It's possible that your LP relaxation has this issue.

Efficiency of solving LP relaxation


What is the proper way to use a hand plane on wood?

Question: I am installing threshold between a bamboo floor and tile, and the threshold sits too high above the tile. I would like to use a hand plane to reduce it. But I have never used a plane before, and would like to know the correct way to use it?
Comment: This is really best answered by demonstration -- or at least video -- and by practicing on some scrap to get a feel for how the tool behaves before starting on a piece which matters.

"I hear, and I forget. I see, and I remember. I do, and I understand."
Answer: The concept of a plane:  It uses a very sharp chisel like blade mounted in a body to remove a thin layer of wood.  In practice, you use both hands (for control and even pressure) to slid the plane in the direction of the wood grain to remove a thin layer of wood at a time.
For effective use, you will need the piece of wood you are planing to be firmly held in place.  Use clamps, not someones hands, to hold the wood.  The blade on the plane needs to be razor sharp (reason for not using hands) to effectively grab the wood and shave it.  If it is dull, it is just going to skip and mar the wood.  You will need to find the right amount of pressure you will need to pressure to keep the blade in the wood.  Also don't try planing off too much at once.  The deeper you set the blade, the more likely it will mar the wood.  Start razor thin at first and gradually cut more as you get used to it.
For best results, do full strokes along the wood.  Where you start and stop it is easy to create mars in the wood.  Also if you do short strokes it is easy to create an uneven cut.  A good way to see if you are cutting evenly into the wood is to create a scribe line where you want to plane the piece to.
As @Keshlam said in the comment, use some scrap first.
Answer: This is sort of a two part question. 1: How to fit a threshold, and 2: what are the basics of hand plane use. On the first point, place your threshold in its space and mark or scribe your piece, then remove it and tune the piece to the line. Trying to fair it out in place will likely result in either damage to your tile, bamboo, or plane. On the second point...that is a looooong answer. I've been actively studying the use and maintenance of hand planes for over a decade and am only recently starting to feel like I'm getting the results I want. I will tell you that the first thing you need to know is how to sharpen your iron, a skill that takes time to learn and if you want to get to really serious about it you'll eventually need to invest significantly in your equipment (my stones alone cost over $500). To be perfectly honest, unless you intend to get into furniture making, a power plane and a belt sander will do everything the average person wants to do with only basic skills and a fraction of the monetary investment. I personally recommend Bosch power planes and Makita belt sanders particularly the 9904 (it has a lower center of gravity and just feels right in my hand). Having said that, there is nothing more satisfying than the feel of a well tuned plane taking a perfect shaving. In that spirit, if you still want to pursue learning about hand planes check out the videos on YouTube by Peter Sellers and Rob Cosman, they cover a good cross section of what you'll need to know to sharpen, set up,and use hand planes.
Comment: I hope you are wrong about sharpening needing huge investment of time and money (I'm awaiting delivery of a second-hand plane from Ebay). As a novice sharpener I've had acceptable results from sharpening wood-chisels using an inexpensive oilstone and some wet&dry paper on a ceramic tile. You mentioned Paul Sellers, who has some [videos](http://www.youtube.com/watch?v=vvTcReENk9g) on low-cost sharpening techniques that I find inspiring.
Comment: Oh yeah sorry I need to edit my answer. What I meant was, to get the results I wanted (heirloom furniture quality surfaces) I needed to step up to that level, but that's not necessary for everybody and it's not where you need to start out at either. I was just, in my round about sort of way, trying to suggest that there are easier ways to tune a threshold than learning how to sharpen, then set up, then use a hand plane:)


Tank reading half full. No more fuel will go in

Question: Tried 3 different times at 2 different stations with same result. Nozzle says full, guage says half.
Comment: It would help to know the make and model of the car. Did this just start? Are there any other problems?
Comment: Welcome to the site. Beyond the additional information GdD asked for, do you know how many gallons you pumped in before it stopped? Was the fuel gauge on "E" when you started pumping?
Answer: tl;dr: it sounds like your fuel tank vent hose is blocked.  Find the obstruction and fuel should go in fine.
Here's a quick diagnosis technique: try putting in more fuel while pressing the little white button under the gas cap (it's white on my car).  That releases vapor pressure right in front of you.  If fuel goes in better while pressing that button, the vent hose is almost certainly blocked.
I had a similar problem with a straight-forward but gross solution.  In my case, the vent hose was blocked, causing the pump to read a build-up of vapor pressure as a full tank.
Remember that the fuel tank isn't just a bottomless pit: when you put fuel in there, the liquid needs to displace the air and fuel vapors.  That is why there is a vent hose (usually running through a charcoal canister or similar in order to catch the waste vapors).
In my case, we have one car that spends a lot of time outdoors while my older son is at college.  A whole civilization of mice has built a multi-story complex of nests in the rear bumper and fuel tank area.  Eventually, this almost completely blocked the vent hose, making it nearly impossible to get more fuel in before the pump clicked off.
Solution: clean the accursed mice nests out of the area.
Result: fuel goes in!
Answer: Have you checked the tank? Has someone fitted the wrong cap to the tank? Or is the tank breather blocked?
I ask because there was a model of car that had a mechanical pump which could suck the tank "flat" : it would only hold 3 gallons instead of the 12 it should do! And the solution was to replace the tank and the "wrong" cap...
Comment: That there is an impressive pump!
Comment: It was an engine driven pump from the camshaft with a diaphragm - and yes it would suck start a Harley as the saying goes... Was a regular fault on the Avenger model....


Converting a web page image layout to HTML

Question: A graphic designer created a web page design and I have it in PSD now.
What are the tools or techniques used to easily convert this image into HTML.
Comment: Not programming related.
Answer: to get the best result you need to code up the html yourself integrating the relevant graphics when needed. if you are unable to do this yourself there are quite a number of companies that will take a PSD and code it into HTML for you. One example being www.psd2html.com - do a search on google for more examples.
Comment: take a look here for some more ideas http://vandelaydesign.com/blog/design/psd-to-html-services/
Answer: Use the Slice Tool to slice up the psd file into chunks of graphics that can be layed out on a web page. Then choose Save for web... to save these chunks into individual jpeg, gif or png files.
Answer: check http://www.bolducpress.com/tutorials/from-photoshop-to-html/ for a great tutorial about "slicing" which is one technique to "convert" a psd-file to a webpage.
Answer: Have it sliced if you must, but better build carefully planned HTML by hand, or have it done for you.
There are slicing tools that others will be able to tell more about. I personally think there is no better way really than creating the basic HTML and CSS  by hand. Because what you build now is the foundation for your entire web site, and any future extensions to it, it is really worth the effort.
If you go this route, you would pick a normal HTML editing program or platform and sketch out the basic structure according to the layout you have.
If you have little experience with HTML and need to get the job done, try out a slicer. If you have time and/or money, work it out by hand, use a high quality template as a basis, or have it done professionally.
Answer: Whilst I would agree with all of the comments above, if you want to do this yourself or don't have the knowledge/funds, you can do it with the likes of Dreamweaver/Fireworks, but as everyone has said, you won't get good HTML and unless you use it properly you'll have problems if you ever make changes to your page as changing sizes will break your layout.


Is it possible for wizard to become bishop?

Question: The problem is the magic enables the wizard to duplicate most of the event stated in the Bible, however it is a taboo in the world of magic to disclose the existence of magic in public. An offense punishable by exile into oblivion oversee by the wizardry council members and wizardry police. All magic do not require praying or calling out name to work. I'm trying to create such a protagonist to be both a faithful Christian and a professional wizard at same time for my story. How can I made it work in the modern day setting?
Comment: This is more of a plot thing than world building. The question is that how to hide the magic from public, or how to hide the use of magic from the wizard council. Becoming a bishop would probably draw a lot of attention from the council. Is it necessary, if all the protagonist want to do is cure people and do good deeds? Becoming a bishop required being a priest. I think that would already be a nono-thing for a wizard. What is a professional wizard?
Comment: @Lostinfrance  Your 2a and 2b are clear plot holes that may need to be explained in the story. 1a and 1b are the conflict that creates the story. As a world building, it would probably be more about the nature of church and the wizards. Now the questions are completely about the story.
Comment: Bishops don't perform any kind of miracles, they're simply higher ranks within the Church. Are you intending a second Jesus Christ, or does your religion possess a different kind of magic (aka miracles)?
Comment: @user3644640, I feel that this questions *is* mostly worldbuilding. The real problem with it is that it is multiple questions squashed into one: (1a) How to conceal his use of magic from fellow magic users so they won't exile him to oblivion  / (1b) How to conceal his use of magic from the general public  / (2a) How to reconcile his use of magic with his conscience if he believes magic is inherently evil and forbidden by God / (2b) How to reconcile his use of magic with his belief that he should obey the rules of his denomination if those rules forbid magic .
Comment: What, magician? No! I'm a *miracle worker*.
Comment: @user3644640: a professional wizard abide by the wizard code by day and do children party by night...
Answer: Magic, as is understood in our world, is incompatible with Christianity. Because it is a way to appropriate and manipulate the fundamental laws of nature above the power that God gave men. Both Old and New Testament condemn sorcery on several passages.
Note, that this is different from miracles, in which God is the author of the prodigy. The human didn't make the miracle, he asked God to do it and gave God the merits. In fact there is an interpretation that Moses wasn't allowed on the Promised Land because he said that "I made water spout from a rock in the desert", therefore not giving God His due.

Now, there are lots of people in the Church that don't follow Christianity's rules. Some of them are even bishops. But you can't say he is a faithful Christian. If he is, he is a Christian in spite of his Magic usage, not because of it.

Also, this wizard's "sin" is undercover and he can't allow it to be revealed, not only for his own sake, but for Wizardkind's sake.
So, if you want this to suceed, your going to create an alternative Christianity, with different assumptions. Because a bishop would be under severe scrutiny by the Church. The existence of Magic would be under severe peril of being revealed to the world, with a wizard bishop.
In fact, before being a bishop, he was a priest, and a deacon before that, and a seminarian before that. It is almost impossible for a man with such a backtrack to become bishop without being discovered.

The only realistic alternative that I can give you is if the wizard renounced the use of his Magic when he entered the seminary.
Comment: As an alternative to creating an alternative Christianity with different assumptions, you could create an alternative magic. For instance if some people turned out to have psionic powers or superpowers whether they wanted to or not, these powers would be "magic" in one sense but would not involve any intent to appropriate and manipulate the laws of nature or contact with demons. They would merely be a natural ability the science of which is not yet understood.
Comment: Also worth pointing out that the wise men who brought gifts of gold, frankincense and myrrh to Jesus are described as "magi" and practised a form of astrology but are still portrayed as good.
Comment: Good points on both accounts, although the magi were given more leeway, since they were gentiles.
Answer: The Church is a long running institution, I'd imagine that they would have learnt about the existence of the wizards by now.
Having a wizard rise to fame in the church by doing these biblical events would most likely be seen as an attempt to gain control of portions of the church. In the end religion can be a good thing but the big churches are more worried about keeping the money flowing in. Anything that threatens this would be dealt with quickly and efficiently.
I can see the Church contacting the wizard council and demanding for the main character to be dealt with. For the council it would be easier to get rid of him than to oppose the church.
Answer: For a twist in the plot:
The wizard council IS the upper echelons of the Church. Back when the church was recognized by the Roman Emperor, the wizard council saw an opportunity and mass converted. At the time, the church wasn't aware of magic, and the wizards simulated miracles through their magic and rapidly rose to the top as blessed sons of the church. Once in place, they took advantage of their positions to scout out new wizards and bring them into the fold. Non magical people can join the church, but they'll only  rise so far, and though they may be unhappy about it, the church will point out that their brother who is blessed with miracles is surely a worthier candidate, and they'll be next in line when another vacancy opens up. Those who make too much fuss will be accused of heresy against the Mother Church and burnt at the stake.
Your protagonist might be unaware of this when he joins and tries to conceal his magic, only to find that the ones getting ahead are cheating with magic, but nobody seems to notice.
Answer: Perhaps your character doesn't see himself to be a wizard. As a child, he may have inadvertently performed miracles and was seen by his community as a gift from God. When he grows older, he is entwined in Christianity and believes his gifts are given to him by God and so enters the church. He moves up the ranks to Bishop, never identifying himself as a wizard, but possessing magical powers. If necessary, he stops using his 'powers' claiming that God's new path for him is a leader of the Church.


Suggested synonym for finance → money

Question: I'd just like to suggest "money" as a synonym for the "finance" tag.
One of my questions was recently tagged with finance, I remember that I did search the tags for "money" but it did not appear. This would solve this problem.
Comment: I like this, if it gets more support I'd be in favor of doing it.
Comment: @Undo to me the two are so much synonym, I'd automatically check for "finance" first when looking for "money": "money" doesn't feel like a tag to me (maybe not abstract enough). One wouldn't use `doctor`/`pills` but rather `health` (or `medicine`) for a tag, right? – But I'm fine with a synonym if it helps. Count my vote as "undecided, but not contra" :)
Comment: Given the questions currently tagged as finance are mostly accounting, I would suggest accounting (or money if needed) rather than finance.
Answer: This gets interesting because tags work in a different way than human linguistics.
In linguistics, we have constructs such as supersets, subsets, and overlapping sets.  In contrast, with tags, everything is linear because all tags are at the same hierarchical level.
Finance topics can include accounting, investing, savings, loans, mortgages, depreciation, budgeting, and more.
Money topics can include currency identification, currency conversions, numismatics, finance, and more.
Even though money initially appears to be a superset of finance, in fact, money is a tool used in finance.  It's easy to talk about money without talking about finance, and it's equally easy to talk about finance without talking about money.  On the other hand, talking about finance without talking about assets is challenging.  But I think it's safe to say that very few people would use an assets tag.
The relationships between these lingual constructs get complicated quite quickly.
Creating SE tags at the appropriate level of detail is challenging, yet important.  If we get very detailed, it becomes easy to find posts, but difficult for people to assign the most appropriate tags.  If we get too general, the tags become fairly useless.
We currently have 41 open (4 closed) QAs with the finance tag and only 9 open QAs (1 closed) with the accounting tag.  Some of the ones tagged with finance are accounting questions, and some of the ones tagged with accounting are finance questions.  The lines get blurred very quickly.  Using the accounting tag will not find all the accounting QAs, and using the finance tag will not find all the finance QAs.
TL;DR The bottom line is that we have at least one user who did not find the finance tag, but did think of using money.
For Software Recommendations SE, at this time, I think it is a good idea to have a single tag for everything that is finance or money related.  Currently, that is 50 open questions.  This way, users will have a single tag to find all such QAs.
The terms money, accounting, and bookkeeping can then be set as synonyms for finance.
Answer: Another option is to have tags with a higher degree of granularity.  More granularity makes it less likely that an answer will be included in a "search by tag" operation.  This can make it harder to find QAs because they won't be included in the results.  But it can also make it easier to find QAs because there will be fewer search results to sift through.
Select this option if you prefer having multiple tags: finance, accounting, and investing
For this option, bookkeeping can be a synonym for accounting, and money can be a synonym for finance.

Suggested synonym for finance → money


Issues with Office 365 Compliance center to audit SharePoint Online

Question: I have admin rights both on SharePoint online and compliance center in Office 365 tenant. but i am unable to use the auditing features and perform any actions. attached the screenshot with the error message.
let me know if there are any solutions.
Comment: I'd recommend opening a support ticket in the admin portal.
Comment: thx, i did that already. posting here to see if someone has faced the similar issues or share any workarounds.
Comment: I used it a couple times today with no issues
Comment: i am interested to know what are the pre-requisites to see what exactly the problem i am facing ?
Answer: The below are the pre-requisites for SharePoint Admins to have the auditing capabilities via Compliance center.

SharePoint admin.
Exchange online license (this is required because all the underlying cmnd are running under exchange online with in office 365)
the user should be a member of the organization management group (global admins will be having it as a default option).
if you are worried about the organization management role as it have several in-built permissions at a larger scope. so follow the below step:
create a separate group with permissions as view audit log results and then assign the user in to that group.

once all the pre-requisites are in-place then you should be able to view and export all the audit log entries both for SharePoint and One Drive.


Has Lord Shiva worshipped Lord Vishnu to incarnate in any form?

Question: Which all Gods prayed to Lord Vishnu to incarnate as Lord Rama? Was Lord Shiva also one of them?
If not, then has Lord Shiva worshipped Lord Vishnu to incarnate in any form?
Comment: Can you correct the grammer in your q? It is currently not understandable.
Comment: I mean, Who all Gods prayed Lord Vishnu to take the avatar of Lord Rama? Did Lord Shiva also pray him?
Is my question clear?
Comment: No sorry, can maybe fix the grammar?
Comment: @Parth Bhagwat Do you mean that was Lord Shiva present among the gods who prayed to Lord Vishnu to incarnate as Rama?
Comment: @Manoj Gowda, Yes!
Answer: Yes, Lord Shiva was present when the Gods prayed to Lord Vishnu to incarnate as Rama. The verse can be found in the 15th Sarga of Balakana of Valimiki Ramayana. I am reproducinng it from here.

तदा देवर्षि गन्धर्वास्सरुद्रास्साप्सरोगणा:।
स्तुतिभिर्दिव्यरूपाभिस्तुष्टुवुर्मधुसूदनम्।।1.15.31।।
Then along with gandharvas, groups of apsaras, rishis, rudras and devatas sang in praise of the 'Lord Slayer of Madhu', with hymns of celestial beauty.

The sloka mentions that Rudras were also present. Since Lord Shiva is the leader of Rudras, we can infer that he too was present.
Lord Shiva was also present when Devatas urged Lord Visnhu to incarnate as Krishna. Slokas can be found in Bhagavatha purana. I am quoting from here.

ब्रह्मा तदुपधार्याथ सह देवैस्तया सह ।
जगाम सत्रिनयनस्तीरं क्षीरपयोनिधे:॥
Thereafter, having heard of the distress of mother earth, Lord Brahmā, with mother earth, Lord Śiva and all the other demigods, approached the shore of the Ocean of Milk.
Comment: Thank you @Manoj Gowda. I had read about the Halebidu Temple "astronaut" thing and saw the sculpture in a image on web. I don't think that it is actually true. I saw some a video on YouTube by "Pravin Indramohan" regarding that. He said that the helmets wore by sculpted Devas and wires around the bodies of the Devas referring to an astronaut suit. But I think that it is "Yadnyopavit"(I don't know English word for it, but maybe "sacred thread") and I guess it's not any helmet but the setting of the hair was like that during those days.
Comment: Also in other sculpts in the same temple, one can see the same hair setting which are depicting different scenarios. Also these Devas are worshipping Lord Vishnu (The sculpt is broken near the head so not sure but some web sources support it by saying that the hand holds "Sudarshan Chakra") and I think that one of the god is Lord Shiva(it's my guess because there's a thing around his neck which I presume is "Vasuki"). Hence I'd asked this question that whether Lord Shiva had worshipped Lord Vishnu or not. I would like to get your views too on the "Astronaut" thing of Halebidu Temple.
Comment: @Parth I visited Halebidu long time back. I do not remember the specific sculpture you are referring to.
Comment: You can see this:  https://images.app.goo.gl/f36kEXf17FD2pjsG8. Also you may read this: http://www.phenomenalplace.com/2017/11/ancient-astronauts-carved-in-halebidu.html?m=1
Answer: Shiva means "the auspicious/kind one". The word Shiva is used as an epithet for several vedic deities, including Rudra.
Like other epithets like Indra, Vishnu, Rudra, etc, Shiva is an epithet used to indicate the auspiciousness/kindness of the Almighty God.
For example:
In respect of Agni: (RV I.31.1)

तवमग्ने परथमो अङगिरा रषिर्देवो देवानामभवः शिवः सखा | तव वरते कवयो
  विद्मनापसो.अजायन्त मरुतो भराजद्र्ष्टयः ||
You, Agni, the first Aṅgiras, the seer, the god, became a kindly
  comrade of the gods. Under your commandment were born the sage poets
  working with their know-how—the Maruts with glinting spears.

It was in the interpolated parts of EPICs and many puranas deified the epithets Vishnu, Rudra, Agni, etc.
So Shiva worshipping Vishnu, for incarnating in some form, if found in Puranas, is the story added at a later date.

In Ramayana (Sarga 15 of Bala Kanda), there was a mention of various gods extolling Vishnu.

तदा देवर्षिगन्धर्वाः सरुद्राः साप्सरो गणाः |
  स्तुतिभिर्दिव्यरूपाभिस्तुष्टुवुर्मधुसूदनम् || १-१५-३२
Then all the groups of gods, sages, gandharva-s, with rudraa-s, and
  apsarasa-s, extolled Vishnu with prayers of divine exposition.

As mentioned above, there are some interpolated Sargas in Ramayana.  Sargas 15 - 17 of Bala Kanda are one among them.
As far as I read, Understood, Shiva did not pray to Vishnu to incarnate in some form.
Comment: Well said , well said ! Historically speaking , Savism came centuries before the Vishnavites.


Naming convention for multiple star systems

Question: Okay, so I've seen different notations for the stars in β Capricorni. Some sources state that the stars are Aa, Ab1 and Ab2, Ba, and Bb, while others say that they are Aa, Aba and Abb, Ba, and Bb. So, what is the proper way to name stars in a multiple star system, and are there any exceptions to this convention?
Answer: The purpose of the notation is to indicate how the system is physically constructed, to indicate which stars orbit which - especially useful in hirachically organized stellar systems. So both ways are correct as their meaning is understood.
The notation I encounter most often is the first one you indicate: indicating with capital letters the systems which orbit the common pericenter of the overall system. With non-capital letters the components of the upper level are distinguished. And keeping it more readable, numbers are used for the 3rd level if further distinction is needed for a 3rd level.
However this nomenclature is not unique - and there is so far no general consensus. See the Washington Multiplicity Catalog for a take on getting some order at a given time and the IAU working group on stellar names.
For a given system the designation might be more traditional and depend on order of discovery and naming by discoverer than following a fixed scheme. See also the discussion of future nomenclature on stellar system components in the corresponding wiki article.
Answer: I suppose that the International Astronomical Union has rules for naming stars in multiple systems.
I believe the usual rule is to describe the brighter star as A and the dimmer star as B, which works well as long as neighter star is very variable.
Thus the brighter star in Alpha Centauri is Alpha Centauri A and the less bright star is Alpha Centauri B.  Sometime later a very dim red dwarf was discovered close to Alpha Centauri A & B, and became known as Alpha Centauri C, or Proxima Centauri since it is the closest star to our solar system.  I think that recent research has shown that Alpha Centauri C is actually gravitationally bound to A and B and part of their star system.
I also know that when exoplanets are found orbiting stars the exoplanets are usually given lower case Latin letters, starting with b for the first exoplanet discovered.  And there is an exception when several exoplanets are discovered orbiting the same star at the same time.  In that case they are designated b, c, d, etc. in order of increasing distance from the star.  And if more exoplanets are later discovered in the system, planet e could orbit between planets b and c, for example.
That is different from the system in science fiction stories where it is normal to designate exoplanets with Roman numerals in order of increasing distance from their star, so that in our solar system Mercury is sometimes called Sol I, Venus is sometimes called Sol II, Earth is sometimes called Sol III, and so on.
Castor, or Alpha Geminorum, is a sextuple star system, with visible three stars which are spectroscopic binaries.  That means that telescopes show three Castor stars as dots of light, but the spectra of each star shows that it is actually a close binary star with two stars revolving around each other and thus changing their doppler shifts relative to Earth.

Castor is a multiple star system made up of six individual stars; there are three visual components, all which are spectroscopic binaries. Appearing to the naked eye as a single star, Castor was first recorded as a double star in 1718 by James Pound, but it may have been resolved into at least two sources of light by Cassini as early as 1678. The separation between Castor A and Castor B has increased from about 2″ (2 arcseconds of angular measurement) in 1970 to about 6″ in 2017.[18][16] These two binary pairs have magnitudes of 1.9 and 3.0.

https://en.wikipedia.org/wiki/Castor_(star)[1]
So sometime in or after 1718 the two brightest strs in Castor were labeled Castor A and Castor B.   Sometime later the third visible star was discovered and named castor C, or Alpha Geminorum C.
When the three stars A, B, & C were discovered to be spectroscopic binaries, the two stars in each pair were give lower case letters a & b, so the six stars are now named Castor Aa and Ab, Castor Ba and Bb, and Castor Ca and Cb.  That doesn't conflict with the system of naming exoplanets as long as any expolanets in the Castor system orbit Castor Aa, Castor Ba, or Castor Ca.  but if exoplanets are found orbiting Castor Ab, Castor Bb, or Castor Cb, I'm not certain how they would be labeled.
Fortunately the orbital periods of Castor Aa & Ab, and Castor Ba & Bb, are only a few days long, and the orbital period of Castor Ca & Cb is less than a day.  Thus most exoplanets found in the Castor system would probably orbit around both the stars in a pair.  And I am not certain how such circumbinary exoplanets would be labeled. Probaly as Castor A b, c, d, etc. Caster C c, d, e, etc. and so on.
So I think that with the present system there is a possibility of ambiguous labeling, and people being uncertain whether Castor Ab, for example, is a star or an exoplanet.
I note that the original question mentions stars labeled with an Arabic number as part of a multiple system.  And I never heard of that before.
And no doubt an astronomer who studies multiple stars can give a much better explanation of the naming conventions.


Question about Tails installation

Question: I am interested in installation of Tails to Hard Disk. I tryed to make USB flash disk with Tails then use information from it. Cant find anser in manual. Help me plz.
Answer: Generally speaking... you can't.  Digging a bit deeper, you'll find that it can be done manually with some work, but even then persistent storage won't work unless your Hard Disk is attached via USB.
If you happen to be using a USB hard-drive, it should be easier.  You just have to remember to remove live-media=removable at the Tails Bootloader Menu (just hit tab)

Question about Tails installation


Navigating to commonly used folders by right click?

Question: So is there a way I can navigate to common folders by right clicking?  I want this to work in explorer and open/save file dialogs.  I use windows vista.
Answer: I use Direct Folders to do this.  By default, you middle-click or double-click on a blank area in the folder (e.g., Windows Explorer, Save As... dialog, Open File dialog, or even your desktop), and you get a menu with your recently-used folders and preconfigured "common" folders.
Comment: Yea, direct folders seems to do what I want and appears to have a functional version for free.  Thanks.
Answer: This is not exactly what you asked for but maybe helps. I do not know about vista but in server 2003 it works like this:
In the open / save dialog on the left side there are some shortcut icons (desktop, my files, ...) and there is a way to add and remove entries to this list.
I do not remember how it works now, but if you are interested I could check.
But the number of entries in this list is limited.


How to get iMovie, iPhoto & garage band back after rebuilding system?

Question: My hard drive malfunctioned and I had to have it replaced with a new one and reboot my Mac. Now iPhoto, iMovie and garage band have all disappeared and are no longer on my Mac. Is there any way to get them back without having to pay for them?
Answer: Log into the App Store, and they should be there in the 'Purchases' tab - assuming that when you bought the Mac you told the Store that you wanted to register the apps to your Apple ID.
Answer: The apps aren't part of the OS - so you will need to use the same Apple ID as you used to "redeem" them initially. If you feel you didn't redeem them, you could contact Apple support and ask for them to check if the included apps for that Mac have been claimed. If not, I would expect them to get you redemption codes to not have to pay for them if they should be included.
If someone redeemed them, it's up to Apple whether they decide to slide you them gratis or ask for you to purchase them - but it wouldn't hurt to ask nicely.
Answer: You cannot ever get them back if they're not in the purchases >-<
Comment: We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.


Computational complexity of function $U^V$

Question: Given $(U,V)$ two integers of finite size, I have a question about the complexity of calculating the $V^U$, i.e. $V$ raised to the power $U$. Is their a polynomial time algorithm to do this? If not is this an NP-hard problem?
Comment: see https://cs.stackexchange.com/questions/37242/fixed-base-exponentiation-with-precomputations
Comment: What research have you done?  This is covered in standard textbooks and in Wikipedia.  What complexity model?  Number of basic operations (additions, multiplications, etc.)?  Number of bit operations?
Comment: @RickDecker I vaguely remember there was a very good answer for this question (probably by Yuval?) but couldn't found it myself. Also was too lazy to do the right thing (as you did!) and properly answering it..
Answer: One way to do this is by repeated squaring. First, express $V$ in binary,
$$
V = b_0+2^1b_1+2^2b_2+2^3b_3+\dotsm+2^nb_n
$$
where each  $b_i$ is either zero or one. Having done this, repeatedly square $U$ to get $U, U^2, (U^2)^2 = U^4, (U^4)^2=U^8, \dotsc, U^{2^n}$. Then
$$\begin{align}
U^V&=U^{b_0+2^1b_1+2^2b_2+2^3b_3+\dotsm+2^nb_n}\\
   &=(U^{b_0})((U^2)^{b_1})((U^4)^{b_2})\dotsm((U^{2^n}))^{b_n})
\end{align}$$
For example, to compute $3^{21}$ we would get the binary expansion of $21=16+4+1$ and then repeatedly square the $3$s:
$$\begin{align}
3^1 &=3\\
3^2 &=9\\
3^4 &=81\\
3^8 &=81^2=6561\\
3^{16} &= 6561^2=43046721
\end{align}$$
So we'll have
$$
3^{21}=3^{16+4=1}=(3^{16})(3^4)(3^1)=(43046721)(81)(3)=10460353203
$$
Consider the worst case, with $V=2^n-1$, and let $d$ be the number of bits in the representation of $U$. This will require $n-1$ squarings. Let's use the grade-school multiplication algorithm, for which the product of two $k$-bit numbers will take $O(k^2)$ primitive operations. We'll then have
$$\begin{array}{ccc}
\text{product}& \text{factor size} & \text{ops needed}\\
U^2 & d & d^2\\
U^4 & 2d & 4d^2\\
    & \dotsc & \\
U^{2^{n-1}} & 2^{n-2}d & 4^{n-2}d^2
\end{array}$$
So the total number of operations needed to precompute the squares will be
$$
(1+4+4^2+\dotsm+4^{n-2})d^2 = O((2^n)^2d^2) = O(V^2\log^2U)
$$
Now since we chose $V$ so that it involved all of the squares we computed, we'll have the final product $(U)(U^2)(U^4)\dotsm(U^{2^{n-1}})$. Mirroring the construction above, we find that the final product will also take $O(V^2\log^2U)$ operations, so to compute $U^V$ by repeated squaring will take time $(2^nd^2)$ where $n, d$ are the number of bits in $V$ and $U$, respectively. Unfortunately, this means that this construction is not polynomial in the size of $V$.
Notes.

In your original question, strictly speaking, the classes P, NP, Np-complete and NP-hard are generally applied to decision problems, which this isn't.
There are faster ways to compute the product of two integers, so you can actually do better than $O(V^2\log U)$.
While this (as it turns out) is actually less efficient than the naive algorithm of computing $U^V$ by successive multiplications, $U, U^2, U^3,\dotsc$, it works very well when computing modular powers, $U^V\pmod W$, since none of the intermediate products will ever be larger than $W$.
Comment: Thanks a lot. I just need a clarification for what you mean by "primitive operations". When they define polynomial time problem set $P$, do they say what are those primitive operations? This has always confused me.
Comment: @seek. When we talk about primitive operations, we generally mean those that are essentially close to being at assembly-level, namely adding two bits or multiplying two bits. A level up would be evaluating $x<y$ for two binary numbers. This isn't quite primitive, since it would either be implemented as "subtract $x$ from $y$ and check that the result is positive or negative" or doing a comparison of the bits in the numbers, either one of which could take $O(n)$ for $n$-bit numbers. Remember, in this (log-cost) model, the numbers involved may be arbitrarily large, so we need to be aware of that
Comment: I'm not buying this. It is true that this uses $O(\log U)$ multiplications, but with repeated squaring the numbers get larger with each step and you cannot really assume that every multiplication will take $O((\log V)^2)$ operations. For example, is it really true you can compute $2^N$ with $O(\log N)$ operations, while the result takes $N$ bits to write?
Comment: @sdcvvc. Quite right. Again, I learned the truth of the maxim "Post in haste, repent at leisure". My only excuse is that it was late at night and I must have been fuzzy. I've edited my post to be closer to correct.
Comment: Seems you gave almost the same answer [before](https://cs.stackexchange.com/questions/37242/fixed-base-exponentiation-with-precomputations); maybe you want to consolidate the two versions over there?


Retain tag/field across events in logstash 1.5

Question: I'm using logstash 1.5 to analyze logs.
I want to track two events which occur one after the other.
So I would like to set a flag/field/tag when first event occurs and retain the value across events.
I looked at this link but looks like grep and drop are not supported in logstash 1.5.
Is there a way of achieving this?
Answer: The closest you can get with logstash is the elapsed{} filter.  You could use that code as a basis for your own filter if it doesn't meet your needs.  I also run some external (python) post-processing to do more than elapsed{} can (or should) do.


How to effectively use the metadata of ERC721

Question: When you store a URL as the metadata of ERC721, does that defeat the purpose of the immutability aspect of a blockchain, since the content that URL is pointing to can be modified? How do I effectively use the metadata of ERC721 without storing everything on the blockchain? I know IPFS is a popular choice, but could I use a conventional URL endpoint and still have it align with the purpose of ERC721?
Answer: This is a very important topic, and it's been pointed out that not enough attention is given to it.
Ultimately, immutability is a bit of a spectrum. If somehow every last device storing the Bitcoin and Ethereum networks would be destroyed, the networks would be lost. Fortunately, that is improbable enough to not worry about. Similarly, even IPFS is not as permanent as people think sometimes. Files that are not accessed often have a chance of getting dropped of the network. (This can be mitigated by running an IPFS node and pinning, but then users are somewhat dependent on either running their own node, or relying on someone who does.) Arweave has very strong liveness guarantees (that means guaranteeing that your file will always be there), along with immutability (that your file cannot change). Mintbase uses them for their NFTs for those reasons, as does InfiNFT.
Does that mean that you must use Arweave in order to make an NFT? It depends how far you want to go in guaranteeing the immutability and liveness of the underlying asset being tokenized by the NFT. The same goes for IPFS. And, to answer your question directly, the same goes for using a URL. There should be a spectrum in using a URL too - you could reduce the problem by ensuring NFT purchasers have some level of agency in the platform they are stored in - that they are able to renew the domain, and to re-upload their content to their endpoint in the event it goes down.
That's just one idea. The basic idea behind it is that there should be as much transparency as possible about the URL and its management. It isn't a perfect answer to all of the questions of immutability and liveness, but will be the most you can do in aligning with the goals of decentralization, like you mentioned in the question.
Hope that helps!
Comment: Thank you for your detailed answer. I have two following up questions: 1) If I'm understanding Arweave correctly, it's a non-Ethereum-based private blockchain, which means I'd be using Ethereum for ERC721 and another blockchain to store the metadata  because it costs less? Is this a common pattern for NFT?  2) When you say the users are able to `renew the domain, and to re-upload their content to their endpoint in the event it goes down`, that helps with the permanency of data, but not necessary with the immutability of them, correct?
Comment: I would think it kind of helps with both. If the content is changed, at least the user can change it back. It's not foolproof, and not true immutability, but it's a protection against some mutability. The same goes for the permanency, depending on how it's set up. In short, the setup will not be as trustless, but can still at least take some steps.


Is it viable to put an engine at the rear of the plane like in this photo?

Question: I saw this image on a NASA page talking about hybrids and I was wondering if the back-engine placemente is actually viable and if it is why hasn't been done yet?
Comment: "why hasn't been done yet?" one word: tailstrikes
Comment: This configuration (STARC-ABL) is also aimed to reduce drag and energy consumption by [absorbing the turbulent fuselage boundary layer](http://articles.sae.org/15159/) in the continuation of Boeing [SUGAR](https://www.youtube.com/watch?v=eLizJJytQqU) program.
Comment: Doesn't any single-engine jet effectively have a back engine - or at least back exhaust - placement, given obvious weight & balance limitations?  Not to mention a number of pusher prop planes.
Comment: Until somebody loads the plane improperly and [tips the tail](https://aviation.stackexchange.com/a/15058/3386).
Answer: As you look closely to the picture, there are also engines located under the main wings. Thus this is a trijet, a concept that has been used in the past by for example the MD-11, Lockheed tristart and Boeing 727. The main reason for choosing a trijet configuration was the ETOPS requiring twin engine aircraft to always be within a certain range of an airport. This was in a time when engines where less reliable. With three engines the aircraft did not have to bother with ETOPS regulations allowing it to fly routes impossible to fly for twin engine aircraft. But as engines became more reliable and the ETOPS got lengthened the trijets became redundant.
A big downside of the trijet is the structural complexity of an engine in the back, the fuselage needs to be reinforced to withstand the extra forces. From a maintenance perspective it is difficult to access the middle engine because it is high of the ground requiring a stair for visual inspection. Then there is the economical aspect, if you can do it with less engines it will always be more fuel economical. The next iteration of 777 can carry as many passengers as the 747 with half the engines.
Comment: You completely missed the reason the aft engine is here. It's not for escaping ETOPS, but [to suck air flowing along the fuselage](http://w3.onera.fr/ceas-tcad2014/sites/w3.onera.fr.ceas-tcad2014/files/04_innovative_concepts_s1_c_onera.pdf) instead of the free air stream in the hope this will reduce aircraft total drag. Conventional trijets exist, this is not one of them.
Comment: I don't think this is right ... what's unheard of on this design is not the rear choice for the engine, but more the fact that the rear engine is centered on the fuselage while a tri jet such as the MD11 have it offset (up)
Comment: The question mentions only "the placement" of the back engine, not the shape of the intake.
Comment: @mins, I'm aware that the reason NASA put the engine here is for the boundary layer ingestion, but the question asked here was more general about placement of the engine in general indicating that the asker is not aware of the trijet concept.
Comment: @Antzi: Most trijets have the rear engine centered on the fuselage; the DC-10 and MD-11 are the exception in that regard.


After Factory Reset, how do you unlock phone when it is not connected to wifi?

Question: I can't use my Samsung i9000 (Galaxy S1) for a number of years because I tried the screen lock incorrectly too many times. I no longer get that option, it just says "Too many pattern attempts" and asks for your Gmail details. But even after a factory reset, its still asking for these details and the phone is not connected to wifi. I would really appreciate some help.
Comment: It shouldn't know about that after a factory-reset – it rather should behave as if it came "straight from the shop". Which raises the question whether your factory-reset was successful at all. // I've just added the `locked-out` tag to your question. Please take a look at [its tag-wiki](https://android.stackexchange.com/tags/locked-out/info), which contains some background info on that as well as fist-aid and further links on the topic.
Answer: Till i understand, factory reset will completely erase all data which includes all settings also. So are you sure you have factory reset your device?
As mentioned here if you have USB debugging ON on your device you can follow this steps to disable lock:-
How to Disable Pattern Lock via ADB

You must have previously enable USB Debugging (Settings ->
Application -> Development -> USB Debugging)
Download and extract the Android SDK (from here)
Plug your phone into your computer
In command line navigate to where you extracted the SDK, then to the Tools folder which should contain adb.exe. Do not simply run adb.exe but instead enter adb –d shell.

Please check this question of forum


Coolant and water in oil problem

Question: I have an 06 Vauxhall Astra and it overheated so I filled with antifreeze, 5 miles later it had gone, over last day have been topping up with water and watching when stationary and when driving and the water just disappears and smoke from under bonnet, got home after 5 min drive water gone and now I have the sludge on oil cap, have looked best I can for leaks but can't find anything obvious, do I need to add oil if it's watery, any advice on what it is would be grateful
Comment: What does the oil look like on the dipstick? Also could you use full sentences with punctuation and not one long run on with comas.
Answer: A leak should be pretty obvious if the car is using that much coolant. As you say the oil is watery though then I suspect the cylinder head gasket has blown. This will need attention & replacing asap.

Coolant and water in oil problem


Is it possible to include inline assembly in Go code?

Question: Is it possible to include inline assembly in Go code?
This blog post shows compiling Go to a separate .s file and editing it, but not inline asm as part of a Go function like many C compilers support.
Comment: Generally don't include an answer in the question.  A comment is a better place for link-only things.  But in this case that article isn't about *inline* assembly, just compiling to asm and hand-editing that asm in a separate file, so I think we can edit your question to just mention it without talking about deleted link-only answers.
Answer: There is no support for inline assembly, but you can link with code written in assembly through C, compiling with cgo and using import "C", like in gmp.go. You could alternatively write in a style of assembly that is directly compatible with Go, like in asm_linux_amd64.s, that requires that function names start with "·".
Or, you can use nasm and gccgo, my favorite way so far. (Note that Nasm does not seem to support functions starting with "·").
Here's a working "hello world" example:
hello.asm:
; Based on hello.asm from nasm

    SECTION .data       ; data section
msg:    db "Hello World",10 ; the string to print, 10=cr
len:    equ $-msg       ; "$" means "here"
                ; len is a value, not an address

    SECTION .text       ; code section

global go.main.hello        ; make label available to linker (Go)
go.main.hello:

    ; --- setup stack frame
    push rbp            ; save old base pointer
    mov rbp,rsp   ; use stack pointer as new base pointer

    ; --- print message
    mov edx,len     ; arg3, length of string to print
    mov ecx,msg     ; arg2, pointer to string
    mov ebx,1       ; arg1, where to write, screen
    mov eax,4       ; write sysout command to int 80 hex
    int 0x80        ; interrupt 80 hex, call kernel

    ; --- takedown stack frame
    mov rsp,rbp  ; use base pointer as new stack pointer
    pop rbp      ; get the old base pointer

    ; --- return
    mov rax,0       ; error code 0, normal, no error
    ret         ; return

main.go:
package main

func hello();

func main() {
    hello()
    hello()
}

And a handy Makefile:
main: main.go hello.o
    gccgo hello.o main.go -o main

hello.o: hello.asm
    nasm -f elf64 -o hello.o hello.asm

clean:
    rm -rf _obj *.o *~ *.6 *.gch a.out main

I call hello() twice in main.go, just to double check that hello() returns properly.
Note that calling interrupt 80h directly is not considered good style on Linux, and calling functions written is C is more "future proof". Also note that this is assembly specifically for 64-bit Linux, and is not platform-independent in any way, shape or form.
I know it's not a direct answer to your question, but it's the easiest route I know for using assembly with Go, in lack of inlining. If you really need inlining, it's possible to write a script that extracts inline assembly from source files and prepares it in a way that follows the pattern above. Close enough? :)
Quick example for Go, C and Nasm: gonasm.tgz
Update: Later versions of gccgo needs the -g flag and only "main.hello" is needed instead of "go.main.hello". Here is an updated example for Go, C and Yasm: goyasm.tgz
Answer: There is no facility in the Go programming language to support in-line assembler language code, and there are no plans to do so. Go does support linking to routines written in assembler and C. There is an experimental feature which adds SWIG support to Go.
Comment: It's not always necessary to use cgo to link to C code. cgo just allows calls into code compiled with GCC (for now) because Go uses an otherwise incompatible ABI. If you don't mind linking in the C code statically, you can simply write and compile it in the style of the runtime package: http://golang.org/src/pkg/runtime/. Any function starting with "·" -- a mid-dot -- is callable through Go.
Answer: No, you can't, but it is easy to provide an assembly implementation of just one function by using the go compiler.  There is no need to use "Import C" to use assembly.
Take a look at an example from the math library:
http://golang.org/src/pkg/math/abs.go : The Abs function is declared in this go file. (There is also an implementation of abs in go in this file, but this isn't exported as it has a lower-case name.)
package math

// Abs returns the absolute value of x.
//
// Special cases are:
//  Abs(±Inf) = +Inf
//  Abs(NaN) = NaN
func Abs(x float64) float64

Then, in http://golang.org/src/pkg/math/abs_amd64.s , Abs is implemented for intel 64 bit in  this file:
#include "textflag.h"

// func Abs(x float64) float64
TEXT ·Abs(SB),NOSPLIT,$0
    MOVQ   $(1<<63), BX
    MOVQ   BX, X0 // movsd $(-0.0), x0
    MOVSD  x+0(FP), X1
    ANDNPD X1, X0
    MOVSD  X0, ret+8(FP)
    RET

One problem with assembly functions like this is that they aren't inlined by the go compiler, so there's a limit to how much performance you can gain if you're calling a small function many times.  The abs function is no longer implemented in assembly in the go library. I would say that the go compiler has improved such that with inlining it is faster for compiling the abs function without assembly in more recent go releases.
Comment: In order to use NOSPLIT, you must #include "textflag.h".  I have added it above.   See https://firstname.lastname@example.com&q=subject:%22Re%5C%3A+%5C%5Bgo%5C-nuts%5C%5D+NOSPLIT+on+Go+assembler+defined+functions%22&o=newest&f=1
Comment: `_amd64.s:2: illegal or missing addressing mode for symbol NOSPLIT`
Answer: The optimization pass in the standard Go compiler (that is: 8g+8l, not gccgo) is basically working with raw instructions in binary form. There is currently no way (it isn't implemented) for the compiler to distinguish compiler-generated assembly from user-supplied inline assembly code - this is the primary reason why the Go compiler doesn't allow inline assembly. In other words, the compiler has no support for inline assembly because of compiler architecture.
There is of course nothing in the Go language itself which would be preventing other Go language implementations (that is: other Go compilers) to have support for inline assembly. Inline assembly is a compiler-specific decision - it has little to do with the Go language itself.
In either case, inline assembly is unsafe because it cannot be checked for correctness by Go's type system. It seems it is better to implement any function which requires usage of inline assembly in a language like C, and call the C function from Go.
Comment: Is better not to use inline asm at all, the original version of C and Unix didn't need it or implement it, it makes code unportable and


Asymptotics of list size in Robertson-Seymour theorem

Question: A planar graph cannot have $K_5$ and $K_{3,3}$ as minors. Robertson-Seymour theorem generalizes this by stating for every genus $g$ there is a finite list of forbidden minor graphs that are obstructions that prevent the graph from being genus $g$. Is there any result on the size of the list? Is it linear in $g$?
Answer: No, it is not linear in the genus; it is at least exponential in $g$. See for example this answer by David Eppstein.
Comment: As Eppstein mentions, if you take a graph which consists of exactly $g+1$ blocks, each of which is a $K_5$ or a $K_{3,3}$, then this will be an excluded minor for embedding in a surface of genus $g$.  There are obviously at least $2^{g+1}$ such graphs.
Comment: i dont see a reference for 'at least'.
Answer: It seems that this paper by Djidjev and Reif establishes an upper bound of $\exp(O(g)!)$ for the number of minimal forbidden minors.
Djidjev, Hristo, and John Reif. "An efficient algorithm for the genus problem with explicit construction of forbidden subgraphs." Proceedings of the twenty-third annual ACM symposium on Theory of computing. ACM, 1991.