Free will of people with mental disorders

Question: It is said that God cannot affect people's free will and that is why he does not manifest himself directly. However, what about psychiatric problems in this category? They somehow alter people's ability to assert themselves, obsessive disorders of some nature that harm them like always washing their hands causing skin problems or even wasting money. In Exodus 4:11 it is said that God is the one who makes the blind or gives sight, who makes the dumb and the deaf. So would he also be responsible for penalizing, so to speak, mental problems of a nature that affect people's power of choice? This would not be resolved as just an organic temptation as a sexual need that has to be mastered as in the case of Amnon, worse than even this type of thing can be framed in health problems and not be merely a moral weakness. So how is it to judge people with this type of problem and the issue of free will spiritually speaking since no earthly court would impute guilt to these qualified people with these disorders.
Comment: Well, it is even said that God fulfills the rabbinical decrees or that the decree of Rabbi Guershom tied God to the Jewish people forever and even if he wants to divorce he cannot because the Jewish people as the wife have to give consent, so God is tied to his creation and obeying his determinations? The principle is the same.
Comment: "It is said that God cannot affect people's free will". Where is this said? How would Gd be limited from affecting His creation?
Comment: If he can affect then how justice will be meted out to that person in relation to what he commits against other people or himself? I've seen contortionist explanations to fit pharaoh's free will with God's sovereignty and this dispute raises more questions than solutions.
Comment: The Ramban explains clearly that Gd gave back paro's free will rather than take it away. The miraculous plagues plus the fear instilled by Moshe speaking to him took away his free will and it was given back to him so he could make an objective decision. No not the same idea at all and I think you don't understand free will. It doesn't mean the ability to do whatever you want. It means the ability to make a choice in areas Gd gave us this ability which is only in regards to Torah prohibitions.
Comment: But what objective decision is reached in the midst of the death of his firstborn son?
Comment: Vychazek Hashem es lev paro means that Gd gave him this ability.
Answer: Great question!
The Machneh Yisrael 2:1 says something stunning about those who are handicapped (or have mental disorders). He says that those who are handicapped (or have mental disorders) are people from previous gilgulim (reincarnations) who did many sins. They eventually died, and instead of getting punished in shamayim, they were sent into another gilgul to get their punishments here (which is a lesser degree of punishment). They were afraid that they would cause more sins (as they did in the previous gilgul) so they begged to be in a reincarnation in a body that is handicapped (or that contains mental disorders), so they would barely do any sins, and also pay their punishments in this world.
Based on this, we can say that it's actually in the benefit of those who are handicapped (or have mental disorders), it's what they want for their own neshama. The Gemera in Makkot 10b says, בדרך שאדם רוצה לילך בה מוליכין ,אותו "along the path a person wishes to proceed, one leads and assists him." Even though this is only speaking about the body, I would apply it to the neshama as well, which desires to suffer the punishment in this world (and thus not have free choice) then suffer a greater punishment in shamayim. Thus, Hashem is not responsible, but on the contrary, since He is helping the person for his better good, one should thank Hashem for this.
Now it is very hard for that handicapped/mentally disordered individual and his loved ones to understand this, but after time/hard work one can come to appreciate what Hashem has done for them. This is the famous teaching of Rabbi Akiva in Brachot 60b, כל דעביד רחמנא לטב עביד, "Everything that God does, He does for the best." (the Gemera shows how this line takes place in a story with Rebbi Akiva himself). Along the same lines, Nachum Ish Gamzu in Taanit 21a says, גם זו לטובה, this too is for the good (thus his name Ish Gamzu, and the Gemera as well brings many stories involving Nachum Ish Gam Zu showing the same idea).
Hope this helps!
Comment: Avishai very inspiring, and the מחנה ישראל literally brought me to tears!! Its a מצוה לפרסם! I would just say that perhaps Reb Akiva was able to understand this because he was a disciple of Nachum Ish Gamzu (see Tosefta Shevuot 1:4 Reb Akiva darshened ריבוי ומיעוט and not כלל ופרט because thats what נחום איש גם זו taught him). Not a coincidence that Rebbi and Talmid shared together this beautiful trait. May we all achieve this kind of אמונה ובטחון!
Comment: Thanks @shayachagigah, it was indeed a big chidush for me too. Nice point on the relationship between Rebbi Akiva and Nachum Ish Gamzu!
Answer: An earthly court would have difficulty imputing guilt to people with mental disorders. However, it's not impossible to do so. The court might be convinced that despite having some form of mental disorder, the crime was too egregious for the person not to have been aware of the difference between bad and good; and will find the person guilty of the crime.
But in all cases God knows the truth about the person, and He is the true judge. Claims that the person is mentally insane, and is therefore not guilty, will be determined by God Himself.
Did the person commit the sin solely due to his mental illness, or did he really intrinsically have the capacity/capability to refrain from doing the sin, but was unwilling to engage his Yetzer Hara in battle?
If he has the status of "shoteh" (שוטה), God will exempt the person from punishment, since he is considered "Anuss" (אנוס), and the sin was committed under duress of his illness.
Otherwise, Hashem might find him culpable for his actions.
At the end of the day, it's up to Hashem to judge the person, and not our job to do so.
Comment: @Thales Just because someone has been "diagnosed", doesn't mean that the diagnosis was accurate. Mental health is not a precise science. There are no blood or other lab tests to show a mental illness, and classifying mental illness is a more subjective endeavor. Psychiatric diagnoses all use different decision-making rules, and there's a huge amount of overlap in symptoms between diagnoses. In addition, almost all diagnoses mask the role of trauma and adverse events in the person's condition. In the end, God is the only one who knows the truth if the person still has Free Will or not.
Comment: The issue is more God's interference in the free will of people with these problems, if it is a disease and it has been proven that way, to what extent does this relate to the free will intact so that sin or not is possible and even the right of person to decide for himself whether he prefers holiness over the other side?
Comment: But if there are these diseases, even from a subjective point of view, they exist and affect the person's free will. The question is not whether God will judge this individual based on the mental history he has had here, but how does free will relate to these health issues? Did all people who came into being have free will intact?
Comment: @Thales Sometimes people get sick, such as having a stroke or Alzheimer's, and they might be unconscious or in a coma for an extended amount of time, and their free will is definitely impacted. Some people are born mentally deficient, (Down's syndrome, autistic). I posit that this must be the will of God, to reduce these people's cognizance. They are not regular people who lost their free will. They are **damaged** people.
Comment: I wasn't going to go into this field here but I will. People who were born blind and deaf go through this life without sins right? Since for them to know that it is a sin it is necessary to hear the law or at least read it, the vision is also the door to many temptations, if it does not have the temptation it is canceled
Comment: @Thales I strongly doubt that people who were born blind and deaf go through this life without sins and/or temptations to sin.
Comment: Adam was only aware of what he should not do because he heard God's order, for him not to do what God commanded he would have to see the forbidden fruit, Eve saw that the fruit was pleasant in appearance, sexual sins develop with the sight or listening to a flirt. What sins would it be possible for a person who was blind and deaf from birth to commit?
Comment: @Thales Sorry, I thought that you were referring to blind OR deaf. BTW, there's an argument in the Talmud (BK 87a) whether or not a blind person is obligated in the mitzvos. Lehalacha, we rule that he is obligated. Some deaf people have the Halachic status of "Shoteh".
Comment: Even if it was one or the other. For example, if God's commandment to Adam was that if he ate he would die, how would Adam know of that consequence without seeing something dying? What was death to him? Of the animals, otherwise God would be giving a penalizing command for something he didn't understand, right? Hearing and seeing is fundamental for a person to be able to sin or not, even more so if he was born because his conscience is intact because he did not absorb malice around him by listening or seeing.
Answer: The Chachamim say that everything is in the hands of heaven except fear of heaven (Berachot 33b and Megillah 25a). One thing we have to know is that ultimately, we are guaranteed our choices between good and evil. However, it is true, as brought by Rav Dessler in Michtav me-Eliyahu, we all have a different "level" of free will, meaning there are some things we are expected to be able to choose between, and some things that are currently beyond our level. Many people wouldn't be able to murder, but they also wouldn't be able to concentrate on every single word of prayer. This deals with your point about people having very strong temptations that others don't have and how we should judge them, and resolving it with Chazal's original statement will be made at the end of this answer, although a simple answer is, we can all climb that ladder to the point of never being able to sin.
Hashem chooses everyone's station in life, and what his service is meant to be, what area of humanity he has to master and conquer in the service of Hashem. Each is calculated according to vast calculations only Hashem is capable of (see Daat Tevunot by Ramchal). This might mean that the best thing for this person might be to have almost no free will, and there is a purpose for that (and in some cases, perhaps none at all - this the Arizal says is because we have multiple incarnations in this world and a person might sometimes come down here to atone for something, as Avishai's amazing answer deals with, or make up something and complete free will would not be required - see Shaar HaGilgulim). This deals with people who have severe mental impairment.
To understand this more deeply though, we have to realise why exactly Hashem gave us free will.

So, given all this, how do we salvage the statement of Chazal? This is a very good point, and is dealt with in Chassidus. See this shiur for example, or Likuutei Sichot vol 19 pp. 279-281 on this Rashi (the second one). To summarise (badly, I highly recommend the shiur), we can think of free will on 3 levels:

The realm of decisions, between good choices and bad choices.
The realm of choosing how we identify ourselves.
Truly choosing God.

