Can the concept of Entropy be used to analyze source code in a useful way?

Question: It seems logical to me that one could define a context for static source code analysis that included rules to produce a relative value of complexity.  I know it is not like in the physical sense because souce code doesn't have "Energy" but I'm betting there have been efforts, at leat academic, to draw a parallel.  Has anyone any knowledge of this and if so, to what end has it produced useful results?
Comment: There are already measures of code complexity - cyclomatic complexity, class length (LOC), method length (LOC), number of fields, number of method parameters, n-path complexity, fan in/fan out, and data flow analysis (DU/DD chains). Work has been done to correlate these to defect density, effort to maintain, and ease of understanding. How does what you are looking for compare to these?
Comment: For a rather unconventional approach, you could either directly compute the data compression ratio for the source code, or compute the data compression ratio after normalization of some sort. (e.g. http://c2.com/doc/SignatureSurvey/)  -  I do not know how meaningful or useful this would be, but it might give some insight when combined with more traditional metrics.
Comment: I don't have any specific knowledge on that. But as an engineer I do believe that you can apply this concept to anything you want in the universe. "Everything" is energy. Your code can be modeled as an entity, which has energy.
Comment: @Thomas Owens: I think this is exactly what the OP was asking for, please post it as an answer!
Comment: @Simon, ok, if you think so. I'm not 100% sure.
Answer: There are already a number of measures of code complexity:

Cyclomatic complexity
Class length
Method length
Number of fields
Number of method parameters
N-path complexity
Fan-in and fan-out
Data flow analysis (DU/DD chains)

Work has been done to correlate these to defect density, effort to maintain, and ease of understanding. Some are more meaningful than others, depending on what you are trying to learn from your analysis. I'm not that familiar with the concept of entropy from the physical sciences, but I wonder if tracking measurements and metrics like the ones I named over time, and relating them to defects over time, would be similar to what you are looking for.
You might also be interested in Ivar Jacobson's definition of software entropy and software rot. The general idea of these topics is that over time, as the code as well as the execution environment changes, the software system begins to degrade. Refactoring is seen as a method of minimizing entropy or rot, and, at least in my experiences, the metrics and measurements that I mentioned above would be indicators that refactoring might be necessary in a system or subsystem.
Answer: I think you're trying to draw a parallel between thermodynamic entropy and "complexity." The thing is, entropy is a measure of disorder not complexity. I don't believe that the two are equivalent and interchangeable.
The closest analog to thermodynamic entropy is Shannon entropy which measures the amount of disorder in a random variable. This notion is primarily concerned with the amount of "information" in a message.
In that regard, a piece of code can have a lot of information (high entropy) but very low complexity. Think of a program that simply prints out a very long string of arbitrary characters. It has a lot of information, but low complexity.
Comment: Entropy for source code wouldn't be computed from the same model as that for unstructured text. With a *model suited for source code*, it should be meaningful to compute an entropy which would not vary widely for arbitrary situations, such as the long string of characters you describe.
Comment: Just like it wouldn't make sense to compute thermodynamic entropy for natural language text, it doesn't make sense to use Shannon entropy for computer source code, since the meaning of a program is structured within a **different** set of rules and patterns (i.e. syntax). Natural language has its own syntax. The model must correspond to the syntax of the domain. Thermodynamic entropy is measured in joules per kelvin. Shannon entropy is measured in bits. Source code entropy would be measured in...different dimensions entirely. I took a stab at what the model would look like in my answer.
Comment: So how would you rate the entropy and complexity in the given program? I would argue that it contains a lot of information no matter what model you use. Though the definition of complexity is much less clear.
Comment: I like your answer - i was thinking, for instance, when "bad" code is introduced, a the entropy of the entire environment it exists in increases, i.e. including the coders who have to work harder - in that way maybe there's a practical, if not scientific link to thermodynamics?
Comment: entropy is a measure of information, not disorder. Disorder is a consequence of information.
Answer: Entropy is a "measure of disorder [or] unpredictability." A wider range of unique patterns in the information (i.e. roughly "more meaning") indicate a higher degree of entropy.
Applied to computer source code, I think that this principle could be useful. However, it would be necessary to design a probabilistic model for source code with which to compute the entropy. (A data structure that comes readily to mind is a graph with different edge types: call, class inheritance, etc.)
Once the model is designed and then populated with the source code of a software application (i.e. frequencies for nodes/edges), the entropy could be computed.
I don't know of any research on this, but my intuition is that a low degree of entropy would mean that the source code reuses common patterns throughout the application (i.e. DRY). Conversely, a high degree of entropy would mean that the source code is high in complexity and has not been factored well.
Answer: One way to think of entropy is "average information to be gained", so I think it is better to go back to modeling information. I know of two basic approaches to mathematically modeling information. (Forgive me for giving Wikipedia references, but IMHO they're not bad.)

Shannon Information, which looks at symbol sets, probability distributions on those, codes that can transfer information between symbols sets, and lengths of those codes. The general concepts of code efficiency, noise, error detection and correction via redundancy, etc. are couched in terms of Shannon information theory. One way to express information is to say it is the length of the shortest binary code that could represent a symbol. This is based on probability, which is a numerical value assigned to a symbol or event by some observer.
Solomonoff (or Kolmogorov) information. Here's another explanation. In this formulation, the information content of a symbol or event is represented by the length of the shortest program that could compute it. Here again, it is relative, not to an observer assigning probability, but to a universal machine that can execute the program. Since every universal machine can be simulated by a universal Turing machine, that means, in some sense, that the information content of the symbol or event is not relative, but absolute.

If I can take the liberty of telling what I think this means in everyday terms, about which I wrote a book, it simply means the complexity of a program is its length, when things like the functional spec and language are held constant, with appropriate allowances for things like comments and name lengths. But there's a problem with this - the "APL tarpit", where conciseness equals incomprehensibility.
It's much better to consider (as I did while studying AI) that the functional spec of the program consists of a mental model, which is not only real, but encoded efficiently, that is, with small enough redundancy that changing one's mind about the requirements can be done without too much danger of making it internally inconsistent - i.e. having a "bug".
Then the process of programming is an information channel that takes as input the mental model, and its output is the working source code.
Then when a change is made in the mental model, that delta must be fed through the programming process and turned into a corresponding delta in the source code.
That delta is easily measured. Diff the source between before applying that delta, and after applying it (completely, with all bugs worked out), and count the number of code blocks inserted, deleted, and replaced. The smaller that is, the better the source code language represents the language the mental model is represented in (in terms of nouns, verbs, and structure).
If that measure is somehow averaged over the space of likely functional changes, that is a concept of entropy of the source language, and less is better.
There's a term for this - Domain Specific Language (DSL)
I'm sorry if the references are weak / personal, but I think this overall question is a very important one.
Comment: +1 for Shannon *and* Kolmogorov, both of which are relevant...
Comment: @Alex: I think of Shannon as being applicable at run-time. So for example, you can understand the performance of algorithms in terms of the entropy of decision points, and you can understand normalization of data structure in terms of minimal code. Algorithmic information seems much more linguistic, applying to the suitability of a language for it's expressive purpose, and the algorithm you're trying to make efficient is the mysterious one that cranks in your head when you program.
Answer: Jon Jagger and Olve Maudal have a slightly different view of Code Entropy, as can be seen in their 2011 Accu conference session Code Entropy and Physics of Software.
They talk about the stability of code being related to whether future developers/maintainers are likely to change that code.
To demonstrate this, they performed a survey with a number of code snippets and the results were quite interesting.

There seemed to be a strong bias against one-true-brace style.
But a strong bias for embracing single statement if's.
There was a strong bias against using temporary variables.
There was a strong bias for adding parentheses to make operator precedence obvious.

plus 16 others.
The general trend seemed to be towards making code easier to comprehend, and more difficult to mis-comprehend.
They also look at some of the changes made to a large codebase over the years.
Although the slides on their own suffer from not being a transcript of the session, there are still some interesting points in there.
Answer: I studied under a professor who used entropy as a measure of the complexity of programs (our textbook was an older edition of this one, some of his pubs are here). There were a number of dissertations at FAU where this was one of the major measures, but the school's website has changed since I last looked, and I am unable to locate where the student thesis/dissertations are now located.
One such dissertation is Information Theory and Software Measurement.
Answer: If you want a definition that is "mathy" in the way entropy is, you might want to look at Kolmogorov complexity, which measures complexity by the minimum amount of code something could possibly be done in.  However, this is not complexity of code, but of what you are trying to do with the code.  But you might think it's relevant because you could theoretically compare a particular piece of code with the minimal one.  However, this is not presently a useful technique for measuring complexity of real world code.
Answer: I think this is not viable, one could argue that a well-written code base should have higher entropy (disorder).  Think to a code base where code snippet is repeated over and over, it can be compressed with high compression ratio because of repeating part(lower entropy/file size), however if you move the code to a separate function the compression ratio will be lower (higher entropy/file size).
So one may think, then I can calculate something like Entropy/CodeLines using the compression ratio as coefficient, to measure code quality, however this has the problem that total random input would look like the best code in the world wich is obviously not.
Indeed compression ratio is a good meter for measuring entropy of code, however both are not good meters for code quality.
Answer: Well, the term entropy does not only appear in thermodynamics and information theory, it also appears in the real world of data compression. In that context, the entropy that the compressor sees is equal to the number of bits it produces. (Note that I said "the entropy that the compressor sees", because what is considered entropy depends on the model the compressor uses to describe the input data. This is the reason why different compressors produce files of different size: What is entropy to the one is exploitable structure to the other.)
This can, in principle, be beautifully applied to source code complexity: "Just" write a compressor that only works on fully standard compliant source code, and which compresses it actually parsing it like a compiler would, producing the corresponding syntax tree. Then it can walk this syntax tree, and decide at each node which nodes would have been possible at each point, encoding that node with that knowledge.
So, for instance, if the language allows either an existing identifier, or something enclosed in parentheses, or a product at a specific point, the compressor would count the possible existing identifiers, taking the type information into account (say you have 3 such identifiers), and add 2 for the two possible subexpressions, giving 5 possibilities. So the node would be encoded with lb 5 = 2.32 bits. In the case of the two possible subexpressions, more bits would be needed to encode their contents.
This would indeed give a very accurate measure for the complexity of the code as it is. However, this measure is still useless! It's useless for the same reason that all code complexity measurements are useless: They fail do draw the connection between measured code complexity (whatever that may be) and the complexity of the problem that the code solves. You can always find ridiculously complex solutions to your programming problems to impress your employer with your LOC counts, but no code complexity measure will tell you that the task could have been solved with a fraction of the effort.
Answer: Code has exactly as much entropy as the number π.
Code maintenance and change may introduce entropy (because there's a possible state change involved).
But code is just a big number.  With a binary representation.
Comment: thinking that way couldn't you say all code has the same entropy when gzip'd?
Comment: @Gabriel: That's a different thing.  That entropy is the amount of noise among the bits when viewing that number as a sequence of bits.  Not viewing at as a single, static number.  Source code is a single static number, like 42.  Only with a lot more bits.
Comment: just curious, in this view do decimal 42 and binary 42 have equal entropy or is that comment saying that numbers don't have entropy, and thats the point of it?
Comment: "numbers don't have entropy".  They just are.  A representation, viewed as a stream of symbols may have entropy, but the number as a whole is just a number.


Patent in two different countries; two patents or one?

Question: One patent I have as inventor my institution issued first in Europe, and later in the United States; can I then say that I have two patents or just one?
Answer: If you have a patent in Europe and one in the United States, you do have two patents. That's how the patent system works.
Beyond that, the question just becomes what "can I then say" means. If you're speaking in the legal sense, it's more or less indisputable that you have two separate patents. On the other hand, if you're speaking in the marketing sense, that's a little more subjective. I would probably stick to saying "I have an invention patented in two countries," just since "I have two patents" is, while accurate, fairly misleading. Ultimately, it's just a matter of context. But I'd generally side on the more verbose, less misleading phrasing.
Comment: thanks for your insightful comment! I would like to know whether from the academic point of view, i.e., for the CV, it is counts twice too
Comment: @flow Again, "it counts" is subjective. If it were me, I would, as I said, probably go with "an invention patented in two jurisdictions." I imagine the last thing you want is for someone to read this, think you have two inventions, look you up, and think you lied or intentionally misled them.
Comment: I have a fair number of patents which were issued in the United States and other countries.  Because all of my patents started life in the US, I only ever give my US patent count.  What I say in my resume and elsewhere is "I have 40-something (I forget the number ...) patents issued in the US and elsewhere."  That's the most honest and shows that the patents were worth protecting outside the US patent system.


Going to men's mikva at night

Question: Is there any issue for men going to the mikva at night? The customary thing seems to be to go before davening in the morning, or in the afternoon on erev Shabbos or Yom Tov, or at dawn on leil Shavuos, etc. What about during actual nighttime?
Comment: The Mishna tells of Kohanim who would dip at night (Tamid 1). Not sure what the problem would be.
Comment: related info https://www.chabad.org/library/article_cdo/aid/3997062/jewish/Why-Men-Immerse-in-the-Mikvah-Every-Day.htm
Comment: @DoubleAA Maybe וקדשתו.
Comment: @Yez hmm? כי את לחם אלהיך הוא מקריב? What does that have to do with anything
Comment: @DoubleAA 'Twas a joke. My שיטה on how long Purim Torah season lasts is documented [here](https://judaism.stackexchange.com/a/66069/4794)
Answer: I'm unaware of any halacha that prohibits men from going to the mikvah at night (other than Yom Kippur and Tisha B'av.) I've occasionally seen men do this in my neighborhood.
However, practically, in many neighborhoods that have one mikvah or even a few, most of these are used by women for their tahara that ends niddah. So, of course, not only can't men go when women are there, but they really shouldn't even be roaming or "loitering" anywhere near the mikvah at night when women are there.
Ideally, places have dedicated men's only mikva'ot so going at night to these poses no problem. I recommend that before you go at night, inquire about the mikvah's night usage.
Incidentally, I have heard of some places that send men to "dunk" in the keilim mikvah - the one that's used for utensils. Apparently, this occurs somewhat more frequently than I imagined. The keilim mikvah tends to be ice cold and, honestly, not only would I not want to dunk my body in the keilim mikvah but, I wouldn't want to dunk my kli in that mikvah afterwards. So, somewhat aside, but, perhaps, relevant - anyone that thinks of going to a "men's mikvah" should ask about this. It's not always obvious if you're unfamiliar with the mikvah setup of that place, and, unfortunately, many places aren't volunteering this info.
Comment: There are some men's mikvos that I know about which are open in the morning for the public, and then is available by key to members only.
Comment: @DanF Since the Yetzer Hara works internationally, the problem is worldwide. I'm glad that you were sheltered from this reality.
Comment: Most men's mikvaos that I'm familiar with, have a policy of being open only from early to late mornings. Otherwise it can become a hangout for sleazy characters.
Comment: @IsraelReader It's unfortunate that we have to hear even a smidgen of something like that. While I certainly understand how hard and costly it is to build and maintain a mikvah, in larger communities where they can afford it, I don't think that there should ever be a combo mens / women's mikvah. And one layer of protection should be that all women's mikva'ot should be gated and locked at all times and only members should have a key. A guard and a few escorts would also help things even more.
Comment: I agree with your comments about combo mikvas, and the preference for a separate all woman's mikva, and appropriate security. My comment was directed exclusively to men's mikvas, addressing an unfortunate reality that there perverts and deviants who take advantage of the fact that the mikva is open at unusual hours, and there is little other traffic to prevent them from doing inappropriate things there.
Comment: @IsraelReader Oy. I hadn't even considered that. That's even worse. This happens in Israel?
Comment: @user218076 That seems to be a balanced approach, and hopefully keys are only given to TRUSTED members.
Answer: As stated by others -- primarily it's about giving the women their own space and time.
But furthermore -- the primary halachic grounding for men going to mikva today is the enactment of Ezra against studying Torah after a seminal emission without first going to mikvah. If someone followed that, it would make sense for them to go to mikvah in the morning, before studying Torah.
But supposing that a man (and his wife) were on a nocturnal schedule and thus he wakes up at 9pm and wants to study Torah now, then yes following this logic that would be the time to go to mikvah.

Going to men's mikva at night


Terminal command to get all of a file's metadata?

Question: Is there any way to get all of the metadata associated with a file in Terminal? By "metadata" I mean things metadata and properties that are not stored in nor derived from the file's contents (i.e., checksum, UTD, image resolution, etc.), but rather reside in the filesystem's data about the file (i.e., last time changed, inode, permissions, extended attributes, etc.).
Comment: Check out the 'stat' command, and 'mdls' for spotlight metadata. 'ls' also has '-e' and '-@' options that give more info when used with the '-l' option.
Answer: This response might be late, but hopefully it will help someone.
There are numerous ways to view metadata in the terminal on an Apple computer:

mdls path/file.extension

mdls stands for Metadata List and you can look at the man pages (man mdls) to learn how to use it.

xattr path/file.extension

xattr stands for Extended Attributes. This can be used to display and edit extended attributes of files.
xattr -l path/file.extension causes the attribute names and values to be displayed. However, I've noticed that, at least on macOS, it seems that this only displays user-added data.

ls -l@ path/file.extension

ls is a powerful terminal listing utility. In its simplest form it lists the current directory contents. However, as you can see here you can list more than that.

exiftool path/file.extension

You need to install exiftool separately if you haven't already.  For example, if you use brew, you can do brew install exiftool.
exiftool is a useful utility for viewing and messing around with file metadata.

sips -g all path/file.extension (for images)

sips and identify are both for reading image metadata/info.

identify -verbose path/file.extension (for images)

Depending on your desired application, one of these might be more appropriate or convenient than the others. However, it should be noted that these all show different things, even if slightly.
Comment:  This answer is \*chef's kiss\* perfect. Thank you, exactly what I was looking for, and more!
Answer: I mean, ls can give you a lot of information with the -l flag
email@example.com:~# ls -l .bashrc
total 6980
-rw-r-----. 1 user   user    14499 Jan  6 17:59 .bashrc

There is your last touched, owner, group, and permissions; then there is md5sum for that:
firstname.lastname@example.com:~# md5sum .bashrc
2aa4f74675fa647d23d3dbbe31e9c4d1  .bash_history

Comment: adding a `-i` flag to the ls invocation will print inode information as well


Burninate [stock]

Question: The stock tag currently has no wiki and only 258 questions, most of them with negative votes. Nearly all of them are about stock market apps or similar subjects, which is not really on-topic and doesn't add anything useful to any of these questions. How is such a tag useful?
Comment: Just found this on my way to post my own burninate request.  Yes, this tag should go.
Comment: @Makoto it popped up again [here](http://stackoverflow.com/questions/41275788/investing-in-microsoft-stocks). If this is hard to get rid off, maybe make stock a synonym of stocks, so we only have 2 problems: stocks and stockquotes?
Answer: I think that there is a reason to keep around some kind of tag for working with stocks.  Stocks are a specialized kind of data with their own related set of tasks.
As such, I propose that we get rid of stock (251) and stocks (221) in favor of stockquotes (126).  Also, unrelated usages of the tag should be burned.

Questions about working with stock quotes, TAG stockquotes
Questions about product stock/inventory, BURN

We will also need a tag wiki for stockquotes that explains proper usage.
Comment: It is more important that the tag is discoverable and understandable, rather than precisely descriptive.  Particularly since this subject doesn't attract a lot of questions in our community.
Comment: I like "financemarkets" or something like "financemodelling" so that it is clear that we welcome questions about algorithms and datastructures and not about the the markets or stocks themselves.
Comment: A problem with using "stockquotes" or anything with the word "stock" is that it technically excludes other types of equities such as futures and ETFs. I feel like a tag with a more universal name would be better, but I'm not sure what that could be.
Comment: @AlliterativeAlice The more-accurate term you're looking for I believe would be [tag:financialmarkets] _([Wikipedia - Financial Market](https://en.wikipedia.org/wiki/Financial_market))_.  As for @JasonMArcher's concern, "stock" may be a recognizable term to those outside of the field, but "financial" and "markets" will likely both land more hits coming from those who do this for a living.  _It's a bit like using the term "PCs" with laymen, where experts are going to be searching for "computers" or "laptops"._
Comment: I'm not really convinced "stockquotes" is better than "stocks" here.
Comment: That seems reasonable, [tag:stockquotes] sounds specific enough.
Comment: @SamuelEdwinWard I think an argument could be made that "stocks" is clear enough.  "Stock" is overloaded though.  "financial" and "market" are also too broad.
Comment: Why not use a tag such as "tickersymbol" which does not already exist? Even a simple web search shows that this is used by a number of financial entities for searches within their platform  By using this tag, "Stocks, Mutual Funds, ETFs, Indices and Futures" and any other financial instrument under these can be tagged using the exact same tag while being descriptive of the purpose of each. In fact, even financial bonds have a "tickersymbol". Lastly, some of these negative rated questions are double tagged "inventory" and "stock" (or even just "stock") when only the former applies.
Comment: @ArtB There is already a [`finance`](http://stackoverflow.com/questions/tagged/finance) tag for questions about financial math/operations.  That probably needs improvement as well, but it is another subject.
Answer: Too long for a comment, so forced into "answer":

I think that there is a reason to keep around some kind of tag for working with stocks. Stocks are a specialized kind of data with their own related set of tasks.

I agree with the general sentiment of this, but also agree with:

A problem with using "stockquotes" or anything with the word "stock" is that it technically excludes other types of equities such as futures and ETFs. I feel like a tag with a more universal name would be better, but I'm not sure what that could be.

What about financial instrument (or even tradable instrument)?  Commodities, equity/commodity options, indices, various other derivatives, have many of the same types of development concerns (scale, precision, representation, rounding error, etc.), but are not limited to "stock" issues.

Why not use a tag such as "tickersymbol" which does not already exist?

I think tickersymbol might be too narrow because many financial products exist (and are instruments that have calculable valuation/risk/etc.), that have no "ticker symbol" (as generally understood) e.g. CDO tranches, prop-shop-specific custom bundles, etc.
Comment: If `tickersymbol` is too narrow, please do keep in mind that it is more broad than `stock`, `stocks`, and `stockquotes` as **tickersymbol** can be used to describe anything traded/valued on an **exchange** such as the NASDAQ, NYSE, TSX & others. The potential challenge with using `financial instrument` or `tradable instrument` is the tag could be too broad and may not be easy for users to find without a very thorough wiki description. I don't believe we will easily have a one-size-fits-all for these financial items/instruments into 1 tag & it still comes down to the overall purpose of the tag.

Burninate [stock]


How can one create package for ClearQuest?

Question: I am modifying ClearQuest database schema and I wonder is there a way to create a package for future deployment. If there isn't what are best practices for tracking and deployment of schema modifications?
Answer: In your CQ installation path, look for this "cqload" tool.
basically...

cqoload exportintegration - Exports specific schame versions into a text
file
cqload importintegration - Imports the exported text file into a CQ
schema

What is common practice is you at least have 2 CQ environments, a Dev/QA env, and a Production env. Developers work on the Dev/QA environments (checkout/modify/checkin) until they are happy, QA verified the changes in the same environment. Then the implementor will use cqload commands to transfer the changes to the production environment.
Personally I think this workflow is retarded, as it requires so many manual process and it doesnt work properly if you have additional "Packages" upgrade or installation within CQ, e.g. UCM package, etc. Unfortunately I dont think this is gonna change anytime.


Count of features in a polygon

Question: I have a polyline layer has a unique text field that identifies a path.   I have made a union with a separate 1km lattice grid.  I am needing a way to get a "count" of the number of uniquely identified paths that fall within each 1km grid spacing.  Is there a tool in ArcGIS (of note I have an ArcInfo license) to do this?
Answer: I would use the Summary Statistics Tool ( in Analysis Tools - Statistics).  From here - the statistics field would be the URL field name - with the Statistics Type as COUNT and the add the case field as the Lattice grid ID.
Answer: Well, I would personally do this in two steps.  I would take your line layer and dissolve based on the unique path ID so you have each unique path as one feature (enable multi-part features if necessary so each path is just one feature in the output line layer).  Then, take that output line layer and use the spatial join tool to spatially join it with your grid polygons feature class.  You'd use the grid as the target and line as the join feature.  You'd want to use JOIN_ONE_TO_ONE for the Join Operation.  Then in the field mapping options for the spatial join tool you'd want to use the merge rules (the COUNT rule would probably be what you're wanting) on the line's unique ID or OID field so that the output has the number of lines.  Match option and search radius you should be able to leave at default unless you have unique circumstance you're not describing in the question above.  The resulting output should be the grid feature class with a "count" attribute giving the number of lines that intersect each polygon.  NOTE: using the default Intersect match option on the spatial join tool will double count lines if the same line intersects multiple grids (it'll count the line for all grids it intersects).  Hope that helps, if you need clarification on what I mean, let me know.

Count of features in a polygon


Feature request: Math Jax autoNumber:AMS option

Question: I'd like to be able to auto-number equations and label them so i can refer to them in the text. Math Jax provides a built-in way to do this by setting the autoNumber option to AMS. I realize that by adding this option to the universal template, existing code will be affected in such a way that some equations will get unduly auto-numbered. Is there any way to allow individual users to specify this option for their posts, either once and for all, or on a per-post level? If not, what is the recommended way to number equations and refer to them?
Answer: You can use something like this
$$
\sum_{k=1}^\infty\frac1{k^2}=\frac{\pi^2}{6}\tag{1}\label{mylabel}
$$
and refer to it like $\eqref{mylabel}$
This can also be used in a normal link
Caveat: I believe that these labels need to be unique within a question.
Comment: I'd guess the OP also meant the number will be auto generated.
Comment: @Royi: yes, but "If not, what is the recommended way to number equations and refer to them?"
Comment: Is it impossible to get auto numbering in MathJaX?
Comment: @Royi: as far as I know (which doesn't mean "yes"). However, auto-numbering is usually set up before `\begin{document}`  and MathJax seems to be encapsulated inside a `\begin{document}...\end{document}` environment.


Are Yajuj and Majuj (Gog Magog) humans?

Question: Are Yajuj Majuj part of the human race or are they different creatures? Same question about Dajjal.
Answer: There are 2 verses in the Qur'an mentions about Gog Magog.

They said, "O Dhul-Qarnayn, indeed Gog and Magog are [great] corrupters in the land. So may we assign for you an expenditure that you might make between us and them a barrier?" (Surat Al-Kahf 18/94)
Until when [the dam of] Gog and Magog has been opened and they, from every elevation, descend. (Surat Al-'Anbya' 21/96)

We can't say anything about their humanity from these verses, but probably they are humans, because I never heard of a non-human intelligent creature apart from angels and djinns. I assumed that they are intelligent (at least more than animals) because of the corruption they made. They can't be angels because of the angels's nature. They might be djinns or humans.
About Dajjal, there are no verses for him/it. It is a very controversial topic. Some scholars say he is a human, some says he is not a living thing, and some says he is completely made up. Here are some hadith about the topic. Some people believe that Dajjal is not actually a human, but a source of greatest fitnah ever and accuse television, internet etc. Some scholars believe if it was real, it would have mentioned in The Qur'an. And they believe that all the hadith about Dajjal are completely made up.
So, Dajjal is a very controversial topic.
Answer: Salam
actually I wanted to comment on Kalahari's post, but I can't since my reputation is below 50 ^______^

According to some hadiths they are human. According to some other hadiths, they are not human but some sort of animals which are kept underground and will be released before the arrival of Jesus. It seems that they will mainly attack western lands and Jesus will fight them and drown them in some sea.
Comment: Wa alaikum salaam. I heard so much hadith about Dajjal, Gog-Magog, the return of Jesus(puh), Mahdi and mainly about The Signs of The Apocalypse. There are so much of them contradicting each other, I chose for now to be skeptical about them. Quran doesn't contain much about Gog-Magog and Signs of Apocalypse, and never mentions about Mahdi, Dajjal and the return of Jesus(puh), except [Surat An-Nisa' 4/159](http://quran.com/4/159). I am not sure what this verse says. I am going to ask about it in this site.
Answer: according to Al-Nawawi, Yajuj Majuj and Dajjal are a human
Answer: Selam Aleykum,
Of course none but Allah know what Gog and Magog really are.  Coming from an Information technology and electrical engineering background, I would like to present my theory on what Gog and Magog (ref G&M) might be.
As the previous answers have eluded, there was a wall built to keep G&M out but what I found interesting from the standpoint of answering the question is the material this wall was composed of; iron and copper.
If we take iron to be a metaphor for magnetism and copper to symbolize electricity, we combine the two metaphors to symbolize electromagnetism.  So with my background, I interpret the Quran as saying there are certain beings that will cause trouble for mankind but they can only come into existence at some time in the future when the electronic or electromagnetic technology to make them possible comes to fruition.
Noah Hariri in his best selling book "A history of the future" talks about a troubling trend where computer algorithms are replacing humans in many sectors of the economy particularly the online economy.  Humans are really starting to become obsolete.
So we already see this trend where droids, robots, and software algorithms are taking over. If these droids ever start developing their own consciousness and listen to the whispers of the jinn or sheytan, we can at that threshold say that they are indeed G&M and will take over the earth as they will be much more intelligent and infallible than humans.  Then only through Allah's mercy will there come a savior (return of Jesus, Mahdi ) to subdue G&M and bring Sharia to the whole earth.
Answer: I know the Quran Does not say about the nature of Yajuj majuj

Are Yajuj and Majuj (Gog Magog) humans?


Can we have a list of most viewed questions?

Question: one day I was asking my self what are the most read/seen question on askUbunt.com ? So how about we have a featured list of the top viewed questions. This would also benefit other new Ubuntu users. For example, I was lucky enough to find this question How can I improve Ubuntu overall system performance? I was checking the askUbuntu and suddenly saw this question which is really useful. Now am thinking, there are many other useful questions like this one but it is really hard to find. So with a featured list of the most viewed, most answered , or stuff like that it would make it easier for Ubuntu users to learn the hidden and beautiful tricks/tweaks to configure Ubunutu.
Comment: Are you looking for questions with [most votes](http://askubuntu.com/questions?sort=votes)?
Comment: I was looking for most viewed. @SantoshKumar but the highest voted is also nice. Thank you
Answer: Ask and you shall receive
Comment: Works for me, chrome, firefox, anon mode, different pcs and networks
Comment: Just tried this and after clicking the 'Run query' button all I get is `{"captcha":true}` on the page, nothing else. Firefox + NoScript (but stackexchange.com is whitelisted). Is it working for others?
Comment: Strange, it didn't work until I temporarily white-listed microsoft.com in NoScript. Never mind that though, well-done and it's an interesting list.
Comment: Yup its working. But you see. Am not expert like you. and many new Ubuntu users do not know how to find these qesutions. So there should be an easier method. just Like this one. http://askubuntu.com/questions?sort=votes
Comment: @Suhaib That really isn't that helpful based on this Q&A: http://meta.askubuntu.com/questions/4070/would-adding-a-beginners-section-to-this-site-make-it-easier-to-use/4071#4071
Answer: If you're looking for awesomeness sometimes it's not just about views:

https://askubuntu.com/questions/greatest-hits
Comment: Thanks that's what I was looking for, I know awesomeness is not about views. but i want to see what people are looking for the most.
Comment: and as Stepahn mentioned below in the comment. visitors want to know these questions. So featuring them would make it easier for new Ubuntu users to find. :)
Answer: Most viewed is not necessarily the same as most useful
However, Most upvoted does indicate that the question is useful.
Hence, I don't see any great use in making a most-viewed list, but may be that's just me.
Comment: I disagree with your thoughts.  Both "Most viewed" and "most upvoted" have a role to play.  When you consider  there are a signicant number of users who are Not members (but visitors) to AU who cannot vote but use the site as a source of information.  Someone once told me that members only account for about 10 -15% of the sites visitors. #Views is a good indication about what visitors wnat to to know about Ubuntu.  e.g. One of my questions has over 50k views but only 40 upvotes.  It helped 40 members (AU contributors) but you cannot analyse how many it actually helped.
Comment: Agreed. Most viewed may be used as an indication of what the community wants.
Comment: I know it might not be useful to me. But there is a reason why its getting high views ! as @StephenMyall mentioned in the comment


What gear is necessary to start vocal recording?

Question: I'm planning to involve myself in music recording, and I'm starting with the voice. Hopefully once I get more experience I'll also record instruments.
For a starter, what gear is needed?
Answer: All you need is:

Computer (PC or Mac is ok.)
Multi-channel recording and editing software (Audacity, Reaper, Cubase, Garageband, Logic...etc.)
External USB sound card with 48V phantom power
(Firewire is extinct. Don't buy anything with Firewire.)
(Be sure that it has 48V phantom power. There are fake marketing products with useless 15V phantom power.)
Condenser microphone (Condenser vocal mics are pretty sufficient for recording also acoustic instruments.)
Microphone stand with boom extension (Mini table top stands can be difficult for recording stand-up vocals and instruments
XLR cable

Optional:

Pop filter. (To prevent pop and breath sounds when recording vocals.)
3.5mm audio cable (For recording powered instruments with line-out.)
Another 3.5mm audio cable (For recording a stereo instrument like a keyboard.)
Backup cables (Cables are fragile, ending a productive recording session is really bad.)
Acoustic foam (For room treatment.)
(Pillows, curtains, wardrobes and similar material are also useful for room treatment. I use a table top recording booth made from big ground pillows.)
Answer: At the most basic, all you need is a mic, a cable, a recorder and a quiet space.  There isn't really a "most optimal", just a range of costs and qualities.
The most common set of gear for studio vocal recording would be to get a decent large diaphragm studio condenser mic, an XLR cable to hook it up, an ASIO audio interface (making sure it has phantom power for your condenser mic), a computer to run the system, a DAW software package (there are several free ones available to get you started) and a decent set of headphones or studio monitors to listen to your work on while working with it.
When you set it all up, make sure you setup the computer in a different room from the recording or use a computer that can cool itself without using fans that will be picked up on the recording.  You also may very well want headphones to listen to what you have recorded while laying down additional tracks, but a set of studio monitors in the control room (where the PC is) so that you can listen to how it sounds played in a room when editing.
It may additionally be useful to get a small digital mixer as an alternative to the ASIO interface as that allows for some amount of mixing to be done from a control surface rather than relying entirely on software controls in the DAW, but this raises the cost quite a bit (possibly doubles it if you are on the cheaper end of gear).
Answer: Well for a starter kit, this is a really good deal: http://www.amazon.com/Focusrite-Scarlett-Studio-Interface-Recording/dp/B00AW91CPG/ref=sr_1_7?ie=UTF8&qid=1421127987&sr=8-7&keywords=focusrite


Please explain "I Am America (And So Can You!)"

Question: As a non-native speaker, I found Stephen Colbert's book title I Am America (And So Can You!) a little hard to dissect. Why so can you? Why isn't it So Are You? What's the full phrase that And So Can You implies?
Comment: It's going to be difficult to come up with a single best answer to this question, but +1 for a good example of an -- I assume -- intentionally malformed title.
Comment: I asked about [what exactly makes this title ungrammatical](http://linguistics.stackexchange.com/questions/1979/why-exactly-is-i-am-america-and-so-can-you-ungrammatical), on Linguistics.
Answer: It's a play on titles from self help programs which utilize ellipsis. For example

I lost 20 pounds in 4 days, and so can you.

This is a kind of strange ellipsis, because just tacking on "[lose 20 pounds in 4 days]" doesn't really create a grammatical sentence, but it's something like that. The ellipsis would be clearer if the sentences were

I lost 20 pounds in 4 days, and you can [lose 20 pounds in 4 days] too.
I am America, and you can [be America] too.

And the ellipsis is not so great with "to be", either. Here's some discussion from Language Log:
http://itre.cis.upenn.edu/~myl/languagelog/archives/004522.html
Comment: @JK2 That would be known as *the joke*.
Comment: I had my own answer on this before, but I deleted it because you've convinced me that this is what Stephen was going for with his title.
Comment: Are you suggesting that it is ungrammatical to say "I lost 20 pounds, and so can you."?
Comment: And isn't "I am America, and you can be too" much better than "I am America, and you can too"? It seems to me that the latter is almost ungrammatical.
Answer: It follows the form

I <verb> <rest of predicate>, and so can you!

For example, in

I use computers, and so can you!

the "...so can you" means "you can use computers, too."  The part where it becomes confusing, and funny, is that the verb is not an action verb, but "am."  So "...so can you" means "You can be America too" in this case.
Answer: It's a satirical joke. The title is deliberately confusing, that's the whole point.
Answer: I always took "I Am America" to be hubris inflated for comic effect, and the "(And So Can You!)" part to be a backhanded slash at Americans who can't even speak their own language good.
Answer: It's a joke on mistakes made with the English language by foreign countries.  If you look at the book there are many more jokes about the book being printed in some Asian country and it seems to make fun of engrish type mistakes.


Why my mead is sparkling?

Question: I just tasted my mead after 3 months of brewing and now it tastes ok, but it is sparkling, like champagne. It also tastes a little like it. Actually, i never tasted mead before so i don't know hot it is, i just thought it would be smoother.
Why did it happened? Is there something to help it?
Answer: That sparkle is carbon dioxide (CO2), one of yeast's main fermentation byproducts. It occurs in all fermentations (beer, wine, mead etc.) and residual amounts will linger in the beverage for many months after fermentation is done. Beer and champagne makers go to lengths to create and capture CO2 in solution for its characteristic sparkle, while wine makers often forcibly remove it by degassing, especially in wines that won't be aged long enough for it to dissipate on its own. For mead it depends entirely on how you want to serve it, with some preferring it still and others preferring it sparkling.
If you want to degas, here are a few existing questions on the subject:
How to get rid of gas from mead?
How can I tell when wine has finished degassing?
Degassing wine - how to proceed
Answer: There is always some CO2 in a fermenting liquid. Unless you have had recent changes in temperature or pressure, the amount of CO2 will be right at the saturation point, so that a little agitation will cause bubbles to appear.
Comment: So you mean the bubbles will only stop when fermenting is done?
Comment: Mead tends to ferment slowly, for along time, depending on how happy the yeast are. So CO2 could be produced for a long time. After that, try the things in the links Franklin posted.
Answer: That is from BJCG, Instructions to Mead Guidelines about carbonation
That is from BJCP STYLE GUIDELINES 2008 edition

A mead may be still, petillant, or sparkling. Still meads do not have
  to be totally flat; they can have some very light bubbles. Petillant
  meads are "lightly sparkling" and can have a moderate, noticeable
  amount of carbonation.

Next version of BJCP STYLE GUIDELINES 2014 Draft, which should be released sometime this March (or this year) adds.

Minor differences from stated carbonation level should not be a
  heavily-penalized or disqualifying fault.

So, it's okay. I have made 3 standard size (5-gallon) and 8 small (1-gallon) of mead. Only traditional semisweet mead (both times) had light carbonation, but it didn't cause any issues with the mead itself.

Why my mead is sparkling?


Textbooks on modern optimization (on machine learning) with exercises

Question: I know Boyd's famous Convex Optimization, but for me it's a little bit old because it was written in 2003 and some progresses have been made during this decade. The book Optimization for Machine Learning fill the gap nicely but it's not a textbook: the chapters are independent, and it doesn't have exercises. So any recommendations for textbooks on modern optimization? Thanks.
Answer: "Convex Optimization" is a good book. The first part covers mathematical formulations of optimization methods and concentrates on theoretical aspects of methods. The second part mentions in details algorithmic aspects.
You can also refer to "Nonlinear Programming" by Dimitri P. Bertsekas and it has assignments too. This is a great book for anyone who wants to deepen into the details.


In Texas holdem, how should my betting change as my stack of chips changes?

Question: In tournament style Texas hold-em, how should the amount of chips I have left affect my play?  Should I become more conservative as my stack declines and more risky as my stack grows?  Does my position relative to the blinds affect this?  Should I avoid playing low probability high value hands as my stack dwindles or do the opposite?  Should the ratio of my chips to the current pot size also come into play?
Comment: I think this is an example of a good question.  the question is not complex, but the answers can get very deep.  My answer touched on only the very basics of this issue, but there is much more room for discussion.
Answer: Ratio of chips to current pot size always to me play, when you want look poker odds calculator software that will calculate that for you.
About chips what you have in stack this depends:

when you play tournament then this matter, depends how much your stack is to blind sized you play more open. For calculate that you have Harrington M and SNG PokerStategy Phase statistics, on that values you can range some actions.

SNG PokerStrategy Phase this is defined by:

stack size more than 24 blinds - you play in early style, wait for strong hands.
stack size more than 12 blinds - you play middle style, trying to play middle hands, showing more aggression.
stack size less than 12 blinds - you play late style, push or fold, depends on ICM.

Harrington M is described and defined by:
M you can calculate from formula: M = (stack size)/(small blind + big blind + ante)
is other way to calculate M too and this taking care about players on table, this is named Effective M and you can calculate than using EffM = M * (players on table) / 10

Green Zone when (M >= 20), Play tight, don't take needless risk, wait for other players to eliminate each other, play only with best hands.
Yellow Zone when (M >= 10), Play more open, your good position slowly changes into not so good, blinds have more meaning for the number of your chips than in Green zone look after opportunity for Blinds Stealing.
Orange Zone when (M >= 6), Play aggressive, to stay in tournament, this is a good time to take risk. Your stack is not yet too small for recapture
Red Zone when (M < 6), All-in in the first hand as the first one is a good solution, it will surprise your opponents, and maximize the chance for them to Fold.
Death Zone when (M < 1), in the best case scenario, you've chips only for one Dealer turnover at the table.
Answer: The higher the blinds/antes in relation to your stack, the more desperate you need to be to get (and keep) chips.
That first manifests when you reach a point that you should stop playing speculative hands. The risk/reward payoff for set-mining and searching a multi-way pot with a suited connector shifts to be too expensive. For me, that happens somewhere in the 40-50BB range.
Next, you begin to have a real need to up your aggression to take down pots and steal blinds. This often means playing more hands in position. It definitely means sticking entirely to a raise-or-fold gameplay. You want to start this type of adjustment while you still have enough chips to make your opponents fold. Often, you can make a significant profit from 3-bet shoving against aggressive opponents with hands that might otherwise be too marginal to continue with (e.g. AJs). I tend to enter this stage in the 20-30BB range.
Finally, you reach the point where you have to fight tooth and nail to avoid blinding out. You will take risks that would otherwise be poor plays, and you will make gambles. You should tend to shove preflop every hand that you play unless you have very specific reasons not to do so. Note that you will still play fewer hands in early position than in late position, but the range of hands that you will play begins to grow. I tend to enter this stage in the 10-15BB range, and I am still pretty selective about my early and mid position hands. With each orbit around the table that passes without adding chips to my stack, I become less selective.
Comment: I would say it gets a little more complicated the closer to the bubble you get.  You might want to back off a seemingly premium short-stack hand if it might mean that you get popped out before the bubble.  It also depends on how much action you have in front of you when faced with a short-stack premium hand (like A-10s or KQo).  You want to maximize your chances by having as few opponents in the hand - preferably being heads-up.
Answer: If you are short-stacked, you should be picking and choosing which hands you are in much more carefully.  You will not have the bankroll to intimidate other players, and you can count on table leaders to make you pay dearly for just about every hand you want to participate in.  Stick with hands where you can expect to be in a good position pre-flop.  If you get really short stacked, you want to look for some pre-flop all-in opportunities to help you get back in the game (or put you out of your misery!).
If you are ahead at the table, then you should be making bigger bets to put pressure on your opponents.  This doesn't mean you should play lots of hands you wouldn't have played earlier in the tournament, just that the size of your bets should increase.  If you've got a chip advantage, stealing small pots will help increase the distance.
Answer: As a tournament progresses, the blinds increase.  The effect this has is to decrease the effective stack sizes for every player with respect to the size of the blinds.  As your stack size decreases, you have fewer opportunities to correctly play speculative positions.  This is true regardless of format -- whether in a tournament or in a cash game, the shorter you are, the less you can profitably draw and bluff.
Consider a board of As 7h 2h 5c, where you have Kh Qh.  You have no chance for a straight, and you're opponent (you somehow "know") has an Ace.  So, you are drawing to the nut flush.  The pot is $100, and then your opponent bets $100.  You are getting 2:1 on a $100 call.  Are you correct to call?
Naturally, the answer is "it depends" -- in this case, on primarily Implied Odds.  You're getting 2:1 on a 5:1 dog.  In order for this call to be profitable, you would need to win at least an additional $250 at the end when you do make your flush.  Can you do it?
Again it depends, and again, on primarily 2 considerations: 1) If you get there, will your opponent pay off $250 more?  2) Do you have enough in your stack to bet $250 more?
In a tournament, the answer to #2 is very often "no."  Tournaments generally never play deep enough for these kinds of considerations to come in to play.  In cash games they often do, but it all depends on the size of your (and your opponent's) stack.  If you're to shallow to ever bet the $250, then your too shallow for this play to ever be profitable.


What happens if I delete a profile in apparmor

Question: I would like to what happens a program if the apparmor profile associated with it is deleted.  Would it run as if it had unconstrained access?
Answer: It would run as if it had unconfigured access. Meaning, it would use whatever defaults are set for your system. If you plan on doing that, I would highly suggest making a backup though... Those are there for a reason.


SqlBulkCopy - Useful on smaller datasets (ie 1000 rows)?

Question: Before I go to the trouble of implementing SqlBulkCopy and performance test it, I was wondering if anyone had any guidance on when it should be used and if it is preferable to use even on relatively small data sets (1000 or so rows). Is there any overhead to using it in this situation or should I always use it when inserting a reasonable number of rows?
Answer: I probably would use it for 1000 rows, but you can do something similar with command-batching.
Note that with 1000 rows, the simplest approach is probably to throw the data you want into a DataTable of the correct shape, which is pretty trivial. For larger sets, writing a bespoke IDataReader (to stream the records, rather than buffer them all in memory first) is my preferred option.
The other thing to watch is transactions, durability, etc; when using SqlBulkCopy I tend to use this to push into a staging table, and then call a sproc (or just a simple TSQL command) to push the data over to the real table. This keeps the real table clean except for a single set-based (and fully logged) INSERT.
But if you just want to measure the performance, throwing it into the real table should do to get a ballpark estimate.
Answer: SqlBulkCopy does not write in the transaction logs, making it faster than inserting each row manually.
Even for 1000 rows, there should be a speed gain, especially if it's a highly accessed operation, such as from a web application.


How can I morph a flat plane to be a flat cirlce?

Question: So I'm making a 2d animation in blender, using the z space as layers, and the camera is in orthographic view.
I'm trying to morph a square plane to be a flat circle, but I have no idea how to even approach it.
Comment: Start with a circle, it is easier to go from a circle to a square than the other way. You can then reverse the keyframes
Comment: How would I go about morphing the circle to a square?
Answer: The easiest way, in my opinion, is to use the 'Cast' modifier. Using a subdivided plane you can cast/warp an object from one shape, to another, preset shape:

Animating the 'Factor' allows you to switch between the original shape and the 'cast' shape.
Comment: Oh my gosh! These answers are amazing! Thank you guys for your quick responses, and I love your videos, Ray Mairlot, btw.
Comment: + 1 for not applying any modifiers
Answer: Add a cube to your scene, enter edit mode, and delete the top and bottom faces. Select all and press Ctrl+N and check the Inside checkbox in the Tools menu.

Now add a circle and add a Shrinkwrap modifier to it. Select the cube as the Target and set the mode to Project. Now press the Apply as Shape Key option.

You can now go to the Object Data panel and change the influence of your new shapekey. You can also animate it by hovering and pressing I. To go from a square to a circle, sart with an influence of 1 and then animate it going to 0. You can also delete the cube mesh now, it is not needed for the animation to work.
Final Result:
Comment: This one wins for flexibility as you could make any shape as a target.
Answer: Mapping a disc to a square

Journal of Computer Graphics Techniques Vol. 5, No. 2, 2016 http://jcgt.org. Mappings between Sphere, Disc, and Square. Martin Lambers.  outlines a number of disc to square, and square to disc mappings

One of which is the elliptical square to disc mapping
$$\begin{align}
u =  x\sqrt(1 - y^2/2)\\
v =  y\sqrt(1 - x^2/2)\\
\end{align}$$
Test script that adds a 16 x 16 grid (basis "square" shapekey) and it's elliptical  mapping as a shapekey "circle"
import bpy
import bmesh
from math import sqrt
from bpy import context
collection = context.collection
me = bpy.data.meshes.new("Squircle")
obj = bpy.data.objects.new("Squircle", me)

bm = bmesh.new()
bmesh.ops.create_grid(bm, x_segments=16, y_segments=16, size=1)
def squircle(x, y):
    u = x * sqrt(1 - y * y / 2)
    v = y * sqrt(1 - x * x / 2)
    return u, v

bm.to_mesh(me)
sk = obj.shape_key_add(name="Square")
ci = obj.shape_key_add(name="Circle")
for v in bm.verts:
    ci.data[v.index].co.xy = squircle(*v.co.xy)
collection.objects.link(obj)

Test on all mappings. Elliptic mapping above is row 1 column 4.
Comment: Many thanks, I've been searching for this for ages (to use with the node Animation nodes plugin and scatter random vectors on a circle / tube)
Answer: If all you need is a shape you can use the To Sphere tool.
Add a plane, subdivide it and press ShiftAlt
S

To animate create a shape key for the square part and a second shape key for the circle and animate the value for the second shape key.
Shape keys are created in object mode.
Comment: And just when the hopes were highest that nobody had mentioned the old to Sphere, Well remembered.
Answer: Same as the answer of Ray Mairlot, but with shrinkwrap (as Cast modifier can go too far and make it like a clover). NᴏᴠɪᴄᴇIɴDɪsɢᴜɪsᴇ pointed it out, but here's a way to do it in less steps.

New plane
New circle
Extrude and fill the hole of the circle.
Subdivide plane by 10
Add modifier Shrinkwrap to plane
Set the target of the Shrinkwrap to be the circle
Apply as shape key
done
Answer: Another non destructive way of doing this is using a subdivision modifier.

Add plane
Add a Subdivision surface Modifier
Switch the Subdivision algorithm from Catmull-Clark to Simple
Add Cast Modifier
Use factor to liking (1.00 means a complete circle)


Tips for golfing in Sesos

Question: If you have any tips regarding golfing in Sesos, a language made by Dennis, and nobody else has covered them yet, please post them here! Only one tip is allowed per answer. Your tip should be at least somewhat specific to Sesos itself, and not just brainfuck. If your tip is relevant to brainfuck in general, you should post it here instead.
Answer: What's different in Sesos?
Golfing in Sesos is similar to golfing in brainfuck in that it has limited control flow, and that you have to grapple with the specifics of memory layout.
However, this does not mean you should write brainfuck code first and then translate it instruction-by-instruction to Sesos!
Here are some things that are different:

You barely pay for repeated commands. For example, add 1 is a 1-byte Sesos program. add 100 is a 3-byte Sesos program. add 1000 is still a 3-byte Sesos program. This means that things that would have been prohibitively expensive in brainfuck (e.g. ++++++++++) are fine in Sesos.
Unless you have set mask on, cells are not 8-bit unsigned integers—they are signed bignums. This means that you can do things like store an offset into an array as a cell without having to worry about the possibility of the array being more than 256 elements and causing overflow.
Control flow is a bit more flexible: you have do-while loops that are guaranteed to execute at least once (with the use of nop). You also have jne, which is the equivalent of ,] in a single instruction.
Answer: Omit what you can
In Sesos, you can omit some instructions, specifically:

You can omit a jmp instruction at the start of the program, if its corresponding exit point is not omitted.
You can omit a jnz instruction at the end of the program, if its corresponding entry point is not omitted.

This example program prints numbers from 10 to 1:
set numout
add 10
jmp
    sub 1
    put
jnz

However, we can reduce the SBIN file's size by a triad, therefore potentially reducing it by 1 byte, by removing the jnz:
set numout
add 10
jmp
    sub 1
    put

Tips for golfing in Sesos


Can I mix latex paint into concrete

Question: would like to color concrete mix can I use outdoor latex paint to mix in with the concrete?
Comment: This pinterest board says to replace 1/4 of the water with latex paint: https://www.pinterest.com/pin/311311392962557782/  I have no idea if this affects the final resulting concrete. Would love an answer.
Answer: While you probably could, this wouldn't be a good way to try and match a color.  It would likely effect the setting performance of the concrete and you'd never match the color of the paint.  On top of everything else, it would be much more expensive than the alternatives - all you really need is the pigment and everything else that makes up the paint is essentially wasted.
For coloring concrete it is much better to use products that are specifically designed for this - either a concrete dye mixed into the concrete itself, or a concrete stain applied afterwards.
Comment: The fact that it _could_ affect the setting performance is enough to not try this. I find this answer pretty good. On the flip-side, @ssaltman, Pinterest ?? Seriously ? That a dubious reference. What's next tiktok ? I think the takeaway is: use products for their recommended usage. Latex paint is not recommended for use in concrete.
Comment: This is actually not a very good answer.  It is a supposition.  I would like to know the answer to this question: will it have any noticeable affect on durability or strength of the resulting concrete? There is a pinterest board that says yes: https://www.pinterest.com/pin/311311392962557782/  but I do not trust it.
Answer: Cured concrete is a chemical brew. When concrete is setting, it doesn't just dry out. There is an exothermic chemical reaction going on. Go put your hand on it. It'll be warm (or hot, depending on how thick the pour is).
My point is that if you were to mix latex (rubber) into the concrete mix to color it, you would be interfering with the chemistry and would end up with weaker (or very weak) concrete.
The correct solution is a concrete dye or stain that is created for this purpose.
SERIOUS EDIT: A comment prompted me to do a little bit of research, and there's a chance that mixing the right proportion of latex paint into concrete based on Portland cement might be fine, or even improve certain properties of the concrete. Concrete curing absolutely is a chemical process, but it seems that the polymers in latex might actually work in a synergistic way with cement as both cure together.
It seems there has been substantial research in the past into PMC (Polymer Modified Concrete) or LMC (Latext Modified Concrete) to improve properties like tensile strength and chemical permeability. One of the problems was that the cost per gallon of LMC was three times as high as regular concrete. So there has been more recent research into the potential to use waste latex paint to produce LMC (Latex Modified Concrete). There's obviously more in latex pain than just latex and pigment, and it might differ quite a bit from brand to brand, but this is suddenly a pretty interesting possibility, to me.
A quote: "It is thought that a co-matrix is formed in LMC, where the cement paste is surrounded by a polymer film. Figure 1 displays a three step formation of the polymer-cement co-matrix (Ohama, 2005).
I haven't read the whole thing (skimmed it), and who knows if the link will last forever, but here's one resource from academia:  http://digitalscholarship.unlv.edu/cgi/viewcontent.cgi?article=2232&context=thesesdissertations
Caveat Emptor. I'd do more research, ask more questions, and try to find specific information on what ratios to use, but this might be just fine to do!?  ;-)
Comment: This answer, while suggesting a reason why it is not a good idea, also does not actually provide any experience or studies or examples to show whether mixing latext paint into concrete at certain unknown rations will have any affect on the resulting strength or durability of the concrete.
Comment: @ssaltman - While you have a point, remember that this is not a scientific nor engineering site.  It is a DIY site, with insight provided by amateurs and professionals in the home improvement fields, none of whom are likely to have done thorough research on this particular experiment.
Comment: And my original point was that, hey, concrete doesn't just "dry." It's chemistry and the right answer is going to involve doing some research and/or asking a scientist or engineer, because concrete is chemistry, and dumping miscellaneous junk into the concrete may produce unexpected (unexpected by a non-chemist anyway) results. But having said that, it looks like dumping rubber paint into concrete might actually be a good thing. I'd still research it a little more. Or just try it and be ready to rent a jackhammer if it goes badly.  :)
Answer: I can tell you that I have mixed latex paint with Portland cement(Mortar mix). I put the slurry into a spray hopper and sprayed my concrete block wall.  I wanted the wall to match the house in color and finish. It worked perfectly.
I did this in 2008, and the wall looks as good today as the first day I sprayed it. The wall has an adobe finish, and the grout lines are not even visible.  To this day there is not one crack, chip, or flaking going on.  The wall finish is almost bulletproof!
Answer: Why not just buy the pigments, buy the acrylic polymer, some sand and cement and start experimenting?  I made concrete countertops this way with no previous experience.  You'll have more control, and you'll be using ingredients that have been extensively tested and designed to work together.
Answer: Isn't this the basis for products such as UGL waterproof paint? I know that paint MUST be added to ready mix drywall mud to accomplish water resistance prior to decorative finishing. I know acrylic additive is available for all portland cement based products. I know latex additive is available for ceramic tile mortars. In my estimation, these are over-priced dilutions. I have mixed paint with cement for decades and had very good results. "Bulletproof" (as the one comment said) is not an understatement!!

Can I mix latex paint into concrete


Creating tag synonym: the 5 points rule

Question: I wish I didn't have to have 5 points in a tag to be able to suggest a tag synonym. E.g. for the tag "health" I wanted to suggest a synonym "fitness" but I couldn't since I don't have 5 points in the tag "health". This happened a couple of time to me. Is there any way to relax the rules for a specific SE? That to would be useful in beta.
Comment: Easy fix, Franck: Just become a moderator :-) I just noticed in the ranking that Franck is #1 with twice as much reputation as #2!
Answer: Community votes for tag synonyms don't even really work on Stack Overflow, so this issue isn't specific to beta sites. I'd be all for a better system to coordinate tag synonyms among experts, but that system wouldn't be specific to smaller sites, it should be used for all the sites up to SO.
If you think your synonym suggestion is a no-brainer, ask one of the moderators in chat. If you aren't absolutely sure, raise it on meta. If the discussion settles in favor, a moderator will create the synonym (if you think there's a consensus to create a synonym but moderators haven't acted on it, again, ping us in chat).
Regarding health and fitness, I don't think they should be synonyms: I associate health with, well, health issues, such as monitoring a heart condition or keeping track of your diet; while fitness puts me in mind of sport activities. There might be some small overlap but they're overall pretty different things.
Answer: There aren't enough questions nor tags to start making synonyms that would make worth the effort. Now really if those questions are about health or fitness just retag them which would take less time and effort to complete ;). I'm just giving a sensible solution to that little problem.
Comment: This goes for name variants like `foo` and `foo-plugin`, but not for different names that mean the same thing like "health" and "fitness".

Creating tag synonym: the 5 points rule


Omf and video guide track sample rate

Question: I import an OMF into my Protools session.
I match the session to the OMF spec of 48/16bit.
I notice that the audio that came with the video guide track is 44.1/16bit.
When I import the video track I don't see anywhere where I can adjust the sample rate of the audio.
How do I do this or do I need to?
Answer: When you import your video it will ask you if you want to import the guide track as well.  When you import the guide track audio it will automatically convert it to the proper sample rate to match the session.  You just have to point where you want the new guide track audio files to live.

Omf and video guide track sample rate


Sales per minute on Tiny Tower is at 0.00

Question: I used the time trick to skip over waiting time and then put it back to normal time (I was not stocking anything when I did this) I did lose 1 Bitizen in a time travel accident, and my sales per minute is stuck on 0.00- How do I fix this? I am playing on my iPhone 4S
Comment: It would also be good to give yoru feedback to the folks that make this game as it does sound like a bug.
Answer: Check the App store for upgrades to be sure that your Tiny Tower is the latest version.  Then Restart the Tiny Tower app in iOS.
If that doesn't do it, wait until the correct time naturally passes the latest time from your time traveling adventures.  This may be a new time travel bug.
Answer: I didn't do any time skip but my sales per minute turned to 0.0 also.
To fix it just let everything sell out. Have no inventory for anything and all the lights out on the stores. Log in each day to collect the rent. And when the all the lights are out on all the stores. Start back up. This worked on mine.


Canadian citizen overstayed in the US by 10 days 6 years ago

Question: I'm a Canadian and overstayed in the US by 10 days (my departure was delayed because of issues getting a new passport) 6 years ago. I departed the US voluntarily, by plane. The border official didn't scan my passport at the airport. I'm now considering a 2-month holiday in California. Could there be any issues?
Comment: The only way to truely find out is to apply and find out.
Comment: How long your total stay in the USA was, including those 10 days? Did you enter by land or by air, and if by land, did you get paper I94?
Comment: Hello George, Canadians get 180 days, so that makes it 190 days. I arrived and left by air. No paper what's do ever in or out.
Answer: You did not trigger an automatic ban.  The automatic ban is triggered by more than 180 days of "unlawful presence" (8 USC 1182(a)(9)(B)), and you accrued no more than 10 days of unlawful presence.
Furthermore, you did not accrue any unlawful presence unless you were given an I-94 form specifying a date of departure.  If you entered the US by land, you probably did not receive an I-94 form.
The main issue you might have is that your previous overstay could lead a US officer to deny entry, for example because of a conclusion that you can't be trusted to comply with the terms of admission.
Your presence in the US for greater than 183 days may also have made you a resident for the purpose of US tax law, in which case you might have some tax liability issues to sort out.  It is, however, unlikely that the US has enough information about this for a CBP officer to be aware of it.
Answer: Since the overstay occurred six years ago, and CBP I-94 electronic records are available for the past 5 years, you may have to file a Freedom of Information request to know whether there is an issue.
You might first check your I-94 Arrival/Departure Record for your travel history. With luck, the earlier visit and departure may still be included in the results, and reassure you that an upcoming entry would be uneventful.


How to silence background music leaving only vocals no matter quality?

Question: I am using pitch analyzer app to write down notes of singers voice in a song but background music (instruments) makes it difficult. I am sure there is some Eq, filters setting that can make only vocal frequencies loud making rest as silence as possible. Sound quality is not important, but what matters is only pitch of a singers voice.
Comment: In general, the frequencies used by musical instruments overlap the frequencies present in the human voice. Some sounds, like a kick drum, might have hardly any overlap, but the main instruments that are making it hard to hear the vocals are probably masking because the frequencies overlap. You might be able to high pass at around 300 to 500 Hz and see if that helps.
Comment: Thanks! Sorry I am beginner in sound editing, can you please explain how to do this. I use Adobe Audition and Cool Edit.
Answer: Todd is right about the frequency overlap in his first OP reply comment, meaning simple EQing may not get you the results you require.
However, something else to note is that the main vocals are commonly centered, spacially. So extracting this 'centre channel' will remove the unwanted side channels from the stereo file. The bass is also commonly centred, so will remain, but lower frequencies will be easier to control on the mono output signal that is returned from this process.
Adobe CCE
Explanation from MusicHack
You should Search this site (SSD) for 'Remove vocals'(very similar process) and 'Extract vocals' to get some other ideas. This subject is like a holy grail for audio professionals. It has widespread implications, so it is a common question on this site.


System password in Lubuntu 13.04

Question: When I reboot my computer Lubuntu prompts me for a password,it's just after the motherboard prefrences and there are no username options,just system password,I input sudo password and it's ok,but it's kinda annoying,I want lubuntu to autologin,I have removed the option that Lubuntu asks me password at login,in users and groups preferences,if I would have checked that,I would have to input my password twice..
So,how do I get rid of that "boot" password..
It's a blueish screen,with a huge lubuntu logo,and just a password field..
Answer: I would post this as a "comment", but I can't because of the forum rules.
I think it has to do with Ubuntu's security system. When you disable the keyring password, it's not that you disable passwords. You just disable the built-in password manager. You will be prompted for passwords every time you come to a closed area. In my opinion it's not usefull to do this.
Try if you still will be prompted at the beginning, if you enable your keyring password again. I think you won't be asked two times.

System password in Lubuntu 13.04


What do native English speakers call chips/fries that are no longer crispy?

Question: I am looking for a term commonly used to describe chips (BrE)/fries (AmE) that are no longer crispy, and need to be re-fried to give them back their crispiness and proper taste. It should be quite a simple word to find, but I cannot find one.
Comment: @Kris Avoid answers in comments. We get it: standards for comments are low, they get an undeserved privileged position on the page above answers, and they cannot be community edited or peer reviewed. But this discourages people from posting actual answers and defeats the core answer ranking process. A better place to post an answer is in the answer box. See: [Privileges > Comment Everywhere – Help Center](https://chat.stackexchange.com/help/privileges/comment). See also: [Is SE enforcing "no answers in comments"? – Meta](https://english.meta.stackexchange.com/q/10646/)
Comment: This question has already been discussed and answered in detail here: https://ell.stackexchange.com/questions/30775/if-potato-chips-come-in-contact-with-humid-air-they-become-what
Comment: As to the number of upvotes being unfair, I'll leave others to decide. It's certainly an embarrassingly high number, but I see it as compensation for the answers I've given that have taken an hour or more to write and have garnered no upvotes at all - despite being, in my opinion of course, well-reasoned and well supported by authorities in the field!
Comment: I might suggest including an image of the food you are interested in, as there is considerable confusion in the answers.
Comment: Is the notion that the fries needs to be refried is important? If not then I would strongly suggest you delete it, otherwise…
Comment: @Kris. The OP claimed to be unable to find a suitable word. We can assume therefore that he or she did some research, which is our minimal requirement. And it's obviously more difficult to research from definition to word than from word to definition. Having followed discussions on Meta about not posting answers in comments, I decided to go ahead with my post, which I had finished composing just after your comment appeared ... .
Comment: Why is this off topic? Questions on the following topics are welcomed here:

    Word choice and usage
Answer: Crisps that have gone soft are often labeled 'soggy'. Here are three links that tell you how to make soggy crisps palatable again:

Wave goodbye to soggy crisps: Simple bag sealing trick
Never Have A Soggy Crisp Again With This 30-Second Hack
Stale bread and soggy crisps: How to bring old food back from the dead

UPDATE: The original question asked about crisps. Since then the OP has clarified that he or she is actually asking about chips (BrE) / French Fries (AmE). The word 'soggy' fits the description the OP is after for chips/fries too:

This is how to reheat those soggy chips from yesterday's takeaway and make them delicious again
Fish and Chip Monger Solves Soggy Fries Dilemma With Dry Vinegar
How do you revive soggy French fries?
Physicist reveals the best way to revive your soggy french fries
Answer: BrE Crisps = AmE Chips and they go stale (chewy or even slightly rancid because the oil on them goes bad) Frying them will not help because they will just burn
BrE Chips = AmE Fries and they will become soggy (lose their outer crunch from moisture escaping the inner part) and eventually dry out (not sure there is a word for that though, I would probably not say "dessicated fries") Frying them again will bring back some crunch as a outer layer of the chip / fry has moisture removed to make it crunchy/ crispy.
Generally speaking a Crisp/Chip is a packaged food sold in a store and eaten cold whereas a Chip/Fry is a fresh food served hot and eaten immediately. In American English it would be illogical for a Chip (crisp) to be soggy since a few hours time has no effect. The only exception would be if water were poured into a bag of chips (crisps.) Likewise it would be illogical in American English to refer to a fry (chip) as stale because it is eaten fresh and would never be left long enough to undergo becoming stale (assuming it was a tasty fry/chip.) The only exception might be if the potato it was made from was too old but then the term would more likely be rancid or rotten than stale.
Notes:
In Australian dialects and creoles, the terms are much muddled and therefore it is hard to predict how speakers of those dialects would describe this situation.
There is some gray area concerning what Americans may call "pub chips" these are thinner slices of potato more similar to the British crisp, though I believe the BrE term is "sliced chip." Though
Answer: I'd use stale. It may be particular to my region maybe.

stale (of food) no longer fresh and pleasant to eat; hard, musty,
  or dry. 'stale bread'Oxford Living Dictionaries
Answer: I'm an American. Here's what I have to say about this:
"Soggy" fries are cooked at the wrong temperature, and absorbed too much oil. "Stale" fries are old and not crispy anymore.
I've never, ever referred to chips/crisps as "soggy"; they are always "stale". Usually they go stale from exposure to moisture, and I bake them for 5 minutes at about 200F to fix them.
"Soggy" also refers to cereal that's been sitting in the milk too long.
Answer: American here in the Midwest part of the country.
I don't think I've ever heard someone refer to french fries as stale unless they had been left in a freezer too long before frying or baking.
Soggy would be fine and well understood, but the most common way I hear this described is limp or cold.
Answer: Australian weighing in.  We use all the names.
Crisps are the bagged thin-sliced (often corrugated) 'wafers' eaten at room temperature (not cold, you don't put crisps in the fridge) and are usually called chips.
Fries are the hot 'sticks' of potato that come in a cup (or wrapped in paper with fish) and get dowsed in salt & vinegar and are also usually called chips.  To remove ambiguity we usually say 'hot chips or crisps'?
Just to confuse, we also do this:
]
that's right, french fry crisps.
Crisps go stale, fries go soggy (especially if dowsed in vinegar).  However, we're Australian and stale is generically near enough to soggy to allow us to call old fries stale.   Crisps however don't get called soggy if they're just stale, though they can get soggy if left out in high humidity areas.
It's worth noting there is an excellent comparison of food names on the cooking stackexchange site
Answer: Limp
You could say the chips/fries have gone limp, once they are cold and no longer crunchy.
As others have mentioned "Soggy" works as well.
Answer: American here:
RE: French Fries (Br: Chips)

Soft
Cold
Limp
Soggy -- only if they were doused in liquid (i.e. gravy, malt vinegar, spilled soda, etc.)
I would not call them Stale unless they were shriveled and, ironically, hard again and chewy

RE: Potato Chips (Br: Crisps)

Stale
Chewy
Answer: Being a Brit and having suffered this somewhat nauseating effect when visiting some "Fish & Chip Shops" and other fast food outlets such as "Fentucky Cried Khicken", around the UK, the most adequate word I can find that would describe Fries/Chips that had lost their crispiness is "Mushy".
Here is a link to the word
http://www.thesaurus.com/browse/mushy
Answer: A (GB-EN) chip which is already crisp is unlikely to lose its crispness.
A cooked oven chip, colonial style french fry, home fried potato chip or a 'fish and chip shop' style chip does not lose its consistency when left.
A plate of them anywhere in the British Isles would simply be referred to as a plate of cold chips.
I suspect refrying them is a more Northern England practice but I am happy to be corrected on this point.
Beyond the point of ediblity I would expect them to be referred to as old chips or stale chips at a pinch.
Answer: Cold
Once the (french) fries are cold, Americans agree they won't be good.
Most Americans will warn you they are "cold," unless they have been sitting there for a long time (hours or days) in which case they might tell you they are "old."
A Brit I know once inquired about the specific condition of cold fries. The Americans were puzzled - only grandma tries to "toast up" the fries, younger Americans consider them garbage.
Comment: Yeah, that business in the question about "needing to be re-fried to give them back their crispiness and proper taste": [Are you kidding me?](https://www.youtube.com/watch?v=xoQJrMKO7e0)
Answer: Old
not fresh
I suppose this is a 'chiming in" answer however in colloquial american English I think 'stale' strongly suggests that something is close to irreparably inedible ... something you left in the refrigerator and came back to to eat but no longer could enjoyably.
Pizza left a few hours might be "cold" (another possible answer here) as could fries - and cold fries are generally not crisp (well certain brands might retain that outer shell).
If however, the fries were sitting in a warm food storage case at a fast food place I think the complaint would neither be 'stale' nor 'soggy' .. the first implying perhaps a day old and soggy implying incorrectly prepared or mistreated beyond time.
Also.. side point ... I don't think you can 'revive' french fries that aren't fresh  .. you might reheat them, but that won't cure their lack of freshness.
'not fresh' or 'old' is the reason you'd request a 'fresh batch'
Answer: I have a British friend who always orders French fries or bacon by saying he wants them "rigid" not "floppy".
I think floppy is a good description of fries that are no longer crisp or "rigid".
Comment: Welcome ELU, please consider adding sources to support your answers.
Answer: "...fries (AmE) that are no longer crispy, and need to be re-fried to give them back their crispiness and proper taste..."
"It should be quite a simple word to find..."
I think the issue here is that French fries are only eaten fresh, less than an hour after cooking, and 'old' FF are usually thrown out rather than saved. So there's not a specific word for 'old' FF that need to be revived, because this isn't really a common situation. You could describe the FF using the words many other posters have suggested, but these are generic descriptors that can apply to many 'old' foods, not just FF
Essentially, 'old' FF are usually considered ruined and not worth saving (not unlike say a half finished can of beer). The one exception is if they're saved with other food (say half a steak) that was also part of the meal, in which case they'd be called 'leftovers' (USA) collectively with the rest of the food
But in the end a single, common word to describe past their prime French fries doesn't really exist IMHO


Are modern GPUs good at saving power when low-loaded?

Question: What if I buy a super-duper-computer with 2 or more top-grade nVidia/ATi GPU boards and will mostly (above 80% of time) use it for simple browsing/office/coding tasks, will it consume a lot of power and produce huge amounts of heat or will it just downclock itself automatically?
Answer: If you have modern graphical cards and you use them in CrossFire (AMD's name) or SLI (nVidia's name) then an unused secondary GPU can power almost all the way down. AMD calls it ZeroCore Power technology. I am not sure what the nVidia name is.
Note that this will only power down the currently unused card(s), not the main card.
The main card will keep using power. How much will vary between regular browsing on a single screen, regular usage on multiple screens (GDDR Speed increase in that case, raising power usage) or when gaming.
Answer: During low use/idle states most newer cards don't typically use much power. Normal use of your machine won't be taxing on your GPU.....so there would be little power consumption.
But, at the same time, regardless of the manufacturer...one card will of course use more power than another in any situation. Most high end graphics cards have power management systems (which both nvidia and ATI offer) that allow you to adjust voltage use by your GPU and so-on.
Hope this also helps: GPU Power Management