Weight training for body re-composition

Question: I'm 5 '11 183 pounds and about 23% body fat. I'm new to working out and I'd like some help with a weight training (and cardio if needed) program. I'm looking to build on lean muscle mass and lose fat. Thank you!
Comment: This has been asked several times on the site, and is a very broad question as it is stated. If you could research a bit of what you want to do, and narrow it down other than "get more muscular", we can help you with better suggestions. Right now it would be "Eat healthy and do stronglifts or similar". :) Welcome to the site!
Answer: If you're new to lifting just take something basic from the internet, your composition doesn't seem too alarming to overweight or underweight so if you just pick a plan and follow it with Good form(this is important) and push yourself, follow a diet plan and stay consistent with your training you're going to see results.
As someone who is new to training you just need to follow a plan that you will stick to and just start. Learn the form and stay strict with it.
If you google it, the information is there. Once you've been going for a few months if you want to be leaner then start your cardio and cutting but for now, just eat clean and train.
Answer: If you can afford it, I'd suggest to take an appointment with a coach, just to make a program that fits you and get started.
If you want to build muscle and lose fat on the same time, you will have to be careful on your diet, so seeing a nutritionist can be a nice thing too.
Be careful with internet : everybody is different. My diet is perfectly fine for me but not for a lot of people, it is the same for my workout.

Weight training for body re-composition


Connecting a three phase electric motor to a single phase power supply

Question: I would like to know what the cheapest and easiest way to connect a three phase 2.2kW AC induction motor to a single phase 230V power supply is. Also, in this setup, how can the motor be started and stopped? Would there be a need for protection devices?
Answer: The Steinmetz connection is probably the cheapest and easiest, but it only allows the motor to provide 70% of its rated power. See: 3 phase motor running on single phase using steinmetz delta connection
Powering the motor through a Variable Frequency Drive (VFD) allows the motor to provide rated power and also provides variable speed. That may be easier and the cost may be less than any other alternative other than the Steinmetz connection.
What is easiest depends to some extent on the experience of the person doing the conversion.
What is cheapest depends on the willingness and ability to scrounge up and use parts that are used and what materials can be cheaply obtained.
For more information on alternative methods, see: Single-phase to 3-phase conversion
A VFD would provide starting and stopping and protection against motor motor overload protection and ground fault of the motor lines. The input power feed to the VFD would require a circuit breaker or other disconnect means and branch circuit protection. Before purchasing a VFD it is advisable to download and read the manual.


Measurement display while creating a vector layer

