IPhone SDK - Transition to NavigationController display problem

Question: I am nearly finished with my first IPhone app and everything works fine - except of one very little display bug:
My starscreen is an UIView (Fullscreen) without Navigationbar or Toolbar.
If I tap on a start button, there is an UIViewAnimationTransitionFlipFromRight animation that flips to the main navigation controller:
<code>-(IBAction) switchViewToMainMenu {
[UIView beginAnimations:@"Flip View" context:nil];
[UIView setAnimationDuration:1.25];
[UIView setAnimationCurve:UIViewAnimationCurveEaseInOut];

[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.window cache:YES];
[self.navController viewWillAppear:YES];
[self.startScreenViewController viewWillDisappear:YES];

[self.startScreenViewController.view removeFromSuperview];
[self.window addSubview:navController.view];

[self.startScreenViewController viewDidDisappear:YES];
[self.navController viewDidAppear:YES];
[UIView commitAnimations];
self.startScreenViewController=nil;
[startScreenViewController release];
</code>
}
This works fine except of one little problem:
When the navigation controller view appears (flips in), the Navigationbar on top is some pixels too high (the is a white bar where the Navigationbar should be). When the animation finished, the Navigationbar drops down to the right position. This doesn't look very beautiful...
Any ideas how to fix that problem ?
Answer: We found a solution using the setAnimationDelay giving some time the tabbar to load and placed in view.
Thought you have to alter the code a little in order to use the setAnimationDelay.
You have to use the setyanimationdelay just before the setanimationtransition and the setanimationtransition just before the commitAnimations. So the code above should end to:
<code>[UIView setAnimationDelay:2]; // 2 seconds delay seems to be working for us
[UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:self.window  cache:YES];
[UIView commitAnimations];
</code>


Diskpart will NOT open through cmd