When it comes to 1, it's arguable if that is really a "free" choice. Many arguments are made against it in philosophy and it is currently an unsolved problem (see the original Stoics et al). According to Chabad Chassidus, they are basically correct; this is not truly free will and it can't be. There will always be the decision that makes the most sense and one would always choose that. All those types of decisions are based on some sort of reasoning.
Choosing an apple, one will choose which looks tastier, or bigger. Failing that, one will choose whichever is closer. Failing that, one will choose which one is nearer to his good hand. Failing that, he will just flip a coin (which is not a choice!). When it comes to moral decisions, one has to climb the ladder to 2 to get his reasoning.
2 takes us closer. A person is ultimately free to choose how he identifies. A person in a prison can still choose to identify as a free man, a free man stuck in some walls. A person can decide if he wants to be a good person pursuing good, or decide if he wants to be a wicked person out for destruction. Again though, it is a little dubious - a person will make this decision based on some sort of reasoning. The choice will be completely influenced by that reasoning, and therefore it is not truly a "free" choice.
Therefore, we have to go to 3. We can't explain it at all, nor can we truly understand it but that doesn't mean we haven't got anything to say about it. We know that God is completely uninfluenced. Nothing can tell Him what to do; this is the God of Avraham. Therefore everything He does is a truly free will. He does it based purely on Himself. This is something we can put into words but can't really grasp. At the same time, we sort of can grasp it because this is how we feel about ourselves. We feel that our will is our own, and get that idea. He used that choice to choose us.
Hashem has instilled into our Divine soul this power to be able to choose Him, not in a classical choice between options (what other options is there?)... Another way to put it - we are completely free to express who we are. I am me, and me chooses Hashem. When I choose Hashem, I do it because that is who I am, not because it makes sense, or there's a good reason, or I am coerced in any way.
This I believe is what Chazal mean. Hashem decides every last detail of our lives, what gender we are, what time we are born in, what religion we are born to, what colours we like... The only thing He will not choose for us is choosing Him. My wife also makes most of the decisions in my life, but she can't choose that I be her husband! Even if she could, she wouldn't; that's not a husband. We are all given a unique battle against this truth: we all would choose Hashem in a heartbeat, but to bring out the reality of that, we are given 1000 reasons to not choose Him, and by overcoming that, we get to truly own that choice.
Answer: According to Rav Dessler's Qunterus haBechirah (Discourse on Free Will, found within Michtav meiEliyahu), many if not most of our decisions are not free willed. For example, I would hope none of us even consider shoplifting that watch near the exit to the department store. That decision is done preconsciously, weeded out from among our options with no conscious thought. However, when it comes to stealing far more money by lying on one's tax forms, there far more people need an effort of will to resist.
Our nequdas habechirah (decision point) is like a battle front. The battle only rages where the two opposing forces meet. It is only in areas where I have competing desires and goals where I have to think about my choices and decide among them. And then, like a battle-front, each good decision moves the front a bit in that direction, and each sin makes the next sin all that much easier. (Until naaseh lo keheter -- it becomes the the person as if it were permissible.)
Because people are born with differences in innate middos, born with different family environments, encounter different people and live through different events, we all have our nequdos habechirah in different places. And what Hashem judges us on is how far it moved and in hwich directions, not where it is now. This is why the tinoq shenishba, the one Hashem placed to grow up in a home that didn't teach Torah values, is not judged for decisions that had no way of knowing and internalizing that were sins.
This is true of all of us. The mentally ill are simply a more extreme case. Their nequdos habechirah start off in a different place, further from mine than most mainstream peoples'. And they face different challenges. But they have the same task we do... to move the nequdas habechirah closer to the decisions Hashem's "Image" ought to be making.
Back when he was a child and lived at home, my son Shuby and I would go to shul together. Shuby has Down Syndrome. So I wind the tefillin for him, help him with the berakhos, etc… We had a conversation one morning, which started with him declaring me "the boss of the tefillin." When I explained that tefillin weren't something I came up with, that it was Hashem's idea, he asked me why Hashem told us to put on tefillin. I started thinking of a formulation he could understand, and it was difficult.
Shuby isn't playing life by different rules than the rest of us. My difficulties explaining the purpose of tefillin to Shuby are no different in kind than my own limitations understanding their full purpose. That I may reach the same limited comprehension as most others who ask the question is only a statement of quantity — qualitatively it's the same.
The most transcendental quality of man is our very ability to transcend. Our lives may not compare to much in the face of G-d, if it were not that He entered with us (and Noachides as well) into a covenant, giving us the means to continually go beyond today's limitations.
A person is not a better sculptor because of the quality of his materials. As we saw from Rav Dessler, it is all about how we progress, not where we progress from.
After all, Rachmana liba bai — Hashem wants our heart. And who can say "vetaheir libeinu" or "veyachad levaveinu", that we should have pure and united hearts to serve the Ribbono shel olam, better than the boy who would run up to greet me when I get home from work, bouncing with joy he just can't contain? Or who fidgeted with excitement when mom brings home something for him — even if it's just a new pair of socks? Who better captured the wholeheartedness we find in Rivqa, when she gets so lost in meeting Yitzchaq he falls off her camel? Or of Yitzchaq, as he stood there praying?
For a number of years, Shuby would double-check with me every night before going to bed, by making three diagonal strokes with his finger across his arm, while saying "Tomorrow we…" I may comprehend a bigger negligible sliver of why Hashem commanded us to wear them. He excitedly anticipates going to shul and putting on tefillin.
That is a perfection I can only aspire to.


Purcell and the Magnetic Field