Question: I am trying to display the measurement tool on QGIS while I am adding a vector to a vector layer I created. I am using EPSG 4326 and I cannot figure out how to use the measurement tool while creating a vector. Currently I am doing research and I need to gather vectors that are 4km in length that showcase a fault line in the direct center, meaning I need to measure 2 km on each side of the fault line and represent it with a vector. I would like to be as accurate as possible and showing the measurement while creating the vector would help a lot. Is there a way to do this in QGIS?
Comment: Does this answer your question? [Which map projection is suitable for distance measurement purpose in USA?](https://gis.stackexchange.com/questions/349172/which-map-projection-is-suitable-for-distance-measurement-purpose-in-usa)
Answer: The Advanced Digitizing Panel will probably be of use. You can show it with
View > Panels > Advanced Digitizing.
When your line layer is editable and you have Add Line Feature activated, you can then enable Advanced Digitizing with this button:

Once you have begun your line by clicking the first vertex, you can use the  button to specify a fixed length for your line.

However, this won't work if your project and line layer are both in EPSG 4326. It will work if your project is in a projected coordinate system (UTM, or better yet, the local coordinate system) even if your line layer is not. That said, I would recommend working in a local coordinate system rather than EPSG 4326 wherever possible.


Could you give boundary conditions to the gravitational potential given the density distribution?

Question: We´re doing a project that's all about solving differential equations with separation of variables. We´re trying to find the gravitational potential given the density distribution (that has azimuthal density) but we don't know how to define the boundary conditions.
Answer: Every differential equation problem has two parts: the differential equation itself, and the boundary condition. Neither can tell you the other in and of itself. Consider $y'' = -k^2 y$. Is the solution sine or cosine? The answer depends on boundary conditions, and I have to specify them. I can't get them by specifying anything in the equation.
So, say your differential equation is something along the lines of $ \nabla^2 \phi = \rho$, where $\phi$ is a potential and $\rho$ is some source. (Your actual equation may differ from this in constants--but I assume you're solving Poisson's equation anyway.) You're going to need conditions for each coordinate, and the form of it depends on the coordinates you use. If you're in cylindrical or spherical, you have some radius $r$. Usually people take the potential to go to zero at $r \to \infty$, and/or require that $\phi$ be regular at $r = 0$. These tend to pick either $r^\ell$ or $r^{-(\ell + 1)}$ solutions, depending on which one you impose. For angular coordinates, the important thing is often to preserve periodicity, so you want to make sure that $\phi(\theta) = \phi(\theta + 2 \pi)$.


What does "How come" mean?

Question: Is How come a phrase? What does it mean? Is it formal or informal? British or American?
Can I use it in anywhere?
Answer: How come is a fixed phrase with fixed uses of its own.

It means, as you have divined, why, and may be used, like why, either as the head of a noun phrase, or as a bare interrogative, or as an interrogative head; but as an interrogative head it does not take 'DO-support'—that is, it is followed by an ordinary clause in indicative form:

And that's why I went to the party. ... And that's how come I went to the party.
Why? .... How come?
Why did you go to the party? ... How come you went to the party?

It is never inflected: we never say ✲How came or ✲How has come or ✲How comes or anything of the sort.

How come is not used in formal writing or speech; it is distinctly casual.
Comment: @PeterShor That, and "How I came" and "How does it come?" and "How it comes to pass" and "That is how it came about" are no doubt where the phrase originates; but they aren't ***How come***, which takes neither an infinitive nor "that" but a full, unsubordinated indicative clause.
Comment: Can't it be inflected: *"How did you come to go to the party?"*
Answer: It means

I don't understand how that can be. Please be good enough to provide
  an explanation.

It is colloquial, and in some circumstances it might sound rude. As a foreign learner, you should avoid it yourself until you are confident about its use, but it's important for you to understand it.
Comment: Thank you for your answer. So that you have explained, It is informal and I must be careful for using it!! Is it true? Can we say that It means briefly 'why'?
Comment: @hzs_4279. I'd say it was a little more than _why?_ and would be used in different circumstances. No space here to give a complete lesson on it, though.
Comment: I think the sense of rudeness stems from children asking "_How come?_" to people of authority after having been denied a request. It suggests a lack of respect for an authoritative decision; not that I necessarily agree with that perspective.
Comment: @hzs_4279 i think,yes,you can use `how come` instead of  `why`.
Answer: "How come" is actually often seen as a more polite,  less confrontational way of asking "why?" in standard American English.  I encourage my adult ESL students to use it instead of WHY  in most situations.   Often when a person is asked WHY, they feel somewhat defensive, as if the person asking is challenging the action.   In my experience, when a person is asked HOW COME instead of WHY it sounds more like the asker is simply, genuinely asking for help understanding the other person's reasoning rather than challenging it.  That leads to a less defensive response and better communication overall.   I believe students learning English should be taught HOW COME early in the language learning process, at the same time they are taught the basic question words WHO WHAT WHEN WHERE WHY and encouraged to use HOW COME in conversation rather than why. I'm surprised by the above comments that HOW COME has a stronger, more complex or rude meaning than WHY and should be avoided by inexperienced speakers.  I'm going to think about that and see if I can come up with any evidence that this feeling is common.  It is very different than my view of the phrase.
Answer: "How come"  in questions is short for "How does/did/has it come + (that) clause. It is colloquial style. - How come your English is so good?
Answer: I'm not an expert on word history, but I do know that I heard this phrase more often in the South Eastern United States where I grew up more than I hear it in the South West where I have lived for 15 years. It may be best to avoid it outside the South East unless you hear other people using it.
Many have stately that it can be replaced with "why". In many cases, I would agree. However, it needs to have more words with it sometimes.
For example:
How come my knees pop when I stand up?
Why do my knees pop when I stand up?
Or the verb may need to move as in this example.
How come my check engine light is on in my car?
Why is my check engine light on in my car?
I would venture to say that the phrase means more than just "why". I think it may have been shortened from a phrase such as "how did this come to pass". Just a guess though based on my experience using this phrase in the South Eastern United States. Feel free to disagree.
Comment: 'the phrase means more than just "why".' Indeed. In contrast to "why", which can mean "for what reason", "how come" means more specifically "from what cause".

What does "How come" mean?


Race Problem counting

Question: In a race there are n horses.In the race more than one horse may get the same position. For example, 2 horses can finish in 3 ways.

Both first
horse1 first and horse2 second
horse2 first and horse1 second

In how many ways,the race can finish so that a particular horse can never be first.If f(n) is the number of ways, is there any recurrence relation to get f(n).
Answer: Let $g(h,p)$ be the number of ways that $h$ horses can be ordered in $p$ positions.  Then consider introducing an extra horse: it go in one of the $p$ existing positions of $h-1$ horses or in one of the gaps between the positions or before or after all the $p-1$  positions of $h-1$ horses.  This leads to the recurrence $$g(h,p)= kg(n-1,p)+kg(n-1,p-1)$$ starting at $g(1,p)=0$ except $g(1,1)=1$. This gives a table of numbers which are in fact factorials multiplied by Stirling numbers of the second kind.
So for $h$ horses, the number of possibilities is the sum of these, e.g. $\displaystyle G(h)=\sum_{p=1}^h g(h,p)$.  These are called Fubini numbers or ordered Bell numbers.
But you want to exclude a particular horse from being first alone or equal first.  The number of cases where it would be first alone among $h$ horses is equal to the total number of cases with $h-1$ horses and (assuming there is more than one horse) the number of cases where it would be equal first among $h$ horses is also equal to the total number of cases with $h-1$ horses.  So subtract these from the total with $h$ horses to get $$f(h)=G(h)-2G(h-1)$$ and for the special case of $h=1$ see that obviously $f(1)=0$ since the single horse must come first.
Answer: Possible Outline: Let $N(n)$ be the number of possible positions for $n$ horses (not worrying about making sure that one doesn't come in first). Define $N(0)=1$. Let's start counting $N(1) = 1$ clearly. $N(2) = 3$ since both could tie for first, horse A could win and B lose, or B wins and A loses. $N(3) = {{3}\choose{0}}N(0) + {{3}\choose{1}}N(1) + {{3}\choose{2}}N(2)$ because we have that of the $n=3$ horses, we can rearrange the $k = 0, 1, 2$ horses that don't win in $N(k)$ ways.. Continuing you will find that $$N(n) = \sum\limits_{k=0}^{n-1} {{n}\choose{k}} N(k).$$ Now, if you ask how many of those $N(n)$ arrangements have it so that horse A doesn't win, it seems you will find $$f(n) = N(n) - 2N(n-1)$$ where $2N(n-1)$ is the number of ways where horse A does win. Indeed, there are $N(n-1)$ ways to arrange the $n-1$ horses that aren't horse A if horse A is the unique winner, and there are $N(n-1)$ ways to arrange the horses that aren't horse A if horse A is not the unique winner.
Answer: Let's say there're $n$ horses and we don't want horse pony to be the first.
Let's first define $g(k,n)$ which is the number of all possibilities for the $n$ horses to take positions, and they all got ranks from $1$ to $k$. $g(k,n)$ is exactly equal to $k^n - k\times (k-1)^n + \binom k 2 \times (k-2)^n - \dots =  \sum_{i=0}^{k}{(-1)^i \binom k i (k-i)^n}$ by inclusion-exclusion principle.
Now the problem is easy. First order the other $n-1$ horses, and take the position of pony at last. If the other $n-1$ horses take rank from $1$ to $k$ their are $2k-1$ possible position for pony not to be on the first. Therefore, $f(n)=\sum_{k=1}^{n-1}{(2k-1)g(k,n-1)} = \sum_{k=1}^{n-1}{\Big( (2k-1)\sum_{i=0}^{k}{(-1)^i \binom {k} i (k-i)^{n-1}}\Big)}$

Race Problem counting


iPhone: Set recurring reminder to get off an app

Question: Instagram has become a major distraction for me. I will spend hours upon hours mindlessly scrolling, allowing what little time I could have spent doing things I enjoy to slip away. I don't want to delete the app since I sometimes use it to message people. Is there a way, perhaps using Shortcuts, to check if I'm on Instagram, if so, set a reminder (e.g. "Get off!") to pop up every 10 minutes, and once I'm off, delete the reminder?
Comment: A technological fix will not help in the long run. This is something only you can do for yourself. At least you're recognizing that it is a problem, which is a first step in finding a non-technological solution.
Answer: You could activate Screen Time (https://support.apple.com/en-us/HT208982) with a limit set to ten minutes per day which would give you a full screen overlay when your time is up, with the opportunity to extend your usage by one minute, fifteen minutes, or for the rest of the day.
Tine limits can be managed on a per app basis.


Why does my Laptop choose the weaker of two Access Points with same SSID?

Question: My Laptop (running Ubuntu 15.04) receives the signal of two access points with the same SSID. For some reason it always picks the one with ~45% signal quality (-79 dBm) over the one with ~70% (-55 dBm). Is there a way to force a switch to the other one?
Comment: Please do see http://superuser.com/q/844471/243625
Answer: Intra-ESS roaming (i.e. roaming between access points with the same SSID) is typically performed at the WiFi driver/chipset firmware level. It is unlikely your Operating System is having any input into the decision making process.
Inter-ESS roaming (roaming between APs with different SSIDs) is done at the supplicant level, and this is when your OS/supplicant will have a say in who to connect to.
So you need to look at your WiFi card and driver, and check that you are using the most up to date one, and that there are no known issues.
Also, as pointed out by others, with signal strength, the lower the number the better. Chipsets I have worked on usually initiate intra-ESS roaming when the signal strength hits about -80dBm but this will vary between manufacturer.
You could always try walking around with your laptop and watching the signal strength as it drops to see when roaming is triggered.
Answer: Ubuntu does not choose the strongest connection, it takes the last one you have used.
You can use apt-get install wifi-radar to install this software and set preferences for ssids.
Comment: Even when forcing the Laptop to connect to the 2nd (better) AP by turning the 1st one off for a bit it switched back again the second the worse one became available again :-/ We could actually fix this behavior by changing the 1st AP's channel. Seems like Ubuntu treats it as a new connection now and stays with the better AP.
Answer:
For some reason it always picks the one with ~45% signal quality over the one with ~70%.

Are you reading the numbers correctly?
It is common to show the Signal strength and not a percentage (%).
That would then be -45dBm and -70dBm readings, where the first is the stongest.

Have you got an Android phone?
Try this: https://play.google.com/store/apps/details?id=com.farproc.wifi.analyzer&hl=en
... it is free (slight add-banner at bottom)
and allows some layman analysis based on the figures and graphs it shows.
Comment: I was referring to the signal to noise ratio which we laymen interpret as "signal quality". The AP in my office had the far better (above 70%) ratio over then one in the next office. I don't know the dBm by heart but will gladly fill them in on monday.
Comment: update to Answer...
Comment: I'm running wavemon on the laptop which does provide me with all the data I need. Thanks for the pointer, though. I added the dBm for clarification.


How to restrict the users' shell allowing to execute shell programs

Question: Is it possible to prevent any user to not use commands like ls, rm and other system commands which could harm the system. But the users should be able to execute shell programs.
Comment: Oh, no, not the dangerous `ls` command!
Comment: Why would you want to do this? Can't you write a program with which they interact?
Comment: What kind of shell programs they should execute?
Comment: Do you mean "run shell programs of their own creation", which has the obvious security problem..
Answer: Your question should be:
I don't trust my users.  The dumb ones see something on the internet and try it out without understanding what it does.  The devious ones like to snoop around and look at other peoples files and steal their ideas.  And the lazy, don't get me started on the lazy ones.
How do I protect my system and my users from my users?

First, unix has very a very comprehensive filesystem permissions system.  This seems to be a decent tutorial on unix filesystem permissions.  The gist of this is that directories can be set such that a user can go into a directory and can run programs out of that directory but can't view the contents of that directory.  If you do this, for example, on /home, if the user runs ls on /home, they get a permission denied error.
If you're really scared of your users and want to stick them in a supermax type of restricted environment, use something like freebsd's jails or solaris's zones -- each user gets their own tailor made environment.  For added points use ZFS so you can take a snapshot of the environment when they log in so if they delete their files you can just pull them out of the snapshot.
Answer: There are three things that need to be in place to fully do what you're asking for:

A custom shell that lacks the commands you're interested in. This is a hard thing to get, but if you really truly don't want users to have access to some shell primitives, this is the only way to remove them.
Correctly set file permissions. Don't want users to damage the system? Set the permissions so they can't damage the system even if they have the right tools. Of these three steps, this is the easiest step.
Use a mandatory access control technoloy like AppArmor. MACs like AppArmor and SELinux embed permissions in the kernel. These prevent users from running the right tools even if they find them somewhere (and like file permissions, prevent them from using them outside of the restricted box).

Belt, suspenders, and a staple-gun for good measure. Hard to go wrong there.
AppArmor is interesting since the MAC for a specific executable is inherited by all of its children. Set a user's login to be /bin/bash-bob, set the AppArmor profile for that specific binary right, and the only way they're getting out of that permission jail is through kernel exploits. If some lazy install script left /var/opt/vendor/tmp global-writeable for some stupid reason, the user using /bin/bash-bob as their shell won't be able to write there. Set the bash-bob profile to only allow writing to their home directory and /tmp, and such permission mistakes can't be leveraged. Even if they somehow find the root password, the AppArmor profile for /bin/bash-bob will still apply even after they su up since su and the bash process it spawns are children of /bin/bash-bob.
The hard part is building that AppArmor profile.

Create an AppArmor profile for /bin/bash-bob and set it to audit mode
Set Bob's login-shell to /bin/bash-bob
Login as Bob. Do everything you want Bob to be able to do.
Use the auditlog to build the AppArmor profile (SUSE has tools for this, not sure about other Linux distros). This is monstrously tedious, but needs to happen if you need this level of security.

You'll be doing things like:

Approving read access to most of the system libraries
Approving read and execute rights to the selected few allowed system commands
Approving write access to temp spaces
Approving socket creation, if needed

Set the policy to enforce.
Log in as Bob, do things.
Make adjustments.

In my opinion, you only need steps 2 and 3, since in combination they both prevent the ability to do anything harmful outside of the carefully constructed box you set up in both those steps.
Answer: Well, you can set the user's shell to a program you've written that only lets them run certain shell scripts.
Of course this would only be as secure as the program and shell scripts; in practice, this kind of restricted shell typically isn't secure against a smart attacker.
Answer: Don't try and limit commands, limit file permissions.  You can't practically limit people's access to syscalls, so all someone needs to do is provide their own copy of whatever "dangerous" commands you don't want them to execute, and you're stuffed.
Answer: If you want the user to only be able to execute certain scripts/binaries, you can use a restricted shell.
This (as the Wikipedia article mentions) isn't completely secure, but if you can guarantee that no application allowed to run is able to execute a new shell then it is a good alternative.
To setup a users restricted shell, set /bin/rbash (or similar, most shells enter restricted mode when the binary is named r***name*) as the users shell.
Then, edit **.bashrc (or equivalent) and set $PATH to a directory where all allowed binaries/scripts are stored.
Answer: Yes, it's possible, but in practice it would take a lot of work and planning. You can create scripts and have them run as a privileged use, then remove all privileges from the user in question. Or, you can set the user's shell to something of your own making that lets them do only what you explicitly allow.
However, standard permissions in linux make it nearly impossible for a normal user to "harm the system". What sort of harm are you trying to prevent? It's trivial to prevent users from being able to install software or run programs outside of their home directory, and you can use chroot to lock down the system even further.
Comment: You can prevent those using standard linux file permissions...
Comment: I am trying to prevent possible commands like rm -rf /bin ,ls /home/*,
rm -rf /usr/bin,ls /.........................
Answer: You may want to try [lshell][1] (limited shell).

lshell is a shell coded in Python,
  that lets you restrict a user's
  environment to limited sets of
  commands, choose to enable/disable any
  command over SSH (e.g. SCP, SFTP,
  rsync, etc.), log user's commands,
  implement timing restriction, and
  more.

[1]: http://lshell.ghantoos.org/Overview lshell
Answer: The way I usually implement this kind of restrictions requires that several conditions are met, otherwise the restriction can be easily circumvented:

The user does not belong to the wheel group, the only one authorized to use su (enforced via PAM).
The user is given a properly secured rbash with a read-only PATH pointing to a private ~/bin, this ~/bin/ directory contains links to simple utilities:
$ ll ~/bin
total 0
lrwxrwxrwx. 1 root dawud 14 Sep 17 08:58 clear -> /usr/bin/clear*
lrwxrwxrwx. 1 root dawud  7 Sep 17 08:58 df -> /bin/df*
lrwxrwxrwx. 1 root dawud 10 Sep 17 08:58 egrep -> /bin/egrep*
lrwxrwxrwx. 1 root dawud  8 Sep 17 08:58 env -> /bin/env*
lrwxrwxrwx. 1 root dawud 10 Sep 17 08:58 fgrep -> /bin/fgrep*
lrwxrwxrwx. 1 root dawud  9 Sep 17 08:58 grep -> /bin/grep*
lrwxrwxrwx. 1 root dawud 10 Sep 17 08:58 rview -> /bin/rview*
lrwxrwxrwx. 1 root dawud 13 Sep 17 08:58 rvim -> /usr/bin/rvim*
lrwxrwxrwx. 1 root dawud 13 Sep 17 08:58 sudo -> /usr/bin/sudo*
lrwxrwxrwx. 1 root dawud 17 Sep 17 08:58 sudoedit -> /usr/bin/sudoedit*
lrwxrwxrwx. 1 root dawud 13 Sep 17 08:58 tail -> /usr/bin/tail*
lrwxrwxrwx. 1 root dawud 11 Sep 17 08:58 wc -> /usr/bin/wc*

the user is given a restricted, read-only environment (think of stuff like LESSSECURE, TMOUT, HISTFILE variables).
the user is mapped to the SELinux user staff_u and given rights to execute commands as other user as required via sudo.
the user's /home, /tmp and possibly /var/tmp are polyinstantiated via /etc/security/namespace.conf:
/tmp       /tmp/.inst/tmp.inst-$USER-     tmpdir:create   root
/var/tmp   /tmp/.inst/var-tmp.inst-$USER- tmpdir:create   root
$HOME      $HOME/$USER.inst/              tmpdir:create   root

Also, /etc/security/namespace.init makes all skeletal files readonly for the user and owned by root.

This way you can choose whether $USER can execute any command on his/her own behalf (via a link in the private ~/bin directory, provisioned via /etc/skel, as explained above), on behalf of other user (via sudo) or none at all.
Answer: Yes, just change the permissions on these commands.
You might have a better fighting chance by writing a shell command that behaves as to your requirements.
What's not appropriate of the default permissions for normal users on Linux?


cotangent bundle symplectic reduction and fibre bundles

Question: Suppose a compact Lie group $G$ acts on a manifold $M$ with only one orbit type $G/H$ ($H$ denotes the stabiliser group). Then the manifold $M$ becomes a fibre bundle over the quotient manifold $X:=M/G$ with typical fibre $G/H$ and structure group $G$.
On the one hand one could look at the cotangent bundle $T^* X$ of the quotient (which carries a natural symplectic structure).
On the other hand consider the lifted action of $G$ on the cotangent bundle $T^* M$ with moment map $\mu: T^* M\to \mathfrak{g}^* .$ The symplectic quotient $T^* M//G:=\mu^{-1}(0)/G$ inherits the structure of a symplectic manifold.  Here comes the question: Are $T^* X$ and $T^* M//G$ (canonically) symplectomorphic?
Answer: These two symplectic manifolds are canonically symplectomorphic.
Notice first, that the map $\mu$ vanishes on the sub-bundle of $T^* M$ of 1-forms vanishing on the fibers of the fibration $M\to X$. Let us call this sub-bundle by $T_h ^* M$ (h- for horizontal).
To construct the symplectomorphism notice that there is an obvious projection $\pi: T_h^* M \to T^* X$. The restriction of the symplectic form of $T^* M$ to $ T_h^* M$ equals to the pullback of the symplectic form of $T^* X$ under $\pi$. The projection $\pi$ commutes with the action of $G$ and $G$ preserves the symplectic form on $T^* M$. Since the projection $\pi$ just produces the quotient of $T_h^*M$ by the action of $G$, now everything follows from definitions.
Comment: You're right, thanks! One can even show that the pull-back of the Liouville form on $T^* M$ to $T^* X$ is the Liouville form on $T^* X$. Thanks!
Answer: This is more a comment towards Gourishankar than an answer to the original question.
It was part of my thesis, (UCB, about 1986), so, apologies,  I chime in. For simplicity,
I take the case $G$ Abelian, and $H = $ trivial.
 To map $J^{-1} (\mu)$ equivariantly to $J^{-1}(0)$ subtract $\mu \cdot A$ where $A$ is any $G$-connection for $\pi: X \to X/G$.  $J^{-1} (0)/G = T^* (X/G)$
canonically, independent of connection.    The map `momentum shift map
of subtracing  $\mu \cdot A$ from co-vectors  is not symplectic,
relative to the standard structure, but it    becomes symplectic if you subtract
$\mu \pi^* F_A$, where  $F_A = curv(A)$, from the standard structure. So the reduced space at  $\mu$ is $T^*(X/G)$ with the standard structure minus the ``magnetic term''
$\mu F_A$.
For non-Abelian $G$ ($H$ still trivial),  it is easier to explain things in Poisson terms.
$T^* X/G$ is a Poisson manifold whose symplectic leaves
are the reduced spaces in question. The momentum
shift trick turns it  into  $T^* (X/G) \oplus Ad^* (X)$  where $Ad^* (X) \to X/G$
is the   co-adjoint bundle associated to $X \to X/G$ -- its fibers are the
dual Lie algebras for $G$. This direct sum bundle admits coordinates $s_i, p_i, \xi_a$ where $s_i, p_i$ are canonical coordinates on $T^*(X/G)$ induced by  coordinates $s_i$ on $X/G$
and where $\xi_a$ are fiber-linear coordinates on the co-adjoint bundle induced
by a choice of local section of $\pi$. Then the main tricky part of the bracket is that
the bracket of $p_i$ with $p_j$ is  $\Sigma \xi_a F^a _{ij}$,  $F$ being the curvature of the connection
relative to the choice of local section.  The symplectic leaves = reduced spaces
are of the form $T^*(X/G) \oplus $(co-adjoint orbit bundle).
Answer: In addition to Dmitri's answer: when you're doing reduction at non-zero momentum some interesting things happen: the symplectic reduced space $J^{-1}(\mu)/G_\mu$ then becomes a fiber bundle over $T^\ast X$ with typical fiber the co-adjoint orbit $\mathcal{O}_\mu$.  In the case $\mu = 0$, this reduces to the case discussed previously.  This realization is not canonical, though, and depends on the choice of a connection in $M \to M/G$.
The idea of the proof is to relate $J^{-1}(\mu)$ with $J^{-1}(0)$ using the connection one-form, and then to use the isomorphism mentioned previously. Afterwards, the curvature shows up in the reduced symplectic form on $J^{-1}(\mu)/G_\mu$, which is then the sum of the canonical form on $T^\ast X$ and a two-form constructed from the curvature.
In the case where $M = G$, you can choose the Maurer-Cartan form as your connection, and then the isomorphism is $J^{-1}(\mu)/G_\mu = \mathcal{O}_\mu$ with the KKS symplectic form, which is in some sense the "curvature" of the Maurer-Cartan "connection".
Comment: Hello Jvkersch
Could you please elaborate on the method of choosing a connection one form in order to get an expression for the reduced symplectic form
Thanks
Answer: No. Take $M=G$, with action by left translations. Then $T^*G//G$ gives the coadjoint orbits with the Kirilov symplectic str (eg for G=U(n) the complex flag manifolds with the standard Kahler str), while $X$ is just a point.
Comment: Keep in mind that the reduction takes place at 0 momentum. The coadjoint orbit of 0 in $\mathfrak{g}^* $ is 0 itself. So, what's the problem?


Attempting to run a full Monero node on tails

Question: I'm using tails to run monero and have a external SSD which the blockchain is already downloaded on. when attempting to lead monero to the block chain it says my SSD only has 3 gb of space on it. its already mounted to tails and has over 800 gb free. what am i doin wrong.
Answer: Boot tails -> Utilities Disks -> Look if your SSD is there and the size.
On the right part of the window do you see Partition 2 - TailsData
Select it and look at Contents: Mounted at /Home/amnesia/Persistent (around 592 GB).
I Have MoneroBlockhain, monero, monero-gui and monero-gnu directly under:
Home/Persistent
Took me some time to get it all right, but is a safe and secure way.
Good Luck.
Comment: when I open tails and enter disks, I can see my 1 TB SSD, it has 925 GB of free data, and is mounted at /media/amnesia/my passport. it doesn't have a partition 2 for tails data, that's on my thumb drive which I boot tails from(31 gb). should my SSD also have this partition 2. also you stated u have the blockchain stored in persistent storage, isn't that data on the bootable device? in my case, my thumb drive is not large enough nor would it efficiently sync the blockchain, ive tried to put tails on multiple ssds in hopes to keep everything on the same device, yet they never seem to boot up.
Comment: ./monero-blockchain-import --input-file /media/amnesia/PATH/TO/blockchain.raw --data-dir ~/Persistent/PATH/TO/LOCATION
ive been trying to begin the sync using this pathing but i get failure message stating - f bootstrap file not found
Comment: Not sure this will help be this iswhat i use to run monero on tails:

DEAMON:

sudo iptables -I OUTPUT -p tcp -d 127.0.0.1 -m tcp --dport 18081 -j ACCEPT

DNS_PUBLIC=tcp TORSOCKS_ALLOW_INBOUND=1 torsocks ./monerod --p2p-bind-ip 127.0.0.1 --no-igd --rpc-bind-ip 127.0.0.1 --ban-list block_tor.txt --enable-dns-blocklist --data-dir /home/amnesia/Persistent/MoneroBlockChain

I boot directly from my ssd where tails and the blockchain are on.


VMR9 Renderless mode device resetting problem

Question: I'm struggling with this problem for a week.. I hope I can state the
problem clear enough:
So, I setup my custom allocator/presenter and in InitializeDevice() I
create the textures for VMR9
Then, VMR9 calls my PresentImage() function everytime it has a new
frame.
I display render this texture onto a quad and Present() it. If
Present() returns D3DERR_DEVICELOST then I PostMessage() to my
WndProc() to signal a device reset.
Then my WndProc() calls ResetDevice() on my custom object.
ResetDevice() frees all DEFAULT_POOL resources and calls Reset() on
the device. Now let's pause for a moment

At this point Direct3d gives me an error telling me that I still hold
references to some DEFAULT_POOL surfaces... Which I'm pretty sure I do
not because I'm freeing the only texture I allocated. This problem is
a mystery as far as I know... There are numerous unanswered forum
posts regarding this issue dating back to even 2003..

Let's change lanes. In this forum post
http://www.eggheadcafe.com/software/aspnet/29909616/i-did-some-more-e...
it's said that you should stop the graph, disconnect all the pins of
the VMR9, reset the device then reconnect and run the graph again.
When I do that I get another Direct3d complaint:
Direct3D9: (ERROR) :Failure trying to create a texture
Direct3D9: (ERROR) :Texture width is larger than what the device
supports. CreateTexture failed.
I traced the problem to some point where I see that in some function
deep in VMR9 calculates the next power of 2 of the width before
creating some textures (apart from the ones I successfully create in
my A/P). And while tracing I realized this:
My video width is 640. The next power of 2 of 640 is 1024. And I see
that this value somehow becomes 10240. Although I don't even set the
allocation width to 1024. I just pass 640 as my video card doesn't
require pow2 texture sizes.
This is where I stuck..
Is there anybody who knows something about resetting/refreshing the
device with VMR9 ?? Please help.
Thanks in advance.
Fatih
Answer: Since you have a custom allocator/presenter I assume you're using IVMRSurfaceAllocatorNotify9::AllocateSurfaceHelper(); and this method could potentionally allocate multiple surfaces, are you sure all of them are released before the device is reset?


Can I start a new single-player Ark game and save the old one?

Question: I love my current Ark Survival Evolved game, but I would love to start a new single-player game. Is there anyway I can start a new Ark single-player game and save the old one.
P.S., this has to be on the Island, not on Scorched Earth or the Center.
Answer: Technically, yes, if you were to backup your save game data to USB storage.
Comment: It doesn't need to be USB storage. You can copy the save game folder anywhere, even within the same folder the original save folder is in, just rename it. - I save mine in `d:\backups\Ark` for example, which is on the same drive I have the game installed, copying it after every single game to ensure I have a none corrupted backup. I play several different maps simultaneously that way without problems, just swapping out save folders.


sandboxing IoCs and signatures

Question: Sandboxes are used for automated extraction of indicators of compromise (IoCs) that can be used to write signatures. Can this signature then be used, for example, on an IPS system to block certain actions?
Comment: It depends on the IoC, the action, the signature and the IPS, but yes. Can you expand on which part you were curious about? The IPS part, the blocking part, the action part?
Comment: My confusion is that you could read the news, determine an IoC from the article, then configure an IPS to block that action.
Comment: To specifically and immediately answer your question: yes, IOCs can be used to create signatures for your IPS. How can this be done?

Well, IOCs are breadcrumbs attackers leave and organizations gather up to share with each other. There are atomic indicators in an IOC like IP, port #, username, filename, etc that you can configure your IPS to reject.

There are host-based or network-based indicators. Because of all the types of IoCs, your IPS won't be the only tool you use to guard against attacks, though a good one of course.
Answer: After reading your follow up comment - yes, you can and should read news to use indicators published. However, discovering and actioning an IoC yourself is also very important.
The 'Pyramid of Pain' outlines different types of indicators, and groups them by the ease with which an attacker can change them. For example, a hash published in threat intel or VirusTotal can be altered very quickly by an agile attacker. Using a sandbox can provide you agility to meet fast changing threats.
Additionally, some victims may not want the IoC they discovered and blocked to be shared. If it is very targetted malware, the risk of someone publishing the IoC can mean the attacker then alters their TTPs and the victim will need to start all over again (detect and block another IoC).

sandboxing IoCs and signatures


Rigorous Theory of Path integrals

Question: Does there exist a mathematical rigorous theory of the Feynman-Path-Integral in Quantum Mechanics or Quantum Field Theory?
Comment: Does this answer your question? [Is this actually the rigorous definition of the path integral in Quantum Mechanics?](https://physics.stackexchange.com/q/446755/)
Answer: Unambgiously "yes" for ordinary quantum mechanics, "depends on what you mean" for quantum field theory. A good reference is "Quantum Physics - A functional integral point of view" by Glimm and Jaffe.
The path integral in ordinary quantum mechanics can be made fully rigorous without any reservations in terms of measures on abstract Wiener spaces.
Glimm and Jaffe rigorously construct an analogous theory of quantum fields based on the Osterwalder-Schrader axioms, the Euclidean siblings of the Wightman axioms, which, by virtue of the OS reconstruction theorem, also rigorously define Lorentzian quantum fields obeying the Wightman axioms.
Unfortunately, Glimm and Jaffe's construction depends heavily on the spacetime dimension because the convergence properties of various integrals get worse as the dimension increases. There exist rigorous constructions for arbitrary scalar fields in 1+1 dimensions with arbitrary polynomial interaction terms, and some constructions for interacting theories in 2+1 dimensions.
Proving the rigorous existence of interacting quantum field theories in 3+1 dimensions, in particular of theories like the Standard Model, is an open question known as the Yang-Mills millenium problem.
Comment: @naturallyInconsistent I am not aware of any problems in the cases where the path integral is well-defined. The Osterwalder-Schrader reconstruction theorem (see also chapter 19 in Glimm/Jaffe) guarantees analytic continuation of the Euclidean fields and n-point functions produces valid Wightman fields and Wightman functions. (But note that, in general, you can't think of this analytic continuation as a "rotation". The rigorous meaning of "Wick rotation" is really just analytic continuation + the reconstruction theorem.
Comment: You say that it is a solved problem in QM, but isn't the Wick rotation from Euclidean to Minkowski still somewhat problematic? At least, that is the impression I got.
Comment: Yes, that Wick isn't a rotation but is rather analytic continuation is clear to me. But that can only be done if you have an exact integral. If you have a numerical integral, then the analytical continuation will lose too much information.

Rigorous Theory of Path integrals


Which classifier is efficient in dealing with test query which belongs to no trained class?

Question: Suppose classifier trained with 5 class, and input query content does not belong to any of the trained class data.
Naive bayes provides and random class as a result here. Which classifier deals best in such scenario?
Answer: You have trained a model to recognize or discriminate between several particular classes. So when having a new test sample (that according to your knowledge) does not belong to any of this class, the model will fit it to the most similar class.
This is, off course, a very general way of putting it. The behavior and things to consider wether you are using a probabilistic graphical model (like Naive Bayes), linear or non linear classifiers, etc, will vary. However, the principle is the same: the model has learnt the relation among the features of the training data you have used to match particular classes.
More specifically, if you are using a probabilistic approach you can  use the probability of belonging to a class and define a threshold. So if a probability higher than certain value (let's say 65%) is not given, then your confidence on the result will be low, and you might say "I cannot say wether it belongs to any of this 5 classes with certainty".
Other non probabilistic methods have interesting approaches for scoring a new example in terms of probabilities. Check this link for SVM (https://stats.stackexchange.com/questions/55072/svm-confidence-according-to-distance-from-hyperline), which is actually the approach used in Python scikit-learn: http://scikit-learn.org/stable/modules/svm.html#scores-and-probabilities
If you use Random Forests you could use the voting of each tree to define a rate of confidence in a similar way (https://stats.stackexchange.com/questions/94845/how-to-estimate-confidence-level-for-svm-or-random-forest)
A similar thing can be done with K-Nearest-Neighbors by analyzing the distance of the K or J (where J < K) nearest neighbors and just trust the result if they are close to your test sample in some ratio (very generally said, this can be done in many ways).
Now, methods based on deep learning are trying to learn features in an unsupervised way, so your problem could solved in a more interesting way. However, it would not be strict classification anymore, nor you would have the amount of data and servers required to even try it (but just saying :) )


What is this underwater creature?

Question: West Bali, about 10 meters deep. Body is roughly 10 cm across.
Does not move.
Comment: Is that "does not move " in the timeframe you allowed? Or based on a timeframe of months of continuous observation.
Comment: Lack of movement suggests it's not a sea slug. Possibly a strange tunicate?
Answer: I am convinced this is a nudibranch. The features that indicate this are the rhinophores (antennae-like sensory structures at the "peaks"), the cerata or brachial plume (hard to tell which based on this photo, but these are translucent extensions just visible in the "valley" between the two "peaks", if you zoom in). A look here and here shows there is a huge diversity in morphology, but many nudibranchs have some form of these structures. Also, the shape of margins around the edge of the animal matches that of many nudibranch species. These are mobile animals but it is possible it just was not moving during your observation.
Answer: I would say that it is a sea hare of some type based upon its appearance and location above course sand. While it was not moving, that could just be a factor of when it was observed. I wouldn't expect a tunicate to have this appearance or be affixed to sandy sediment.
Comment: Welcome to Biology.SE. You are more likely to get a positive response to this answer if you explain why your identification is correct. Specifically, please [edit] your answer to add discussion of key features that led you to this conclusion and supporting references or at least validated images. Without this your answer is indistinguishable from opinion and is thus inappropriate for this site. ——— You may also wish to take the [tour] and then consult the [help] pages for additional advice on [Answer] and [Ask] effectively on this site.

What is this underwater creature?


Does Ubuntu 14.04 have something like Window's DXDiag?

Question: I need to find out how much video/graphics memory is in my Acer Aspire 3680-2419 laptop so I can try to install a game using Play On Linux. I know it has a Intel Graphics Media Accelerator 950 that's most likely integrated onto the motherboard but I'm not sure. But since I'm fairly new to Ubuntu and Linux in general I'm not sure how to find that info.
Answer: There are various tools that can do this, including:

inxi
$ sudo apt-get install inxi
$ inxi -G
Graphics:  Card: NVIDIA G86 [GeForce 8400 GS]
   X.Org: 1.14.3 drivers: nouveau (unloaded: fbdev,vesa) Resolution: firstname.lastname@example.com
   GLX Renderer: Gallium 0.4 on NV86 GLX Version: 3.0 Mesa 9.2.2

lshw
$ sudo apt-get install lshw
$ sudo lshw -C display
  *-display
       description: VGA compatible controller
       product: G86 [GeForce 8400 GS]
       vendor: NVIDIA Corporation
       physical id: 0
       bus info: pci@0000:02:00.0
       version: a1
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress vga_controller bus_master cap_list rom
       configuration: driver=nouveau latency=0
       resources: irq:16 memory:fd000000-fdffffff memory:e0000000-efffffff memory:fa000000-fbffffff ioport:dc00(size=128) memory:feae0000-feafffff

lshw-gtk
$ sudo apt-get install lshw-gtk
$ sudo lshw-gtk

Then:

hardinfo
$ sudo apt-get install hardinfo
$ hardinfo

Then:

While only hardinfo actually reports the memory available to the graphics card, it is trivial to get that from Google. For example, searching for GeForce 8400 GS finds an NVidia page which tells me that my card has 256MB of memory.
Comment: It is not *trivial*. For example, my [gfx card](http://www.geforce.com/hardware/notebook-gpus/geforce-gtx-670mx/specifications) doesn't have a standard memory listed (I know it's 3GB because the OEM listed 3GB and `nvidia-smi` confirms it). By the way, I don't think those memory values listed are correct, because `lspci -vv` lists similar values with the same labels (`prefetchable`, etc.) for my gfx card, so I think those refer to something else.
Comment: @muru I don't know, to tell you the truth. `lspci -vv` shows me 256M which is the same as shown in `hardinfo` and the Nvidia page.
Comment: Coincidence? Because I checked the output again, and I see it's the exact same values (16, non-prefetchable, 256 and 32, prefetchable). And for my integrated Intel GPU (on a Haswell i5) are 4M, non-prefetchable and 256 prefetchable. Is 256 some magic number? O.o
Comment: @muru well, it's 2^8 :) But yes, I don't really know what those numbers are. I think the best bet is to find out the card's model and then search the interwebs.


Does the tailplane see a higher or lower airspeed than the wing?

Question: The sweepback angle of the horizontal stabilizer is greater than that of the wing. I assume this is to reduce compressibility effects, but it would only make sense if the tailplane sees a higher airspeed than the wing. ¿Is this the case?
Comment: This doesn't make sense, the tailplane and wing are attached to the same structure moving through the air at the same speed, so the airspeed of both has to be the same.
Comment: @GdD The flow is obviously perturbed by the wing and the effective velocity that the tail sees is not the same as the wing. This is implicit in the question.
Answer: "The sweepback angle of the horizontal stabilizer is greater than that of the wing."
Usually it has to be about 5° higher as the the Wing so the critical Machnumber is higher for the Empennage. You dont wanna lose efficiency due to shock waves on the tails (tails have always to work). There are also rules for the thickness and other parameters of the Empennage. You can find some more of them here.
In basic preliminary design the seen speed of the empennage depends on the position of the empennage, but is usually smaller than for the wing, because of the boundary layer(wake). For more detailed design speeds of the jet flow behind a propeller/engine or other cases can be considered too. So not in all cases the airspeed is lower on the empennage and depends on what you are trying to analyze. But the tails should always be able to stabilize the aircraft.
Comment: Thanks. So essentially you're saying that the increased sweepback angle on the horizontal tailplane is due to a lower tolerance for compressibility effects on the empennage due to it's function and not due to a difference in effective velocity. I understood that correctly?
Comment: @steve, the more important factor is that a higher sweep tail is more tolerant to the angle of attack changes: its critical AoA will be higher than for the wing. It is not uncommon to see a swept tail with a straight wing for very subsonic aircraft (e.g. turboprops).
Comment: Yes, that is correct.
But as always there are also "exceptions" e.g. the horizontal tail of the F18. For the YF17(prototype of the F18) the horizontal tail sweep was also initially higher than the sweep angle of the wing. The Horizontal Tail sweep of the protoype was increased further after realising the control authority was not high enough for starts on aircraft carriers. By increasing the sweep the center of pressure is moving backwards increasing the leverarm without other major changes of the configuration.


Why do widows wear white sarees after their husband's death?

Question: After the death of a man (husband), the wife (widow) is not allowed to wear bangles, kumkum (sindhur) and is asked to wear white saree & shave her head. Is there any reference for such a practice in scriptures? And what is the purpose of such a custom?
Answer: I could not find the exact reference of not using saree of any other colors except white. EDIT-On the contrary I found from here that widow women should wear yellow atleast while performing a specific Vrata. So, whether scriptures at all prescribe widows wearing white garments is debatable.

It is prescribed that ceratin Vratas are meant to be observed by women
only. For example women can get the punya obtained by men by observing
the Aswamedha Yagya if they dedicatedly observe the "Ananta Triteeya
Vrata" in winters... The married women to wear red clothes while widows
yellow hued clothes. The unmarried women(girls) should wear only white
clothes.

But shaving off heads are mentioned(pg-20) in a book  called Dharma Bindu: Dharma Bindu contains the essence of all Dharma Shastras.

As a husband passes away and the widow observes the regulations of
widowhood, the woman concerned shall most certainly enjoys a high
level of conjugal happiness in her ensuing life. Since a widow is
distinguished as being one, it is preferred that her head hair is
removed forever, takes a single meal a day and refrain from a second
meal that day! She should not use fragrances and not utilise flowers;
every day she should perform tarpana with 'tilodakas' or black Tilas
with water using 'darbhas'. Those women who are widowed should
consider as the diseased(deceased) husband as Vishnu himself and then her
remaining life would be spent peacefully without problems and even
though as of a woman of auspiciousness.

By "Maharshi" is meant Maharshi Vyasa. Apart from these I could not find anything else. And the exact Sanskrit verses in the image are probably from the Vyasa Smriti.
EDIT
The Mahanirvana Tantra also lays down few rules the widow has to follow. One such rule is she must avoid wearing colored clothes which implies that white clothes are recommended for her.

The widow should not eat twice a day, nor should she eat food cooked
by one who is not her husband's Agnate;
she should renounce sexual enjoyment, animal food, jewels, sleeping on soft beds, and coloured clothes (56).
The widow faithful to her Dharmma should not anoint herself with
fragrant ointments, she should avoid village gossip, and should spend
her time in the worship of the Deities and in the performance of
Vratas (57)
Chapter 10; verses-56,57
Comment: My take is this-  I think the rules are there for our good only. We don't really know what happens in afterlife. If wearing white saree is good for the widows in their afterlives then let them wear . But Hinduism never forces someone. And nowadays not many follow the rules too. as regards Sati Pratha, the scriptures praise it highly but they never mention it as something mandatory. It's entirely upto the widows to decide whether they are willing or not. See my answer here: https://hinduism.stackexchange.com/a/15395/4732 @Rishabh
Comment: I am considering those rules mentioned in book "Dharma bindu" are just an suggestions for widows instead of mandatory rule. It is choice of widow whether she wanna follow these rules or not. Because dharma never makes people act forcefully(against his/her wish).
Comment: Thanks for the clarification, It's just people considers dharma's guidelines as mandatory rules, not only for ourselves but for other also. They forcefully make people to follow these rules whether he/she want or not. One ex. you have shown is wearing white saree which becomes parampara and woman has to wear whether she want or not. And Sati Pratha also became mandatory earlier, when people forcefully make woman get burned with husband's body against her wish. I typed this comment so that future viewers get to know these are guidelines and one has no right to make people follow forcefully.
Comment: The book actually quotes from a whole lot of Scriptures so they are rules only. But people of our age do not follow these rules of course. Actually i have seen in some old Bengali movies that widows always had their hair cut. Not exactly shaved but they sport a short hair something like what a young boy will have.@Rishabh
Comment: Because dharma never makes people act forcefully(against his/her wish).--- Yes it will not make you do something forcefully. It s upto us to choose the path. But Dharma will definitely show us the good side and bad side of any action. @Rishabh
Answer: Yes, some Purāṇas do prescribe widowed women to completely tonsure (shave) their head, and also wear white garments.

1. Widow-Tonsure
Consider the following verses from Skanda Mahā-Purāṇa & Nārada Mahā-Purāṇa respectively.

(i) Skanda Mahā-Purāṇa

(a) Kāśī-khaṇḍa

Verse
22.214.171.124
विधवा कबरीबंधो भर्तृबंधाय जायते । शिरसो वपनं तस्मात्कार्यं विधवया
सदा ॥ ७४ ॥

The braided tresses of hair of a widow cause disaster to the husband. Hence a woman shall always get her hair shaved off.

(i) Skanda Mahā-Purāṇa

(b) Vaiṣṇava-khaṇḍa

While glorifying the importance of Vaisnavas in a kingdom, Maharṣi Bhāradvāja says this -

Verse
220.127.116.11
सकेशा विधवा यद्वद्व्रतं स्नानविवर्जितम् । द्वादशी दशमीयुक्ता तथा राष्ट्रमवैष्णवम् ॥ ३६ ॥

A kingdom without Vaiṣṇavas is like a widow with tresses of hair not removed or like Vrata (without taking) holy bath or like Dvādaśī
with Daśamī overlapping it.

English Translation by G.V. Tagare.

(ii) Nārada Mahā-Purāṇa

Verse
2.23.33
गृहान्निष्क्रमणं स्त्रीणां मास्तु राज्ये मदीयके । मा सकेशा हि
विधवा मास्त्वकेशा मभर्तृका ॥ ३३ ॥

May not be there coming out of women from their houses in my country. May not the widows keep their tresses intact. May not the
ladies with their husbands alive be devoid of hairs.

English Translation by Motilal Banarsidass Publishers

So, from the above two excerpts, it is clear the scriptures prescribe widows to tonsure their heads completely.

2. Widow-clothing
Although, I did not find an explicit verse prescribing white clothes for widow, however, in the Padma Mahā-Purāṇa a verse prescribes white clothes for some vratas.

Padma Purāṇa Verse
1.22.69
विधवा शुक्लवस्त्रं वै त्वेकमेव हि धारयेत् ।कुमारी शुक्ल सूक्ष्मे च
परिदध्यात्तु ॥ ६९ ॥

A widow should put on one white garment only. A. maiden should put on
two white, fine garments.

English Translation by N.A. Deshpande

So, as per this excerpt, in certain vratas at least, a widow must wear white clothes only.


Is there an end to Palpatine's missions?

Question: I have 50 floors so far, and I have noticed that the green death star hologram behind palpatine keeps growing in size as I build up my death star. Does this happen because I do palpatine's missions or because I build up more levels? And is there an end to palpatine's missions? Will it end when the death star hologram behind him grows full?
Comment: Interesting observation about the hologram...I'm at 61 levels and it looks to be about 80% full.  The problem with his missions are that they are worth absolutely nothing...I haven't seen one more than 800 coins.  It's kind of annoying: vader's missions actually become fun and are rewarding, then abruptly end early on, while palpatine's missions are kind of just play the game and not rewarding at all.
Comment: If you look below, I've added a pic of the completed Death Star.  So, at 81 levels it fills in completely, even though there is no end.
Answer: In my case I built all the Service floors, and now Palpatine wants me, according to his genius "plans", to build one more, which is kinda impossible for now... Palpatine's always full of surprises. ;)
So this let me believe he will always summon up new missions randomly. Until you ran out of bux trying to skip the impossible ones.
Comment: Nah I did not skipped any missions, but I did not always followed his plan either.
Comment: dbernard - Interesting!  Did you skip any missions early on, and they've come back to haunt you now?  Or is this just a completely random mission?
Comment: I've built all the levels, and "add another level" still,appears at the top. Palpatine's current mission is "add another level"! Is there any interesting end to this game?
Answer: I have built every floor (including Panna City Medicines twice!).  The Emperor is requesting that I build 2 more of any floor.
I think he's taunting me.

Also, in case anyone is interested, I caught a screenshot of the "completed" death star . . .
Answer: There is an end to the imperial quests but haven't seen any for the emperor


How to multitask with interrupts on Arduino?

Question: I am trying to build a cashless RFID based water dispensing unit. I am using Arduino mega 2560, PN532, relay, flow sensor. Here is the flow of the program in I2C mode; I have two functions, one to scan the card and the other for the flow sensor. As soon as the RFID card is placed on the NFC module, data stored in the card (i.e, date of expiry and balance amount) is obtained and is checked for validity. If the card is valid, then the relay is turned on. A flow sensor measures the quantity of water dispensed. As soon as the limit of 1000 ml is reached, the relay is turned off. The whole process happens serially, when the card scanning is complete, it waits for the entire 1000 ml of water to be dispensed. What I want to achieve is after one card is scanned, 1st relay with the flow sensor has to be turned on and simultaneously the scanning of the second card has to begin. If the first relay is busy, second relay has to be assigned to it. Can I achieve this using Arduino Mega? How do I manipulate the atmega to perform all these tasks at once?
Comment: [BlinkWithoutDelay](https://www.arduino.cc/en/Tutorial/BlinkWithoutDelay) from the Arduino IDE samples is your friend.
Comment: Here's a really thorough write-up I did on how to do bare metal (like Arduino usually is) cooperative multi-tasking: https://stackoverflow.com/a/50032992/4561887
Answer: You do not necessarily need a build a "multitask with interrupts on Arduino".  Instead consider using a state machine.  First define the problem by drawing a state diagram:

Consider all state you wish to be in.  Including your example "...after one card is scanned, 1st relay with the flow sensor has to be turned on and simultaneously the scanning of the second card has to begin...".  Once you have defined all states and the rules that need to be tested for before jumping to a new state you can start programming your state machine.
There are plenty of tutorials including this one on the web specifically for people who want to implement a state machine on an Arduino.  But, briefly, you will want to create a loop that will execute with out stopping over and over again as fast as possible.  This loop will (1) know what the current state is and (2) will repeatedly test to find out if the program can change to any of the possible next states. When you change states is when, if you need to, you perform tasks such at turning the water on or off.
If you forsake the state machine and only use interrupts, testing the code tends to be very difficult.  As controlling exactly when an interrupt occurs relative to other interrupts and the state of the processor becomes problematic and nearly impossible to reliably repeat.  This is why the state machine is suggested. Interrupts can still detect external events. But by using a state machine the program is in control of what happens next. Instead of leaving it up to luck.
Comment: You are welcome.  Please choose the best answer to your question so that others with a similar problem can find your question and an appropriate solution.  Comment if nether solution is the best answer - telling us how to edit the answer to make the overall question & answer better.
Comment: I tried implementing the state machine for my program. It helped me get to the solution. Thanks a lot. Cheers!
Comment: As you mentioned, I designed a state diagram. Hence, it was clear to me in which state each component had to be at a particular time. I ensured that the program did not have to wait for anything to continue. I got the solution by simply manipulating the interrupts used by the flow sensors to make them function almost at the same time. However, I did not entirely implement the state machine program on my arduino. Designing the state diagram helped me get to the solution.
Comment: Glad the answer helped.  Now I have a question for you:  Since it sounds like you implemented your solution using only interrupts, how easy was it to test?  And are you sure you tested every situation?  Are you willing to ride a rocket ship or drive a car running your code?  I'm trapping you.  The answer?  It is very hard to test all situations when interrupts are involved.  That is why I suggested the state machine.  You can still detect situations using interrupts.  But using a state machine means you are in control of what happens when.  Instead of leaving it up to luck.
Comment: Thanks @st2000. You do have a valid point. I will try to implement it using state machines to have control over the program.
Answer: There is no real multitask on Arduinos. The Arduino can only do one thing at a time.
But, you can do things sequentially, one after another, so fast, that a human will think, that it happens simultaneously. This involves a non-blocking coding style, which needs no interrupts

Every delay in your code (at least the long onces) need to be removed. if you want to do timed things, you should use the coding principle from the BlinkWithoutDelay example, that comes with the Arduino IDE.
Also no function should wait for something to happen. Think of a function, that waits for a command from the serial interface. Blocking code would wait indefinitely, until a command was received, preventing any other code from execute. Instead the function could exit fast, when there is currently no command to process, leaving time for the other code to execute.

The whole principle relies on the loop() function executing very fast, so that your code can still be reactive. This works for most of the situations. Only sometimes you need to react that fast, that you need interrupts. Your usecase doesn't seem to belong to the interrupt needed faction.
Comment: Thank you for helping me out! I removed all the delays in my program and got the code working just right.
Comment: @Riya Please mark one answer that fits you most. This will help others seeking for help on similar problems.


ubuntu zfs mount needs to be delayed?

Question: I have a ZFS pool that came out of a freenas box.  I exported it from there and imported it into a Ubuntu 11.10 box.  This has ZFS native installed (Darik Horn's ZFS PPA) which is working fine (i think). The Ubuntu system in installed on a mirrored pair of 320gb laptop drives.
When booting, I sometimes get a 'waiting for hdd warning' on boot (the volume is a copy of another active zfs volume so I dont mind if it gets trashed while I am playing).
Once I am logged in, a zpool status shows that I have corrupted data on random volumes and the recommendation to trash and rebuild.  It once did a resilver when only one drive was showing errors.
If I export the volume and then import -f it, it is fine.  No data corruptions and the volume is mounted ok.
Using gsmartcontrol shows that all drives in the volume have PASSED.
Are my zpool problems a sign of a hdd about to die?  Or just the timing of when things are ready to be mounted.  Can I delay mounting the zfs until the drives are ready?
Any suggestions are most welcome.
Answer: Ignore the SMART status. Few drives report SMART accurately.
If the BIOS is reporting delayed spin-up, and ZFS is reporting checksum errors, then the disk is indeed bad.

ubuntu zfs mount needs to be delayed?


How to express a matrix as sum of two square zero matrices

Question: I have a real square matrix $M$ that I'd like to express as $M=A+B$ such that
$A^2=0$,$B^2=0$. $M$ has an additional property that $M^2$ is a scalar matrix :
($M^2=s^2I$); and it's dimension is a power of 2 : $dim(M)=2^n,n>0$; Any suggestions?
Answer: Regarding what such matrices $M$ can be like and in what dimensions they can exist, here is a relatively thorough (but still incomplete) answer:

If $s=0$, then such matrices $M$ exist in all dimensions. You can take $A=M$ and $B=0$.
If $s\neq0$ (this will be assumed for all remaining bullets), such a matrix $M$ is diagonalizable and the only possible eigenvalues are $\pm s$.
If the dimension $d$ is even, a matrix $M$ with $M^2=s^2I_d$ can be written as $A+B$ with $A^2=B^2=0$ if the eigenvalues $+s$ and $-s$ have the same multiplicity. In other words, up to change of basis, it is sufficient that $M$ is the diagonal matrix $\operatorname{diag}(s,\dots,s,-s,\dots,-s)$ with equal numbers of $s$ and $-s$.
A necessary condition is that both $A$ and $B$ have the same rank $d/2$, but it is unclear whether it implies that the eigenvalues $\pm s$ of $M$ have equal multiplicities.
If the dimension $d$ is odd, no such matrices $M$ exist (unless $s=0$).

These results follow from the following observations.
$\DeclareMathOperator{\rank}{rank}$
Lemma:
If a square matrix $M$ satisfies $M^2=s^2I$ for $s\neq0$, then $M$ is diagonalizable and the only possible eigenvalues are $\pm s$.
Proof:
The properties you are after are independent of basis, so write $M$ in it's Jordan normal form.
Then each upper triangular Jordan block $J$ of $M$ will have to satisfy $J^2=s^2I$.
First, this implies that the diagonal value (eigenvalue) of the block is $\pm s$.
Second, since there cannot be any non-zero off-diagonal entries in $J^2$ and $s\neq0$, the off-diagonals of $J$ must in fact vanish.
This means that $M$ is in fact diagonalizable.
$\square$
Remark:
The lemma is false for $s=0$, which is why I excluded it.
Case where A and B exist:
If the eigenvalues $+s$ and $-s$ have same multiplicity, then $s^{-1}M$ is a direct sum (block diagonal matrix) of copies of the matrix
$$
N
=
\begin{pmatrix}
1&0\\
0&-1
\end{pmatrix}
=
X+Y,
$$
where the matrices
$
X
=
\frac12
\begin{pmatrix}
1&-1\\
1&-1
\end{pmatrix}
$
and
$
Y
=
\frac12
\begin{pmatrix}
1&1\\
-1&-1
\end{pmatrix}
$
have zero square.
This gives a way to construct matrices $A$ and $B$ (as $s$ times a direct sum of the matrices given above).
Details of construction of $A$ and $B$:
Suppose
$$
M
=
s
\begin{pmatrix}
N&\cdots&0\\
\vdots&\ddots&\vdots\\
0&\cdots&N
\end{pmatrix}.
$$
Any $M$ expressible in the desired way is of this form after a change of basis.
You can choose $A$ be the block diagonal matrix
$$
s
\begin{pmatrix}
X&\cdots&0\\
\vdots&\ddots&\vdots\\
0&\cdots&X
\end{pmatrix}
$$
and $B$ can be given the same way using $Y$ instead of $X$.
Now it's evident that $A^2=B^2=0$ (since $X^2=Y^2=0$), $A+B=M$ (since $X+Y=N$), and $M^2=s^2I$ (since $N^2=s^2I$).
General case:
Assume $s\neq0$.
Due to the lemma, an $d\times d$ matrix $M$ with $M^2=s^2I_d$ can be written in the block form
$$
M
=
s
\begin{pmatrix}
I_a&0\\
0&-I_b
\end{pmatrix}
$$
with $a+b=d$.
If $a=b$, we can construct the matrices $A$ and $B$ as above.
Such $A$ and $B$ don't exist if $a\neq b$, as we will see next.
Observations with rank:
It follows from Sylvester's rank inequality that if a $d\times d$ matrix $A$ has zero square, then $\rank(A)\leq d/2$.
The inequality is strict if $d$ is odd.
Also, $\rank(M)=\rank(A+B)\leq\rank(A)+\rank(B)$.
Thus unless both $A$ and $B$ have rank $d/2$, $M$ can't have the full rank $d$.
If $s\neq0$, the condition $M^2=s^2I_d$ requires that $M$ has full rank.
Comment: nice answer...the eigenvalues of the matrices I'm interested in do in fact have the same multiplicity and are nonzero. In fact, I know their eigenvectors : define $D=diag(s,\cdots,s,-s,\cdots ,-s)$ and define $V=M+D$; then $MV=VD$ and $V$ is a complete set of eigenvectors. I don't have a proof of the completeness part but it should follow from $M(M\pm sI)=\pm s(M\pm sI)$...($V^2$ is also scalar); so according to what you have $A$,$B$  should always exist..I would really like to see an explicit construction if possible
Comment: @unknown Thanks! I added an explicit formula for $A$ and $B$, assuming that $M$ is expressed in a particular form (which is always possible after change of basis if $M$ is of the desired type).
Comment: @unknown If you do know that $M$ is similar to $(sI)\oplus(-sI)$, you should state that in the question.
Comment: @JoonasIlmavirta In your third bullet point, you claim that what the OP asks for is possible if and only if $s$ and $-s$ have the same multiplicity, but I only see the "if" part in your answer. Did I miss something?
Comment: @user1551 I didn't want the problem the be too specific but you can edit the question if you think that will improve it...also the $dim(M)=2^n$ can be relaxed to $dim(M)=2n$ since it doesn't affect the answers
Comment: @JoonasIlmavirta thanks for the detailed construction; I verified this with explicit constructions of $A$ and $B$ for all the matrices I'm interested in. A slight variation of the form : using $A=sX \otimes I_{d/2}$ instead of $A= I_{d/2} \otimes sX$ lets $M$ maintain similarity with $sI_{d/2} \oplus -sI_{d/2}$ and makes the calculations easier
Comment: @user1551 Good catch! I had managed to confuse myself. I updated the answer. I thought $\rank(A)=\rank(B)=d/2$ implied that the multiplicities of $\pm s$ are both $d/2$, but it turns out I have no proof.
Answer: Take
$$
A=\begin{pmatrix} 1 & -r^{-1}\cr r & -1 \end{pmatrix},\quad
B=\begin{pmatrix} 1 & -s^{-1}\cr s & -1 \end{pmatrix}
$$
for non-zero $r,s$, and $M=A+B$.
Then $A^2=B^2=0$ and
$$
M^2=(A+B)^2=\frac{-r^2+2rs-s^2}{rs}I
$$
Comment: A more general solution can be obtained by multiplying  $A$ by $a$ &  $B$ by $b$. But your answer is good.
Comment: nice suggestion...this moves the problem to that of finding $r$ and $s$ that satisfy certain equations (here $r$ and $s$ are square invertible matrices of half the dimension of $M$; there's also a set of equation $M=A+B$ which might not have solutions if for example the diagonal of $M$ is zero.
Comment: Sorry, I don't follow. You seem to have demonstrated the possibility of writing $M=A+B$ in some cases, but isn't the $M$ in the OP pre-specified?
Answer: This can always be done for $M$ of even size $2n$, i.e. $M$ is a $2n \times 2n$ matrix.
Set
$P = \begin{bmatrix} 0 & I_n \\ 0 & 0 \end{bmatrix}, \tag{1}$
where $I_n$ is the $n \times n$ identity matrix.  Then
$P^2 = \begin{bmatrix} 0 & I_n \\ 0 & 0 \end{bmatrix}\begin{bmatrix} 0 & I_n \\ 0 & 0 \end{bmatrix} = 0; \tag{2}$
likewise take
$Q = P^T = \begin{bmatrix} 0 & 0 \\ I_n & 0 \end{bmatrix}; \tag{3}$
then
$Q^2 = (P^T)^2 = P^TP^T = (PP)^T = (P^2)^T = 0 \tag{4}$
as well.  Then
$P + Q =  \begin{bmatrix} 0 & I_n \\ I_n & 0 \end{bmatrix}, \tag{5}$
and
$(P + Q)^2 = \begin{bmatrix} 0 & I_n \\ I_n & 0 \end{bmatrix} \begin{bmatrix} 0 & I_n \\ I_n & 0 \end{bmatrix} = \begin{bmatrix} I_n & 0\\ 0 &  I_n \end{bmatrix} = I_{2n}, \tag{7}$
so setting
$A = sP, \tag{8}$
$B = sQ, \tag{9}$
we find
$(A + B)^2 = s^2(P + Q)^2 = s^2 I_{2n} = M. \tag{10}$
Also worth noting:
$(P + Q)^2 = P^2 + PQ + QP + Q^2 = PQ + QP; \tag{11}$
$PQ = \begin{bmatrix} 0 & I_n \\ 0 & 0 \end{bmatrix}\begin{bmatrix} 0 & 0 \\ I_n & 0 \end{bmatrix} = \begin{bmatrix} I_n & 0 \\ 0 & 0 \end{bmatrix}, \tag{12}$
and likewise
$QP = \begin{bmatrix} 0 & 0 \\ 0 & I_n \end{bmatrix}. \tag{12}$
Remark: Not sure if there is a solution for $M$ of odd size.
Comment: I don't think it works for odd, but this is more intuition rather than proof. In order to get $A^2=0$ half or more the eigvals should be 0 (and same for $B^2=0$. At the same time, rank$(A+B) \leq$ rank($A$) $+$ rank($B$). So the only way that works is if $A$ and $B$ have half 0 eigenvalues, which only works if $m$ is even.
Comment: @whyyes It is indeed true that odd dimensions are impossible. Also, it turns out that up to similarity, the matrix $M$ has to be of the form given in this answer. I put the details in a separate answer.
Comment: Sorry, I don't follow. You seem to have demonstrated the possibility of writing $M=A+B$ in some cases, but isn't the $M$ in the OP pre-specified?
Comment: @whyyes:  good points.  I think your ideas might be turned into a proof with a little more work/investigation.
Answer: Another class of solutions:  $A = \left[\begin{matrix}0 &sI \\ 0& 0\end{matrix}\right]$, $B = \left[\begin{matrix}0&0\\sI &0\end{matrix}\right]$.
Comment: This does not answer the OP's question. The OP wants $M=A+B$, but you only make $M^2=(A+B)^2$.
Comment: $(A + B)^2 = sI$
Comment: this doesn't solve $M=A+B$...for example if the diagonal of $M$ is nonzero.
Comment: A+B = \sqrt{s} [0 I; I,0]. (A+B)^2 = sI.
Comment: Wait I'm really confused. If $M = A+B$ then $M^2 = (A+B)^2$? The OP didn't specify any properties for $M$, only $M^2$, which is satisfied.
Comment: oh you mean I"m off by a factor of s? yeah just realized, fixing it.
Comment: If $M=A+B$, of course we have $M^2=(A+B)^2$. Yet the converse is not true. That's why you should prove that $M$ can be written as $A+B$ rather  than that $M^2$ can be written as $(A+B)^2$. In fact, as another comment points out, if $M$ has a nonzero diagonal -- such as when $M=\pmatrix{1&0\\ 0&-1}$, your solution does not apply.
Comment: Oh I see, $M$ is prespecified. That's trickier.


how to curb the smell of fish?

Question: More specifically while cooking it indoors.  My girlfriend hates seafood and hates the smell, is there anything I can do to get this smell to go away faster or reduce its potent aroma when cooking with it ?
Comment: This is an apartment, I am not able to modify my unit.
Comment: Do you already have an exhaust fan?
Comment: Yes but not very powerful.
Comment: Well, a more powerful one will better vent the smell, so you may want to look into that. So will opening the windows, if its at all breezy outside.
Answer: Probably not the kind of answer you are hopping for, but in my case what my dad  (he loves fish, mom and sisters dont) ended up doing was buying a second electric toaster-oven and just use an extension and cook it in the backyard... :S  I guess you could use an electric or gas camping stove too. If there is no backyard... maybe rooftop?
Other than that its just fish fest whenever my mom is away got a trip or something :/
Comment: Although I appreciate the comments, waiting for her to leave town is not an option.  I like my seafood too much!
Answer: i have found that a lampe berger works well to eliminate strong scents after cooking (http://www.lampeberger.us/) -- after all, they were originally invented to help reduce the odors in hospitals and mortuaries! (you can read about their history at wikipedia: http://en.wikipedia.org/wiki/Fragrance_lamp). i use mine after a night of deep frying food to get that smell out. i'm pretty certain it would work on fish just as well.
Comment: Great, my girlfriend will love when this arrives.  Any particular one I am looking for?  Or just the brand itself is known for this type of thing ?
Comment: i believe they are all the same -- it's the way they work that's really key. i haven't tried any others, but i can't see why they would work any better (or worse).
Answer: Lemon juice neutralizes smells very well. Apply to hands in order to remove fishy smell, and to remove smell from enclosed space such as kitchen, squeeze lemon into spray bottle with some water and spray around room.
Answer: Many fish really only smell "fishy" when they're not longer fresh (there are some that just always smell potent, though). Most fish at your local supermarket isn't really at its peak. Unless she's extremely sensitive to the smell of all seafood, switching to different or fresher fish may leave your kitchen smelling better afterwords. For saltwater fish, the freshest fish will be the ones that were frozen on the boat and remain that way until you take it home to defrost properly. I also prefer my shrimp to be individually quick frozen (IQF).
Comment: Perch from lake eerie caught yesterday that we cooked today, smelled fishy.
Answer: This approach will limit your preparation methods, but broiling the fish seems to confine the smelling-up to basically the time between removing the fish from the oven and finishing eating it. It doesn't need to be a full broil; you can just put the oven up to broil with the fish removed and you'll still only need to cook it for 5 minutes or so.
Just make a little bowl of foil to fit the fish, spray hit some kind of non-stick spray, add the fish, add some sauce/fixings, pop it in the oven. It will be done before it has much chance to smell.

how to curb the smell of fish?


Identify a light emitting component

Question: here's a picture of component that is not a LED but emits light, it's a tiny glass light bulb with a resistor and a red plastic case for mounting it.
Answer: It's a neon light. Like it says it works at the mains voltage, you can't make it work at 5 V or so. The thing with the neon light is that it needs a higher voltage to ignite, but then the voltage drops, and the series resistor then will control the current, just like for a LED. So you need the resistor, which may have a high value, like 100 kΩ IIRC. Then the current will be in the order of 1 mA.
Answer: That looks like a neon lamp to me.
Answer: It is a neon light bulb and requires AC voltage to operate.  Typically from a wall socket or other high voltage source.  It will also light up if placed in close proximity to high RF energy (typical of a high voltage transformer as in older television sets or radar units where high RF energy is always present).  It will also work close to some microwave systems.  I used to use them attached to the plastic cover of an alligator clip to test RF energy being produced in an aircraft radar system while I was in the Air Force; and used them to verify proper output of the high voltage section of televisions to see if the transformer was producing sufficient RF to power the picture tube.
Reketek
Comment: Does not require AC.

Identify a light emitting component


12.04 Booting into Terminal

Question: To preface this, I would like to say that I am completely new to Ubuntu and have essentially zero programming experience/experience working with command line and terminal. I installed Ubuntu because I would like to get into programming. If you could provide me with the simplest instructions possible, I would be grateful.
I have a Lenovo Ideapad Y500 (Intel i7, NVidia GT 750m, 1TB HDD, 16GB SSD cache, 8GB RAM) with Windows 8 on it. Using a Live CD, I installed Ubuntu 12.04 onto a 75 GB partition. During the installation, I kept all default settings except for one thing; I decided to encrypt my home folder, and so checked the corresponding box. The installation completed, and I restarted.
Once I restarted, I saw the options

"Ubuntu, with Linux 3.2.0-23-generic"
"Ubuntu, with Linux 3.2.0-23-generic (recovery mode)"
"Memory test (memtest86+)"
"Memory test (memtest86+, serial console 115200)"
"Windows Recovery Environment (loader) (on /dev/sdb3)"
"Windows 8 (loader) (on /dev/sdb5)"
"System Setup"

I chose the first option, and was directed to a screen with the Ubuntu logo and the row of five dots below that change from orange to white. Then, I was brought to a full screen terminal that prompted me to login, which I did. I saw no option to boot into GUI at all, and am lost. I've been searching around and have tried the "startx" command to no avail. Should the command have some sort of context or something?
I've also tried selecting the recovery mode option from the boot manager. I've tried the resume option from the following menu, which eventually just shuts down the computer after displaying a lot of scrolling text that's too fast for me to read.
I've also tried the failsafex mode from the recovery mode menu, which only brings up a terminal box at the bottom of the window that covers the entire bottom part of the screen. Commands won't work in this window.
When I try to access Windows 8, I get a message saying that the EFI file path was not specified or something along those lines. I had to enable Secure Boot in order to access Windows 8 (I had disabled it to be able to boot from the Live CD), which is functioning normally. I am at a complete loss for what to do. Any help will be extremely appreciated.
EDIT: Bonus question! If you could figure out a way for me to boot to Windows 8 without having to enable Secure Boot, it would save me a lot of trouble. I can deal with switching every time, but I'd rather not have to.
Comment: The Nvidia GPU you have there is *very* new. It's only supported by the Nvidia driver 319.17 and up. See http://www.nvidia.com/object/linux-display-amd64-319.17-driver.html for the release notes of that version. Try the lastest 319.x driver. The failing graphics is probably the cause for why you only see the textual login.
Comment: How would I go about installing that driver?
Answer: Your hardware appears to be very new. Much newer than the Ubuntu 12.04 release.
Specifically, for your Nvidia GPU (GT 750M) you'll need the 319.17 or newer driver. The 319.x branch is also the latest one, so you don't have much other options than installing the latest in that branch. At the time of writing this is 319.23.

Add the Xorg-edgers PPA and reload the package sources list. In a terminal run:
sudo add-apt-repository ppa:xorg-edgers/ppa   # confirm the question
sudo apt-get update

Install all updates.
sudo apt-get dist-upgrade

Install the newer 319 driver and the settings utility:
sudo apt-get install nvidia-319 nvidia-settings-319

Note: if you have hybrid graphics (Optimus: both Intel and Nvidia), also install bumblebee-nvidia to be able to use switchable graphics.
Consider installing the newer 3.8 kernel backported from Raring for your very new hardware:
sudo apt-get install linux-generic-lts-raring

Notes:

This is just one way of installing the Nvidia driver. I like the Xorg edgers PPA, but others like to install it from upstream.
It's most likely that the next Ubuntu release will provide the 319.x driver in the repositories, so with 13.10 and up this won't be needed anymore.
Comment: I'm currently in the driver installation process, I just want to know what the benefit of installing the newer kernel is.
Comment: @user170796 Your hardware is very new. To be able to get the most out of it, you should run a newer kernel too. Some features get backported to the 3.2 kernel of Ubuntu, but not all. The 3.8 kernel is from the [Hardware Enablement Stack](https://wiki.ubuntu.com/Kernel/LTSEnablementStack) - in order to have more hardware compatible with 12.04 LTS.
Comment: Ok so I installed the driver and the new kernel, but now when I try to login, after I enter my password and press enter, the screen flashes to black for a second, the quickly flashes the NVidia logo, the goes back to the login page. I am able to get into the system through a guest session, but not my account.
Comment: @user170796 A working guest session indicates that the driver is installed fine. I'd suggest to ask a new question as to why logging in to your user account does not work (because X crashes presumably).
Answer: I'm not sure why you're booting into terminal by default, but as for the Secure Boot issue, once you get into Ubuntu properly, you can install boot-repair from the Software Centre and choose Default Repair. That should add an item called something like Windows 8 UEFI to your boot options, which will boot you into Windows 8. See https://help.ubuntu.com/community/UEFI for more info.
Answer: One you have logged into the terminal, try the following command:
sudo apt-get install ubuntu-dekstop
If there is anthing to install anything then continue, and reboot.
Otherwise can you post the output?
Comment: Executed this command, it displayed a bunch of stuff like extracting files etc. Is there a way for me to capture all the contents of my screen verbatim? After rebooting, it just went back to terminal. I tried the startx command again, didn't work.

12.04 Booting into Terminal


How to fix a slow drip in this exterior faucet?

Question: Now that I've disconnected my hose for the winter, I can see that the exterior faucet/valve on the house I just moved in to has a slow drip (drips once every several seconds). I worry about the water getting behind the stone facade and freezing and displacing things. How can I fix a drip on this kind of valve?
Comment: Google:  How to Fix a Leaky Hose Spigot | Ask This Old House
Answer: You'll want to turn off the water to your house. Then turn the brass nut below the handle counterclockwise with an adjustable wrench and remove the valve stem. There should be a washer at the bottom of the valve stem, replace it, reassemble and you should be good to go. If it still leaks, check the seat in the valve base where the washer presses up against to see if it's smooth and forms a good seal. If it doesn't, there are kits available to grind the seat smooth. In this case, it might be easier to just replace the faucet. Check the back side of the wall to see if you can determine how to remove the faucet since it might be a silcock.
Comment: Like much of everything else on the exterior of my house, the base of the faucet is completely covered and embedded in stucco. Behind that will be brick, and then my front room's wall. Replacing the faucet would be a messy, involved, and expensive endeavor indeed. I will try the other things listed first.
Comment: As @JACK indicates replacing the washer will probably do it. However, if it gets cold enough to freeze you might want to consider either a freezeless faucet or a shutoff inside the house. Since it's a new house for you check in the basement for a shutoff - you may already have one. If so, use it and save yourself a headache in the spring.
Comment: @HoneyDo, the house is new *to me*, it's 50 years old itself. I updated my question text for clarity. There's no shutoffs inside the house, I have to go out to my sidewalk and pull up a metal cover to turn off the water to my house.


VS2008 web service code coverage

Question: I have written a test method for a web service in VS2008, using visual studio test framework.
Everything works fine until I enable code coverage for the web service dll in localtestrun.testrunconfig. Then, when I run the test, I get the result "Not executed". Could you give me an idea for this?
Thank you
Answer: One possible cause of your problem is that you ran the tests in the debugger.  If you run your tests in the debugger, then code coverage is not available.  Make sure you are running the tests without the debugger attached whenever you use code coverage.
Answer: Never mind, I found the issue.
Exception was thrown: The web site could not be configured correctly; getting ASP.NET process information failed. Requesting 'http://localhost:59795/VSEnterpriseHelper.axd' returned an error: The remote server returned an error: (500) Internal Server Error.
Thanks anyway

VS2008 web service code coverage


Is it alright to store frozen meat above frozen prepared foods?

Question: Would this cause any cross-contamination issues since the meat is frozen and wouldn't be dripping down onto any of the frozen prepared meals that have already been cooked?
Comment: Are we taking about a domestic or a commercial situation here? In the latter, sometimes there are rules to minimise risks that would be regarded as insignificant at home, so the answer may be different.
Comment: Commercial situation.
Answer: Are you not wrapping the meat (and the prepared food)?
Wrap the meat, put them in sealable bags (*)  (ziplock type) and you should be OK.
If your meat melts in tour freezer and start dripping, then you have a bigger problem than cross-contamination, fix your freezer.
(*) or better put the meat in a vacuum bag if you have the machine to do it.
Answer: In my experience, it's OK so long as the meat is in a sealed container or bag. However, it's always preferable to place meat on a separate space because it helps prevent your frozen prepared food getting the smell of meat, not to mention the health and safety aspects of having raw meat near cooked food.


advanced custom field (ACF) Repeater + Contact Form 7

Question: I have a Repeater field which creates "jobs"
each job has title, text as sub-fields
and also a contact form 7 form which sends jobs applications.
I want to add hidden field which will also send the sub-field "title"
so whenever form is submitted we know which job the sender sent the application from
Tried to use:
Contact Form 7 Dynamic Text Extension
but it is not working with ACF as far as I'm concern
any help will be appreciated
Comment: Sorry, but your question is unclear.  It would be more helpful to at least see the structure of your ACF code, and how your form is submitted.  But in short... you would want to make a custom form tag to do what you want.
Answer: you could use CF7's 'wpcf7_form_hidden_fields' filter before your form is displayed,
add_filter('wpcf7_form_hidden_fields', 'add_job_title');
function add_job_title($hidden){
 //$current_job is the currenlty job loaded.
 $hidden['job_title']= $current_job->sub_title;
 return $hidden;
}

when the form is submitted, $_POST['job_title'] will have the value of the hidden field.


PC emits buzzing sound when nearby welding machine is on

Question: A desk computer is making odd buzzing sound exactly when welding machine in other room is being used. Is it because they share same electrical grid?
Comment: What kind of welding machine? How is it supplied? 230VAC? 3 phase 400V?
Answer: Likely this is "coil whine" caused by electromagnetic interference (EMI), which could for example happen inside the PSU or maybe the motherboard or graphics card. Very annoying but probably harmless. It could be caused by conducted electrical emissions - wire-bound over the power grid, but it could also be caused by radiated emissions through the air.
Many bad, non-conforming PSUs didn't consider that a PC is a multimedia device where one of the purposes of the product is to play sound. Properly designed PSUs will test for electromagnetic compatibility (EMC) against a broad range of electrical noise frequencies, to ensure that they get no coil whine at certain frequencies. I had a bad one myself which would start to whine as soon as the graphics card did something fancy.
So the most likely reason is that your PSU wasn't properly designed. There should be a decent EMI filter integrated directly on the PSU input from 230VAC. At the very least ensure that the PSU is marked with an UL mark one of these (the CE mark doesn't mean jack). But not even this necessarily means that the PSU is compliant, only that the manufacturer managed to find a fishy-enough test house.
It could less likely be something else inside the PC or the welding equipment causing it. I would btw recommend to put welding equipment on a mains connector with a dedicated fuse of it's own.
Comment: "your PSU wasn't properly designed" I don't fully agree. Products are generally EMC compliant for a specific environment. Products like a welder for industrial environments can have (but must also withstand) much higher emissions than products made to be used in an office. So when a welder and a PC are placed together in the same environment, they are simply not guaranteed to be electromagnetically compatible to each other.
Comment: @Klas-Kenny I think the welder is probably irrelevant, there are a whole lot of things in a home environment that could cause similar conducted and/or radiated emissions. Ovens, water boilers, electrical lawn movers with wire, a starter engine in the garage next door, a moped passing by on the street outside. And so on.
Comment: Well, not really. Since the oven, boiler etc. will need to comply with EMC requirements for residential use. The radiated emissions from a moped on the street will be nothing compared to conducted emissions from the welder. Surely when two (from the EMC requirements point of view) different environments are very close together like this there is a gray area that might induce problems, which is likely exactly what OP is experiencing.
Comment: @Klas-Kenny Btw there's not a lot of differences in EMC compliance for industrial and commercial use. I'm not super up-to-date, but I believe for example radiated susceptibility tests are around 30V/m in either case. Some industrial sub-standards name tougher requirements, like various standards for earth-moving machinery requiring 100V/m etc but these are essentially automotive applications.
Answer: A similar issue happens when I use my radio equipment in my room. A loud buzz comes through the speakers.
It's interference getting picked up by the wire going to the speaker. A shielded wire can fix this - Try wrapping your wire in aluminum foil connected to ground.
When your welder is running, the high voltage can create an electric field that causes electromagnetic interference.


WIS 10901 error while refreshing Webi report

Question: While refreshing Webi report I am getting an error:

A database error occured. The database error text is: (CS) "Unexpected behavior" . (WIS 10901)

All the objects are parsing in the universe and Server is also responding. What can be the possible reason?
We are also able to run query in the database using database client tool.
Answer: If the error message appears after the a long time it might just be a timeout issue.
Else, you could try to import a version of the report that works in CMS to your local drive, rename it and run again.
Answer: It can be caused by some special character in the data combined with the fact that the server language settings do not foresee such character and therefore Business Objects cannot parse it for presentation.
If that is the case you might need to configure an environment variable of the server (like NLS_LANG) setting it to a value such that those special characters in your data can be handled by Business Objects.
Answer: In my situation, the error appera when some objet from the data base has changed or does not exists anymore. So we need to delete this object in the Universe or be sure that the field exists in the data base with the same name and type.
Answer: I had same problem with my reports. After couple hour of "investigation", I found.
I create Object in my universe, and set inappropriate type of object data Number, when value in database have type Character.
It throw me oracle Error (ORA-01722), and Bussiness Object error (WIS 10901), though SQL copied from report creator interface, executed directly on database return proper data.