Question: I open up my cmd and type 'diskpart'  It prompts me with the UAC box, I click yes.  Everything is going good up until this point.  After I click 'Yes' diskpart opens up in a separate window (At school it opens up within the current cmd window, this might be where the problem lies) but instead of starting up I'm left with a blank cmd instance and diskpart will NOT open.  Any ideas?
Comment: Use USB boot flash disk)
Answer: Couple things to try.  Right-Click Command Prompt and hit Run As Administrator.  When you type diskpart it will not spawn another command window.
Another thing to try would be to disable UAC.  You do that by going to Control Panel -> Action Center -> User Account Control.  Having UAC disabled mimics the behavior you are seeing at school (where things never prompt for elevation).
If neither of these things works, then you have a problem with diskpart or the storage management system on your computer.  If they do work, then your issue is some kind of problem with elevation which (hopefully) only affects this one scenario.
Hope this helps.
Answer: If you have a disk that will not initialize at all (i.e. it's completely broken) then you will sit at the "On computer: yourpcname" screen forever. The disk is toast and will most likely need binning.
Answer: Mine was stuck on  "On computer: yourpcname" screen forever as well. I had a bitlocker protected USB drive that was still locked. A few seconds after I unlocked it, the cmd session moved on to the diskpart> command prompt. Disk management wouldn't load either until I unlocked the bitlockered drive.

Diskpart will NOT open through cmd


Is there a way to use the numeric keypad in DOSBox?

Question: Searching around Google and the DOSBox Wiki there doesn't seem to be a way to use the numeric keypad as a numeric keypad, instead it seems to behave like the arrow keys. Looking at the dosbox.config there isn't anything apparent. The keyboard setting looked promising but apparently that is for changing the language of the keyboard (as per their wiki).
Answer: Press the NumLock key on your keyboard while active in DOS Box (it may not work before-hand).
Comment: You're welcome.  Heheh, the NumLock light indicator can be incorrect when virtual computers are involved (and DOS box definitely fits that classification in my opinion) which will lead to confusion at times.
Comment: Thank you! I had though I had done this but I had to cycle it several times before it actual worked.
Answer: Press TWICE "num-lock" that will make your numeric keypad work.
When your numlock is standard "on" it's not recognized in dosbox. When you hit one time the numlock it is off, so that's what dosbox is notice first. You need to hit numlock one more time, and then it's on.
If you want to swap between num-lock and the arrows after this, you just need to hit numlock one time.
So in most cases hitting numlock 2x will work


Should I always prefer esc_attr_e & esc_html_e instead of _e?

Question: I am working to internationalize my plugin. As I can see on Wordpress site about esacaping, it says you should always use it. But as I can see in many popular plugins, they have used _e instead apart from few specific cases. So should I always use escaping or not for all strings, if not then for what specific cases should we use it?
Answer: Always escape output unless you have a great reason not to.
The main thing that you lose when escaping translated strings is the ability to use html tags and html entities in the original string and translations, but you should probably not get into a situation in which translators are required to know html just in order to translated several words in the first place.
If for whatever reason you have to include an html entity as part of the string you can use printf/sprintf to give the translator some flexibility on the location of such an entity in string with something like
printf('%s&%s',esc_html__('first part','td'),esc_html__('second part','td'))
where & is just an example for an html entity.
Obviously there might be more complex scenarios that might be impossible to escape in a sane way, but your guiding light should be to always escape by default.
Comment: Splitting the string, if it is mid-sentence, would probably be bad for translation. It is actually fine to include HTML entities, since `esc_html()` is idempotent and won't double-escape. It would only be if you wanted to include actual HTML tags. In that case, you can use `wp_kses()` on the result, or possibly split the string as suggested.
Comment: always good to learn something new, but I do not like the idea of using the `kses` family as a solution as those functions as they might remove parts of the string which means they are sanitizing and not escaping. (and maybe someone like you that is not fed up with how core works, can fix the description of `esc_html` to correctly reflect what it does)


Examples of hyperbolic groups

Question: What are some other classes of word-hyperbolic groups other than the finite groups, fundamental groups of surfaces with Euler characteristics negative and virtually free groups?
Comment: All introductions to hyperbolic groups I can think of abound of examples.
Comment: The Bridson-Haefliger book certainly mentions more.... it should mention relation to negative curvature somewhere... mention stability under free product. Of course I also think of the Ghys-Harpe book, which is in French.
Comment: Can you tell me some of those texts because so far all the books that I have referred to (papers by Bowditch, the book metric spaces of non-positive curvature, book by Clara Loh, GGT ) cite only these classes of examples.
Answer: Below are some sources of hyperbolic groups. Of course, the list is far from being exhaustive.

Groups defined by generators and relations:

Finitely generated free groups, as their Cayley graphs are simplicial trees.
If $\varphi$ is an atoroidal automorphism of a free group $\mathbb{F}_n$, then the extension $\mathbb{F}_n \rtimes_\varphi \mathbb{Z}$ is hyperbolic.
One-relator groups with torsion, namely groups admitting a presentation of the form $\langle x_1, \ldots, x_n \mid r^m=1 \rangle$ with $m \geq 2$, are hyperbolic.
Coxeter groups not containing $\mathbb{Z}^2$ are hyperbolic. (See Theorem 12.6.1 in Davis' book The geometry and topology of Coxeter groups for a better characterisation.) As a nice particular case, right-angled Coxeter groups defined by finite square-free graphs are hyperbolic.
Generalising hyperbolic right-angled Coxeter groups, graph products of finite groups over square-free graphs are hyperbolic.
If $\Gamma$ is a topological graph which does not contain two disjoint loops, then the braid group $B_2(\Gamma)$ is hyperbolic.
Small cancellation groups C'(1/6) or C'(1/4)-T(4). A very rich source of two-dimensional hyperbolic groups.
Random groups in Gromov's density model are hyperbolic and non-elementary below a given density.

Fundamental groups:

Fundamental groups of compact negatively curved Riemannian manifolds are hyperbolic.
Fundamental groups of hyperbolic 3-manifolds. A general construction is to take a hyperbolic 3-manifold of finite volume and to "fill in" its cusps with tori in different ways. The keyword is Dehn fillings.
Uniform lattices in real, complex and quaternionic hyperbolic spaces are hyperbolic. Arithmetic constructions may lead to explicit examples.
If $f$ is a pseudo-Anosov homeomorphism of a closed surface $S$, then $\pi_1(S) \rtimes_\varphi \mathbb{Z}$ is hyperbolic, where $\varphi$ denotes the automorphism of $\pi_1(S)$ induced by $f$. (A reference is Otal's monograph Le théorème d'hyperbolisation pour les variétés fibrées de dimension 3; also, a generalisation to free groups of pseudo-Anosov homeomorphisms can be found in Farb and Mosher's article Convex cocompact subgroups of mapping class groups.)

Constructions

Dehn fillings are now defined purely algebraically, and it is possible to create hyperbolic groups by quotienting relatively hyperbolic groups for instance, or even to create exotic hyperbolic groups from classical hyperbolic groups.
The family of hyperbolic groups is also stable under various operations, including commensurability, some graphs of groups, and some graph products. For instance, free products (as mentioned by Yves in the comments).

I can add a few precise references if some examples interest you. Otherwise, you have some keywords to help you in your research.
Comment: Thank you, much appreciated! I will try finding the sources on the basis of the keywords provided.
Comment: It's not stable under graph product (not even under direct products).
Comment: "Coxeter groups defined by square-free graphs": probably you don't consider the standard graphs (where edges labeled by $2$ are omitted) but omit instead only edges labeled $\infty$?
Comment: Random groups in Gromov's density model are hyperbolic in all densities; below some density rather ensures they're non-elementary.
Comment: In the last point, I didn't mean that the family of hyperbolic groups is stable by *all* graph products, but only some of them (similarly for graphs of groups). I refer to Meier's article *When is a graph product of hyperbolic groups hyperbolic?* for a precise characterisation.
Comment: The criterion I gave about hyperbolic Coxeter groups is not correct. I edited my message. (I also took into account your comment about random groups, thank you.)
Comment: I think the wording about RA Coxeter groups and graphs products is still confusing. For instance "They [Coxeter groups without $Z^2$] include RA Coxeter groups" seems to say that every RA Coxeter group has no $Z^2$, which is false, maybe just say "include many Coxeter RA groups"? As regards graph products, apart from free products, not many work (the only hyperbolic graph product of infinite hyperbolic groups is the free product).
Comment: @AGenevois Hie! Can you please provide me a reference for bullet# 12, the pseudo-Anosov example?
Comment: @Temari: I added two references about this example.
Comment: Thank you very much! :)

Examples of hyperbolic groups


How do I install fuse-ext2 to use with OSXFuse

Question: I'm trying to make Ext4 disk readable on mac OSX 10.10.5. I've already installed OSXFuse, I read on this site that I also needed to install fuse-ext2. I downloaded fuse-ext2-master.zip and unzipped it. It seems to contain source code files but no installation program. How am I supposed to use these files?
Answer: The build from source how-to is available at the git homepage of fuse-ext2. Please use the lines below though, because I had to make slight changes to get it working (e.g the libtool download source has been moved).
At least the appropriate xcode-command-line-tools and OSXFuse have to be installed.
Download the source from github and unzip the file. Then open Terminal.app and enter
cd ~/Downloads

assuming the fuse-ext2 file was unzipped there.
First you have to download, make and install several tools (m4, autoconf, automake, libtool, e2fsprogs). Then you can build fuse-ext2. This is all done using Terminal.app.
export PATH=/opt/gnu/bin:$PATH

mkdir gnu
cd gnu

# m4
curl -O http://ftp.gnu.org/gnu/m4/m4-1.4.17.tar.gz
tar -zxvf m4-1.4.17.tar.gz
cd m4-1.4.17
./configure --prefix=/opt/gnu
make -j 16
sudo make install
cd ../

# autoconf
curl -O http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz
tar -zxvf autoconf-2.69.tar.gz
cd autoconf-2.69
./configure --prefix=/opt/gnu
make
sudo make install
cd ../

# automake
curl -O http://ftp.gnu.org/gnu/automake/automake-1.15.tar.gz
export PATH=/opt/gnu/bin:$PATH
tar -zxvf automake-1.15.tar.gz
cd automake-1.15
./configure --prefix=/opt/gnu
make
sudo make install
cd ../

# libtool
curl -O http://ftp.hawo.stw.uni-erlangen.de/gnu/libtool/libtool-2.4.6.tar.gz
tar -zxvf libtool-2.4.6.tar.gz
cd libtool-2.4.6
./configure --prefix=/opt/gnu
make
sudo make install
cd ../

# e2fsprogs
curl -O https://www.kernel.org/pub/linux/kernel/people/tytso/e2fsprogs/v1.42.12/e2fsprogs-1.42.12.tar.gz
tar -zxvf e2fsprogs-1.42.12.tar.gz
cd e2fsprogs-1.42.12
./configure --prefix=/opt/gnu
make
sudo make install
sudo make install-libs
cd ../../

# fuse-ext2
cd fuse-ext2-master
export PATH=/opt/gnu/bin:$PATH
./autogen.sh
CFLAGS="-idirafter/opt/gnu/include -idirafter/usr/local/include/osxfuse/" LDFLAGS="-L/opt/gnu/lib -L/usr/local/lib" ./configure
make
sudo make install

All lines without a # have to be entered in Terminal and then executed by hitting the Enter key. You may use copy and paste.

An easier way is to install brew and use these instructions below (also in Terminal).
brew doctor #repair everything you are warned about!
brew install homebrew/dupes/m4
brew install e2fsprogs automake autoconf libtool
cd ~/Downloads/fuse-ext2-master
./autogen.sh
CFLAGS="-idirafter/$(brew --prefix e2fsprogs)/include -idirafter/usr/local/include/osxfuse" LDFLAGS="-L$(brew --prefix e2fsprogs)/lib" ./configure
make
sudo make install

After finishing either of the two methods all necessary files are installed (including a prefpane) and you should be able to r/w ext2/3/4.
Comment: I cannot expres how much I hate apple right now. I have to download a 2.6GB (xcode) program just to mount a filesystem and compile a driver myself? I'm on the brink of a nervous breakdown.
Comment: @BdN3504 Command line tools (160 MB) are sufficient. AppleID required though.
Comment: Thanks for the help... but it didn't work. Here's what I got in my terminal window:

make[3]: *** [install-exec-local] Error 1
make[2]: *** [install-am] Error 2
make[1]: *** [install-recursive] Error 1
make: *** [install-recursive] Error 1
Studio-Mac:fuse-ext2-master michel$
Comment: Studio-Mac:~ michel$ echo PATH$
PATH$
Comment: @MichelGougeon sorry that was the wrong one: `echo $PATH` is the right one
Comment: Hi @klanomath it seems that the above is not currently working for macos with M1 apple silicon. It failed with errors during "make" of fuse-ext2. Any ideas ?
Answer: @klanomath:  I had some issues working through your instructions.  Brew failed for me so I went back and worked through the longer instructions.  There were a few issues I had to resolve, but couldn't have been successful without your outstanding instructions!  Thank you.  My notes:
The link is broken for libtool. Had to use:
curl -O https://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz

Also had issue with needing needing get text which addressed with:
brew reinstall gettext

and
brew unlink gettext && brew link gettext --force

and Finally, I actually needed full Xcode install (so big) and then running the following command:
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer

I have compiled more code on a Mac than on Linux... didn't expect that... LOL


Internet keeps timing out on Yosemite 10.10.5

Question: I have really strange WiFi issues on my early 2015 MBP. I'm running Yosemite 10.10.5 and for some strange reason wifi/internet stops working for up to a minute and then starts working again. In the meantime I am not disconnected. I say wifi/internet because I'm not sure where the root cause is. All my other equipment still works when my MBP decides to stop working. Even my old 2009 MBP still works fine when my MBP drops out. Since I haven no clue where to start looking to fix this problem, I was hoping to find some guidance here.
Comment: One thing to try: in System Preferences > Network > Wi-Fi > Advanced..., delete _all_ the Preferred Networks and recreate the one you connect to most often. If you don't want to be so drastic, then make sure the wifi network you need is at the top of the Preferred Networks list. If the network in question is the only wi-fi network, tear it down and start again.
Comment: Seems like another Yosemite bug... I have the same issue since the 10.10.5 udpate.
Answer: It was a strange issue with my configuration as far as I know. I ended up simply moving <code>/Library/Preferences/SystemConfiguration/</code> to another location (or just renaming/deleting) and rebooting my MBP. Everything has worked fine ever since.
Answer: Try rebooting the gateway. Type 192.168.0.1 in any search bar and look for an option that says "Reboot/restart router". Click it. Wait a while, then see if your internet connection is faulty. If it is, check your wi-fi card, or try upgrading to OS 10.11 El Capitan, maybe this will fix any bugs in your system. If not, success!


Hot network questions should not include locked questions

Question: I was just now led to this question, which appeared under "Hot Network Questions". However, it is locked since yesterday. Certainly, questions which are closed or locked should not be advertised as hot questions, so I believe this is a bug.
Comment: I disagree with your general assessment that this kind of behavior is a bug (feel free to try to change my mind) - but do you think this particular question should have been presented as hot, irrespective of its lock status? "too many comments" doesn't seem to be a pretty strong negative indicator of quality.
Comment: @JanDvorak My opinion on whether or not this particular question should have been presented as "hot" is not the point here, my point is that *locking* a question also makes it so that it doesn't appear any more in search results (of the SE search), so it appears counterproductive to the intention of locking (hence a bug) that it would continue to appear in the hot question list.
Answer: No.
As far as I know and remember, closed questions are already excluded from the Hot Network Questions list, or more accurate a closed question can't become "Hot".
So, if a question is off topic for a site and should not get new answers, a moderator or five ordinary users can just close it.
Such locks as the one on the question you linked to are quite common and meant to prevent comments,  not answers. This should not affect the question visibility or its quality.
Comment: Note that the question mentioned by the OP is also *protected*. That might add to his/her experience that he/she can't do anything with it.
Comment: @Glorfindel that's a totally different thing, and protected questions shouldn't be excluded as well. On the contrary, there's a popular feature request asking [to auto protect all hot questions](http://meta.stackexchange.com/questions/170419/should-trending-questions-be-auto-protected)
Comment: I know, I'm just pointing out a possible source of confusion.


12V,20W bulb connection doubt

Question: I have 8 12V,20W bulbs and want to connect them in series. I cant seem to find a 12V,160W transformer for my 240V mains supply.
Is there another way like connecting in series+parallel connection to use them directly with 240V mains?
Any suggestion is welcome...
Comment: You wouldn't connect your 8 bulbs to a 12V, 160 Watt transformer in series.  You would connect them in parallel.  Also, a quick google turns up 240V to 12V 160Watt transformers available literally all over the place.
Comment: Add another 12 bulbs in series. 20x12 = 240V - this is how Christmas tree lights used to be wired in the old days - though they weren't 20W bulbs.
Answer: 12V bulbs and the lamps in which you use them are in general NOT designed to be run directly off the mains voltage. They are designed to run with a transformer which provides mains isolation.
I would advise you to get not one but several transformers like 2 times 80 W or 4 transformers of 40 W.
Also 20W bulbs are very oldfashioned, why not get some LED lights instead, for the same amount of light you would only need one 30 W transformer.
Answer: Eight 12 volt lamps in series will result in the highest possible resistance, and will require only 96 volts to drive them to 20 watts each so, without finding some way to drop the extra 144 volts, you're stuck.
Answer: The 12v lamps are ELV which means that they are NOT safe for mains voltages.
Are the fittings double insulated? I bet you they are not.
I don't want you to fry anyone.
DON'T DO THIS!

12V,20W bulb connection doubt


What subjects in graduate algebra have applications to computer science?

Question: Currently I am deciding whether I want to do my thesis on graduate algebra next year and I'd like to study something with applications to either physics or computer science (two relatives of mathematics). I have heard that graduate algebra has found applications in automata theory and to system communications in electrical engineering. Therefore, I'd like to be informed of some examples of the recent applications of advanced algebra (non-commutative algebra or commutative algebra) to other fields of science or engineering or just recent research trend motivated by breakthrough problems in disciplines other than math.
Comment: @MattSamuel: I thought about that option too, but I am not sure how I should phrase my question on those subdomains and it still remains clear to their audience. I mean it's possible that they use these subjects unknowingly without reference to the mathematical terms or the literature.
Comment: Applications exist in both computer science and physics. I would think to find out the applications in computer science you should ask on the computer science site, and ditto for physics.
Comment: Certainly the typical computer scientist is not well versed in algebra, and physicists abuse math and don't really have a clear mathematical idea of what they're doing, so perhaps you're right.
Comment: You might be interested in the book "Mathematics++: Selected Topics Beyond the Basic Courses"  by Ida Kantor et. al. From the back cover: "Mathematics++ is a concise introduction to six selected areas of 20th century mathematical tools used in contemporary research in computer science, engineering, and other fields."
Answer: I know little about computer science, but if you include category theory among the subjects of algebra (as Hungerford does), then that subject apparently has a lot of applications to that field. I can say more, though, about applications to physics, if that is among your interests:
Lie groups are used to express symmetries in physics. Symmetries occupy a central role in physics especially in gauge theories in quantum field theory. The basics of gauge theories can be found in chapter 10 of Introduction to Elementary Particles by Griffiths. There is also Quantum Theory, Groups and Representations: An Introduction by Woit, which is more in-depth and discusses more topics (still focused on the idea of symmetry in physics). This of course also has  a fair amount of crossover with differential geometry, since Lie groups belong both to algebra and geometry.
There are also applications of C*-algebras and von Neumann algebras to quantum physics. Quantum physics itself, is of course built upon linear algebra and functional analysis.


Passover baking with milk instead of water

Question: Juices and liquids constituted partly of water, but themselves not pure water, do not create chametz when mixed with flour, according to another set of answers here on Mi Yodeya. Does this same principle apply to milk as well, and can you, therefore, under proper conditions, bake with flour and milk?
Comment: And [Welcome to Mi Yodeya](https://judaism.meta.stackexchange.com/questions/3886/a-beginner-s-guide-to-my-how-is-this-site-different-from-other-judaism-sites/3887#3887)!
Comment: Keep in mind that any answer you receive on this site is not to be taken seriously, and all serious questions asking for p'sak halacha should be directed towards your local Orthodox rabbi.
Comment: A secondary problem would probably be the prohibition against making dairy bread.
Comment: See Pesachim 36a which discuss this directly
Comment: possible dupe: https://judaism.stackexchange.com/q/57110/16354, as it is answered there.
Answer: A recent Posek, Rav Eliezer Melamed, notes here that kneading with milk would indeed have the status of "Mei Peiros", and would not create Chametz. His source is the Gemara in Pesachim linked below.
There are still a number of other factors to be considered for a Pesak, such as if the milk is watered down, as well as making sure such bread would not fall under any prohibitions, as noted by DanF.  Also, see here for an interesting discussion about milk from cows that are fed chametz...
H/t to DoubleAA for sourcing Pesachim 36a as the Talmudic source.
(For those interested, the Gemara, and subsequent Sefaria translation, says:

כדאמר להו ר' יהושע לבניה יומא קמא לא תלושו לי בחלבא מכאן ואילך לושו לי בחלבא והתניא אין לשין את העיסה בחלב ואם לש כל הפת אסורה מפני הרגל עבירה אלא הכי קאמר יומא קמא לא תלושו לי בדובשא מכאן ואילך לושו לי בדובשא
The Gemara adds that this is as Rabbi Yehoshua said to his sons: On the first night of Passover, do not knead for me dough with milk, but from the first night onward, knead my dough for me with milk. The Gemara raises a difficulty: But wasn't it taught in a baraita: Throughout the whole year one may not knead dough with milk, and if he kneaded dough with milk, the entire bread is prohibited, due to the fact that one will become accustomed to sin, by unwittingly eating it with meat? Rather, this is what he is saying: On the first night of Passover do not knead me dough with honey; however, from then onward, knead me dough with honey.)
Comment: Seriously what's the difference between water and skim milk anyway? #PTIJ


When should a question be closed as "too localized"?

Question: What is the "too localized" close reason and when should it be used?
Answer: The most important metric for "too localized" is "how many people could this ever help?". If the answer is "only the one person who asked the question", it's too localized.
There are some indicators to help determine this:

relevant only to a very small number of people (e.g. users of a single SharePoint installation)
specific to a point in time (e.g. "When will SharePoint v.Next be released?")
impossible or extremely difficult to reproduce the situation described

It's important to close these questions for the same reasons that we want to remove or discourage anything else regarded as "noise" in the site - we want a site of high quality that attracts and engages people.
Sifting through questions that can't be answered isn't interesting or fun.
Comment: There's an unanswered tab for a reason, so that people will go work on those questions when they want.  Sometimes when I have the time I go to Stack Overflow and just go through unanswered questions.
Answer: It should not be used for questions that are general, i.e. are reproducible on anyone's computer, no matter whether they have an answer or not.

If they're closed they still just sit there on the site, but now if someone does have an answer, it can't be answered.  I've answered questions on Stack Overflow before that have no answers, long after they were posted, there are even badges to encourage this behavior.  You should incentivize answering those questions.  I even have year old questions with no answers on Stack Overflow that haven't been closed, and I leave them out there hoping that someone will come someday with an answer
The Sharepoint Stack Exchange has a very small population, as more people join in there will be more faces to see the questions and answer them, but they can't do that if the question is closed.

There's no good logic in closing a question just because it doesn't have an answer.  That's not what the 'too localized' reason is for.  It's generally used for irreproducible bugs, and very specific programming situations that no one would ever need.


Factorization into irreducibles

Question: Let $R$ be a ring with $1$. Let $r$ be an element of $R$, $r\neq 0$, $r$ not a unit. Can I say that $r$ is a product of a finite number of irreducibles or not?
Comment: Maybe you want $R$ to be an integral domain. As I mentioned [here](http://math.stackexchange.com/questions/297271/does-any-integral-domain-contain-an-irreducible-element), in my answer, there are integral domains without irreducible elements.
Answer: Let $R$ be the ring of algebraic integers (over $\mathbb{Q}$). There we see the following problem:
$$
2=(\sqrt2)^2=(\sqrt{\sqrt2})^4=(\root8\of2)^8=(\root{16}\of 2)^{16}=\cdots
$$
Obviously you can continue as long as you wish without ever leaving the ring $R$, so you never get to see irreducible elements here.

In a comment Federica asked for a ring that also has irreducible elements but also elements that cannot be written as product of a finite number of irreducibles. I think that the following works, but I haven't double-checked everything.
Let $x_k=e^{2\pi i/2^k}$ be a primitive root of unity of order $2^k$. Let
$$R=\mathbb{Z}[x_2,x_3,x_4,\ldots].$$
Then the number two still has a never-ending factorization
$$
2=1-x_2^2=(1+x_2)(1-x_2)=(1+x_2)(1+x_3)(1-x_3)=(1+x_2)(1+x_3)(1+x_4)(1-x_4)=\cdots
$$
because we always have $1-x_k=1-x_{k+1}^2=(1+x_{k+1})(1-x_{k+1})$. From the theory of cyclotomic field we know that all the factors $1+x_k$ generate the lone prime ideal of $\mathbb{Z}[x_k]$ lying above the prime $2$.
Yet, I think that the two factors of $5=(2+i)(2-i)=(2+x_2)(2-x_2)$ are
irreducible. An eventual factor (being a polynomial of a finite number of $x_k$'s) belongs to some ring $\mathbb{Z}[x_k]$. But $5$ generates a subgroup of index two in $\mathbb{Z}_{2^k}^*$, and consequently splits into a product of two prime ideals, namely the ones lying above $(2+i)$ and $(2-i)$, in all the rings $\mathbb{Z}[x_k], k\ge2$. Therefore $2+i$ and $2-i$ are irreducible as elements as well.
Comment: and if we assume that there exist irreducibles? Is there an example where $R$ have irreducible elements and $r\in R$ cannot be expressed as a product of finitely many irreducibles?
Comment: YACP gave a link to a more comprehensive description of this phenomenon!
Comment: @Federica, is this what you wanted to see?
Answer: there are rings which have elements which cannot be factors as product of a finite numer of irreducibles.
Let $A=\mathbb Q[x_1,y_1,x_2,y_2,x_3,y_3,\dots]$ be the polynomial ring on two infinite sequences of variables, let $I$ be the ideal of $A$ generated by the elements $x_i-x_{i+1}y_i$, and let $R=A/I$.
In the ring $R$, we have $x_1=x_2y_1=x_3y_2y_1=\cdots=x_{n+1}y_n\cdots y_1$ for all $n\geq1$.
Comment: so $x_1$ can be factorized in infinitely many ways as a product of finitely many factors. How this implies that $R=A/I$ has an element $r$ which cannot be factorized as a product of finitely many irreducibles? Can you do an example of such an $r$ in $A/I$?

Factorization into irreducibles


ORM domain design pitfalls

Question: Are there any patterns which seem sensible when designing an object oriented domain, but do not translate nicely onto a relational database schema?  If so, are there standard patterns that can be used instead?
Answer: Domains which have entities where the number of attributes (properties, parameters) that can be used to describe them is potentially vast, but the number that will actually apply to a given entity is relatively modest.
An example of such a domain would be a medical practice, where there are a vast number of possible symptoms, but the number of symptoms that any patient might have at any given time is comparatively small.
These kinds of domains are typically represented using an Entity-Attribute-Value (EAV) model.  This data representation is analogous to space-efficient methods of storing a sparse matrix, where only non-empty values are stored.
In the case of a medical domain, the problem space is complicated by the fact that any given symptom or medical test can have its own set of custom attributes, just as products sold in an online store can have custom specifications.
In fact, online stores have to deal with this problem also.  A book has a "number of pages" specification, while a memory module has a "number of bytes" specification, and the two attributes are not related at all.
So a set of attributes appropriate for each product is chosen from an attributes table.
The Attributes table might look like this:
AttributeID
AttributeDescription
UnitsID --> FK to Units table

The ProductAttributes table might look like this:
ProductAttributeID
ProductID
AttributeID --> FK to Attributes table
Value

Notice that Number of Bytes and Number of Pages aren't features of the database schema. Instead, they are soft-coded into the tables.  So there is no way to represent these features as part of the domain design.
Comment: Interesting.  Is this a good way of defining these properties in a relational database, or a bad way?
Comment: @Alison: It's OK, provided it's only used on these kinds of problems.
Answer: Referencing data that can change, in a record that shouldn't.
I've seen a number of implementations that had something like:
Order
    Id : int
    OrderDate : DateTime

OrderProduct
    Id : int
    OrderId : FK of Order
    ProductId : FK of Product
    Quantity : int
    Cost : Decimal

Product
    Id : int
    Description : string

The code ends up looking something like:
class Order
{
    int Id;
    DateTime OrderDate;
    List<OrderProduct> OrderLines;

    AddProduct(Product p, int quantity)
    {
        this.OrderLines.Add(new OrderProduct(this, p, q));
    }
}

class OrderProduct
{
    int Id;
    Product Product;
    Order Order;
    int Quantity;
    Decimal Cost;

    OrderProduct(Order o, Product p, int quantity)
    {
        this.Order = o;
        this.Product = p;
        this.Quantity = q;
        this.Cost = p.Cost * quantity * applicableTax;
    }
}

class Product
{
    int Id;
    string Description;
}

It seems correct at first glance, the code works fine, and the data ends up being nicely normalized, and you can create and read orders correctly.
Except that if you sell an order today, and you receive info from a supplier tomorrow that the description of something on the product has changed, those systems usually just update the product with the change. Now if you were to reproduce that order 2 days from now the contents of the order will have changed, and you'll be none the wiser.
There's some easy ways to solve this problem but I've seen it a number of times in varying degrees of severity.
Comment: This definitely looks like a problem.  Surely the real solution would be to have immutable products?
Comment: @Alison: That is on of the more popular solutions I've seen.

ORM domain design pitfalls


Is there a benefit to writing in C# major over Db major?

Question: As the title says. It seems that the really sharp keys (e.g. C#, F#, etc.) are really cumbersome to write and play in, so I was wondering if there were any advantages to them over keys like Db and Gb.
Answer: In general, flat keys have less accidentals than the equivalent sharp keys (for example, Db major has 5, and C# major has 7). So, talking about the main key of a song, there seems to be no advantage, and I don't think one would have a reason to prefer C# major over Db major.
The only way I can think C# major is better would be during a (short) section of the song that was before in a key that has sharps and not flats, so that the accidentals would be minimized. For example, if the song is in C# minor, and you want to modulate to its parallel major, you would have more trouble converting all the notes to Db major (removing all 4 sharps and adding 5 flats), than converting to C# major (just adding 3 sharps). This only makes sense of course if you don't want to rewrite the key signature, because if you do, Db is still better.
Curiously, you cited F# major and Gb major as an example, but these are the only keys that have exactly the same number of accidentals (6), so in this specific case it makes no practical difference for most instruments.
Comment: "Flat keys have less accidentals" is a pretty nonsensical statement. What's actually going on is, flat keys have _more accidentals in their name_ (e.g., the 3-♭ key is called E♭, which has a ♭ whereas the 3-♯ key is called A which doesn't have a ♯).
Comment: Well, I think you misunderstood, he wasn't talking about the name but about the total number of sharps or flats in a key.
Comment: @leftaroundabout when I say " flat keys have less accidentals than the equivalent sharp keys", I mean keys that have a flat note as root have less accidentals than the keys that have a sharp note as root.
Comment: Yeah, but this is not because the flat keys have fewer flats but because the way we name keys puts a ♭ in the name earlier than it puts a ♯ in the name of sharp keys. F is still a flat key and D is a sharp key, even though both don't have any accidentals at all in the name.
Comment: @leftaroundabout Yes I get it, I think "flat keys" was not a good word choice, I meant "keys with a flat in the name".
Answer:
As the title says. It seems that the really sharp keys (e.g. C#, F#,
  etc.) are really cumbersome to write and play in, so I was wondering
  if there were any advantages to them over keys like Db and Gb.

I think @coconochao's answer is great, but I would like to elaborate including some words on the topic of keys with many sharps or flats.
In Chopin's C# minor waltz opus 64 no. 2 there is a middle section in Db major. So Chopin does alter the notation from sharps to flats when changing from minor to major. But in music where there is only a short section in a different key Chopin keeps the sharps if the main key is a key with sharps. You can take a look at Chopin's music yourself and see what he does.
Keys with a lot of either sharps or flats can certainly be cumbersome on many instruments, but not all. There are two aspects, the reading part and the playing part. Once you are good at reading it, the subject becomes how it fits on the instrument that matters. On piano many sharps or flats can be very good because the black keys are easy to hit. So such keys are often much more handy than C-major on a piano. But on violin those keys with an excessive amounts of flats or sharps are not easy, although C-major is not the best key on violin either. I play both violin and piano; the feeling on those two instruments is very different.
If I get a piece for violin with 6 sharps or flats as the main key I would certainly prefer 6 sharps and not 6 flats. Let us say there is the note F#. On violin you would use the "F-finger" and raise it a half step. But if the notation is Gb you would use the "G-finger" and lower it half a step. As soon as you know the piece you might change the fingering, but at the first look sharps means raising fingers and flats mean lowering fingers. Fortunately 6 sharps or flats as a main key is a rare key in violin music, although temporarily keys with an excessive amount of sharps or flats happen but as I said rarely as a main key.
On piano the keys with 6 sharps or 6 flats can be "handy" for the hand position. The best chords for the hand position are those chords which have a mixture of black and white keys.
Comment: A little comment about 6 sharps or 6 flats on the violin. I said I preferred the sharps. But now that I think of it I will say that it is only if it is major; I prefer F# major and not Gb major on the violin, but if it is minor I prefer Eb minor instead of D# minor. Interesting isn't it? But I certainly prefer tunes with fewer sharps or flats than that on the violin.
Answer: The relative (dis)advantage of a key signature relates to the use of accidentals to inflect note throughout the rest of the piece & the effect on the readability of the music as written. (In this answer the word accidental refers only to an inflection sign — sharp, flat, natural, &c — that makes a note different from the key signature. Other answers have inaccurately used the word to describe the symbols in the key signature.)
For example: in a piece in G-flat, V7 of IV (C-flat 7th) would require a B-double-flat, whereas in F-sharp it would be a simple B7. Similarly, a it's not many secondary dominants away to double-sharp territory in F-sharp.
It's a similar choice when writing highly chromatic or atonal music: one would choose to use sharps or flats depending upon the readability of the resulting notation.
As for any intrinsic difference in readability of sharp key signatures over flat key signatures, there is none. One could write a piece in B Major (5 sharps) that is more difficult to read than if it were notated in the enharmonically equivalent C-flat Major (7 flats) by virtue of the nature of any chromaticism.
Comment: You are right on the usage of the term "accidentals". I just edited my post on that. Sometimes I have to think twice when writing in English. I am used to think of those terms in Danish since I am Danish. In Danish sharps and flats are called "fortegn" which means a sign that is written in front of something. Then there are the "loose" ones = accidentals ("løse fortegn") and the "firm" ones which are the key signatures ("faste fortegn").
Comment: Thanks, @LarsPeterSchultz. I like the Danish logic — less apt to confusion —, but English being English we like to maximise the available opportunities for confusion.
Answer: Yes, it is. Just write it in C and when you have finished you may add the sharps in front of the line right behind the clef.
In my opinion it is an advantage to write a piece in C#, because the analys can be  "reduced" to C major, then the perception is easier for reading!
try it with the preludium in C# (WTC of Bach) then transpose it to C#


Git branch showing in remote branch list even after deleting

Question: I have deleted and pushed a branch, but it is still showing in branch -r for other users:
serverAlpha $ git push origin --delete origin/issue186
serverAlpha $ git push

serverBeta $ git pull
serverBeta $ git branch -r
  origin/HEAD -> origin/master
  origin/issue186
  origin/master

I am aware of git remote prune origin however each other user would have to run this. How might I remove the branch such that other users see that it was removed? I cannot expect nor even communicate to all others to prune, and I don't want anybody else basing work off that branch.
Answer: TL;DR
You can't. Some operations are simply local in Git.
git-branch vs. git-ls-remote
The git branch command operates on local refs. The -r flag simply restricts output to remote-tracking branches, but it doesn't talk to the remote directly. On the other hand, git ls-remote will actually show refs from the remote, rather than the local repository.
Removing Someone Else's Refs
You can't do this with Git. The whole idea of a distributed VCS is that state can exist in a non-centralized way. What this means in your case is that refs on someone's desktop may not match the refs in some bare repository on a defined remote.
Would you want someone else to be able to delete a working branch on your desktop? Probably not. Since Git doesn't allow this, you don't need to lose any sleep over it.
The best you can do is remove the branch from the server. If, as you say, you "can't communicate" with others who have already cloned the work, then there's nothing you can do about it except revert or rebase any work that is based on that branch if/when that work is committed to some mainline branch.
Answer: You can't remove other people's branches. They are theirs, even the remote-tracking ones.
Their remote-tracking branches will be deleted the next time they fetch from the remote where you deleted branches, provided they use the -p (--prune) flag (I usually do).
Answer: If you have control of origin and others have already pulled from it you're out of luck.
However, for your use case I would simply make a new commit to the origin/master branch removing all existing files and adding a README that points the users to the correct policy/branches that should be used.
In that way there isn't a fetch issue for previous collaborators that used the branch and it is very clear how collaborators who may have used origin/master before should proceed.


How is Voyager so well known within the Delta Quadrant?

Question: The premise of Star Trek Voyager is that they are hurling through space as quickly as possible, trying to make their way back to Alpha Quadrant. They obviously get off course on occasion, but I'm under the impression that they are trying to make good time, and are usually rushing as much as technologically possible in a bee line way. So I'm curious how so many races they bump into have already heard about them. The phrase "word of Voyager's exploits" is used more than once. For these merchants to be aware of them would entail them having heard a story about some run in Voyager had with some species, then somehow leapfrogging ahead of Voyager and being in a position to be casually carrying on their business when Voyager happens to show up. Is it implied that there are sophisticated communication systems that keep different races throughout the quadrant up to date on stuff that might be happening on the other side of the quadrant?
Comment: Consider that "wprd" travels in a rapidly expanding sphere a heck of a lot faster than Voyager can travel. In at least one example (the Hirogen network), the Delta quadrant communication speed is vastly faster than even Voyager's system.
Comment: "They obviously get off course on occasion" or nearly every episode, it seems like... ;)
Comment: @BrianS Well obviously, I mean it wouldn't make a very interesting episode if they were just flying in a straight line (the closest they came was "Night" I believe and they did a lot of playing it for laughs) I think Voyager does a better job than the rest of the series at dilating time to not conveniently have interesting things happen once a week and have episodes that take place over multiple weeks occasionally.
Answer: The Voyager was one of the most advanced/powerful ships (replicator, teleporter (around 55 minutes in), hologram tech, weapons, etc) in the Delta quadrant, and was making a name for itself since they wanted allies to help them with the journey. A group like that does not stay anonymous for long.
In addition to the Sikarians being interested in Voyager's "stories", the Kazon were in need of resources (and thus political/military power) and were willing to do anything to claim Voyager. The Kazon controlled a large part of where Voyager started, meaning that they had much influence in the communication channels. They gave Voyager a bad reputation (first quote; not sure if it's from Kazon propaganda; can't find one that is) along a lot of Voyager's path, which in turn got those who believed in the Kazon to spread Voyager's reputation even further (I don't remember too many specific episodes where Voyager is unwelcome). Other spacefaring civilizations no doubt have their own [FTL] communication networks, which further spread information about Voyager, along with its reputation with each particular group.
Also, since subspace communication is FTL, and travels at warp 9.9997, it is already traveling faster than Voyager's maximum warp speed of 9.975. Combined with the fact that Voyager is not always traveling at high warp, or even flat out stopped (orbiting a planet, marooned, landed, etc), information has lots of time to travel.
Or if you prefer, tl;dr, gossip travels really really fast. Google something along the lines of information propagation for more technical details.
Comment: Nothing you said in those paragraphs was off-topic, so I'm not sure what Lohoris is writing about.
Comment: The first two paragraphs are completely OT, but the following two contain a good answer.
Comment: what is this OT?
Answer: Well, yes.  Right near the beginning of the series, in 1x10, Prime Factors, they encounter the Sikarians' spatial trajector.
In the course of the episode, Harry Kim is transported 40,000 lightyears away.  That's over half of the distance back to the Alpha quadrant.
Additionally, the Sikarians are highly interested in stories.  Voyager's journey home would make quite a story all on its own, so there's not a whole lot of doubt that they would hear of its exploits while hopping around the galaxy.  And probably spreading those same stories further.
Comment: My understanding was that the Sikarians sought out the Voyager crew in the first place, "We've been looking all over for you" style, i.e. The news of the Voyager crew was already spreading at that stage
Comment: The Sikarians had the technology to travel far further and faster than *Voyager* though. Some of their people could have witnessed *Voyager* in action, or spoken to people who did. They could also have propagated that knowledge further along *Voyager*'s route.
Comment: @Robotnik I don't quite remember that, but it still completely fits with this answer.  It's not like their trajector could only go in one direction.
Answer: Because:

They say gossip travels faster than warp speed.
-The Doctor, VOY: Someone to Watch Over Me

In seriousness, calccrypto touches on one significant factor: Subspace communications travel faster than Voyager's maximum warp speed (apparently warp 9.9997 (although that statement seems to be uncited, it is consistent that subspace comms are faster than starships), compared to Voyager's top speed of warp 9.975). So in that respect, the Doctor is completely correct -- gossip does travel faster than (a ship at) warp.
The other side of the coin is that, while Voyager does want to get home, they spend a lot of time not doing that. It's not just "getting off course on occasion", although that does of course happen, but it's also that Captain Janeway and her crew are still at heart explorers, and jump at almost any opportunity to meet new cultures, to explore strange new phenomenon, or just to lend a helping hand now and again. To say nothing of the time spent acquiring fresh resources, making repairs, fighting/running from hostile aliens, or giving the warp engines a bit of a breather (maximum warp can only be kept up for so long, and even standard cruising speed isn't indefinite).
Plus, it seems like almost every other episode they're going dozens to hundreds to even thousands of light-years in the wrong direction, just to check out something neat or to respond to a distress beacon. That alone would give their reputation and rumors about their exploits ample time to stay well ahead of them, as every 1 light-year that they back-track is 2 light-years behind where they otherwise would have been!


John 16:12 - What were the "many things"?

Question: In John 16:12, it is written,

I still have many things to say to you, but you cannot bear [them] now.
Ἕτι πολλὰ ἔχω λέγειν ὑμῖν ἀλλ᾽ οὐ δύνασθε βαστάζειν ἄρτι (Textus Receptus, 1550)

Does the Bible ever state what these "many things" were?
Answer: [Acts 1:2-3 NKJV]
2 until the day in which He was taken up, after He through the Holy Spirit had given commandments to the apostles whom He had chosen,
3 to whom He also presented Himself alive after His suffering by many infallible proofs, being seen by them during forty days and speaking of the things pertaining to the kingdom of God.
According to verse 3, the "many things" were the things pertaining to the kingdom of God. Jesus has been speaking about the kingdom of God during His 3.5 years of earthly ministry as seen in the four gospels. His speaking at the time was limited by time, space and the capacity of His disciples to receive them. However, after resurrection He can intensify His speaking greatly because now He is no longer limited by time and space.
Immediately after resurrection, He trains His disciples for forty days to live by His invisible presence and He continues to speak about the kingdom of God. At the day of Pentecost, He pours His spirit upon them and now they even become the "bearer" of His speaking.
And today He is still speaking to His believers concerning all things of His kingdom through His written word and His anointing deep within (1 John 2:27).
Answer: The Ἕτι πολλὰ"(yet many[things]) is implied by 'many words I must say to you, but you cannot hear them now'. The "things" is implied to mean "words", since "things" is not spelled out, yet we know contextually He is speaking, and not some other activity.
What further illustrates this verse is the following,(vs 13-TR)

ὅταν δὲ ἔλθῃ ἐκεῖνος τὸ πνεῦμα τῆς ἀληθείας ὁδηγήσει ὑμᾶς εἰς πάσαν
  τὴν ἀληθείαν· οὐ γὰρ λαλήσει ἀφ' ἑαυτοῦ ἀλλ' ὅσα ἂν ἀκούσῃ λαλήσει καὶ
  τὰ ἐρχόμενα ἀναγγελεῖ ὑμῖν

"When however might have come He the Spirit of Truth he will guide you into the truth of all; not indeed will he speak from himself, but whatever he may hear he will speak; and the (things) coming he will declare to you."
Again, the "things" are words, yet Jesus is saying that the Spirit of Truth(Holy Spirit) will speak the words that Jesus would say, in the time they need to hear them.
In conclusion: Ἕτι πολλὰ" defines "Yet many(things)....", the verb "λέγειν"(to say) defines what "things" in English we need to understand.


How to write a Unit Test?

Question: I have a Java class. How can I  unit test it?

In my case, I have class does a binary sum. It takes two byte[] arrays, sums them, and returns a new binary array.
Comment: You can utilize a tool like [jUnit](http://www.junit.org/) and write test cases (test methods) for your java class. Then invoke the jUnit tests as part of the build process (ant/maven). Using jUnit is not hard at all, the tough part is coming up with as many test scenarios you can think of so that you catch the bugs early and often.
Comment: Please mention "in Java" in the title (now I cannot do that, the edit queue is full)
Answer: I provide this post for both IntelliJ and Eclipse.
Eclipse:
For making unit test for your project, please follow these steps (I am using Eclipse in order to write this test):
1- Click on New -> Java Project.

2- Write down your project name and click on finish.

3- Right click on your project. Then, click on New -> Class.

4- Write down your class name and click on finish.

Then, complete the class like this:
public class Math {
    int a, b;
    Math(int a, int b) {
        this.a = a;
        this.b = b;
    }
    public int add() {
        return a + b;
    }
}

5- Click on File -> New -> JUnit Test Case.

6- Check setUp() and click on finish. SetUp() will be the place that you initialize your test.

7- Click on OK.

8- Here, I simply add 7 and 10. So, I expect the answer to be 17. Complete your test class like this:
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
public class MathTest {
    Math math;
    @Before
    public void setUp() throws Exception {
        math = new Math(7, 10);
    }
    @Test
    public void testAdd() {
        Assert.assertEquals(17, math.add());
    }
}

9- Write click on your test class in package explorer and click on Run as -> JUnit Test.

10- This is the result of the test.

IntelliJ:
Note that I used IntelliJ IDEA community 2020.1 for the screenshots. Also, you need to set up your jre before these steps. I am using JDK 11.0.4.
1- Right-click on the main folder of your project-> new -> directory. You should call this 'test'.

2- Right-click on the test folder and create the proper package. I suggest creating the same packaging names as the original class. Then, you right-click on the test directory -> mark directory as -> test sources root.

3- In the right package in the test directory, you need to create a Java class (I suggest to use Test.java).

4- In the created class, type '@Test'. Then, among the options that IntelliJ gives you, select Add 'JUnitx' to classpath.

5- Write your test method in your test class. The method signature is like:
@Test
public void test<name of original method>(){
...
}

You can do your assertions like below:
Assertions.assertTrue(f.flipEquiv(node1_1, node2_1));

These are the imports that I added:
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Test;

This is the test that I wrote:

You can check your methods like below:
Assertions.assertEquals(<Expected>,<actual>);
Assertions.assertTrue(<actual>);
...

For running your unit tests, right-click on the test and click on Run .

If your test passes, the result will be like below:
Answer:
Define the expected and desired output for a normal case, with correct input.
Now, implement the test by declaring a class, name it anything (Usually something like TestAddingModule), and add the testAdd method to it (i.e. like the one below) :

Write a method, and above it add the @Test annotation.
In the method, run your binary sum and assertEquals(expectedVal,calculatedVal).
Test your method by running it (in Eclipse, right click, select Run as → JUnit test).
//for normal addition
@Test
public void testAdd1Plus1()
{
    int x  = 1 ; int y = 1;
    assertEquals(2, myClass.add(x,y));
}

Add other cases as desired.

Test that your binary sum does not throw a unexpected exception if there is an integer overflow.
Test that your method handles Null inputs gracefully (example below).
//if you are using 0 as default for null, make sure your class works in that case.
@Test
public void testAdd1Plus1()
{
    int y = 1;
    assertEquals(0, myClass.add(null,y));
}

Comment: Yes, `@Test` notation is required. This is done to signal the unit test runner that this method represents a unit test and should be executed. Methods that are not annotated with `@Test` are not executed by the test runner.
Comment: 1. is the @Test notation required?
2. why not test for null input with with assertNotNull?
3. where are the results of the unit tests captured? how are the results indicated to the user?
Comment: for the second test - shouldn't adding a `null` to `y` just give you `y`?
Comment: Thanks! I wanna know why there is no need to add `static` to the modifier of the test method.
Answer: This is a very generic question and there is a lot of ways it can be answered.
If you want to use JUnit to create the tests, you need to create your testcase class, then create individual test methods that test specific functionality of your class/module under tests (single testcase classes are usually associated with a single "production" class that is being tested) and inside these methods execute various operations and compare the results with what would be correct. It is especially important to try and cover as many corner cases as possible.
In your specific example, you could for example test the following:

A simple addition between two positive numbers. Add them, then verify the result is what you would expect.
An addition between a positive and a negative number (which returns a result with the sign of the first argument).
An addition between a positive and a negative number (which returns a result with the sign of the second argument).
An addition between two negative numbers.
An addition that results in an overflow.

To verify the results, you can use various assertXXX methods from the org.junit.Assert class (for convenience, you can do 'import static org.junit.Assert.*'). These methods test a particular condition and fail the test if it does not validate (with a specific message, optionally).
Example testcase class in your case (without the methods contents defined):
import static org.junit.Assert.*;

public class AdditionTests {
    @Test
    public void testSimpleAddition() { ... }

    @Test
    public void testPositiveNegativeAddition() { ... }

    @Test
    public void testNegativePositiveAddition() { ... }

    @Test
    public void testNegativeAddition() { ... }

    @Test
    public void testOverflow() { ... }
}

If you are not used to writing unit tests but instead test your code by writing ad-hoc tests that you then validate "visually" (for example, you write a simple main method that accepts arguments entered using the keyboard and then prints out the results - and then you keep entering values and validating yourself if the results are correct), then you can start by writing such tests in the format above and validating the results with the correct assertXXX method instead of doing it manually. This way, you can re-run the test much easier then if you had to do manual tests.
Answer: Like @CoolBeans mentioned, take a look at jUnit. Here is a short tutorial to get you started as well with jUnit 4.x
Finally, if you really want to learn more about testing and test-driven development (TDD) I recommend you take a look at the following book by Kent Beck: Test-Driven Development By Example.
Answer: Other answers have shown you how to use JUnit to set up test classes. JUnit is not the only Java test framework. Concentrating on the technical details of using a framework however detracts from the most important concepts that should be guiding your actions,  so I will talk about those.

Testing (of all kinds of all kinds of things) compares the actual behaviour of something (The System Under Test, SUT) with its expected behaviour.

Automated testing can be done using a computer program. Because that comparison is being done by an inflexible and unintelligent computer program, the expected behaviour must be precisely and unambiguously known.

What a program or part of a program (a class or method)  is expected to do is its specification. Testing software therefore requires that you have a specification for the SUT. This might be an explicit description, or an implicit specification in your head of what is expected.

Automated unit testing therefore requires a precise and unambiguous specification of the class or method you are testing.

But you needed that specification when you set out to write that code. So part of what testing is about actually begins before you write even one line of the SUT. The testing technique of Test Driven Development (TDD) takes that idea to an extreme, and has you create the unit testing code before you write the code to be tested.

Unit testing frameworks test your SUT using assertions. An assertion is a logical expression (an expression with a boolean result type; a predicate) that must be true if the SUT is behaving correctly. The specification must therefore be expressed (or re-expressed) as assertions.

A useful technique for expressing a specification as assertions is Design by Contract. These specifications are in terms of postconditions. A postcondition is an assertion about the publicly visible state of the SUT after return from a method or a constructor. Some methods have postconditions
that are invariants, which are predicates that are true before and after execution of the method. A class can also be said to have invariants,  which are postconditions of every constructor and method of the class,  and hence should always be true. Postconditions (And invariants) are expressed only in terms of publicity visible state: public and protected fields, the values returned by returned by public and protected methods (such as getters), and the publicly visible state of objects passed (by reference) to methods.

Many beginners post questions here asking how they can test some code, presenting the code but without stating the specification for that code. As this discussion shows, it is impossible for anyone to give a good answer to such a question, because at best potential answereres must guess the specification, and might do so incorrectly. The asker of the question evidently does not understand the importance of a specification, and is thus a novice who needs to understand the fundamentals I've described here before trying to write some test code.

How to write a Unit Test?


Should my time series be stationary to use ARIMA model?

Question: Should my time series be stationary to use ARIMA model? If yes, so why do we do  Integration in ARIMA?
I read somewhere that ARIMA can handle non-stationary time series, what type of non-stationarity can ARIMA handle?
Answer:
Should my time series be stationary to use ARIMA model?

No, the I-letter stands for the procedure part, which makes stationary time series out of your non-stationary one. This procedure is called "differencing".
However, if you want to use ARMA(p, q) straightforward, then your time series BETTER be stationary. In practice, there is always some degree of uncertainty about "stationarity", since you re only observing the realisations (aka time series), and do not know the real stochastic process random variables. This uncertainty means you just approximately see it's stationary (with a test/graph/etc.), and try to apply ARMA model, or brute force the d-number, though this will give you subpar performance.
ARIMA = ARMA + preliminary differencing procedure.

Why we do Integration in ARIMA

Exactly as stated above: to make your time series stationary.

I read some where that ARIMA can handle non stationary time series,
  what type of non stationarity can ARIMA handle?

It can handle 2 types of non-stationarity: hidden trend (linear, polynomial, seasonals, etc.), and unit roots.
Differencing removes any type of polynomial trend (Mentioned + Exercise in first chapters in Brockwell, https://www.amazon.com/Introduction-Forecasting-Springer-Texts-Statistics/dp/0387953515). The higher-degree polynomial is, the more differencing you need. If there is seasonal pattern, you have to remove it with seasonal differences (different from normal d, google SARIMA).
On the other hand, differencing removes 1 unit root per application. If you have 2 unit roots, you do differencing twice. 3 unit roots - three times, etc.
If you are familiar with time series notation/little theory (lag operator):
In fact, ARIMA(p, d, q) model is ARMA(p, q) model with d unit roots. it can be easily seen from its formula:
$(1 - \theta_1B)(1 - B)y_t = (1 + \beta_1B + \beta_2B^2)\epsilon_t$
This is ARIMA(1, 1, 2) process. In the left side the factor $(1 - B)$ is the differencing operator. However, if you just multiply it with the preceding $(1 - \theta_1B)$, you will get $1 - (\theta_1 + 1)B + \theta_1B^2$ which you can then rewrite:
$(1 - (\theta_1 + 1)B + \theta_1B^2)y_t = (1 + \beta_tB + \beta_{t-1}B^2)\epsilon_t$
But its just ARMA(p+d, q) model expression! Now you can clearly see how differencing makes TS stationary (from unit roots) - you difference the data $y_t$ with $(1 - B)$ first, and you are left with
$(1 - \theta_1B)y'_t = (1 + \beta_tB + \beta_{t-1}B^2)\epsilon_t$
which is already without unit-roots.
Showing any degree polynomial removal with differences is much harder, you can try exercise in Brockwell book (I just trust the author).
Comment: ARIMA models cannot handle *any* type of non-stationarity. For example, it does not handle $\epsilon_t$ with time-varying variance.
Comment: @Ash Could you give an example of what you mean, specifically? Also, my comment is confusing now that the answer has been edited: the answer originally claimed that ARIMA could handle "any type of non stationarity". I was pointing out that it could handle certain types but not others, not that it couldn't handle any type at all.
Comment: @ChrisHaug Heteroscedasticity does not imply non-stationarity in general. ARIMA handles nonstationary time-series.
Comment: @ChrisHaug It is possible to have a stationary process with infinite variance. ARCH is an example of such a process. In your post, you say "cannot handle" and you mention time-varying variance, so my humble guess is that none of your statements are correct.
Answer: First, you have to take into consideration that there is just one way a series can be (second order) stationary but infinite ways the series can be non-stationary. ARIMA models can handle cases where the non-stationarity is due to a unit-root but may not work well at all when non-stationarity is of another form.
Answer: It should be stationary in order to use ARMA(p, q) (a short way of saying ARIMA(p, 0, q)). However, the general ARIMA model can handle nonstationary series as well.
Answer: @Stats, @mlofton, and @asdf are all correct. Let me try to summarize.
Non-stationarity is not a single concept. Rather it is the lack of a single concept -- stationarity. This means that there are (as @Stats mentions) an infinite number of non-stationary structures. There is a non-stationary model where the truth is an ARIMA model (with your specified p,d, and q), but where the coefficients associated with the p and q change every 10 periods. Could the ARIMA model do a good job of modeling that? Making predictions in that setting? Learning coefficients under those conditions? No.
But there are some non-stationary structures the ARIMA model can handle. An $AR(1)$ model with $\phi=1$ is non-stationary in one sense -- the distribution differs for each time period. But we can still model it successfully with an ARIMA (under some conditions). Similarly, data which follows the ARIMA structure more generally is inherently non-stationary. However as long as it sticks to that type of non-stationarity -- namely some finite number of differences being modeled by an ARMA process  -- things are manageable.
This is why there is some disagreement. It is true that there are types of non-stationarity that ARIMA models can handle, but it is also true that there are many types that it is totally worthless in the face of.
Comment: Your characterization of stationarity is incorrect: the marginal distribution of an AR(1) process with $|\phi|<1$ is the same for every period, and it is decidedly stationary. The fact that the conditional distribution $Y_t|Y_{t-1}$ depends on $Y_{t-1}$ does not make it non-stationary.
Comment: On the other hand, the marginal of an AR(1) with $\phi = 1$ is not the same for every time period, and is decidedly not stationary. But I concede that my summary of an AR(1) was overly brief.


Forcing method used in Baker-Gill-Solovay Relativization paper and Cohen's Proof of Continuum Hypothesis Independence

Question: I am generally interested in the forcing method used by Baker-Gill-Solovay and Cohen.  I am looking for as many sources as I can get my hands on concerning either the technique itself or its use. Does anyone have suggestions?
Comment: who points out that its the same technique?
Comment: I second @vzn, i've never seen anyone seriously unifying both constructions. There is some analogy between the results, and the idea of constructing some artificial objects, but that is very very superficial. Presumably one could formalize some things in common, but that would not lead to new insights. Now that does not mean actual forcing (as invented by Cohen) could not be very useful in complexity theory, it has led to some results in weak arithmetic theories, but just that BGS' result, and their idea of relativization, is not a case of forcing (as invented by Cohen).
Answer: For more uses of forcing (via so-called generic oracles) in complexity theory, see The Oracle Builder's Toolkit (freely available from Fortnow's homepage) by Fenner, Fortnow, Kurtz, and Li. They give a general theory of generic oracles, and show its many applications in complexity.
If you're interested in how oracles in complexity are like independence proofs in set theory, you might be interested in the following papers:

Arora, Impagliazzo, Vazirani. Relativizing versus Nonrelativizing Techniques: the Role of Local Checkability.
Impagliazzo, Kabanets, Kolokolova. An Axiomatic Approach to Algebrization. (full version freely available from Kabanets's homepage)

For the uses of forcing in set theory, see the book Set Theory (Set Theory on Amazon) by Jech, especially Parts II and III of the book (not to be confused with "Introduction to Set Theory" by Hrbáček and Jech).
Answer: For an excellent introduction to forcing in set theory, there's Timothy Chow's famous USENET post "Forcing for dummies" as well as the more formal paper that arose from it, "A beginner's guide to forcing".
Answer: For uses of forcing like techniques in proof complexity you might want to look at:

M. Ajtai. The complexity of the pigeonhole principle. In Proceedings of the 29th Annual IEEE Symposium on Foundations of Computer Science, White Plains, NY, 1988, pp. 346–355; and
M. Ajtai. The complexity of the pigeonhole principle. Combinatorica 14 (1994), no. 4, 417–433.

The method of proof is an arithmetical analogue
of forcing (of a kind already used by Paris and Wilkie). More combinatorial (and improved lower bounds) are in J. Krajıcek, P. Pudlak, and A. Woods, Exponential lower bounds to the size of bounded depth Frege proofs of the pigeonhole principle, Random Structures Algorithms, 7 (1995),
pp. 15–39. and T. Pitassi, P. W. Beame, and R. Impagliazzo, Exponential lower bounds for the pigeonhole
principle, Comput. Complexity, 3 (1993), pp. 97–140.
See also:

Miklos Ajtai. The Independence of the modulo $ p$  Counting Principles. ECCC 1994.
Soren Riis. Finitisation in Bounded Arithmetic. 1994, BRICS, Department of Computer Science University of Aarhus.

Recently, Jan Krajicek published a book unifying these forcing techniques:

J. Krajicek. Forcing with Random Variables and Proof Complexity. Cambridge University Press, Dec. 2010. (Draft available from Krajicek's homepage)
Comment: Establishing super-polynomial size lower bounds on propositional proofs for a (uniform) family of propositional statements implies the independence of the corresponding first- (or second-) order formula in the corresponding first- (or second-) order formal theory. E.g., the pigeonhole principle is independent (i.e., true in the standard model, but unprovable) of $V^0$, namely, the theory of "$AC^0$ reasoning"  which corresponds to constant-depth Frege (this is *NOT* resolution); (I use here the terminology of Cook & Nguyen, Logical Foundation of Proof Complexity, 2010; See Cor. VII.2.4 there).
Comment: (cont.) See also Jan Krajicek's book "Bounded Arithmetic, Propositional Logic, and Complexity Theory", Cambridge, 1995, on this. All references above (excluding Krajicek's 1995 book) are available on-line. The connection with forcing is explained in e.g., the 2nd reference of Ajtai above.
Comment: interesting leap but havent seen anyone in papers/books actually compare forcing to pigeonhole principle/proofs...?
Comment: Pigeonhole Principle here is a name of a statement. To show that the statement is independent of a certain theory one uses forcing-like constructions. The references above show how to do this.
Comment: ok, but exponential size proofs of SAT using resolution (via pigeonhole constructions) are not "independent" it would seem... they are just "large"... any online refs pointing the connection out? admit am a bit surprised because many refs on pigeonhole proofs in SAT do not refer to anything about "forcing"....
Answer: see also Forcing in proof theory by Avigad, 30pp, 2004. he cites BGS75 but not in detail. there is some reference to Scott/Solovay as a rephrasing of forcing into boolean-valued models.

Ideas in forcing have been influential in computational complexity; for example, the separation of complexity classes relavitized to an oracle (e.g., as in BGS75) can often be viewed as resource-bounded versions of forcing.


How do I activate this Dwarven mechanism?

Question: I am on a quest where I must retrieve a sword from the ruins of Mzinchaleft. Well, it's been a long (waaaay too long) and perilous journey, but I finally found the sword and everything will be worth the trouble because of all the loot....but I can't get to it because of this thingy:

Obviously, I missed something but I have no idea what it is. There is a room full of loot that's off-limits until I can figure this thing out! How do I activate this?
Comment: One critical addition to the answers here: Spugsley asked how to get into the chamber of loot that is in the vicinity of this mechanism, closed off with the dwarven spear-like bars. Opening the chamber is NOT related to this mechanism, there is a switch on a pillar to the right of the chamber that lowers the bars and gives access to the loot. I overlooked this switch for a while too and thought it had to be related to the weird dwarven mechanism :-)
Comment: That mechanism leads to blackreach (a huge underground area) there are other ways in but I forget which way I took my first time. I did the quest for septimus north of the college of winterhold and that lead me into blackreach. Don't worry you will eventually get in
Answer: Well, you need a special key (and this isn't the only mechanism). In any case, since you don't have it, there should be a lift directly to Skyrim nearby, and you can unlock the route back permanently once you get outside. So it won't be such a long slog, and in any case enemies should stay dead even if you quick travel. The guy* you're looking for is in his outpost on an island north of the College of Winterhold.

 * Septimus Signus, significant because he wrote several books related to the Elder Scrolls and is part of the main quest line.
Comment: Interesting...I was also told to go there for a side-quest line so that's probably why I don't have the needed key. Thanks for the help!
Answer: The Dwarven Mechanism you are trying to open is not related to the sword quest. I'm on the sword quest now, and found the sword next to the Centurian master docking station after I killed him.
I'm trying to find out which quest this Dwarven mechanism is for, which is how I stumbled upon your question. I thought I would let you and others know that you don't need to open the mechanism to get the sword.


Product demo and .net

Question: I have question about using .Net 3.5 or 4.0
I know that .Net is more productive then Qt but i am afraid of problems when my client leave my product because he cant run e.g demo of my app with lack of appropriate framework version.
I wish to ask experienced persons in that matter.
Is that many users that doesn't have .net 3.5?
It worth to make app in .Net 3.5 or better use Qt c++ because .net is not that much productive and more important is that every could run app coded in Qt ?
Comment: @Anna Lear♦: I think the question could be rephrased as "Should I use .NET to build my app because it is easier to build in, or should I build in Qt C++ because it's easier for the client to run? What are your opinions and experiences on this matter?"
Answer: It's not a big issue not to have .Net framework on the machine because the software should be delivered to the customer in installation media with a setup program to install all pre-requisets needed for the application to run properly.
Actually, using native programming languages does not have much advantage in this either because there are usually some libraries to distribute with the application as well. So it's not the point to make you move away from .Net.
Comment: not necessarily - you could build the C++ app with completely static linkage, making a (big) solitary exe to run.
Comment: @gbjbaanb yes I know but it will take more time to load and initialize than one that dynamically links libraries. Static linkage is only good in small applications IMO.
Answer: You should write the application in the most appropriate language/framework combination.
If you use .NET you can create a ClickOnce installer that will, as M.Sameer points out, install the required version of .NET for you. The user still needs to download the framework but you don't need to include it in your installation program. This could be the source of the confusion as your clients will get asked if they want to install it.
If you use something like Qt you'll have to explicitly include those libraries in your installer - this will result in a bigger installation file, but there won't be any "worrying" extra messages for your clients.
Answer: I'm assuming windows windows is the target platform so users will have at least the .NET framework deployed with their OS/Service Pack as outlined here (image is old, but the mail bag snip is more recent).
It's often accepted, and IME it's consistent, that productivity is much higher in a higher level language (ie. C# vs. C++ in this instance).

Product demo and .net


Wunderlist Facebook signin on iPhone?

Question: I signed up to Wunderlist on the Chrome app using my Facebook login, but now I am trying to log in on my iPhone and there is no Facebook option and none of my normal passwords works if I sign in under my email. What am I to do?
Comment: I figured it out. I installed the Mac version and chose "forgot passowrd" and sent myself a new password.
Answer: You need to choose the "forgot password" option to get a new password. Then once you log in with the new password that will be sent to you, you can change it once you're inside. :)
Comment: I did try that, but it makes you put in your existing password, which wasn't working.

Wunderlist Facebook signin on iPhone?


Regularized loop integral confusion when changing integration variable from $l_E\to l^2_E$

Question: I'm currently reading lecture notes on Dimensional Regularization where Wick Rotations are being employed. I understand how to regularize and compute these loop integrals but I'm having trouble rewriting them so the integral can be ready for a table. Take the integral found in the lecture notes: $$I_d=\mu^{\epsilon}\int _0^1dx\int \frac{d^dl}{(2\pi)^d}\
\frac{1}{[l^2-a^2+i\epsilon]^2}$$ where $l^{\mu}$ is the shift variable $l^{\mu}=k^{\mu}-xp^{\mu}$ and $a^2=m^2-x(1-x)p^2$. Now wick rotation can be performed giving us $$I_d=i\mu^{\epsilon}\int _0^1dx\frac{2\pi^{d/2}}{\Gamma(d/2)}\int \frac{dl_E}{(2\pi)^d}\
\frac{l_E^{d-1}}{[l_E^2+a^2+i\epsilon]^2}.$$ All that is worked out in the notes and I understand it but the problem comes in when we prepare the now 1d integral for the use of a beta function. That is the integral $$\int dl_E\
\frac{l_E^{d-1}}{[l_E^2+a^2-i\epsilon]^2}.$$ Were supposed to use the fact that $$\int_0^{\infty}dt \frac{t^{m-1}}{(t^2+a^2)^n}=\frac{1}{(a^2)^{n-m}}\frac{\Gamma(m)\Gamma(n-m)}{\Gamma(n)}.$$ In order to use the formula above, the lecture notes showed $$\int_0^{\infty} dl_E\
\frac{l_E^{d-1}}{[l_E^2+a^2-i\epsilon]^2}=\int_0^{\infty} \frac{1}{2}dl^2_E\
\frac{(l^2_E)^{d/2-1}}{[l_E^2+a^2-i\epsilon]^2}$$ and then the formula can be employed. My confusion results from changing the integration variable from $l_E \to l^2_E$ and where that factor of $\frac12$ comes from. I figured it was just a simple substitution at first by letting $l_E=l^2_E$ but computing $dl^2_E$ left me confused. What am I missing here? I've tried doing the regular change of variables but I'm not understanding the factor of $\frac12$ and the $dl^2$ term. Other than that, I understand the rewriting of the integrand.
Answer: It is indeed just a change of variables, but working it in the $l_E \to l_E^2$ way is a bit messy. I'd rather do it backwards. Notice that
$$\frac{d}{dl_E} l_E^2 = 2 l_E,$$
and hence
$$dl_E^2 = 2 l_E dl_E.$$
Using this,
\begin{align}
\int_0^{\infty} \frac{1}{2}dl^2_E\
\frac{(l^2_E)^{d/2-1}}{[l_E^2+a^2-i\epsilon]^2} &= \int_0^{\infty} l_E dl_E\
\frac{(l^2_E)^{d/2-1}}{[l_E^2+a^2-i\epsilon]^2}, \\
&= \int_0^{\infty} l_E dl_E\
\frac{(l_E)^{d-2}}{[l_E^2+a^2-i\epsilon]^2}, \\
&= \int_0^{\infty} dl_E\
\frac{(l_E)^{d-1}}{[l_E^2+a^2-i\epsilon]^2},
\end{align}
which is the desired result.
Comment: @aygx I merged the $l_E$ coming from the change of variables with the $l_E$ in the integrand's numerator. I'll update the answer to add in an extra step
Comment: So its exactly as I thought. I figured the factor of 1/2 came from the derivative. But why does $\frac12$ $dl^2_E=l_EdlE$ ? Solving for $dl_E$ I get $dl_E=\frac{dl^2_E}{2l_E}$ Where does that $l_E$ term in the denominator go? I assume we just plug in $l_E=1$ since thats the only solution to $l_E=l^2_E$? That and 0.
Comment: Thanks so much for the help, appreciate it!


How to detect screenshots in Ubuntu?

Question: Apart from monitoring keystrokes for Print Screen, is there a way for a tool or software running in Ubuntu (whatever the desktop) to detect that a screenshot or video recording of the whole or a part of the screen is being captured - regardless of the tool used (Gnome Screenshot, Shutter, etc)?
Answer: The short answer is "no, not on a vanilla Ubuntu distribution" (and btw, hitting printscreen is not the only way to take a screenshot).
The somewhat longer answer is that the question is ill-posed.  Whether some approach might work would depend on the specific combination of X server (or whatever display server you are using), window manager, whether you are willing to write your own X extensions, what your threat model is, how tight control you have of your environment, and so on.
I'm curious, though, what is your threat model?
Comment: There are several scenarios. Example 1: detect when users take screenshots of copyrighted content displayed inside a software I developed. Of course they can use their smartphones to take lower quality shots. Example 2: detect if an untrusted third-party software is spying on my desktop.

How to detect screenshots in Ubuntu?


What were the two siblings referencing in episode 5 of No Game No Life?

Question: In episode 5 of No Game No Life, when the two siblings saw the home of the Flugle, they said something and their clothes changed.
I'm pretty sure it was a reference to something, but I can't figure it out.
What were the two siblings referencing?
Answer: Judging by how they said "Laputa is real" as soon as they see it, I googled 'Laputa', and it seems to refer to Laputa: Castle in the Sky, which is a Studio Ghibli film. The poster on the Wikipedia page has the main characters who seem to match the attire that Sora and Shiro change into.
As for the partly censored word they say later, when trying to figure out how to get up to Avant Heim, I am not sure if it is linked to the movie since I haven't seen it. However, considering they comment that "the servers here are better", it seemed like they were using an abusive/offensive word to see if something would glitch. MMORPG games usually kick out players who use such speech, and while I can't recall exactly which game / instance this might be referring to, I have heard similar references before.
Comment: Spoiler: the partly censored word is from the most famous scene of *Laputa: Castle in the Sky* :)
Answer: The previous answer is possibly correct and it may be likely that it is referencing to the Studio Ghibli film. I also agree about @TheGamer007's theory that they were testing to see if using an offensive word would get them 'kicked'.
However, it would be also possible that it is a direct reference to a much earlier literary work, specifically Gulliver's Travels by Jonathan Swift, written in 1726. Laputa is a flying island in the story.
Castle in the Sky's Laputa was also derived from Jonathan Swift's story so it's possible that it's the same for Avant Heim.
Answer: Laputa is the floating sky castle in Castle in the Sky

 Balse / Balus is the "spell of destruction" the two main characters say to destroy the castle at the end of the film. That's why Sora and Shiro remark that "it's not falling" and "it'll take more than magic words."

Also, their clothes are changing to match that of the protagonists in Castle in the Sky.
Answer: I just watched this episode of No Life No Game and can absolutely confirm it is in reference to Castle in the Sky by Studio Ghibli. It was one of my favorite movies as a kid.
The phrase they used was censored because it is a direct word used from the movie to cast the spell of destruction to bring Laputa down, "balse". The pose and clothing they were in while they said it were pretty much exact to what the characters from Castle in the Sky wore when the spell was cast. With all of that combined it is riding on infringement so thats my guess as to why they censored it. This entire episode and the one following actually had a TON of references in it to other movies as well. It was quite fun to watch!
Answer: They are correct it's 100% Laputa: Castle in the Sky, and the censored word is Balse.
Here's the clip english subbed and if interested you can see for yourself here.
https://www.youtube.com/watch?v=ohsNX936ME8


How do I preserve installed applications when migrating Ubuntu to another platform?

Question: I'm looking at maybe moving from an older AMD64 to a new Intel dual-core which is 32 bit. Installation isn't a problem but can I transfer all the installed apps? I haven't been
able to find anything so far on Google except where the migration is to a similar platform and file-system. I won't change the filesystem but the platform will be different. Is there something on the lines of the "World" file in Gentoo?
Answer: You can save your list of packages easily: see "man dpkg" and search for --set-selections and --get-selections.
The basic of it, though is that to save the list of packages:
dpkg --get-selections > package_list
To restore that list on another system:
cat package_list | sudo dpkg --set-selections && sudo apt-get dselect-upgrade
Moving across architectures means that there will be some packages unavailable.  They will be ignored; for example, ia32-libs will not be installable on a 32-bit system.  That selection will be ignored if you're moving from x86-64 to x86.
Comment: Needed to do:$ sudo apt-get install dselect
$ sudo dselect -> Update-> Install . Then sudo apt-get dselect-upgrade worked
Comment: `sudo dselect update`  might also be necessary. Without, I had these errors when running `apt-get dselect-upgrade` :
`dpkg: warning: package not in database at line ...`
See http://askubuntu.com/questions/727067/package-not-in-database-when-restoring-with-dpkg-set-selections
Answer: Funny, here I was using SO as a howto repository (write a question and then select my own answer), but in the time that it took me to write my own answer, I was beaten to the punch thrice!
Anyway, here's my take for the record:
Use dpkg's --get-selections and --set-selections options to capture and select your currently installed packages.
First, export your current package list on your old system:
sudo dpkg --get-selections > mypackages.txt

Then select this list as the packages to install on your new system:
sudo dpkg --set-selections < mypackages.txt

(For extra credit, copy your apt cache directory over to minimize downloads: /var/cache/apt)
Finally, tell apt to download and install the selected packages:
sudo apt-get dselect-upgrade

Answer: For everything you've used apt-get to install, if you want to create a record of what's installed run the following:
dpkg -l|awk '/^ii\s*(.*)\s*/ {print $2}'|packages.txt

This will create a text file with all the packages you have installed.  Then after you do the install, create and run a script with the following:
#!/bin/sh
for p in $(cat packages.txt); do apt-get install $p; done

Notes:
1) Since you're moving from 64 bit to 32 bit, some of the packages might not be compatible.  I would grep packages.txt for '64' before running the script above and find alternatives if they are needed.
2) Anything you've installed from source, you'll have to make a note of and install from source again.
Good luck!
Answer: I'm not sure if this is an answer, but I just discovered the existence of the command aptitude-create-state-bundle. Yes, that's one command. Check out the man page.
Answer: If (like me) you didn't do this before you messed up your system, you can boot into a live-cd or another install, and use chroot to get at this info.
sudo chroot /path/to/old/system /bin/bash

Then do the dpkg --get-selections dance, and you can use the resulting file to setup your new system.
Answer: This is what I generally do to solve similar problem (migrated to a new laptop several times).
There is two addition to the other answers to this question, this will also move your update-alternatives and debconf settings, which always takes a long time to realize those were not transferred.
Backup on old system:
sudo apt-get install dselect debconf-utils
mkdir system-selections
update-alternatives --get-selections > system-selections/alternatives-selections
dpkg --get-selections '*' > system-selections/dpkg-selections
sudo debconf-get-selections > system-selections/debconf-selections

Copy config directory to the newsystem ("scp -r oldsystem:system-selections ~"):
sudo apt-get install dselect debconf-utils
sudo dselect update
sudo dpkg --set-selections  < system-selections/dpkg-selections
sudo debconf-set-selections < system-selections/debconf-selections
sudo apt-get -u dselect-upgrade
sudo update-alternatives --set-selections < system-selections/alternatives-selections

Also, you can use same method to regularly take backups of your home directory and system-selections (mentioned above) to a remote storage. So in case of your laptop broken/stolen, building a similar system is pretty fast.
Answer: The best way I can think of to go about this is to back up the list of installed packages on your current system and then use that list to set what packages to install on the new system. General instructions on how to backup and restore your package selections:
Install tools
sudo apt-get install dselect

Backup Package List
dpkg --get-selections | grep -v deinstall > ubuntu-files

Restore Package Selections
sudo apt-get update
sudo apt-get dist-upgrade
dpkg --set-selections < ubuntu-files
sudo dselect

This will open up a dselect session. Type 'I' and allow dselect to
install of the the packages listed in your ubuntu-files document.
When it's finished, type 'Q' and hit the ENTER key to exit dselect.


What would you call this cut out space in a panel?

Question: What would you call this in English? A Notch / Cavity or something else?
The half panel length needs to be corrected with the width of the "Notch"
Comment: Perhaps a [**slot**](https://www.lexico.com/definition/slot). English speakers would know what was meant.
Comment: Notch or slot..
Answer: Notch would be a reasonable everyday term, though it has many synonyms - cleft, cut, groove, indent etc.
However I believe the technical term in woodworking or masonry is a rebate (N. American rabbet)
The OED provides this as sense 1a of rebate as used in carpentry or masonry (clearly rebate has other meanings - including the obvious commercial one).

A recess or step cut along or into the edge of a piece of wood, stone,
  or other material and usually intended to form a joint with another
  piece or to receive a door, windowpane, etc.; = rabbet n. 1. In North
  America the more usual form is rabbet (see rabbet n. I.).
2004   Sunday Mail (S. Afr.) (Nexis) 19 Dec. h10   How to replace a
  small broken window... Remove old putty with a chisel and take out
  broken glass. Clean out rebate with a chisel to remove any remaining
  putty.

Under rabbet the following is given:

(a) A channel, groove, or slot, cut along the edge or face of a piece
  of wood or other material and intended to receive the edge or end of
  another piece or a tongue made specially to fit (now rare);  (b) a
  rectangular recess made along a projecting angle or arris to form a
  step or shoulder. Cf. rebate n.2 Both forms are extensively used in
  joining or framing wood, the two pieces being commonly either in the
  same plane or at right angles to each other. In a double rabbet (in
  sense 1a(b)) the shoulder on one piece fits into the rabbet of the
  other. In Masonry, a rabbet (in sense 1a(b)) is often made to receive
  the edge of a door, window, etc.; in picture frames the rabbet
  receives the edges of the glass. (b).  †(a) A tongue to fit into a
  groove (obsolete);  (b) any one of the sides of a rabbet made in an
  arris; a shoulder, a ledge.
Comment: @WeatherVane also a rebate does not usually penetrate through the material. For example the part of a door frame into which the door fits is a rebate. The slot in the photo is one part of a _half-lapped_ joint.
Comment: A rebate (rabbit or rabbet in UK too) is usually a *longitudinal* groove. A notched cut-out is a *mortise* or *mortice* (UK).


Start and stop in MS Project

Question: I have a lot of situations where there is a small project that is, let's say, 50 percent done.   Then it's completely put on hold, and restarted a month later.   How is it best to accurately reference it in MS Project without splitting it up?
Comment: I'm not sure I understand - you're saying that project activity is split up by administrative decision, but you don't want project to show it as split?  Shouldn't MS Project reflect reality?
Answer: Suggestion: document and get approval by the project's management committee that adds a milestone at the date where the project is due to start again. Then set upcoming tasks to depend on the milestone.
Answer: You do not have a choice but to split it up.  Schedule is based on time.  If you stopped the work and have some degree of time in between the stop and when it is restarted, you have a split in the schedule.

Start and stop in MS Project