Question: When showing that the magnetic field derived from the curl being proportional to current and the divergence being zero is unique, Purcell says that at some sufficiently remote enclosing boundary the difference of two magnetic fields (two possible fields from the curl), D, would take a constant value. Why is this true?
Comment: Seems unlikely. No choice of gauge should affect the magnetic field. More than likely he meant the vector potential could be adjusted by an overall constant in, for example, the Coulomb gauge, since applying the divergence and curl operations send all constants to zero.
Comment: Is this at the end of section 6.2? In the edition of Purcell that I have handy (1963), there is no specific argument about a remote enclosing boundary.
Comment: @BenCrowell I think it may only be in the second edition.  Purcell makes a similar argument to the one I make below, except he uses $\nabla\times \mathbf D = 0$ to obtain $\mathbf D = \nabla f$ for some scalar $f$, then notes that since $\nabla\cdot \mathbf D = 0$, $f$ satisfies Laplace's equation.  He then states "Over a sufficiently remote enclosing boundary, $f$ must take on some constant value $f_0$."
Comment: @Tony I added an addendum to my response that might be helpful.
Answer: I know that this doesn't directly answer your question about Purcell's reasoning (see addendum I wrote after reading Purcell's argument), but here's how a uniqueness proof would go.
Suppose that two fields $\mathbf B_1$ and $\mathbf B_2$ both satisfy the magnetostatics equations
$$
  \nabla\times\mathbf B_i = \mu_0\mathbf J, \qquad \nabla\cdot\mathbf B_i = 0, \qquad i = 1,2
$$
Let
$$
  \mathbf D= \mathbf B_2 - \mathbf B_1
$$
then the curl and divergence conditions give
$$
  \nabla\times \mathbf D= 0, \qquad \nabla\cdot\mathbf D = 0
$$
Now your question reduces to what we can say about the vector field $\mathbf D$.  Take the curl of both sides of the first equation and use the following vector calculus identity:
$$
  (\nabla\times(\nabla\times \mathbf D))_i = \partial_i(\nabla\cdot \mathbf D) - \nabla^2D_i
$$
along with the zero divergence condition, to obtain
$$
  \nabla^2 D_i = 0
$$
In other words, each component $D_i$ satisfies Laplace's equation.  Now, if we assume that the magnetic field components vanish at infinity (as would be the case for a bounded current distribution) then we recall that the only solution to Laplace's equation that vanishes at infinity is the zero solution.  This gives $\mathbf D = 0$ and thus $\mathbf B_1 = \mathbf B_2$.
Addendum. After having read Purcell's argument, I'm fairly confident that he also is making the physical assumption that bounded current distributions produce fields that vanish at infinity.  Such a boundary condition cannot be derived from the equations themselves.
Purcell is rather vague when he specifies this boundary condition; what he says before the argument is "We don't consider sources that are infinitely remote and infinitely strong."

Purcell and the Magnetic Field


Error! Could not find a Joomla! XML setup file in the package

Question: I'm looking for an extension to serve my Joomla 1.5 websites contents as REST, after some search I've found https://extensions.joomla.org/extension/rest-api/ component,  but there is no specification which version is for  my joomla 1.5,  when I clicked on Get REST API v1.6.2 redirect me to another page which there are several version of com_api, I downloaded and tested com_api_v1.5.1.zip, com_api_v1.6.2.zip , com_api_v2.2.zip, and try to install them via admin extension manager on administrator/index.php?option=com_installer but there weren't any success to install and faced with Error! Could not find a Joomla! XML setup file in the package. , my question is which version is compatible with joomla 1.5 and why I faced with this error while I try to install rest api ?
Answer: Expanding each zip install file and examining the .xml file will tell you the minimum version of Joomla the install file is designed for.
Look for a line similar to the following example which shows, in this case, that the install file is suitable for Joomla 1.5:
<install version="1.5" type="plugin" group="system" method="upgrade">

As you probably already know Joomla 1.5 is end of life since 2012 and migrating to the latest version will probably make your life easier.
Comment: Thank you for replying, is there any plugin or component which return data as json ? ( something like REST API) ?


Decision tree Why is Gini index only used for binary choices?

Question: I would like to understand why "Gini index operates on the categorical target variables in terms of "success" or "failure" and performs only binary split" ? Why it would not be possible to have 3 decision after a split when we are using the Giny impurity to select an attribute
?
source : https://medium.com/analytics-steps/understanding-the-gini-index-and-information-gain-in-decision-trees-ab4720518ba8 and this is not the only ressource saying that.
Comment: First in CARTs every split is a binary split. Second, this claim is made regarding categorical variables only. IMO
Comment: Yeah I know, but the binary split property of the CARTs would be from the binary split property of  the Gini Index, and yes I know that it is regarding categorial variables but i can't understand why it would only be for binary splits.
Answer: Here is a good explanation of Gini impurity: link. I don't see why it can't be generalized to multinary splits.
The binary split is the easiest thing to do (e.g. discussion: link). That's why it is implemented in mainstream frameworks and described in countless blog posts.
A non-binary split is equivalent to a sequence of binary splits (e.g. link). However, this makes the tree complicated. Furthermore, a particular tree learning algorithm applied to a particular dataset might not find the representation of a non-binary split via the smallest possible number of binary splits. This will make the tree even more complicated and less interpretable.
Non-binary splits may reflect the structure of the data better. There are publications on them (e.g. link and link) but if you want to use trees with non-binary splits, you will probably not find frameworks where they are implemented in one line of code, and will have to write the code for them from scratch (if you succeed, please publish it and put a link here in a comment - I would be interested).


Android Custom View: MATCH_PARENT with OnDaw don't work

Question: I'm new to Android but i have a simple problem.
I have a vertical linear layout, if i place here a normal button, and give it the MATCH_PARENT flag for the width and the height, the button will fill all the space. All ok.
Now i have a my simple custom view (a class that extends View) and i overrided the OnDraw method for draw a cross in the middle of the view. For draw the cross i need to get the width and the height of the control, if in the UI Layout editor of eclipse i set a fixed width and height, it works correcly (i see a preview of the cross directly in Eclipse) but if i extend the View to the borders i got only WARP_CONTENT (With button i get MATCH_PARENT), no problem, i change it in the XML, but LayoutParams width and height will return 0!! (I see the error directly in the preview of eclipse!) Why?
I tried to set manualy the width and the height in the OnWindowFocusChanged method to wait but it give me always 0.
The problem is that the view actualy have the rights dimensions but when i call the getLayoutParams().width it give me 0, so i see a white rectangle in the right position (white background of the view), but the cross is drawed on the upper-left corner!
Sorry for my bad english.
Thank you.
Mauro.
Answer: i think u need to set this parameter for your view.
<code>android:layout_alignTop
</code>
or something related to this.i guess


Does the Nexus 7 version of Ubuntu support the same software as the desktop version?

Question: I'm wondering whether the Nexus 7 version of Ubuntu ('Ubuntu on Android') supports the same software (i. e., VirtualBox, Google Chrome, LibreOffice Writer) as the desktop version. Is there any difference between the Nexus version and the Android version in terms of software support?
Comment: The install image for the Nexus7 is not 'Ubuntu on Android', it is simply an armhf Ubuntu 12.10 image with some packages patched and Thunderbird and Open Office removed for space.
Answer: The Nexus tablet is not a full PC. It has an ARM CPU, which while having a pretty OK clock speed, doesn't necessarily perform well at some very CPU intensive tasks. It is designed for minimal power consumption. It also does not have the same instruction set as the x86 CPUs you're used to using in a PC. Therefore, some software will just outright not work or be available (such as VirtualBox), or may perform very poorly. You can see what packages are available by looking through the archive for binary packages built for the architectures armhf or all.
However, most software will be available, even though there are plenty of packages in the archive which only build on x86 architectures, or even on other architectures, but not ARM.
Answer: As dobey said it has a different processor architecture, so to summarise it:

Most software that emulates another systems like Virtualbox, VMWare or Wine will not work. Some, like Qemu will work as they have a processor emulation but much more slowly.
Most open source software will work, as most will compile fine to arm.
Most closed source software won't work, Adobe Flash, Reader, Chrome (as opposed to Chromium), commercial games, etc... as most companies don't ship arm binaries for Ubuntu.

In every case, expect poorer performance, specially in heavy packages like LibreOffice.
Comment: When you say "poorer performance", do you mean that it will run more slowly, or do you mean that it simply won't work?
Comment: CPU intensive things may run more slowly, but one of the main reasons this project exists is to improve Ubuntu's overall performance on the tablet form factor.
Answer: Only apps that have been compiled for armhf will run on the Nexus7.  If there are any that you'd really like to use that aren't compiled for armhf yet, you may have to compile it.  However, it is my understanding that most apps would be available for armhf at this point.


The Google selected canonical for my website home page is an unrelated website to which I have no connection

Question: I have created a small website named https://www.example.co.uk. I have managed to index the majority of pages on my website however the home page is not being indexed as Google is defining it as a 'Duplicate without user-selected canonical'. However my domain, example.co.uk is completely unrelated to the the Google selected canonical of https://www.anothersite.example/. I don't know how Google could think this is a duplicate or how to correct it.
Comment: Have you just purchased the domain recently?
Comment: I bought the domain about 2 months ago
Comment: Is it a fresh domain or has it been registered before?
Answer: As implied by others, the previous usage could be the cause for pointing to this page.
However, GSC is telling you that you haven't set a canonical for your page.
Put a line like this in the  head section of you page.
<link rel="canonical" href="https://www.example.co.uk">

Answer: Google indicates the page was crawled on May 28th 2022, so the reasonable conclusion is somebody used the domain the past, and at the time the URL had identical content to Google's selected canonical.
I think you should do two things. First add a canonical url, as Rohit Gupta suggested. Then click on the request indexing link at the top right of the page[1]. It would take Google a couple of days to crawl and index the page, but then it would realize it has different content & canonical, and will serve it in the search results. It might be a good idea to create a sitemap.xml, and mark the home page with high priority and high change frequency[2] until its crawled.

This is to trigger a crawl ASAP. If Google thinks a page is disinteresting, it might take its time crawling it again. There are pages with redirect on my website that haven't been crawled since 2020, and a page marked as duplicate without user selected canonical that hasn't been crawled since 2017. Google's crawler ignored it for two month, I think its best not to wait for it to come around of its own accord.
https://slickplan.com/blog/xml-sitemap-priority-changefreq#:~:text=Sitemap%20priority%20allows%20a%20search,page%20search%20engine%20result%20rankings.


How to get status of file is playing in Windows Media Player?

Question: I'm doing project about Mini-Lyrics by java-code, so, I want to get take information of mp3 file when it running on Window Media Player, for example: About information beginning time, running time, finish time,get Artist, Album, Singer...Please help me, thanks for your answer my question!
Answer: Java does not have an in-built API for it. You can use native, i.e. do it in  C# and call that from Java.
or go for JIntelliType which can help you call windows native commands. https://code.google.com/p/jintellitype/


Longer retreat thailand

Question: Wondering if anyone could please give me some recommendations for a longer retreat in Thailand. A lot seem to only be 10 days but I'd like to do longer now as Ive done many shorter ones and would like to go a bit deeper. Im not young and need my own room. Thanks
Answer: I am not sure there are any retreat centres in Thailand offering long term retreats. However, many monasteries in Thailand are willing to offer you your own hut ('kuti'). In the monastic environment, often, you must join in the morning & evening monastic activities of chanting & meditation and also do some daily chores; while having the free time to practice on your own. You can try writing to:

Wat Pah Nanachat (please read their information page & instructions carefully).

Wat Phu Khong Tong

While you cannot write to Suan Mokkh, after they get to know you (while you stay in an open dormitory), Suan Mokkh or their ancillary monastery Dawn Kiem (if it is still functioning) may offer you a hut (kuti). A relatively recent post about Dawn Kiem is here. Dawn Kiem is a 5 minute walk from the International Dharma Hermitage. Suan Mokkh has a monthly 10 day retreat at its International Dharma Hermitage. Therefore, if you are offered a hut, you can do formal retreat for 10 days and do personal retreat for 20 days.

Longer retreat thailand


Finding total after percentage has been used?

Question: Tried my best with the title. Ok, earlier while I was on break from work (I have low level math, and want to be more fond of mathematics)
I work retail, and 20% of taxes are taken out, and I am wanting to find out how much I made before 20% is taken out.
So I did some scribbling, and this is without googling so please be gentle. but lets say I make 2000 dollars per paycheck, so to see how much money I get after taxes I do 2000 * .8 which gives me 1600. I can also do 2000 * .2 which gives me 400 and then do 2000 - 400 (imo I don't like this way since I have a extra unnecessary step)
Anyways, I was pondering how to reverse that to have the answer be 2000, and what I did was 1600 * 1.20 (120%) which gave me 1920, and I thought that is odd so I did 1600 * 1.25 and answer was 2000 exact.
My question is why did I have to add extra 5% (25%) to get my answer? I am sure I did something wrong, and I fairly confident the formula I am using is a big no no.
edit; wow thank you all for your detailed answers. I am starting to like mathematics more and more.
Answer: If $20\%$ of your pay is removed for taxes, then you retain $80\%$ of it.  Thus, the amount you receive after taxes is
$$\text{net} = 80\%~\text{of gross} = \frac{80}{100}~\text{gross} = \frac{4}{5}~\text{gross}$$
To determine your gross pay from your net pay, you must multiply your net pay by $5/4$ since
$$\text{gross} = \frac{5}{4} \cdot \frac{4}{5}~\text{gross} = \frac{5}{4}~\text{net}$$
Since $$\frac{5}{4} = \dfrac{125}{100}$$ your gross pay is actually $125\%$ of your net pay.
Answer: When $20\%$ is taken out, you have $80\%$ or $0.80$ of the original amount.  If the amount was $x$ you now have $0.80x$. If you want to recover $x$, you need to divide by $0.80$.  As $\frac 1{0.8}=1.25$, you can multiply by $1.25$  When the percentage $p$ is small, multiplying by $1-p$ and then multiplying by $1+p$ gets you back close as the product is $1-p^2$.  As the percentage gets larger, to undo multiplying by $1-p$ you need to divide by $1-p$
Answer: Thanks for your well-asked question!
If your gross pay is $\$2,000$ and $20\%$ is taken out, you're left with $\$1,600$.
So, $\$1,600$ is $(100-20)\%$ of $\$2,000$.
Now you want to know what percent of $\$1,600$ is $\$2,000$.
In other words, $1600x = 2000$.
Solving for $x$ we get $x = 2000/1600 = 1.25 = 125\%.$
In other words, you add $25\%$ of $\$1,600$ to $100\%$ of $\$1,600$ to get $\$2,000$.
Or, $\$2,000$ is $(100+25)\%$ of $\$1,600$.
Hope this helps!
Answer: Lets say $x$ is how much you earned before taxing and $y$ is the amount of money after taxing. As you calculated yourself in an instance, this follows the formula
$0.8 \cdot x = y$. To get from $y$ to $x$, you can simply divide by $0.8$
$\Rightarrow x = \frac{y}{0.8}$.
Also we see $0.8 = \frac{4}{5} \Rightarrow \frac{1}{0.8} = \frac{5}{4} = 1.25$.
Answer: $80\% = 80/100$.  Since we've multiplied this into the gross pay to get the net pay, we have to do the opposite, which is to say divide by this, to go from net pay to gross pay.  Dividing by $a/b$ is the same as multiplying by $b/a$, so you have to multiply your net pay by $100/80=5/4=125/100$ to get your gross pay back.
Answer: In puzzling situations like this it's often instructive to imagine an extreme example. Suppose 50% of your salary went for taxes (yes that's a high tax rate, but good for this problem). Then you take home half your gross pay. If you know your take home pay you should double it to find your gross. In the equations in the other answers that corresponds to
$\frac{1}{1-0.5} = 2$.
For an even more extreme example, think about a 100% tax rate. Then there's no way to recover your gross from a takehome pay of 0. If you try the algebra, $\frac{1}{1-1} = \frac{1}{0}$ makes no sense.
I see from your profile that you're a programmer. Extreme cases like these are analogous to testing boundary conditions in your code (things like loops that execute 0 times).
Answer: Let x to be your gross salary and y = 1600 to be your net salary. Because tax is 20% of gross salary then we have
x = y + tax = 1600 + 0.2x
=> 0.8x = 1600
=> x = 2000 USD


Listing a hardrive partition by blocks using LBA

Question: Most hard drive and partition inspection tools seem to list the items using sectors, head.. etc.  From another question I was told that these are virtual because they have to be converted from lba, which causes conversion errors.  Are there any unix tools that list a hard drive by logical blocks?
Comment: What tools are you saying about?
Comment: like fdisk and gparted don't seem to have an option to display the number of blocks
Comment: fdisk and gpart (it's not gparted) on FreeBSD shows start sector in LBA and size in sectors for each partition
Comment: I think it does say the sectors, but I was told these are virtual, I wanted to be able to find the logical block.  My /boot partition (using master boot record partition scheme), didn't seem to be right. It said it started at sector 2048.  The start is sector number right (in fdisk)?  I thought it would start at sector 1 or 2 (are they zero indexed)? Since the mbr would only take up the first sector.  Also it says blocks, why would it measure using a mix of lba and sectors? Sorry if this sounds stupid.
Comment: Usually "block" means same as "sector". Why do you think that /boot partition cannot start at sector 2048? MBR handles free space between partitions just fine.
Comment: I'm assuming I miss understood when the word virtual was used, I'm guessing it was just regarding the heads and cylinders? But the sectors are addressed in lba (in fdisk)?
Answer: CHS (Cylinder/Head/Sector) was used in the past for this. CHS addresses did (originally) map to actual, physical locations on disk platters.
However, as drives modernized, this C/H/S division stopped making sense. The fixed number of sector per cylinder is not practical at all (cylinders closer to the outer edge of the disk can store more data than those closer to the inner edge), so a different system was needed.
LBA (Logical block addressing) is what is used on (probably all) modern drives. The drive is logically divided into blocks (512 byte or 4k byte sectors mostly), the first block is block 0, the next one block 1, etc.
How the actual physical drive maps those logical sectors to physical areas of its platters is up to the drive. So in this sense, it is a "virtual" address. But it is also perfectly accurate.

If you have a drive that does use CHS (unlikely), something will have to convert LBA address to CHS, and if the drive geometry information somewhere is wrong, you'll get inaccuracies.
If you have a modern drive, attempts to use CHS will also lead to problems, since a conversion needs to be done, and CHS doesn't map well with modern drives.

What fdisk lists by default is "LBA", using 512 byte sectors (possibly 4k sectors on drives that have that - I don't have one to check). It does list heads/sectors/tracks/cylinder as information but that is the "virtual" measure these days.
cfdisk can print the partition table with C/H/S start/end values if you really want that (use the Print then Table then enter twice).
Comment: Some "newer" ones. (Here's [an article](http://www.anandtech.com/show/2888) with some info.) It is/was actually quite problematic for a lot of stuff ([here](http://lwn.net/Articles/322777/) for some info on Linux), and 512 byte sector emulation has caused serious performance niceties (and data integrity concerns for RAID setups to boot).
Comment: I must be both ignorant and an old fart. What sort of drive uses 4,096 byte sectors?
Comment: I see — so it's still transparent. It makes perfect sense to enlarge sector sizes on the medium itself (and hide this from the host to a certain extent), and I mostly assumed it was done behind the scenes anyway. Thanks for the info! (though I noticed some info on the sites was a little inaccurate. *Caveat emptor*)
Comment: That's just the first links I pulled from google, no proof-reading ;) It's "transparent" as long as the OS and partitioning tools deal with it properly.
Comment: Yeah, I gathered that. Partitions/volumes/slices/quanta have to be 4k-sector-aligned. That's true of any block-access medium when you want to store items smaller than the block size. Anyway, it's interesting that my favourite disk already uses 4k sectors. I'm going to have to power up the machine in the next few days and see what the kernel and `hdparm` have to say about it.


Wave dashboard to get detail rows from grouped result

Question: I am using a group by SAQL (i.e. pivot table) to get records that are not unique for given 3 field combination.
ex. Output is fields a, b ,c, count(rows) if count(rows) > 1 (Group By a,b,c)
Issue is I need to display some additional fields in this result, bu since I cannot group by those fields I am not able select them.
Is there a way I can use result from this SAQL/pivot table (say all values returned for field a) to fetch another table with additioanl fields to display.
Answer: Use first (FIELD NAME ) or last(FIELD NAME) in the foreach statement.


What happens if you wire two solar panels in series and parallel at the same time?

Question: Will anything bad happen?
Or is it safe.
Comment: in series **and** parallel **at the same time**.  Not possible.  Please clarify.
Comment: Parallel wiring will be likely bad. The two panels won't give exactly the same voltage... it serial is imho okay. Hopefully someone will give more details in an answer.
Comment: The EcoFlow 50 watt panels have a port on them to series connect two panels, and each panel also has an outport port which can fed into a parallel connector, so it would be possible to do it, not going to try it, just want to know what would happen.

No MC4 connectors like you might be imagining.
Comment: All barrel jack connectors
Comment: Just because they have series **AND** parallel connections, does not mean they can be connected.  Best case: nothing.  Worst case: damage to both panels.
Answer: It is physically impossible to wire anything in series and parallel at the same time. It is possible to arrange a set of connectors which will allow one to choose whether the components are in series or parallel but this is a different thing.
Your homework is to draw the circuit diagram for a pair of components that are in series, and then add the wires necessary to put them in parallel at the same time. Then, reduce the resulting diagram and try writing Ohm's law for it.
Comment: I am curious, what would happen if different solar cells with different illumination were wired in parallel? Is the final voltage you see the simple weighted average of all the voltages of the cells? Would the weighting be based on the area of the cells? If they were wired in series, the final voltage is just the sum of all the cells' voltages?
Comment: @MeEngineerTrustMe What would happen if you put two batteries of different pontials in parallel?
Comment: the higher voltage battery would run the lower voltage battery backwards.


Best way to represent a tooltip on a table

Question: I have a table with lot of information that needs to display on each cell. I currently have images to represent the presence of information and on hover of these images, I would like to display additional info. I was impressed with the meetup.com and facebook style tool tips divs which display more information on hover and the div would expand based on the amount of information. Which is the best way to represent this kind of info? I would like to use jQuery/Javascript/HTML/CSS to achieve this effect.
Note 1: I have looked at few jquery plugins but they all seem to use the title attribute of a tag to represent the information. But I have large amount of information I need to show on the tooltip and also need to style the information so using title attribute is not very helpful.
Note 2: The tooltip also needs to adjust its position if the left/right or bottom/top of the table is detected.
see the image to get a look at the table that is likely to contain the above format.
Answer: You can try http://www.websnapr.com/previewbubble/


Graphene oxide drying

Question: Suppose you have a food that is naturally liquidy, such as curry. You like the flavor but need it less "wet". The problem with drying it is that the aromas also get lost to an extent. However, graphene oxide is selectively permeable to water. Is it practical to dry your fruit, sauce, or other foodstuff in a container covered by a sheet of graphene oxide, letting the water out but keeping the aromas in?
Comment: The first question is whether you can buy a sheet of graphene oxide (or more like a lid with a filter made of it) for a realistic price, that's food safe.  To address the theoretical aspect, the chemistry literature would be the place to look.  It's not clear from your link how permeable grpahene oxide is to water *vapour* - maybe you'd actually need to put the food in a bag made of GO.  On the whole freeze drying seems far easier
Comment: @ChrisH: I think it was water vapor. Won't freeze-drying also drive off volatiles? What's to stop i.e. fruit ketones from evaporating along with the sublimating ice?
Comment: Some will, but you have to get in to vapour pressures as a function of temperature. That's why freeze drying is supposed to be better than dehydrating withheat
Comment: How dry are you wanting it? I doubt that a few extra minutes boiling would significantly lose flavour - otherwise many slow-cooked dishes would be entirely flavourless.
Comment: @bob1: I find most soups and stews taste watery with weak flavors, while "dry curry" has nice strong flavor (don't know how it's made though).
Comment: Dry curries are made using a minimum of liquid and boiling off any excess. Remembering that most people don't have access to such technology as freeze-driers or anything beyond a heat-source and a pot. There are plenty of "dry" curry recipes out there.
Comment: @ChrisH: The ratio of vapor pressures matters, and the ratio tends to grow somewhat at low temperatures. Since most flavors are less volatile than water it would help. But ice will exclude organics, concentrating them and thus raising their chemical potential quite substantially. So it's unclear which effect wins. I believe the main advantage is that freeze-drying helps preserve the structure of the food.
Answer: On first glance, this doesn't sound too promising to me.
First, let's assume that the graphene oxide really only leaves pure water through and nothing else (acting like a filtering membrane). Then, you would end up with the water outside the box - and the flavor compounds in the box, but not within the food where you want them! When you open the box to eat your food, they will dissipate too, together with the air from the box.
Second, I am not sure how likely this "perfect filtration" is. I am not a physicist and might have misunderstood the paper you linked, but I was unable to find a place where it compares the passing of pure water through graphene as opposed to passing a water mixture or a water solution. In fact, it appears to be a theoretical work that models the way water passes through graphene only. So I have no idea of the context of the statement "selectively permeable to water" - maybe it doesn't select as strongly as you hope.
Third, how do you propose to dry the food when it is snugly packed in a GO bag? The standard process of drying food makes use of the concentration gradient of moisture between the food and the surrounding air. Now that there is no surrounding air anymore, you will have to somehow actively transport the water out of it through the GO, and that will be difficult, even if you apply some force. And since the GO channels are so small, this will be extremely difficult. For comparison, try putting something in a physical filter with holes too small for it to freely pass through. For example, cook some crème anglaise and try passing it through a coffee filter. Gravity won't be sufficient for it to pass, but even if you try exerting pressure, you will destroy the filter before it goes through.
And fourth, even if the two first points are somehow solved I don't think you will be able to keep the food as tasty as it was. When you bite into fresh fruit, you enjoy the spilling of flavor-carrying cytoplasm onto your tongue (and I am oversimplifying here by ignoring the effect o,f texture on pleasure). If you have a "dry collection" of flavor-carrying molecules somewhere inside the food, you won't necessarily get the same experience when they land in your mouth, if they are not bound to a fluid the way they were bound originally. Add to that the chemical changes which will happen as a result of the drying process itself, and you will get a very different outcome than that of a fresh fruit.
In the end, this doesn't sound completely impossible, but it seems that the complexity of implementation will be huge (certainly not "a container covered by a sheet of GO"), and the resulting improvement might turn out to be very slight. We will have to wait and see if somebody develops an application for it. And frankly, I hope that food producers would instead invest their money in growing food that has enough aroma in the first place.
Comment: 1. Would the tiny amount of headspace really hold *so much* flavor?
2. *This* is the most likely problem. I remember GO expands when it absorbs water vapor, so it may let through vapors dissolved in a mostly water liquid.
3. A thin enough sheet was found experimentally (different paper?) to not impede the evaporation of water; a water activity gradient gets set up within the sheet.
4. Yes raisins will still be raisins, of course. Hopefully with a stronger smell, and less musky/more fruity.
5. Yes, caring less about mass or calories and more about phytochemicals is a good idea.
Comment: @KevinKostlan 1. the most important part here is that a mental model where the flavor stays "in the food" is wrong. The headspace will have space for a ton of aromatic molecules, but indeed not all will escape into it, since the concentration matters. 2. yes, we have to wait for experimental observations, it's exciting to think what may come out. 3. My intuition is that there may be a problem here. Fruit doesn't dry on its own, it needs to be either exposed to warm moving air, or to partial vacuum. When protected by the GO sheet, why would the water move out quickly enough? 4 and 5, agreed.
Answer: Great idea. GO can be engineered with many custom properties. I think for your application (getting excess water out of a curry) it would be better to remove liquid water using pressure, rather than letting water vaporize. This is the process used in reverse osmosis (RO) water desalinators.
Conventional RO uses very high pressure to force water through membranes. The same process is potentially much more efficient with GO. from Wikipedia:

In 2013 Lockheed Martin announced their Perforene graphene filter.
Lockheed claims the filter reduces the energy costs of reverse osmosis
desalination by 99%. Lockheed claimed that the filter was 500 times
thinner than the best filter then on the market, one thousand times
stronger and requires 1% of the pressure.

It would be like a molecular-sized version of separating curds from whey. If the membrane can retain salts, it would certainly retain larger flavor molecules.
GO is potentially much more efficient than freeze-drying. And RO can use much less energy than vaporizing water.

Graphene oxide drying


How to measure capacitor maximum voltage rating

Question: I have a lot of mixed SMD capacitor where i have no idea what is the voltage rating and is a waste. Is there any method to determine voltage rating of a capacitor? i tried connect resistor and capacitor in parallel and measure the transient using oscilloscope, is there any calculation required from the waveform?
Answer: Measuring the transient, you can find only capacitance of the capacitor.
I'm afraid that you can measure only what was the breakdown voltage of the capacitor, if you connect it in series with a current limiting resistor and the microammeter to the regulated voltage source.
When you increase the voltage above the breakdown voltage. The current will increase. Depending on the type of the capacitor it may lead to its destruction (and I wouldn't dare to use this capacitor later on).
Please note, that so found breakdown voltage may vary significantly for different capacitors from the same batch. So the safe operating voltage for the rest of capacitors from the same batch should be assumed to be a few times lower (I don't know the exact number) than the breakdown voltage measured above.


Moving SpatiaLite Table into PostgreSQL using ogr2ogr?

Question: How can I move a Spatialite table from a Spatialite db to a PostgreSQL db using ogr2ogr?
Comment: I know you wanted to use ogr2ogr, and have posted a solution below, but you can also use the VirtualPG support (https://www.gaia-gis.it/fossil/virtualpg/wiki?name=tutorial) if you have a fairly recent SpatiaLite. That can give you a live connection.
Comment: A very cool feature. Works well.
Answer: And, after a bit more reading the ogr2ogr help I found the answer more easily than I expected.
ogr2ogr -f "PostgreSQL" PG:"dbname=db" spatialitedb -sql "SELECT * FROM table" -dialect spatialite -nln new_table

EDIT: As suggested by user30184 in the comments a cleaner, simpler method is:
ogr2ogr -f "PostgreSQL" PG:"dbname=db" spatialitedb spatialite_table_name

Comment: However, if the whole table with all the attributes should be copied it is more simple with `ogr2ogr -f "PostgreSQL" PG:"dbname=db" spatialitedb spatialite_table_name`. Select * probably also copies the "rowid" column which you do not need.
Comment: No need to delete it. This kind of thing is fine on GIS.SE.
Comment: :-o I have to wait 2 days to mark it as the answer.
Answer: A more user friendly option, for those not familiar with command-line tools such as ogr2ogr, is to use Export to PostgreSQL available in the Processing Toolbox in QGIS 3.12.
This processing tool exposes ogr2ogr via GDAL into the QGIS user interface.
I'm unsure if this function exists in earlier versions.
You'll need to add the layers to a project first, though the process is pretty straightforward from there as it uses the existing PostGIS connections set up in QGIS.
You can also Export to PostgreSQL without needing to create a connection in QGIS by using Export to PostgreSQL (new connection).


Unable to obtain content from website using Hpple

Question: I was trying to parse from a website using HPPLE. I was successful with the  tag but it doesn't seem to work on the other tag.  Please advice.
This was the code that I used.
NSData *htmlData = [[NSData alloc] initWithContentsOfURL:[NSURL URLWithString:@"http://www.mywebsite.com/"]];
TFHpple *xpathParser = [[TFHpple alloc] initWithHTMLData:htmlData];
NSArray *elements  = [xpathParser search:@"//tr/td"];
TFHppleElement *element = [elements objectAtIndex:0];
NSString *myTitle = [element content];
NSLog(myTitle);
mLabel.text = myTitle;
[xpathParser release];
[htmlData release];

This is the website source code that I was trying to parse from.

Title of Speech	Speaker Name	Date and Time	</td

I was intending to parse out the Speech Title, Speaker, Date and Time and name of the mp4 file. But it return a empty string to my outlet label.  Please advice.
Regards, Des
Answer: Late but maybe useful for others:
Use
NSString *myTitle = [element text];

instead of content
I used hpple for getting the <title>-Tag of some websites. content was empty but not text.


RDS Gateway Slow Initial Connection

Question: I've setup a Win2k8 R2 RDS Gateway.  It works great but the initial connection takes 10-20 seconds.  I've had a hard time finding troubleshooting ideas for the problem.  Anyone have any suggestions on where to start or common issues?
Answer: DNS is my guess!
Comment: What part of the name resolution process would cause it to be slow but not to fail?
Comment: Reverse dns perhaps..
ive seen this problem before ( waiting until it fails )
im not exactly sure.. but its where i would start looking
Answer: We had this problem and ended up virtualizing Remote Desktop Gateway on its own VM under Hyper-V. We isolated it away from our other server functions, and it sped it up as far as connections go.
We recently installed a VPN (Remote Access Server role) for sstp traffic, and we noticed our VPN connection happens a bit quicker than the RDP one through SSL.
Our advice to you would be to build a box in a lab environment with only this service loaded and the appropriate certificate to see if something else is perhaps slowing it down.

RDS Gateway Slow Initial Connection


What makes Ubuntu not totally Free Software?

Question: I heard that Ubuntu is not completely free (as in Freedom). What are the specific parts of Ubuntu that are not Free?
Comment: Do you mean "Free as in Freedom?"  Free as in beer refers to price, and as far as I know, Ubuntu is still provided without charge.
Comment: Huge typo, YES I meant Free as in Freedom. :p
Comment: I'm always suspicious of sentences that begin "I heard that...".  For every "heard that" there is usually an equal and opposite "heard that" waiting down the pub or lurking on the intertubes somewhere.    I heard that you couln't even cite a source for that remark ;-)
Answer: Assuming you mean "Free as in Freedom" rather than "free as in beer" (see this essay for one description of the difference between the two), a person claiming that Ubuntu is not free may be referring to one of the following issues:

Binary blobs in the Linux kernel (this is often firmware that is needed to let a free driver work).
Non-free hardware drivers.
Non-free software that is in the Ubuntu repositories, such as flash.

Sometimes, they may be referring to the inclusion of software that poses legal problems in the US because of patents or other issues; however, such issues are usually orthogonal to the software being free.
However, it is more than possible to have a completely free system using Ubuntu.  The vrms package in the Ubuntu repository is a good first step if you are concerned with non-free packages that are installed on your system.  If you want to go even further, you can consider using Linux Libre a version of the Linux kernel that has non-free binary blobs removed from it.  Note, however, that installing linux libre will break your support for any hardware that needs those non-free bits.
I personally find it "free enough" to ensure that I don't have any non-free packages installed and tend not to worry about binary blobs.  But each person tends to draw "the freedom line" in a different place.
Comment: Regarding Ubuntu One: Isn't any web broswer (say Firefox) really that different (ie a "a free client for a non-free web server")?
Comment: yeah, the Ubuntu One point isn't really valid. You might configure, say, a nameserver that's running on proprietary software, or set google.com as the default home-page. :)
Comment: I agree Ubuntu One is a bit out of place in that list.  I think (it was a while ago) I was simply trying to list items people might be referring to, even if they are not /actual/ issues.  Edited to remove.
Answer: For one thing, it uses closed source hardware drivers, which aren't regarded "free" the GNU way. That's one of the reasons, why some drivers aren't supported on Fedora. There's different kinds of "free" in the Linux world. Closed source is what makes a Distro not GPLv2 compatible, which clearly requires addition of all the source codes.
Answer: And it can be easily installed without the non-free bits by pressing F6 and selecting "Free software only" before installing.
Comment: It might be useful to include a description of what this actually does.  As far as I know, you would still be getting the same kernel with non-free blobs in it,  which some may care about.
Comment: Yes if there is a link to such information that would be great!
Comment: This doesn't really answer the question about "what makes....".
Answer: Ubuntu provides specific repositories of nonfree software, and Canonical expressly promotes and recommends nonfree software under the Ubuntu name in some of their distribution channels. Ubuntu offers the option to install only free packages, which means it also offers the option to install nonfree packages too. In addition, the version of Linux, the kernel, included in Ubuntu contains firmware blobs.
As of October 2012, Ubuntu sends personal data about users' searches to a server belonging to Canonical, which sends back ads to buy things from Amazon. This does not, strictly speaking, affect whether Ubuntu is free software, but it is a violation of users' privacy. It also encourages buying from Amazon, a company associated with DRM as well as mistreatment of workers, authors and publishers.
This adware is one of the rare occasions in which a free software developer persists in keeping a malicious feature in its version of a program.
Ubuntu appears to permit commercial redistribution of exact copies with the trademarks; removal of the trademarks is required only for modified versions. That is an acceptable policy for trademarks. The same page, further down, makes a vague and ominous statement about "Ubuntu patents," without giving enough details to show whether that constitutes aggression or not.
That page spreads confusion by using the misleading term "intellectual property rights", which falsely presumes that trademark law and patent law and several other laws belong in one single conceptual framework. Use of that term is harmful, without exception, so after making a reference to someone else's use of the term, we should always reject it. However, that is not a substantive issue about Ubuntu as a GNU/Linux distribution.
Comment: This text was copied from [FSF's webpage on distributions verbatim](https://www.gnu.org/distros/common-distros.en.html) and it should be said that FSF's guidelines for what's free and what's not are extreme to the point of potentially severely limiting use. FSF considers offering an optional non-free repository to lessen the freedom of the system and you could easily argue the opposite as well. FSF does not hold monopoly on the freedom's definition.
Comment: @WhimsicalWombat Your concern is understandable, but the argument FSF puts against Ubuntu is much stronger than simply providing non-free repositories. Good catch on  this answer's plagiarism btw.


High Speed Signals PCB guidelines

Question:
How quick does a signal have to be in order to be considered a high-speed signal?
What are the limits and threshold where you can get away without special PCB layout?
Comment: Re: 1. This depends on who you ask. 2. That depends on which effects on the signal your system can and can't deal with. No general answer is possible! Also, you'd need to define "special" first.
Comment: My rule of thumb that puts a signal in transmission line territory is when the length of track is longer than 1/6 of the rise / fall time of the signal (the strict definition is much shorter). Typical propagation velocity on 'ordinary' epoxy FR4 is about 160 ps per inch (surface) / 170 ps per inch (internal layers).
Comment: Remember that it's not just about the switching speed or frequency but also mainly the rise/fall time. Don't see digital signals as a 1 or 0, but see them as a combination of a large number of analog waves, all with different frequencies.
Comment: It's not an "official" term.  It's a useful construct used to indicate that your design might go wrong if you don't take the frequency of the signals into account.  High-speed can mean different things for different reasons.  If you're trying to make advanced logic operations out of discrete transistors, it means one thing, and if you're building a wave guide for microwave transmissions, it means another.
Comment: For digital world depends on time delay of the trace to rise time of source. conservative rule is delay of the trace max should be rise time * 0.25 . see these 1. https://www.protoexpress.com/blog/pcb-transmission-line-critical-length-controlled-impedance-rise-fall-time/      2. https://electronics.stackexchange.com/questions/258765/how-to-determine-if-a-signal-path-needs-to-be-treated-as-a-transmission-line  3.
Comment: There are people in EESE that consider my high-speed signals to be DC.
Answer: If you have a vacuum-tube computer with 100 nanosecond edges, then 10nanoSec or 20nanoSec round trip delays and reflections will be hidden in the edge waveform.
In that case, your computer can be 5 feet across (5 + 5 nanosecond round trip) to 10 feet across (10 + 10 nanosecond round trip).
This vacuum-tube computer will have UGLY waveforms (lots of reflections) with 50 foot distances (100 nanosecond round trip) unless you provide some method to absorb the fast energy. Your long cables may couple into other long cables, with fast edge energy being the best transferred between wires; in that case, your signals (your logic levels) will show lots of trash coupled onto the "0" and onto the "1" levels, and you'll have slow edges because of the wire-wire transfer of fast energy; the slow edges may be clean, because the fast energy was stolen by adjacent wiring.
If you build a computer with 100 picosecond edges, you'll see two effects. (1) the FR-4 epoxy-fiberglass insulation becomes an absorber of your high-speed energy, and your fast edges become slow, thus reflections are less of a bother. (2) the fast edges will not have time to fully penetrate the copper foil, and the thinner region used by the fast energy results in higher resistance and lots of heating losses; again your fast edges become slow, and reflections are less of a bother. { using loop inductors on both sides of single-layer PCB foil, I observed about 150 nanoSeconds propagation delay; Jackson (E&M book) agrees/predicts this much delay THRU the foil. }
In between the cable-bundle-losses and the FR-4/skin_effect losses, you should use Roker Pivic's rule.
Answer: For you to need to consider high-speed design (controlled impedance) rules you would need traces on your PCB that are physically longer than the wavelength/10 of the highest frequency component of your signal. For continuous wave RF (and long-pulse RF waveforms) this will correspond to:
$$
L \ge\frac{\lambda}{10}
$$
For digital waveforms the rule of thumb is the highest frequency component is related to the signal rise time \$T_R\$:
$$
f_{knee} = \frac{0.5}{T_{R}}
$$
Of course these need to be calculated for the particular effective permittivity of your substrate material because the propagation velocity in the substrate changes based on the material used.
Answer: If your rise/fall time is much longer than the signal propagation time over the length of your traces, you're good to "get away without special PCB layout". So, basically, have a short traces and slow rise times.

there are no special thresholds: the physics is always the same, it's just that at certain conditions you'll see some effects more strongly. Some people recommend the rule of thumb, though, where if the trace length is longer than a 10% of the wavelength to be a "high-speed" situation.

High Speed Signals PCB guidelines


Automatically connect Wired Ethernet Connection after power outage

Question: I am using Scientific Linux 6.2 (Variant of RHEL / CentOS) . Every day at a particular time there is a power outage at my place, and after 1 hour power is restored. My laptop is connected to a network switch, that has no Backup power, and connection is disconnected when power is gone. Laptop keeps running in battery power.
Now when power is restored, the ethernet connection (eth0) is not automatically restored in linux. It only says connection available under wired connection. The same thing happens to the Wireless Network Connections. What can I do to automatically connect to these networks, whenever they are available?
Comment: does it have a gnome environment???
Comment: yes. gnome 2 environment.
Answer: NetworkManager does this automatically.  It is part of RHEL/CentOS so I assume it will be available for Scientific Linux as well.
Answer: Since you have gnome environment, I will give you a GUI solution,


Do i need another drill?

Question: I have an impact or power drill already, its a bit heavy so I am wondering if I need another drill which is light for the purpose of drilling screw in woodworks
I mainly use the power drill to drill a hole in the cement to put to tox
Answer: Yes.  As long as your wife says it's okay, you should buy a new drill.  Not only will you be getting a new tool, you'll also be stimulating the economy.

Do i need another drill?


How many developers should work on same developer pro sandbox without impacting performance?

Question: Is there a figure on number of developers should work on same Developer Pro sandbox? I see a lot of performance issue and environment is very unresponsive when multiple developers (~5) have enabled debug logs. It becomes impossible to use developer console. It doesn't respond on clicks, navigation and throws no response from server errors.
Is there any best practice to follow here?
Answer: Coding on Developer-Pro Sandbox you are asking for trouble in the first place. Developer-Pro sandbox is supposed to be UAT-QA and not your usual development environment.
Having a single sandbox where multiple developer's code is like playing a devils advocate where anyone can overwrite someone else's code and there is no tracking and historical code change trends. It can get ugly even before you think about migrating.
A developer should have their own Sandbox where they work and test their code peacefully. Once they are sure they can commit in Code Versioning System and move to Developer-PRO(QA or UAT).

The problems you mentioned is the reason salesforce provides 100's of sandboxes so that each dev can have at least 1 sandbox and can work/test peacefully without facing intermittent issues from other devs working on their functionality.
You might be interested in looking into Salesforce DX which introduces scratch orgs which have life of 7 days that devs can use to work over the week and get going.
SFDX: https://trailhead.salesforce.com/en/trails/sfdx_get_started
Source: https://help.salesforce.com/articleView?id=data_sandbox_environments.htm&type=0
https://resources.docs.salesforce.com/sfdc/pdf/salesforce_development_lifecycle.pdf
Comment: +1, and everything you say here goes double if developers are trying to share a Dev Pro sandbox *while using Developer Console* instead of an offline IDE.
Comment: Thanks Pranay for replying but my issue is not on looking for alternative. I wanted to see if there are any guidelines on how many parallel debug logs. we using dev pro because dev org can't support storage for our test data.
Comment: 100mb is more that enough for a single dev. You dont test on all data in one go. I know data creation is bit tricky but thats what best practices state.  That been said, There are no guidelines for what you are looking for. There were no studies for this behaviour . You might have to raise a case with SF for this.
Comment: Even 1GB is not enough in our case unfortunately. Not sure if you ever worked on any commerce projects where you can't really do development as you don't have data. We have to treat data as metadata to make our logic work but storage limit applies to it. I believe this should be the case with many of such projects. Limit of 5 dev pro sandboxes makes it worse.


Do Alitalia serve breakfast on an early, short-haul flight?

Question: Leaving Naples early morning for Milan, does Alitalia serve breakfast?
Comment: At just over an hour, this flight is probably too short for food service.
Comment: When you search on a flight on most flight search engines, the result details should tell you which meal, if any, is served in your cabin.
Comment: If your flight search engine doesn't tell you, go and look up the flight on the AlItalia website. If it doesn't say anything about food, there is no food.
Comment: Are you flying in economy or business class? Food and drink service normally varies between the two, especially on short flights
Answer: I assume you refer to economy class. I don't know about Naples-Milan, but my experience is that in most national flights Alitalia serves only a minimal amount of food and beverages. I expect to see a limited selection of beverages (tea, coffee, water, coke, and orange juice), and a very small snack (sweet or savoury at your choice), like a small package of biscuits or saltines.
So, something insufficient for a typical Italian breakfast, and very far from a continental breakfast.
Also, don't expect to get newspapers.
Alitalia has undergone severe cuts in the last years, and the quality of service has been affected negatively, especially when it comes to these small perks.


translate data file with odd Hebrew encoding

Question: I have a binary data file, in a format used by a relatively ancient program, which I am trying to convert into something sane.  With the help of a Hex editor I have basically worked out the file format except that it contains Hebrew characters with an odd encoding.
All characters are 8 bits.  The "standard" 27 consonants (including "final" consonants) go from hex 80 to 9A.  Then there are vowels that seem to start around hex 9B or so (I'm guessing right after the standard consonants end).  Then there are "dotted" consonants that seem to start at hex E0.
If I remember correctly, I think this is some sort of DOS encoding.  What encoding is this and what encoding should I translate it to so that a user in Israel will be able to most easily open it in, say, Microsoft Word?  Are there any tools that I could use to do the translation?
Answer: 80 to 9A seem to match the codepoints in the CP862, but I could not find any match for the vowel codepoints. I think what you should do is just make a custom mapping to Unicode and produce the output in UTF-8 or UTF-16LE plain text file. If you add a BOM (Byte-Order-Mark), Notepad and/or Word should be able to read it without issues. I would probably make a small Python script, but it shouldn't be hard in any other language.


Electron pair repulsion theory qualm

Question: Is the there not repulsion between the individual electrons within the bonding pairs ? Why does the "bonding pair " have an overall repulsive effect on the other lone and bonding pairs ?
Answer: There is repulsion between the individual electrons of a bonding pair (and within a lone pair, for that matter). The reason that the electrons can be found in that "pair" nonetheless is that those "pairs" are actually orbitals - allowed "spaces" for electrons. Of these orbitals, there are many more than there are electrons in a molecule: they can thus be classified as occupied and unoccupied. They differ in energy: the "closer" an orbital is to a nucleus, for instance, the lower the energy of the electrons occupying it. Often, the electrons are lower in energy when sharing an orbital than when not sharing it - because in case of the latter, one of the electrons ends up in a higher orbital (think Aufbau principle). One might also say that the electron-nucleus attraction overcomes the electron-electron repulsion of the electrons within a pair.
The natural question to ask next is: why do we not have more than 2 electrons per orbital? The answer is that you cannot have 2 electrons with the same spin (a fundamental relativistic property of an electron) in one orbital (There are reasons for this, but elaborating them goes too far at this point). Electrons have either +1/2 or -1/2 spin - thus you get one of each within a VSEPR pair.
There is repulsion between electron pairs, simply as a result of the identical charges of the electrons.

Electron pair repulsion theory qualm


Can I backup or restore my old PS3 hard drive to a new PS3?

Question: My PS3 just YLOD'd. I'm hoping its just a temporary overheating issue and if I just leave it off and unplugged for the day I can get it back on long enough to eject the game disc and backup the hard drive.
From reading up on the YLOD, it sounds like this a sign that if it's not dead already it will be dead in the near future; so I've resigned myself to just buying a new PS3. My question is this:
Can I...

Backup my old PS3 hard drive to an external hardrive
Move the old hard drive from my 60gb PS3 (I upgraded the drive to a 640gb drive a while ago) to a PS3 slim. I know that once I insert the drive it will prompt me to reformat the drive; this should be fine since I backed up my data first.
Restore my backup on the new PS3 and get back most of my saved data? I know some games encrypt their save data, so I might be screwed with certain games.

Is this possible?
Answer: Yes, you can backup the drive, assuming you can get it to bootup and run without getting the yellow light.  Sony's User Guide on backing up states:.

Some types of backed up data can be restored on another PS3™ system. The types of data that can be restored on another system are as follows:

Saved data from PlayStation®3 format software *1
  Image files under  (Photo)
  Music files under  (Music) *2
  Video files under  (Video) *2
   Bookmarks added under  (Internet Browser)
   Terms that were added using  (Settings) >  (System Settings) > [Add/Edit Term], or predictive terms that were "learned" by the on-screen keyboard

*1     Copy-protected data cannot be restored. Also, saved data that has been restored may not be usable in some games.
*2     Does not include copyright-protected data.

Most everything should backup and restore, except copy-protectd game saves, movies, and music.
Your best bet for getting your data to the new system is to  transfer the data directly from the old to the new PS3 using an ethernet cable.  Again, details in the PS3 User Guide.  Unfortunately, both systems have to be functional for this to work.  After the transfer, any old backups will no longer work.  From the user guide:

If you back up data on a PS3™ system and then transfer data to another PS3™ system using the data transfer utility, copy-prohibited saved data that is included in the backup data cannot be restored on either system.

Unfortunately, you can't just swap hard drives between systems.  According to this thread requesting this feature, it looks like the PS3 encrypts the internal drive with a key that is unique to each physical system.  This key can't be transferred.
Good luck!
Comment: Are there any options available when your old PS3 won't boot?  I assume not seeing as the contents of the drive is encrypted.
Answer: Two ways to do this:

Backup the whole disk with the system, registry and drivers and your games to an external hard drive, and restore the image to the new hard disk.
Just directly clone the old hard drive to the new one with everything on it.  You may also resize the partitions on the new disk.

Here's the way in which I upgraded my hard drive without reinstalling the system.
Comment: This sounds like an answer for PC, not PS3.
Comment: You can in fact do this with a PS3 drive (using a PC/laptop) and it works, but it doesn't resize the disk, and it won't allow transfer to a new machine.


Illustrator script How to generate a cross to center of all selected circles

Question: Is there a way (or Script) to place a cross (+) at the center of all selected circles?
Comment: Are all the selected things circles? Or does the process need to identify circles.
Comment: all selected things are circles.
Answer: Another way is to create a scatter brush using the + object.
Select all the objects, duplicate and ungroup all, open the Transform each panel and give then a 1% size.
Now just apply that + brush and group them if you want it.
Answer: I'm not exactly sure what's the end results, but you could align the cross in the circle and group them. Then you can spread the group evenly everywhere.

Align Horizontally and Vertically the Cross and the Circle

Group them together Object > Group or Ctrl + G

Duplicate the group by selecting the group, holding Alt and dragging it somewhere

Spread them evenly

You could also create a pattern with this group under Object > Pattern > Make
Comment: There should be a capability to show the center point of regular objects automatically.
Comment: @Chris With the Pattern Options window, you have a lot more options.


Does the cooldown reduction buff exceed the 40% cap?

Question: In Smite, the blue "jungle buff", represented by what seems to be a blue mana potion, provides "+5 mana per second and 10% cooldown reduction" (CDR). The maximum amount of cooldown reduction that can be provided by items is 40%. Does the buff stack with items to provide total cooldown reduction >40%?
I suppose one way to form a theory to test this is to see if the buff affects one's listed CDR (seen one way by hovering one's cursor over one's magic stat in the scoreboard).
Comment: @BRoebie Is there a character with a CdR different than 40%?
Comment: No, CDR is capped at 40%. There is an item Chronos pendant that subtracts 1 second of all abilities currently on cooldown every 10 seconds. Also the character Discordia her third ability that has a similar working here is the link to the page with further details https://smite.gamepedia.com/Discordia
Comment: Sorry I meant CdR cap. Re: changing "The maximum cooldown reduction provided by items" to "The maximum amount of cooldown reduction" because you asserted the CdR cap is inherent to the characters rather than the items. I'm thinking I can reduce the confusion by changing it to "achievable by items alone". But otherwise I doubt it'd really be a problem as is.
Comment: No, there is no character that has a different CDR maximum provided by items, mana buff or a character passive.
Keep in mind that the Mana buff gives 10% cdr as well
Answer: No. The maximum cooldown reduction provided by items and buffs is 40% and cannot be increased further.
However, this does not restrict skills-toggled cooldown reductions.
Comment: Smite is not the same game as LoL. This question might have the same answer for both games (I don't know, I don't play smite) but linking to the LoL wiki is not a source for Smite questions.
Comment: Sorry, I was unaware because I was looking for LoL question at the same time. Answer altered to Smite.
Comment: What do you mean by "skills-toggled cooldown reductions"? I can't think of any skills off the top of my head that toggle cooldown reductions.
Comment: @NiteCyper one example would be when Ah Muzen Cab picks up his stinger after his ultimate.
Comment: Can I suggest you edit the sentence "The maximum cooldown reduction provided by items" to "The maximum amount of cooldown reduction" because the first statement is factually untrue there is no maximum of cooldown reduction provided by items they provide the cooldown reduction. It is the playable characters that have the caps on stats. It is like saying the maximum amount of attack speed provided by items, the characters have hardcaps on stats not the items


Combinatorial curvature of real projective plane

Question: There is a notion of combinatorial curvature due to Forman, see here (published paper) or here (preprint). I checked for a couple of small triangulations of $\mathbb{RP}^2$ (6-vertex, 7-vertex, 9-vertex) and the 1-curvature seemed to be non-positive for any edge in these. Is there any triangulation which has at least some positive curvature? (My expectation is no: subdivisions seem to have more and more negative combinatorial curvature, so positive curvature triangulations should be small.) If there is no triangulation of $\mathbb{RP}^2$ with some positive curvature, what would be the explanation?
Answer: Take any triangulation and any pair of adjacent faces $ABC$ and $BCD$. Now subdivide the shared edge $BC$ and both faces into three edges $BE$, $EF$, $FC$ and six faces $ABE$, $AEF$, $AFC$, $BED$, $EFD$, $FCD$. The edge $EF$ has $1$-curvature $2+2-2=2$.
Comment: Thanks. So does this mean that positive combinatorial curvature on $\mathbb{RP}^2$ detects possibilities to simplify the triangulation (by reverting the operation you described)?


Apart from cross-validation, what other methods are used to tune hyperparameters?

Question: I'm performing linear regression to predict house prices. My dataset has close to 2,000 observations. My model has over 50 variables. I'd like to know how I can tune hyperparameters like, L2 regularization, and degree of polynomial used in the objective function. I'm aware only of k-fold cross validation to perform this task. Is it common to use cross-validation for this, or are there better or more common techniques?
Answer: If you have enough, plenty of data, it is common to divide the dataset into 2, training set and validation set. You fit the model with the training sets and perform the tuning with the validation sets. It will be faster because you don't need to perform the validation k number of times. For smaller number of dataset, using cross validation will generalize better.


Difference between sounds and segments

Question: I have always wondered whether there is a clear distinction between (speech) sounds and segments. The two words appear to be used interchangeably in some places while in others they are considered to be different.
Comment: I think it depends on the definition you're looking at for "segment". Are you able to specify?
Answer: Although this is a "usage" question, it's about a potential technical distinction. There is no technical distinction between "a sound" and "a segment", and the thing is most often referred to in the phonological literature as a segment. On the other hand, outside of linguistics, the concept of "segment" is alien, instead people talk about "sounds". This means that there is some tendency for non-technical writing by linguists to use "sound" rather than "segment", to cut down on the amount of arcana that has to be introduced to the general audience.
"Segment" has a somewhat technical connotation, just as "atom" is a technical term in physics, in that an atom is not onlyelectrons, protons and neutrons, it also involves relations between these primitive units. In older SPE phonology, a segment was the totality of features delimited by the first feature "segment", and in autosegmental accounts, it more or less corresponds to "everything dominated by a single Root node", but in fact the existence of the segment as a special representational unit was not universally accepted (see for example Grounded phonology, and similar decompositional efforts by Steriade and Selkirk).
The term "sound" is more widely used by phoneticians, probably because "segment" has certain ontological implications that phoneticians may not want to commit to. However, when phoneticians approach the problem of cutting up continuous speech into discrete units, they talk of segmenting an utterance and the results will be segments (though their choices are often different from those made by phonologists, who are not traditionally concerned with segment-internal structure, such as closure versus release).

Difference between sounds and segments


Low voltage signal passing through microcontroller

Question: Can microcontroller work like switches for low voltage analog signal. I mean when press the button
signal (less than 300 mV, very low amperage) pass unchanged through microcontroller (one analog input,
one analog output), than by software disable input and output or simply turn off power (same button)? I want to
solve that without external switches and relays. Thanks.
Answer: No, a microcontroller will generally not include an analogue switching element. The analogue input is implemented as an analogue to digital convertor (with limited resolution and sampling frequency) and the analogue output is a digital to analogue convertor (with again limited resolution and sampling frequency).
So it is possible to pass an analogue signal in and out, but there will be latency, voltage quantisation and timing quantisation introduced. It will also require you to continuously transfer data from one peripheral to another.
An external analogue switch is likely to work much better...


Choosing between performance vs readable/cleaner code?

Question: If you have to pay the price of performance to make code more readable would you prefer that or you would always prefer performance over it?
Comment: I understand that it will not have a definite answer ,but based on your experience I wanted to understand which one have you given more priority at times and why
Comment: Obviously, the answer is: "it depends." A performance difference of seconds is quite different from a performance difference of milliseconds
Comment: Could you provide an example?
Answer: In layman's words:

Making the code ugly does not make it fast.
Making the code clean does not make it slow (or fast).
Making the code ugly does make the maintainer's work slower.
Clean code usually means the code was made by someone who cares.
One who cares to make his code clean, usually cares to make it efficient.
Hardware becomes cheaper with time.
Programmers don't get cheaper over time.
CPU time is cheaper than programmer's time.
Some performance problems can be solved by throwing money at them.
Very few code maintainability problems can be solved by throwing money at them.
Comment: who has time for perfection?
Comment: Add Amdahl's law to the list (and connecting all the dots together) will make it the software equivalent of Moore's law.
Comment: See Herb Sutter's [The Free Lunch is Over](http://www.gotw.ca/publications/concurrency-ddj.htm) on reasons why performance problems can't be solved by hardware. Also, someone posted a diagram a while ago which says most people's code started with neither clean nor fast.
Answer: You should always choose clean code first as it reduces the cost of maintenance and it likely to be less complex.  You shouldn't address a performance problem that you haven't identified; that's probably a premature optimisation.
See When is Optimization Premature?
Answer: The general idea is to make the code as readable as possible first, and then only look at optimizing where there's a proven performance problem.  In most cases a response time of, e.g. 5 ms instead of 1 ms isn't going to make a difference.  50 seconds instead of 10 seconds is a different matter.
Comment: +1 great answer. The day computers begin to maintain code, ona can stop caring about readability.
Answer: Prefer meeting your customer's requirements.
If the customer has imposed a performance requirement, and that requirement dictates that you change the code to make it less readable but more performant, then you change the code to make it less readable but more performant.
But ugly fast code is a false dichotomy.  Sometimes you can make code perform better without making it significantly more ugly.
If the code already performs adequately, then prefer readability over more performance.
Measure first, then optimize the slow bits only if you need to do so to meet the requirements.
Comment: @CWallach: That's not a requirement, it's a wish.  A requirement is stated explicitly, like: *"All web pages shall render in 1000ms or less, under a single-user load."*
Comment: @CWallach: Not if the page meets the stated customer specification.  There either needs to be an amendment to the specification, or a waiver if it is discovered that making a particular page compliant will be too expensive.  "Too slow" is not measurable.
Comment: "But ugly fast code is a false dichotomy." Yep.
Comment: Often the customer will expect a satisfactory level of performance without having a written requirement. The developer should clarify this.
Comment: None the less,  when a web page renders too slowly the customer will consider it a bug and expect the developer to fix it.
Comment: Rarely do specifications cover everything and then developers have to be flexible. You can get all legalistic but then you have an unhappy customer.


05 Buick lacrosse

Question: My car said I was low on oil and I accidently put in about 3/4 of a quart of sae30 instead of 5w30. Will it be ok to fill it the rest the way with the correct oil ? What should I do?
Comment: It's basically OK but are you expecting a lot of arctic cold operation?  If so, I'd fill the rest with 5W20 to balance it out.  Otherwise don't worry about it.
Answer: It's of little significance especially in the short-term.  Besides, you diluted the SAE30 with the existing 5W30.
The difference is that SAE30 is "straight" weight oil.  The 5W in 5W-30 means that it has modifiers added to make it flow better at low temperatures.  This helps the engine to turn over easier and start in cold weather.
If this were my car, I'd go ahead and put the rest of the SAE30 in there to top it off.  Then just change the oil when it's due again.

05 Buick lacrosse


Ubuntu/Debian Is it okay to use a sudouser account as my primary on a workstation?

Question: This question comes to you from the the common WindowsNT advice that "I", as the computer administrator, should login with a normal unprivileged user account for day to day use. Does this concept have a place in the Linux (Specifically the Debian and Ubuntu [derivatives])?
Answer: In fact it does not matter much.
The admin / normal user separation comes from the world of mainframes, back in the previous century; it was expected that a given computer was used by several (many) users, often at the same time, and these users do not trust each other. The OS enforced separation, and becoming "administrator" allowed for bypassing that separation, and thus was the ultimate goal of any attacker. In that models, attackers are the users themselves.
In modern computer usage, especially for "workstations", there is only a single user on a given machine. Your computer is yours; thus, you are not an attacker. It is expected that you can become an administrator whenever you wish it so, and, in practice, since you have physical access to the machine, it would be hard to prevent you from doing so. Attackers, in that model, are external people who want to access your data (not root's data, but yours). The attacker wins if he gets to run his code with your privileges, because then he can plunder all your data, and/or use the machine as a relay host to attack other machines. In modern workstation usage, there is no strong security need for user/admin separation. You still want to log in as a non-root account (but still sudoer) to protect you against accidental mishaps: as a non-root, if you want to make your machine unbootable, you have to do it on purpose. Anyway, due to the longstanding firmly entrenched Tradition of mainframes, modern Linux distributions frown upon opening sessions as "root", in the same way that playing satanic hard rock might offend the Pope (although that's not guaranteed with the current incumbent).
What you do with your machine will fall somewhere between these two models, but probably closer to "modern workstation" than "mainframe". As a rule of thumb: if your machine does not run a SSH daemon (sshd), then you are in the "modern workstation" model and user/admin separations are irrelevant; you can be a sudoer as much as you want.
Comment: [To put it another way...](http://xkcd.com/1200/)
Answer: I'd say that's fine. As long as you don't preface your commands with 'sudo', you're just like any other user on the system. Just be mindful that when you use sudo, you're borrowing the power of root. Don't use sudo for untrusted programs and scripts, and keep your password extra secure.
However, if there is a sudo vulnerability that allows for authentication bypass [*], you would be at risk since you have the right to use sudo. If that's an acceptable risk to you, then use a sudoers account for your day to day. If not, work out something else.
[*] which would be AWFUL


Why is Curve25519 in the GPG "expert" options?

Question: The only way to access the Curve25519 curve in GPG is through gpg --expert --full-gen-key.
From my knowledge, Curve25519 is one of the most secure (and fast) elliptic curves in cryptography. So why is RSA fine, but Curve25519 is considered a risk only experts should take?
Answer: The risk mainly resides in compatibility.
See, not all GPG users/systems are updated to the latest version. If you look at the GPG changelogs, you'll notice ECC was first introduced to GPG with version 2.1 in 2015:

Support for Elliptic Curve Cryptography (ECC) is now available. ⇒more

None of the pre v2.1 versions of GPG support ECC, which is something that can and most probably will cause several annoyances and interoperability issues — hence the "expert" toggle which can be interpreted as "herewith I confirm that I know what I'm doing and that I'm aware of related compatibility problems that may come within it".
Note that this is only an annoyance for the time being; things will surely brighten up while time goes by and more users/systems adopt newer GPG versions by updating
Also note the related dependencies and — last but not least — the OpenPGP specification "draft" status, which additionally influence adoption speed:

Encryption ECDH — RFC7748: Curve25519
OpenPGP specification: RFC4880bis draft
Dependencies:

libgcrypt >= 1.7.0

Gnuk >= 1.2.0

(Source: https://wiki.gnupg.org/ECC)
Comment: That draft is only for Curve25519. 3 NIST ECC curves are already in [RFC 6637](https://tools.ietf.org/html/rfc6637) according to the Wiki page you cite.
Answer: Support for what GnuPG calls cv25519 public-key encryption keys, and for ed25519 public-key signature keys, is neither standardized nor widespread, so you're likely to hit compatibility issues with anyone else using OpenPGP.
Answer: FYI: I noticed in my Proton Mail account that my keys use ECC (Curve25519).
So, a simple way to use this encryption method is with a fellow Proton Mail user.

Why is Curve25519 in the GPG “expert” options?