Lists.GetVersionCollection in SharePoint 2010

Question: I am trying to pull version history for a specific column in a list and cannot get the syntax for the method correct. I keep getting the error,

Exception of type
  'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown

I know that the List ID I am using is the correct list ID and I know that my service reference is working properly because I can get data from other methods such as Lists.GetList(ListName).  Any help I can get would be great.  I am trying to get the version history from the first list item from the column called Description.
Here is my call:
var descriptionVersionCollection = myList.GetVersionCollection("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx", "1", "_Description");

Exception Detail: System.ServiceModel.FaultException was unhandled
  HResult=-2146233087   Message=Exception of type
  'Microsoft.SharePoint.SoapServer.SoapServerException' was thrown.
  Source=mscorlib   StackTrace:
      Server stack trace:
         at System.ServiceModel.Channels.ServiceChannel.HandleReply(ProxyOperationRuntime
  operation, ProxyRpc& rpc)
         at System.ServiceModel.Channels.ServiceChannel.Call(String action, Boolean oneway, ProxyOperationRuntime operation, Object[] ins,
  Object[] outs, TimeSpan timeout)
         at System.ServiceModel.Channels.ServiceChannelProxy.InvokeService(IMethodCallMessage
  methodCall, ProxyOperationRuntime operation)
         at System.ServiceModel.Channels.ServiceChannelProxy.Invoke(IMessage
  message)
      Exception rethrown at [0]:
         at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage
  reqMsg, IMessage retMsg)
         at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData&
  msgData, Int32 type).....
Answer: You should use
var descriptionVersionCollection = myList.GetVersionCollection("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}", "1", "_Description");


Shower head change caused a problem

Question: house built in 1972, changed the screw off shower head for a screw on hand held shower head.  Since then every time someone turns water on in kitchen it effects the water temperature in the shower.  Its like someone turned off the hot water.  Can someone tell me what i need to fix this problem?
Comment: `Its like someone turned off the hot water` ... do you mean that there is no hot at all?
Comment: Changing the shower head won't affect the water temperature or mix.  Whatever is going on is coincidental.
Answer: If you have the old shower head, consider to re-install it temporarily for the purpose of this exercise.
Run the water through the shower head into a five gallon bucket. Measure the amount of time it takes to reach a mark on the bucket.
Replace the shower head with the hand-held unit. Perform the above test again. If the amount of time for the hand-held is shorter than the fixed head, your water flow through the plumbing to the shower has increased. If the time is greater, you have a lower rate of water flow through the new hand-held shower.
It's not unusual for shower temperatures to vary when a hot water tap is opened elsewhere, if pressure and flow are insufficient and/or the plumbing is configured to allow one pipe to take more of the hot water.
I suspect that your flow rate has changed sufficiently to reduce the hot water flow to that leg of the plumbing. Today's shower heads, both fixed and hand-held are supposed to meet US flow rate requirements:

Did you know that standard showerheads use 2.5 gallons of water per
  minute (gpm)? Water–saving showerheads that earn the WaterSense label
  must demonstrate that they use no more than 2.0 gpm. The WaterSense
  label also ensures that these products provide a satisfactory shower
  that is equal to or better than conventional showerheads on the
  market.

Shower head change caused a problem


The others, who is dead or who is alive?

Question: In the movie The Others,
whose family is dead and whose is alive? Victor's family or Nicolas' family?
Who is Lydia and old couples?
Answer: Grace and the 2 children, Anne and Nicholas, are dead and ghosts, but they don't know they are until they found out at the end of the movie. Her husband is also dead; he was killed in the war. Grace killed her children when she was psychotic and then killed herself.
The 3 servants (Mrs. Mills, Tuttle the gardener and Lydia) are also ghosts but they know. They died of tuberculosis 50 years earlier.
Victor and his parents are alive. They are trying to buy the house but discover it is haunted by ghosts. The old woman is a medium who is holding a seance with Victor's family to get rid of the ghosts, which they fail to do.
Answer: In the end , it is revealed that Nicolas family is dead and Victor's family is alive.
That's is the whole twist of movie, that they are not aware that they are dead and they think others as dead.
Refer Wiki


How can I run an async process in the background without popping up a buffer?

Question: I have defined some functions to run async background process using async-shell-command in my .emacs, but everytime I run the commands a new window (not frame) is created and the process' buffer is shown there. How could I run the command without the "pop up" buffer?
Answer: You can start background processes with start-process, which shouldn't pop up a buffer:
(start-process "process-name" "buffer-name" "program")

Process names are modified to avoid duplication as necessary, so don't worry about that. Just give it a name useful for debugging in the future!
If you give a "buffer-name", a buffer will be created but not shown immediately. This can be convenient for managing processes and looking at output. If you don't want a buffer to be created at all, pass nil as the buffer name:
(start-process "process-name" nil "program")

Comment: `"program"` in this case is only program name (e.g nautilus, caja, firefox) and `"arg1 arg2 ..."` should be in the fourth positional argument of `start-process`. I figured that out by reading the documentation :)
Comment: Is it possible to use `start-process` for a sudo command? I tried wrapping my call to `start-process` in `(let ((default-directory "/sudo::")) ... )` but it didn't work for me.
Comment: @sid-kap: I don't know. You should probably ask that as a standalone question.
Answer: Like Tikhon mentioned, (start-process) is the way to go. In case you don't want to create a buffer but would still like to react to the background process status, you can also employ (set-process-sentinel). Here's a modified example I'm taking from my projector package:
(set-process-sentinel (start-process "process-name" nil "command") #'output-message-sentinel)

(defun output-message-sentinel (process msg)
  (when (memq (process-status process) '(exit signal))
    (message (concat (process-name process) " - " msg))))

From the Emacs function description:
(set-process-sentinel PROCESS SENTINEL)

Give PROCESS the sentinel SENTINEL; nil for default.
The sentinel is called as a function when the process changes state.
It gets two arguments: the process, and a string describing the change.

The GNU manual pages on Processes is pretty good for more info.
Comment: The [GNU Emacs manual pages on Sentinels](http://www.gnu.org/software/emacs/manual/html_node/elisp/Sentinels.html) and [Processes](http://www.gnu.org/software/emacs/manual/html_node/elisp/Processes.html#Processes) are actually pretty good for more detailed information.
Comment: Could you describe what `set-process-sentinel` does a bit more accurately? I get the general idea of having a function that manages the process, but I don't fully understand all the details. Thanks!
Comment: If you do `M-x describe-function` and enter `set-process-sentinel` you'll get the short answer from Emacs documentation:

(set-process-sentinel PROCESS SENTINEL)

Give PROCESS the sentinel SENTINEL; nil for default.
The sentinel is called as a function when the process changes state.
It gets two arguments: the process, and a string describing the change.
Comment: Cool. Perhaps you could edit the links into your answer? I guess one could also learn more just using `C-h f`...
Answer: There's no need to change how you run an asynchronous command. Emacs has a generic ability to allow you to control where or whether any buffer will pop-up, by modifying a single data structure, the display-buffer-alist.
In the solution below, you can see that the action function display-buffer-no-window (ie. no pop-up) is set to be associated with any buffer with a name beginning *Asynchronous Shell Command* (emacs adds an incremental suffix when it's asked to create more than one).
To see the list of other available display options, type C-h f display-buffer and look for the list of "action functions".
;; Buffers that I don't want popping up by default
(add-to-list 'display-buffer-alist
  '("\\*Async Shell Command\\*.*" display-buffer-no-window))

Answer: You might also want to check out async-start-process (from emacs-async):
(async-start-process "name" "cmd" nil "arg1" "arg2)

That nil argument is the place for a function to run when it's done.
Whilst emacs-async is an external package it's highly likely you have it as a dependency if you've installed much from MELPA and it makes what you want very easy.


Which software should I use to manage all my books and collections in my Kindle?

Question: I have noticed that at times, when I am having too many books, I make up a mess. Also, I want to be able to easily add books which I have bought or downloaded from some other source.
Like, I may have books downloaded from Project Gutenberg as well as general books bought from the Kindle store, Kindle Unlimited or some PDFs too.
Answer: I like to use Calibre to manage and convert ebooks. You will need Kindle's software for PC in order to download the books, that you can then import on Calibre.
Beware that the books are DRM protected, so you won't be able to convert those.
It is free (both as in '..speech' and in '..beer') and actively maintained.


Algorithm for checking if a list of integers is pairwise coprime

Question: Are thre any efficient algorithms for checking if a list of integers is pairwise coprime, or would a more general algorithm be the best option available?
Comment: yes, every combination of 2 integers must be coprime
Comment: Just to make sure, you mean that every pair of integers in your set is coprime?
Answer: First, two facts about coprime integers:

Iff $a$ and $b$ are coprime, then $ab = \mathrm{lcm}(a,b)$
Iff $a$ is coprime to both $b$ and $c$, then $a$ is coprime to $bc$

It follows from this that a set of distinct integers $\{a, b, \cdots z\}$ is pairwise coprime if its product is equal to its least common multiple.
You can compute the least common multiple by using the following identity:
$$\mathrm{lcm}(a,b,c) = \mathrm{lcm}(a,\mathrm{lcm}(b,c))$$
Assuming you have $n$ numbers with $k$ digits each, and multiplying/dividing/modding two numbers is $O(1)$ (which may or may not be a good assumption depending on your model), then:

Calculating the product of your set takes $O(n)$
Calculating the gcd of two numbers takes $O(k)$
Calculating the lcm of two numbers thus also takes $O(k)$, by reduction to gcd
So calculating the lcm of your entire set takes $O(nk)$

Thus, the time complexity of the entire algorithm is $O(nk)$.
Comment: @D.W. I believe the point is that by testing incrementally, you can bail early once the first non-coprime example is found, as opposed to only after processing the whole list. Since we expect most lists to not be pairwise coprime and we don't have any information about the list being tested, we should expect that the list will probably not be pairwise coprime, and therefore proceed with a procedure that is optimized for that common case.
Comment: If OP is actually implementing this it may be worthwhile to evaluate whether the product/lcm are equal for each number as they are read rather than after multiplying all of them/lcm-ing all of them.  This won't change the complexity but if you expect most lists to not be coprime (as would be the case for a long list of random numbers) then it will most likely be faster
Comment: If you count the number of digits of the numbers, it doesn't make sense to assume that multiplication and division are $O(1)$. They're $\Omega(k^a)$ for some $k \gt 1$.
Comment: @AndreaReina exactly thanks for writing it more clearly
Comment: Another implementation note... Using gcd==1 instead of lcm==prod is probably easier since as far as I know the best lcm algos use the gcd anyway
Comment: @sudorm-rfslash, gcd==1 doesn't work here.  For example, with the list [2,5,2], you get gcd(2,5,2)=1, but the numbers are not pairwise coprime.
Comment: @D.W. good point my mistake.  I was thinking about the algorithm for lcm(a,b)=ab/gcd(a,b) but I didn't account for the list the right way
Answer: Yes.  The naive approach of checking each pair of numbers takes quadratic time, but there are more efficient algorithms.  There is a nearly-linear time algorithm, described in the following paper:
Daniel J. Bernstein. Factoring into coprimes in essentially linear time. Journal of Algorithms 54 (2005), 1--30.
See also https://cstheory.stackexchange.com/q/3393/5038.  That's almost as efficient as you could possibly hope for.
To clarify how this helps with your situation, once you've found a coprime basis and factored each element over the basis, it is trivial to check whether they are pairwise coprime: if they are not pairwise coprime, then some pair will have a common factor, and that will be a factor that is in the coprime basis and that is present in the factorization of both.  If there is no factor that is common to present in the factorization of two or more numbers, then you know the numbers are pairwise coprime.  Once you have the factorizations, it is easy to check in linear time whether any numbers in more than one factorization.
Comment: I don't see how `Factoring over a coprime base` relates to `checking if a list of integers is pairwise coprime` (yet).
Comment: @greybeard, see edited answer -- I added a paragraph at the end explaining.
Answer: Find the prime factors of each number. The numbers are all pairwise coprime if and only if every prime in the entire collection is distinct. This check can be done in O(n) time using a hash table.
Edit: Draconis' answer is better though, because it doesn't require any factorization. GCD computation is faster if your numbers are big and/or prime.
Comment: Factoring is very slow.  As far as we know, there's no efficient algorithm for factoring -- and we certainly don't know of one that takes O(n) time.   Basically, this algorithm will be close to exponential time (technically, subexponential but superpolynomial time).


How to construct a transaction with multiple inputs (joint payments)?

Question: I sometimes encounter Monero transactions with more than two inputs. If I have access to multiple wallets, how do I construct a transaction with multiple inputs from different wallets?
Answer:
I sometimes encounter Monero transactions with more than two inputs.

This is very common and happens automatically. Your wallet uses outputs it receives, as inputs to fund a transaction. Sometimes your wallet will need to use multiple outputs (as inputs), to fund a transaction. This however is different from your question:

If I have access to multiple wallets, how do I construct a transaction with multiple inputs from different wallets?

To send/join funds from different wallets you need to first send funds from each of the wallets in question to a single wallet that will do the ultimate spending. This could also be a multisig wallet if there are more wallet owners than just yourself.
A couple of guides:

https://monerodocs.org/multisignature/
https://monero.stackexchange.com/a/5647/7493
Comment: Multisig sends from the same wallet, not from different wallets.
Comment: Multisig requires multiple wallets (participants private keys) ,to sign a transaction to be able to spend/send it.
Comment: I'm not going through your tortured logic hoops again, so this'll be my last comment here: multisig is ONE wallet, created from the data from several precusor wallets. You don't send outputs from those precusor wallets, but from the single multisig one.
Comment: Not sure of the need for the "tortured logic" comment. A multisig tx is signed by multiple private keys, each owned by the participants of the multisig scheme. They each have a wallet which has their own private key. Sure, one can define the multisig wallet as one wallet shared amongst the participants, but the wallet does not contain all the participants private keys. You'd be sending outputs from the precusor wallets to the multisig wallet and each participant could then sign a tx in each of their version of the multisig wallet (signing with their private key).
Answer: It is theoretically possible send a transaction using outputs from different wallets, but there is no tooling for this currently. The idea is that each participating wallet will sign only the rings for the outputs they are spending. There is a proof of concept for this in https://github.com/moneromooo-monero/bitmonero/tree/multi but it turns out the mapping from inputs to outputs can't be made private, so it did not go any further, though I believe it works if you don't mind that drawback.
So AFAIK all transactions currently on the blockchain with more than one input spend from the same wallet.


What is the historic origin of these Indian burial grounds?

Question: I've recently watched two movies that feature the Indian burial ground as a plot point, however in these two films they both actually show a physical burial ground, which appears to be made up of concentric circles of rocks. I've never seen this anywhere other than in movies, and my Google searches mostly lead me to more images from these movies, so I'm curious where the inspiration for these came from. The two films (there may be others) that I saw these in are Pet Semetary (1989) and Bone Tomahawk (2015). Are these portrayals based on any actual burial ground ruins?
Pet Semetary

Bone Tomahawk
Comment: Side note: "Indian burial grounds" are also an important plot point in the movie *Poltergeist*.
Comment: @ToddWilcox And The Shining.
Comment: @ToddWilcox yes indeed, I had that one in mind as well but didn't mention it since there isn't any depiction of them. Its a common horror trope, but the only examples of them being depicted that I could think of was the two mentioned.
Comment: To be clear, you're asking about that one site *specifically*, and not Indian Burial Grounds more broadly?
Comment: @BruceWayne I'm asking about burial grounds that the two in the film screen-caps are patterned off of.
Comment: @ToddWilcox Nope, Indian burial grounds are ***not*** a plot point in *Poltergeist*. It's a regular cemetery.
Answer: According to Atlas Obscura:

First of all, it's important to note that the Indian Burial Ground,
  which is sometimes abbreviated to IBG, is a trope, and not a real
  thing. Pre-Columbian peoples identified as hundreds of totally
  different communities, families, or nations, without very many
  similarities between them. That extended to the burying and treatment
  of the dead; in some arctic communities, the dead were simply left on
  the ice to be eaten by predators (what else are you going to do up
  there?), whereas other groups practiced more familiar burial forms
  ranging from mass graves to careful and solemn burials to burials
  performed quickly and with great fear of the corpse. The IBG concept
  is wrong right from the get-go; depending on how you look at it,
  there's either no such thing or an unending variety of them.

(See also TV Tropes' page on the subject.)
The only thing I've found that somewhat resembles the images in these movies is the Medicine Wheel/Medicine Mountain National Historic Landmark, formerly known as the "Bighorn Medicine Wheel":

The stones are arranged in the shape of a wheel, 80 feet across and
  with 28 spokes emanating from a central cairn. The cairn, a
  ring-shaped pile of rocks, is large enough to sit in and is surrounded
  by six others that lie along the wheel's circumference. Oddly enough,
  this configuration is not unique to Wyoming. Rather, hundreds of
  similar stone wheels exist throughout North America.
Known as medicine wheels, or sacred hoops, these special structures
  have been built by American Indians for centuries. With uses ranging
  from the ritual to the astronomical, the medicine wheel has been
  appropriated over time by New Age spiritualists, Wiccans, and Pagans.

See also Wikipedia: https://en.wikipedia.org/wiki/Medicine_Wheel/Medicine_Mountain_National_Historic_Landmark
Comment: The trope is likely a dramatization of Moundbuilder sites mixed with the medicine wheel sites.  European settlers in northwestern NY, the Ohio valley, and most of the Mississippi drainage found complex earthworks, often centered around burial mounds. Mound Cemetery in Chillicothe, OH is probably the most famous -- and a US Army training camp was built on top of it -- but others are marked by geometric boundary walls that likely led to the confusion with medicine wheels.


How can I stop unwanted e-mails from Facebook?

Question: I am not a Facebook customer.  How do I stop emails from people who want to be my friend & other  annoying emails from Facebook?
Answer: Ultimately there's nothing you can do to stop people sending you e-mails.
You could try contacting Facebook and ask them to remove you from any mailing list they hold, but I suspect the e-mails are from your friends and acquaintances who are using the "use your address book" option to see if anyone they know is interested in joining.
The best you can do is set up an e-mail filter that looks for certain words in the subject or body of the e-mail ("Facebook" itself would seem to be a good place to start) and automatically route those to a separate folder or even delete them immediately. How you set this up will depend on your e-mail client.
I'd recommend routing them to a separate folder where you can check them from time to time to make sure you're not missing an important message from someone that just happens to mention "Facebook".
Answer:
Click the gear icon in the upper right, and click "Account Settings"
Then click "Notifications" in the left sidebar
Then click "Email"
And click the radio button for "Only notifications about your account, security and privacy"

That should handle most unwanted email.


Photo's import function

Question: Good day everyone!
I've come back to Linux distros and now I've started using Elementary for my main operating system.
So, I have one question (deep looking into the "Photos" app isn't getting answers for me) about importing.
I'm using for my photo-hobby Nikon's cameras with RAW (NEF) files and when I import them into my laptop, the application automating convert my photos to JPEG (like and for all my collection, when I've moved to a new system, this app convert ALL my RAWs to JPEG). How I can import only RAW from my flash-card without converting? And how turnoff automatic import?
Answer: Strangely enough, on my PC Photos doesn't auto-import anything when I connect my camera. At the same time I couldn't find a preference inside the app which could be responsible for that behavior, let alone 'Do not convert my RAWs into JPGs please' option.
There's a preference called 'Watch library for new files' though, so try turning that off and see if it fixes the auto-import issue. If it doesn't, try your luck and report that to the eOS devs.

Photo's import function


What is the difference between 举行 and 举办?

Question: What is the difference between "举行" and "举办"? Both of them have the meaning of 'holding / organizing an event", but do they have any difference?
Answer: An answer I found on Baidu Zhidao says this:

二者的区别在字面上,"行"注重过程,"办"强调事情,进行(集会、比赛等)

The difference between the two words can be seen from the words themselves, "行" focuses on the process of events, while "办" emphases the thing things and the carrying out of such things themselves (meetings, competitions, etc).
The following all use "举行"

~会谈
~球赛
展览会在文化宫~。

Hold talks
to hold a sporting event
the exhibit will be held at the cultural palace

The following, here, would all use "举办"

~展览会
~学术讲座
~训练班

To hold an exhibition
The hold an academic speech
To hold a training class

So basically
行 = just doing it
办 = includes setting it up and doing it (edit: or organizing like you said in your original post)
Answer: 举办 applies to carnivals, Olympics, super bowl, exhibitions, ...
举行 applies to company meetings, wedding ceremonies, funerals, group discussions, ...
Comment: @MrVocabulary 举办 refers to exciting, crowded events. 举行 refers to routine, non-exciting events. An example is that the latter can apply to funerals.
Comment: @MrVocabulary Of course, if you are talking about the wedding of Prince William, using 举办 is OK.
Comment: @MrVocabulary If it takes a committee to run a event, one can use "举办" with it. Prince Wiliam's wedding definitely counts. An exception is that if it is the prince himself is talking about he wedding, and he doesn't want to boast about it, he should use "举行". While a reporter reporting on it will go with "举办".
Comment: Didn't you say the opposite? Doesn't 举行 go with carnivals, olympics etc.?
Comment: it seems based on user3306356's answer, that 举办 connects with events that are longer or last multiple days, while 举行 seems to concern single events. Would you use 举办 if Prince William's wedding was big (many participants) but short (let's say, 1 hour official celebration)?
Answer: I would supplement the two other answers (although I think John Z. Li's answer switched the examples) by stating that it seems that:
举办 describes single events, defined by one point in time (like an hour-long meeting, a single football match).
举行 describes long-lasting events, defined by multilple points in time (like a series of seminars, or weekly exhibition).


Recovering from setting root's shell to a bad file

Question: Let's say I've gone and done a silly thing, such as using 'chsh' to change the root user's shell to a bad file path. Future logins to the root account will abruptly fail, citing /bin/whatever not being found, and boot you back out to the login screen. Barring a recovery mode or inserting a LiveCD to edit /etc/passwd, what are my options for getting my system back? Let's also assume (for fun?) that there are no other users in wheel. Thoughts?
Comment: Is this a hypothetical situation that you are proposing?
Comment: I had indeed done exactly this on a (relatively fresh) FreeBSD install. It has since been reinstalled, so I suppose it is now somewhat hypothetical, but I'm curious about what the best route to recovery would have been if I indeed did have full system present.
Comment: Been there, done that, got the t-shirt. But as a result on every machine I administer I maintain a backup root account, just in case.
Answer: When booting, append init=/bin/bash (or a path to any other functional shell) to your boot options - you will be dropped straight to a single user shell. You might need to do mount -o remount,rw / before modifying the /etc/passwd entry in that environment. After that, just reboot or do exec /sbin/init 3. Just do not type exit or press Ctrl+D, as these would result in kernel panic*.
One additional variation of this method might be necessary on some systems loaded in two-stage mode (with an initrd image). If you notice that the boot options contain init= and, most importantly, real_init=, then the place to put /bin/bash should be the latter parameter (i.e. real_init=/bin/bash).
* This is because in that environment, the shell is seen by the kernel as the init program - which is the only process that kernel knows - it represents a running system underneath to the kernel's eye. Suddenly ending that process, without telling the kernel to shutdown the system, must result in kernel panic. (Wouldn't you panic if suddenly everything around you went black and silent?)
Comment: @Stéph You *have* to do that if your kernel does not mount root read-write. Otherwise you won't be able to modify any files (including `/etc/passwd`).
Comment: Nice for the `exec`, but I guess it's better not to mess up too much with mount points beforehand.
Comment: Good thinking! I had managed to get into single-user mode, but it didn't hit me that I had to remount / as read/write to modify /etc/passwd. Thanks!
Comment: @roz Sure, I was trying to say that I would take care of unmounting everything else might have been mounted (other than `/`) before executing init.
Comment: @Stéph There should be no problems with mounts. Notice that `/bin/bash` is run exactly at the point, then `/sbin/init` would be executed on normal boot. So there can be no possible action done by the system at that time.
Answer: You could use su and specify a shell to execute (I'm not sure if you're trying to imply this isn't possible with your note about no other users being in wheel):
su -c /bin/bash

Otherwise you could do something similar if your ssh daemon allows login to root:
ssh root@localhost /bin/bash

You could also set a shell as your init in your bootloader, for example, init=/bin/ksh or similar.
Comment: Good ideas. =) As you suspected, no other users can use 'su'. sshd also has root login disabled.
Answer: If your bootloader is configured to allow live editing of the kernel parameters, a solution is to reboot and use a shell as init process, e.g. init=/bin/bash. Then, mount whatever needs to be mounted by hand, and edit /etc/passwd. sync and boot again with your usual init.
Comment: Wow, I just noticed you posted the same answer in the same minute as myself :-)
Answer: If the gist of your question is that you've locked out all the ways to become root, then by definition you cannot become root.
It is common to allow three ways to become root on a unix system:

Log in as root, by entering root at a login prompt and typing the root password. This runs root's shell.
Log in as an ordinary user, then become root by running su and typing the root password. On some systems, this requires being in a particular group (often called wheel); on other systems, anyone who knows the root password can become root. Systems using PAM for authentication use pam_wheel to manage the wheel group if they have one. If you specify a command with su -c, it is executed via root's shell.
Log in as an ordinary user, then become root by running sudo and typing your own password. The user account must have been given sudo powers by an administrator. Unless restricted in the sudoers file, you can run any command, regardless of root's shell.

A traditional way to protect against root's shell being unavailable is to define another account with UID 0 and a different shell (toor is a traditional name). For example, if root's shell is a dynamically linked executable (a good idea to conserve memory) and a library upgrade goes wrong, root's shell might be unusable. The alternate root account would have a statically linked executable, possibly one with common utilities built-in such as BusyBox.
Answer: The above answers are great and I learned from reading them.  If you don't remember the details of these approaches and don't mind rebooting, you can always boot your system using a live CD distro, mount the / partition and then edit /etc/passwd and reboot.  Not as elegant as the above solutions, but easier to remember.
Comment: You should point out the risks connected with manually editing the `/etc/passwd` file. Other than this, good point - I just wanted to add the same suggestion to my answer.


Elaborating on another answer

Question: Consider the following. You're looking at a thread on your beloved MSE where somebody has posed a problem they're looking for help on, and you realize you have an answer. You scroll down, and see another answer which does what you'd wanted to, but find that it wasn't written very clearly, or the person made his answer more complicated than was necessary. You want to answer the question, but don't want to be accused of posting the same answer, and don't want to appear rude by sounding like you're trying to one-up someone. What is the proper etiquette?
Comment: The community will decide whether your answer is better. Worst case, nobody upvotes. Imagine how many good quality answers were not written because somebody had written a lower quality answer to a question, and they did not want to step on anybodies toes. It is pretty pointless and competition in answering is always healthy as it generally leads to good quality. The aim of SE is to collect good quality Q and A, not good-faithed potential answer comments.
Comment: You can leave a comment to that answer, either asking for more information or pointing out the complications.
Comment: I sometimes see answers that start off saying something like "To elaborate on Jim's answer..." Another problem is short but dense answers. Just "Apply CRT" might be the correct answer, but is likely to leave the asker just as confused as before.
Answer: If your presentation is significantly different*, and you really believe it makes for a better answer, then in my opinion posting a new answer is the thing to do. I've seen it done many times. If it's just a few minor changes that you can apply to the already-existing question, then you can edit it. This addresses "posting the same answer". You can even explain at the bottom of your new answer that your approach is equivalent to the other answer, but that you think your presentation is clearer.
As for rudeness... I don't believe it's rude at all. If someone is offended because they posted an answer on math.SE and you post a better answer, they're the one with a problem, not you. Considerations about ego shouldn't be relevant when deciding to post an answer or what to write in it; if your answer is going to help the OP and future readers, by all means, post it.

* The murky point here is what does "significantly different" means. As a rule of thumb, if you can imagine taking the other answer and adding and removing sentences here and there to get your new answer, it's not different enough. If the answer is completely reorganized and you essentially have to start from scratch, it should be okay.
Comment: Based on my tangential familiarity with sci.math, for example, I am pretty sure that some non-rep-based systems also suffer(ed) greatly from overinflated-ego issues.
Comment: If you are particularly worried about the appearance of trying to one-up someone, you can always make your answer community-wiki, so that you don't get any reputation from it.
Comment: Oh for the day that "ego" plays no role. Unfortunately any rep-based platform suffers greatly from overinflated-ego issues, which complicates decisions like the above (as well as many others).
Comment: @CarlMummert - You'll have to forgive me, but what's community-wiki?
Comment: @AJY: Right at the bottom of the answer box is a checkbox labelled "community wiki". When selected, it makes it so that the answerer's reputation is unaffected by any upvotes/downvotes. Meaning wise it states that it is free for the community to edit (to improve it).
Answer: To repeat Carl's comment, one may post an answer and check the Community Wiki box on the lower right (while still editing); the last time I did this, I also removed a comment on the other answer suggesting changes. The most recent time I did this, I felt the other guy's answer was likely to go over the head of the person asking, while a more accessible demonstration was not difficult to compose. I'm afraid I can't find the specific item, I think it was in May.
This is a compromise, of course. The other guy might dislike the whole thing. However, it is less confrontational than comments saying another answer is not good. It also physically separates the two. Then the CW status says this really is derivative of another answer; third and fourth parties are unlikely to find this annoying.
probably enough...

Elaborating on another answer


Why aren't comments included in indexing?

Question: I agree that comments often are just chat, but at times they offer valuable additions to an answer. Yet they don't seem to be included in text search indexing. Why not?
Comment: personally I would rather them not be part of the search.
Comment: @Kellenjb: I guess we're going to have disagree. I recently searched for "PELCO", and I was disappointed to see "0 results", "Your search returned no matches.", even though I know there is at least one page that mention it (in comments) -- http://electronics.stackexchange.com/questions/65965/communication-between-ptz-camera-and-an-embedded-board .
Answer: If it is a great part of the answer it should be edited into the answer. This site is not like a forum, sometimes comments can be productive, but they should not answer the question, it should be in the answer.
Comment: @Kortuk: If you have to constantly remind people to do things, then that's a bug in the human factors aspect of the site.
Comment: That's in agreement with the policy about [editing an answer](http://meta.electronics.stackexchange.com/questions/631/making-changes-to-someone-elses-answer), but there are very few people who actually do this. Most will post the extra information as a comment.
Comment: @endolith - sometimes it's a sign that it's a Bad Idea tout-court.
Comment: @Stevenvh, yes, that is one more thing that people have not completely started keeping speed with that is is very stackexchange and a major difference from forums. With time hopefully we can work our way to doing this. Help me remind people. There are always 300 things I have to try to help to remind people of.
Comment: @endolith, if it is something that is different from every other site and something I have never reminded people of but maybe 1 time on the site, it is just something we need to teach.(cc: @stevenvh)
Comment: @Kortuk - you can educate people to edit others' answers, or you could educate the answerer to pick up the comments and integrate them in his answer. I prefer the latter, maybe you already expected that ;-)
Comment: @Stevenvh, I also like it when the person whom answers edits their own question, but if you look at users above 2k or peer reviewed suggested edits by 10k users. If the original poster dislikes the edit, they can always edit it again. But it is free rep when you get an improved answer.
Comment: @steven there are already incentives to improve posts -- every edit bumps the question, and people will upvote an improved question or answer. Comments confer neither reputation points, nor bumps...


Is one allowed to wash and then wear shoes during the nine days

Question: I have a pair of shoes that I want to clean, (not just wipe down but put in the washing machine). I know this shouldn't be done for clothes but how about shoes?
Comment: Welcome to the site. Consider rephrasing this to make it more general e.g. "Is it permissible" rather than "can I".
Comment: Welcome to Mi Yodeya. Please note that this site makes no guarantee of validity, and does not offer professional (particularly rabbinic) advice. Treat information from this site like it came from a crowd of your friends. For a definitive ruling, please contact your rabbi. You might also want to see "[Why is it necessary to ask a rabbi?](//judaism.stackexchange.com/q/9146)" for more info. We hope to see you around!
Comment: Although this seems daft in retrospect, I though the question was about bathing and then putting on shoes. Maybe it should be changed from "wash and then wear shoes" to "wash shoes and then wear them."
Answer: Probably not based on the halacha that allows applying polish if the shoe color has faded but does not permit shining.  This may be helpful  http://halachahbyemail.blogspot.com/2012/07/polishing-shoes-during-nine-days.html
Answer: If it is not a cloth-like material, it wouldn't be considered "kibus". If you can wash your dishes, you can wash your shoes.
Comment: @DoubleAA, I've seen porcelain shoes, but they weren't intended for wearing.
Comment: Is leather cloth like? Many shoes are made from cotton, leather and other regular clothing materials. I've never seen porcelain shoes. (I've seen wooden shoes.)
Comment: Leather is not cloth like enough to be considered kibus with just rinsing. Only scrubbing would be kibus by leather.
Comment: So scrubbing shoes is prohibited in the nine days?
Comment: This answer could do with citations for its claims.


descent for birational morphisms

Question: Let $X$ and $Y$ be two smooth projective surfaces and $f:X\rightarrow Y$ a birational morphism. Let $E$ be the exceptional curve on $X$ that is contracted. Now EGA III Theorem 4.1.5 states that the functor $\mathcal{F}\mapsto f^*\mathcal{F}$ is an equivalence between categories of locally free $\mathcal{O}_Y$-modules of rank $r$ and locally free $\mathcal{O}_X$-modules $\mathcal{E}$ of the same rank such that the restriction of $\mathcal{E}$ to the formal completition $\mathcal{X}=X_{/E}$ is trival. Is it possible to generalize this Theorem for arbitrary smooth projective schemes over a field of characteristic zero with birational proper morphism between them?
Comment: Something about the formulation certainly must be changed, because the center $Z\subset Y$ can have nontrivial locally free sheaves.  If $\mathcal{F}$ is a locally free sheaf on $Y$ whose restriction to $Y_{/Z}$ is nontrivial, then certainly the restriction of $f^*\mathcal{F}$ to $X_{/E}$ will also be nontrivial.  If there is a result of the type you want, I suspect it will be found in Michael Artin's, "Algebraization of Formal Moduli, II".
Comment: Also notice that every birational morphism in your setting is a blowing-up along some (possibly non-reduced ...) closed subscheme (see for instance Liu's book, chap. 8, Th. 1.24).
Comment: @Aleksa: Unfortunately, I am too stupid to see how you conclude the equivalence of the above categories from the Formal Function Theorem (4.1.5). Could you please say a few words about this?
Comment: @finite: Existence of vector bundles and global resolutions for singular surfaces. Compositio Math. 140 (2004), 717-728. Proposition 1.2
Answer: If $f:X \to Y$ is a blowup with smooth center $Z$ and exceptional divisor $E$ then the subcategory $Lf^*(D(Y)) \subset D(X)$ of the derived category of coherent sheaves on $X$ identifies with the subcategory of objects such that their (derived) restriction to $E$ is trivial on fibers of $E$ over $Z$ (in the derived sense). For vector bundles you can forget about derived stuff --- a vector bundle on $X$ is a pullback from $Y$ if and only if it restricts trivially onto any fiber of $E$ over $Z$. Note that you don't need to consider the formal completion.
Further, if the morphism $f:X \to Y$ is a composition of blowups with smooth centers (if the strong factorization holds) then you can iterate the above description. If there is no strong factorization, probably you can use weak factorization instead (which always exists!) and also get some description.
EDIT. Here is a sketch of a proof of the statement about the criterion for a bundle to be pullback. Assume that $F$ is a vector bundle on $X$ and $F_{|E}$ restricts trivially to any fiber of $E = P_Z(N)$ over $Z$. Let $p:P_Z(N) \to Z$ be the projection and $O_E(-1)$ --- relative $O(-1)$. For any object $G \in D(Z)$ one has
$$
Ext^\bullet(F,i_*(p^*G\otimes O_E(-k))) = Ext^\bullet(F_{|E},p^*G\otimes O_E(-k)) = H^\bullet(Z,Rp_*(F^\vee_{|E}\otimes p^*G(-k))) = 0
$$
for $k = 1,\dots,r(N)-1$ since $Rp_*(F^\vee_{|E}\otimes p^*G(-k)) = G\otimes^L Rp_*(F_{|E}(-k)) = 0$. Thus $F$ is contained in the first component of a semiorthogonal decomposition
$$
D(X) = \langle i_*(O_E(1-r(N))\otimes p^*D(Z)), \dots, i_*(O_E(-1)\otimes p^*D(Z)), Lf^*(D(Y)) \rangle,
$$
where $f:X \to Y$ is the blowup and $i:E \to X$ is the embedding. Thus
$F \cong Lf^*F'$ for some object $F' \in D(Y)$. One can also check that $F'$ is a vector bundle.
Comment: Dear Sasha, could you please give an argument or a reference for your statement about the pullback of vector bundles from $Y$?
Comment: I guess you can conclude this from Proposition 3.1 in 'Semiorthogonal decompositions for algebraic varieties' of Bondal and Orlov.
Comment: @finite: I added an argument. Aleksa is right, it is based on Orlov's blowup formula.

descent for birational morphisms


Are Megalodon as trained weapon animals enough to sink the passenger ships and warships of the Victorian era?

Question: Could a trained Megalodon shark or pair of them working in tandem be enough to sink the passenger ships and warships of the Victorian era?
Comment: A _C. megalodon_ weighed about 100 tons, probably more like 80 tons. A first rate ship of the line displaced around 3500 tons or more. One hundred tons of shark hitting a wooden ship at 30 miles per hour would definitely have the potential of doing a lot of damage to the ship, and unfortunately lethal damage to the shark. On the other hand, if you don't want to use the sharks as kamikaze torpedoes, then I don't see what exactly they can do to large men'o'war or merchantmen; small ships (of a few hundred tons displacement) would of course be unusable in shark-infested waters.
Comment: @Will: _Great Eastern_ had paddle wheels _and_ a propeller. Victorian engineers liked to have all their options covered.
Comment: @StephenG /OP needs to come up with a rational reason why they're still around in his world/  - nah.  Alternate Victorian eras are steampunk bread and butter, and loaded with Vernian / Burroughsian creatures that time forgot, hollow earths, deep water monsters etc.  It is all good.  Actually it is excellent.
Comment: SS [*Great Eastern*](https://en.wikipedia.org/wiki/SS_Great_Eastern), an all-metal, 32000 tons displacement steamer, designed by the famous [Isambard Kingdom Brunel](https://en.wikipedia.org/wiki/Isambard_Kingdom_Brunel), was built in 1858 -- in the _first half_ of the Victorian era. What can a puny 100 tons shark do to her?
Comment: @AlexP - foul her propeller.
Comment: The question is not defined: the greatest ships? Medium ships? Some ships? What time of Victorian age?
Comment: I'm obliged to point out the obvious : Megalodon had been extinct for about 2.6 million years in the Victorian era.
Comment: @StephenG On our Earth, probably (they could still be around and we simply haven't found where they're hiding, having only explored a tiny fraction of the ocean); but that doesn't mean it's gone in the OP's world (Earth-ish or not).
Comment: You broke my awesome meter.
Comment: @Frostfyre Seeks very, very unlikely a population of megalodon could remain hidden.  As for the OP's world, I'm pointing out the OP needs to come up with a rational reason why they're still around in his world (and hidden is a non-reason - it's handwavium in disguise).
Comment: If you're going to use them as kamikaze torpedos, you might as well strap explosives to them.
Comment: Thank you to everyone who answered. I wanted a 'basis' of fact before I wander off into the realms of 'steampunk Jurassic park' type stuff.
Comment: Megaldon can actually grow up to 18-20 m long
Answer: Yes.
A megalodon was roughly the size of a sperm whale.
source

I asked Google "Could a whale sink a ship?"  Answer: yes.
from https://www.whalingmuseum.org/learn/whale-attack

While it was the business of whalers to hunt and kill whales,
  sometimes a whale would fight back. Among the more famous of the
  several incidents of whales attacking whaling vessels are those of the
  ship Essex of Nantucket in 1820, the ship Pocahontas of Tisbury in
  1850, the ship Ann Alexander of New Bedford in 1851, and the bark
  Kathleen of New Bedford in 1902.
All four stories have one element in common. The species encountered
  was a sperm whale and in each instant the whale rammed the vessel with
  its head after a prolonged fight with the whaleboats. The Essex under
  the command of George Pollard, Jr., with Owen Chase, first mate, sank
  two thousand miles off the west coast of South America in a region
  called the "Off Shore Grounds." The whale attacked the ship "with
  vengeance in his aspect" according to Chase. The event became famous
  not only for the sinking itself, but for the terrible suffering of the
  crew members who were at sea for ninety days in three open whaleboats
  and gradually resorted to cannibalism with only eight of the original
  crew of twenty surviving.

What about a shark?  Mythbusters modeled a great white (nonMegalodon) ramming a boat and confirmed that if their simulation was correct, a great white shark could punch a hole in the side of a wooden boat.
from http://kwc.org/mythbusters/2005/07/special_jaws_special_1.html

Shark strength: Boat (Orca V) smashing
Myth: in Jaws, the shark pierces the side of the Orca and attacks the
  occupants within.
The setup was similar to the sharammer cage smashing. This time the
  sharammer pierced the size of the wooden boat and left a hole, though
  not quite Jaws-sized. The hole was above the waterline so the boat
  stayed afloat.
confirmed (a 3000 lb great white travelling at 25mph could pierce a
  boat)

So a great white has the speed and mass to punch a hole in a wooden boat, and sperm whales the size of megalodon actually did this to wooden boats.
I worry a real shark would not actually ram a wall of wood.  Whales fight each other by ramming (among other maneuvers) and a sperm whale head makes a good ram.  A shark rams a smaller thing in the context of an open mouth and a bite.  The front end of a shark is not as good a ram as the front end of a whale.
Comment: @John - I have long believed that a shark mounted battering ram would be needed for these situations.  Built into the ram there would be a device to administer shark treats, to positively reinforce effective ramming behaviors.
Comment: Sharks have far more sensitive and far softer snouts, getting one to ram something would be difficult.
Answer: In theory, a megalodon could sink a ship, probably by ramming.
Would a megalodon attack a ship by ramming? No, it would not. If we make the reasonable assumption that the megalodon is similar to the great white in physiology, we find that the great white hunts it's prey partially by detecting the electrical impulses of the nervous system. The great white does this with a number of sensors, located around the nose. This leads to two problems: Such sensors should reveal that a ship is not a living creature, and therefore not something that the megalodon would benefit from attacking. As well, it is unlikely that such a hunter would want to damage those electrical sensors in their nose by ramming, or to suffer any injury while attacking.
In the wild, injury is as good as death. In an injured state, the predator would be unable to hunt normally, and will probably starve before it can recover. You can see this with fish in the wild - smaller fish when faced with a larger predator will bristle up and send a message: I'm healthy, and I'm ready to fight. The predator fish usually backs off, not willing to risk injury, and goes searching for prey that is unlikely to fight back, like a sick or injured fish.
If you want something more realistic (and horrible) to send after a Victorian ship, try a giant squid. 25 foot long body, with 75 foot long tentacles. Have it pluck people off of the deck of the ship for a tasty snack.
Answer: Ok, my math may not be perfect here, but according to Wikipedia (and this paper) the bite force of a Megalodon could have been 108,514 N and 182,201 N.
Compared to the ramming example given in Will's answer, which puts the sharks ramming force at approx 15,200 N, a bite could be ten times more powerful then ramming. Meaning it should be more than capable of tearing a chunk out of a wooden ship.
When you add that to the fact a large Megalodon's jaws could be over 2m across then I would say two of them could do a considerable amount of damage to the wooden hull of a ship if trained correctly.
The main problem I can see is the relative flatness of the hull of a ship, which is not something the Megalodon could get it's teeth around. But if they could attack vertically and bite the keel they might be able to make a big enough hole to start causing a ship problems.
Comment: @Will Ah, but a peach doesn't have a keel, which should be easier to bite. I admit it is a bit of a long shot, but if you imagine a shark like creature attacking it's got to be biting, not ramming.
Comment: from James and the Giant Peach: A shark, you see, has an extremely long sharp nose, and its mouth is set very awkwardly underneath its face and a long way back. This makes it more or less impossible for it to get its teeth into a vast smooth curving surface such as the side of a (giant) peach. Even if the creature turns onto its back it still can't do it, because the nose always gets in the way. If you have ever seen a small dog trying to get its teeth into an enormous ball, then you will be able to imagine roughly how it was with the sharks and the peach
Answer: EH...
It's tricky, but it might just work. (albeit highly impractical)
The most pressing issue in this is "why" as in; why would a megalodon attack something that's bigger than itself. Sharks nowadays are simple creatures. They see prey and if they happen to be hungry and the prey they see isn't too large, they chomp it. Most shark attacks on surfers are actually the result of sharks mistaking an unlucky surfer for a meal and take a nibble.
The megalodonshark however is a lot bigger than a shark but it's brain isn't that much bigger. If you can somehow associate attacking Victorian ships with reward (food), they will definitely go for it, but you'll have to condition them to do so, which probably entails using life sized props in order to train your weaponized megalodonsharkfish.
As AlexP mentioned, you'll have to make sure your megalodonsharkfishthingy doesn't get injured upon attacking a ship. Once again this requires conditioning. So theoretically you could use this Megalodonsharkfishthingybeast as a weapon but it's highly impractical, time consuming and most likely not worth the effort when compared to a good ol' cannon with a chain-shot to ruin the mast and then just blast whomever you want to sink to kingdom come.
Answer: I think your megalodon shark attack would fare better if they leaped out of the water and landed on the enemy ship. They could easily capsize a smaller vessel in this manner, or shear off masts, rigging, and of course any unfortunate sailors on the deck of larger ships. A megalodon could be 50-60 feet long, almost twice the beam of many sailing ships, even a first rate like the HMS Victory was only 49' wide. Assuming a regular Great White can leap 3-5' out of the water and this scales proportionately to a megalodon, it could get 9-15 feet out. The Victory had around 30' of freeboard (hull above waterline) so a megalodon should be able to leap up enough to get most of it's body onto the top deck and be large enough to flop off after doing some damage.
In addition they could go after rudders. I'm not sure a shark has the anatomical features to allow it to effectively ram a military grade wooden hull or even bite it, but the rudder is much weaker. Even an early screw would be vulnerable. Disable the underwater control and propulsion surfaces, and disable the masts, and anything in the early to mid 19th century would be left drifting and vulnerable. But once steel hulls/masts became commonplace and larger screw propulsion drives were installed, shark attacks wouldn't be very effective (at least without critically/fatally injuring the shark in the process). At this point you are back to trying to attach limpet mines to seals and dolphins so they can make runs against the hulls/screws of enemy ships.
Comment: "assuming this scales proportionately" naturally, since a 4m tall elephant can jump 60 inches, scaled proportionately to an average human vertical of 20.
Answer: Sharks are extremely stupid. I don't think you can TRAIN them. But you can develop a reflex in them - for example, attack everything that has some flag.
Anyway, that process will take so much time and special tools, that it is not a problem to create one more tool - to give to a megalodon some sheath that will be fastened on its nose and will be hard and sharp. Then it will be able to cut a hole in any not armored ship.
Without such weapon even megalodon can do nothing to greater iron ships even of the 50-60-ties of 19Cent, let alone the 90-ties.
If you want to damage an ironclad, use megalodons with a weapon with a bomb on the end. Such living torpedoes would be effective even now.
Don't forget, that there is always some sort of dialogue in development of weapons and defenses. Better weapon - better defenses and so on. So you can reveal several secret weapons to the reader.
Answer: Put a large metal spike on their heads, attached to a skull cap that distributes the force along the cap, instead of into the shark's skull, and you've got the Nautilus.
Answer: Yes is good, a sperm whale tracked and sank a Victorian whaling ship. They had killed its mate.
Comment: Interesting. Care to share a link to the news?
Comment: Can you please [edit] your answer to provide the source of your information? This answer is currently in the low-quality review queue and might get deleted if you don't edit it.


Why aren't the graphs of $\sin(\arcsin x)$ and $\arcsin(\sin x)$ the same?

Question:
(source for above graph)

(source for above graph)
Both functions simplify to x, but why aren't the graphs the same?
Comment: The inverse trigonometric functions have restricted domains (http://en.wikipedia.org/wiki/Inverse_trigonometric_functions#Principal_values), while the standard trigonometric functions take arguments from the whole of $\mathbb{R}$.
Comment: The two functions are inverse to each other only on the interval $[-1,1]$, so they simplify to $x\mapsto x$ only on that interval. Outside of that interval you get the behaviour you see on the pictures.
Comment: $\arcsin$ is the inverse of the *restricted sine*, not of the usual sine. (The restricted sine is like the sine function, but its domain is only $[-\pi/2,\pi/2]$.
Comment: Actually, this comment is a bit imprecise, so I expanded it to an answer, see below.
Answer: Well, it depends on what you define as "same".
For $\sin(\arcsin(x))$, the domain of the function is domain of $\arcsin$ which is [-1,1]. So the graph is strictly defined between -1 and 1. It would be mathematically incorrect to substitute x as 3 since there is no such thing as $\arcsin(3)$.
The domain of $\arcsin(\sin(x))$ is entire of $\mathbb{R}$, so you can substitute any (real) number you want and you'd get an answer.
So, are they same? If you zoom into your graph such that you look only between -1 and 1, there is no difference. Beyond these limits, the term "same" is meaningless since one of them ($\sin(\arcsin(x))$ doesn't even exist!
You can argue a similar case for $y = (\sqrt{x})^2 \text{and } y = x$. In the latter, you have a straight line passing through the origin from $-\infty$ to $+\infty$. In the former, the function is not defined for negative x although the simplification leads to $y = x$.
Comment: Perhaps a closer analogy would consider $y=\left(\sqrt x\right)^2$ and $y=\sqrt{x^2}$.
Comment: @MarkDominus I agree. It fits better with the question.
Answer: The domain of the function $\arcsin x$ is the interval $[-1,1]$; it isn't defined for any value of $x$ outside that interval. You can then take the sine of $\arcsin x$, but the domain of the composite function $\sin\circ\arcsin$ is still just $[-1,1]$; no other 'inputs' are meaningful. That's why the graph of $y=\sin\arcsin x$ is chopped off at $x=-1$ and $x=1$.
The function $\sin x$, on the other hand, is defined for all real numbers $x$. Moreover, it's always between $-1$ and $1$, so it makes sense to take its arcsine. However, the function $\arcsin x$ always returns the angle between $-\pi/2$ and $\pi/2$ whose sine is $x$, so the composite function $\arcsin\circ\sin$ always 'outputs' a value between $-\pi/2$ and $\pi/2$. Because of the way the sine function works, these values oscillate between $-\pi/2$ and $\pi/2$ as in your other graph.
Both functions give you simply $x$ as long as you stay within appropriate limits, $[-1,1]$ for $\sin\arcsin x$ and $[-\pi,2,\pi/2]$ for $\arcsin\sin x$.
Answer: $$[-1,1]\stackrel{\textrm{arcsin}}{\longrightarrow}[-\frac{\pi}{2},\frac{\pi}{2}]\stackrel{\textrm{sin}}{\longrightarrow}[-1,1]$$
$$ \mathbb{R} \stackrel{\textrm{sin}}{\longrightarrow} [-1,1]\stackrel{\textrm{arcsin}}{\longrightarrow}[-\frac{\pi}{2},\frac{\pi}{2}] $$
Answer: Actually, my comment above is a bit imprecise. I shall make it more precise here.
The motivation is clear. We want to invert the function $\sin:\Bbb R\to \Bbb R$. But this function isn't injective, nor is it surjective, and that is a problem, since a function is invertible if and only if it is bijective.
So if we want to invert $\sin$, we first have to restrict its domain and codomain appropriately to make it bijective. The restriction $\sin:[-\frac{\pi}{2},\frac{\pi}{2}]\to[-1,1]$ is a bijective function, so it has an inverse. (Stricly speaking, this is a new function, but we usually use the same name for it, which might add to the confusion.) And it is the inverse of this function that is called $\arcsin:[-1,1]\to [-\frac{\pi}{2},\frac{\pi}{2}]$. That's why $\arcsin$ is defined only on the interval $[-1,1]$ and the functions $\sin:[-\frac{\pi}{2},\frac{\pi}{2}]\to[-1,1]$ and $\arcsin:[-1,1]\to [-\frac{\pi}{2},\frac{\pi}{2}]$ are inverse to each other.
Now, we can still look at what happens if we take the original function $\sin:\Bbb R\to\Bbb R$ and compose it with $\arcsin:[-1,1]\to [-\frac{\pi}{2},\frac{\pi}{2}]$, but then the functions are not inverse anymore and we get the behaviour you describe above.
Answer: the domain of arcsin(x) only goes from -1 to 1.
Although the functions reduce to the same, they're different in non-reduced form.
This is similar to functions with removable discontinuities: f(x) = (x - 1)^2 / (x - 1) for instance.


Scaling tall graphic to fit in page

Question: I have a Docbook 4 document with several very tall graphics (not all but some of them are much taller than their width). I want them to scale to fit on the page automatically.
Is there a way to define this in stylesheet? There are over a 1000 graphics and I don't want to check them all by myself.
At the moment it looks like this:
<code>      <figure>
        <title>Some Title</title>
        <mediaobject>
          <imageobject>
            <imagedata fileref="graphic.svg" width="100%" scalefit="1" contentdepth="100%"/>
          </imageobject>
        </mediaobject>
      </figure>
</code>
but its only fits the width not the height. So the graphic overlaps with the elements before and after.
As fop i have to use apache-fop.
Answer: In order to scale the graphics with an fo:external-graphic, you can use the attributes content-height and/or content-width with the value 'scale-down-to-fit'

Scaling tall graphic to fit in page


Thermal oil in Boiler not reaching desired temperature

Question: The thermal oil Feroline U in Boiler is not gaining the desired temp of 240 Degrees. We have physically measured the temp using digital thermometer at a distance of 20 cm where the boiler temp sensor is installed. 40 degrees are lost in 20cm insulated area.
The boiler is well insulated with Rockwool & oil quality is good (recently tested).
What could be the reasons? Any solutions please?
Comment: So what happens when you measure the temperature with both methods at the same location? i.e. take the distance out of the equation.
Comment: @hazzey We observed a 40 degrees difference when we measured temps with both methods. Thermocouple has been checked,its fine.
Comment: When physically measuring the temperature, is the temperature of 240 deg supposed to be the temperature of the metal tube underneath the insulation or the temperature on the atmospheric (outside) side of the insulation? Essentially, are you measuring the temperature correctly?
Comment: @Fred 240 deg is temp shown at A (on HMI) it is the temp of sensor that is installed inside the boiler, we measured the temp at point B correctly, exactly at the metal tube inside the insulation. Yes we measured the temp correctly, making sure we are not measuring the temp of insulation.
Comment: "Yes we measured the temp correctly" Sorry, I don't believe you. A digital thermometer tells you the temperature of the thermometer probe, not the temperature you are trying to measure! Unless you drilled a blind hole into the tube at point B and sealed the thermometer sensor inside it, you are measuring some unknown combination of the tube temperature and the surrounding air temperature. you must have made a hole in the insulation to get the thermometer probe close to the tube inside, and that hole will let the outside air get to the thermometer probe!
Comment: @alephzero The digital thermometer probe is very thin in size & is quite very sensitive & accurate. We were getting different temps,relatively higher,while measuring somewhere inside insulation say 210 degrees, but when the probe was hit against the tube it read 200 degrees. You are right, the method we are using is an approximation, but difference of 40 degrees between point A & B not understandable.
Answer: If the equipment sensor is in a well,  which it should be,  remove it and put it in boiling water.  Now put the equipment sensor in cooler water and check temperature. This will confirm span and accuracy, assuming all readings check, for the equipment sensor and indicator system. While performing the above take readings with your portable thermometer also. Record and compare the readings. Draw valid conclusions based on the data.
Answer: There are a couple things that could be going on, but most likely it has to do with how and where the temperature is measured rather than some sort of unknown heat loss. People are being critical in the comments, because the two measurements (based on the info given) should be nearly identical.
Seeing your replies in the comments, I am assuming both your temperatures were measured with the same measuring device, placed between the insulation and the metal pipe/vessel, and given time to reach equilibrium.
I assume A is your vessel and B is your outlet.

Is B in fact the Outlet and not the Inlet? It is sometimes easy to mistake the flow through a plumbing system. Things are also not necessarily labeled correctly. It is very possible B is the Inlet to the heater and this temperature difference is the heat that is being delivered to users as planned. This is the most likely scenario with the info I have.
Have you checked temperature B in different locations about the diameter? Maybe the flow is all to one side or there is rust/scale near the measuring location.

Have you checked temperature A in different locations on the vessel?

How close is point A to the heating element? (not sure of the energy input type, but the location/proximity of the electric heating element or heat exchanger will make a big difference. This is also a likely scenario.)
How close is A to the inlet? (this is where the cool oil returns in a closed loop system) (this is more likely to make A colder than B, but something to think about as well)

Other things to consider is that the steel thickness at B may be thicker or the insulation may be thinner. This results in your measurement being closer to ambient temperature than the the measurement at A. When we place a thermometer below insulation we are making the assumption that the insulation is much much more resistant to heat flow than the metal. Most the time this assumption is true, but it is something to consider when looking for accuracy.
If none of those items help you track down the issue please include info like flow-rate, energy source, energy users, etc.
Comment: Thanks for your time & detailed answer. Both temp are not measured  by the same device, temp A is the boiler thermocouple & Temp B is the one we measured physically. A is boiler thermocouple location & B is 20 cm away from boiler thermocouple. Yes we have measured temp B on equal distances like 30cm on the whole pipe (B), the temp almost same between points. A is 1.5-2m away from inlet. Flowrate 0.5 cubic meter, Thermal oil Feroline is energy source, energy users are heatexchangers & coolers.


my daughter just turned 4 years old she doesn't like going poop in the toilet

Question: My 4 year old daughter knows how to pee in the toilet but when its time for her to poop she goes in her diaper. she has another year of preschool and soon its off to Kindergarten. We do ask her if she need to go potty and she does only with the number 1. We only get frustrated when she doesn't tell us that she has to go poop and we find out that she pooped on herself.  I know its still a work in progress with the potty training for her. when she does go pee in the toilet she is always saying that she doesn't want to fall in the toilet we do have a toilet set for her to use. What type of advice should we do so that she can go poop in the toilet.
Comment: Have you asked her why she doesn't poop in the toilet?
Answer: Do you have a toilet seat insert or a toilet seat that attaches?  We have tried both but the attached kiddo toilet seat, like this one (they sell them all over the place), is much more secure feeling and not very hard to install on one or two toilets in your home.  After a pretty short time using it, my son got comfortable enough to use the full size seat as well.
There is also the possibility that your child's complaint about the seat is more of a distraction and there is some other reason (discomfort, difficulty, boredom, etc) which is very common in kids that age.  The most important thing is to keep an eye on them (look for cues) and keep a positive attitude about using the toilet, even though it can be immensely frustrating at times.


Does belly fat hangs before getting less?

Question: It's been 2 weeks of me working out in strength and transformation change. I don't see any much difference expect my body fat is 4 percent less. And weight has reduced. But pictures don't lie. So I took with a 35 days difference. And I see is my tummy hanging out.

My question is,
1.does the fat hangs like in my picture prior to getting burned away and going away?
2.If I see body fat and weight changes, why doesn't if show in picture?
Answer: For men, the stomach is often the last place that fat is lost. It changes from person to person, but you'll lose fat in a particular order, pretty much the opposite of the order in which you put it on. Most men put on belly fat first and lose it last. If you've lost fat, look at other places first: your arms, back, thighs, chest, face, etc.
Comment: The problem here is your expectations are set way too high for such a small time frame. Bottom line.
Comment: I don't see any changes. Can you see it between two images? The question remains, why is my belly seems like hanging out on right pic?
Answer:
When fat is burned, it just goes away. What could be hanging out is excessive skin that is left if you lose fat very fast and/or have skin elasticity issues, but it's not your case. The effect of "hanging out" on 2nd picture could be explained by different level of tension in you ABS, the position that you would feel as "relaxed" is nonetheless different depending on how did you exercise lately, what time of day it is, how much did you eat etc.
As it was said in previous answer, belly is usually the last thing to go away. How much did your weight reduce? You should probably just give it some more time.


Atlas Robot Reference

Question: Boston Dynamics keeps making great robots, however, I dont see any papers that they publish.  Although now I can find papers on people using the ATLAS robot, I can not find an original paper detailing the robot or its mechanics designs.  Is there a reference for the robot, should I use youtube videos?
Answer: What kind of "reference" do you want?  Some bibtex to reference in your paper?  Or detailed schematics?
If it is a paper reference, i'd probably just point to either BD's website above or this: http://www.theroboticschallenge.org or this: http://www.theroboticschallenge.org/files/ATLAS-Datasheet_v15_DARPA.PDF.
If you want to look at their mechanics, take a look at the ROS URDF and gazebo models.  They can be downloaded from OSRF's bitbucket site: https://bitbucket.org/osrf/drcsim.
Answer: I'm sure they publish, and I bet you can't find anything because they're sponsored by the military. When I was in college, any research that was paid for by the military typically came with a rider that our theses and dissertations had to be made private for 1 year, and that was the longest the university would allow them to be withheld. I'm sure if they could have gotten more time they would have demanded it.
That said, Boston Dynamics is a company, and I'm sure they are competing for funding,  so I don't know that they are as comfortable demanding a short time line as a public university would be.
My advice would be to file freedom of information act requests to see if you can get any papers, if you're really that interested.
Answer: Not really a solid answer, but...
Boston Dynamics does publish papers, though the only one I could find was the one for the BigDog: http://www.bostondynamics.com/img/BigDog_IFAC_Apr-8-2008.pdf
As for the ATLAS robot, it is nowhere to be found, but I believe that as soon as they publish it (if they ever do), it will be on their website http://www.bostondynamics.com

Atlas Robot Reference


Is there a way to boost my performance manually?

Question:
When my files get around 190 MB big the performance gets slow.
Especially when using dynotopology. It starts lagging and sculpting won´t work in real time. Isn´t 8GB RAM enough? Is my Mac already to old? I can´t imagine how Games with graphics like Starcraft 2 can be displayed while blender gets slow at such comparably small files. Is there maybe a way to involve the NVIDIA GeForce GT (if it isn´t already) manually or something?
Answer: You can check to make sure the Nvidia GPU is enabled when you run Blender by looking at Activities Monitor. Graphics Card should say 'High Perf.'

If you don't see the Graphics Card line (as the case with most non-laptops), your system is already using the fastest GPU available.
Comment: Hm, how did you make Graphics Card appear in that menue plz? I just have Energy Impact in mine...
Comment: In User Prefernces it also says OpenCL not CUDA as recommended on the net. I don´t have acces to CUDA do I with my current graphics card?
Comment: Added to answer. CUDA and OpenCL is only used for rendering, it will not have an impact on viewport performance. Also, it seems like CUDA is not available on High Sierra yet: https://devtalk.nvidia.com/default/topic/1026455/cuda-setup-and-installation/cuda-installation-on-2013-macbook-pro-nvidia-geforce-gt-750m-driver-version-incompatibility/


Throughout all editions, has one been able to cast Feeblemind on oneself and how exactly has it worked?

Question: Various editions of D&D have had a Feeblemind spell. Through each iteration has one been able to cast the spell on oneself and if so is a save required or optional? How has this changed throughout the different editions?
Comment: *Idle Curiosity:* What events made this question important?
Comment: it was a discussion about a potential plot. the idea the person i was discussing this with came up with was that the bad guy would be a disgruntled wizard that got reject from the most prestigious academy in the setting because they claim "he was not smart enough" so he learned on his own and returned for revenge by creating a sort of magic bomb on a timer that would kill anybody with an intelligence above the minimum requirement for a wizard. it could be stopped by a wizard by changing the target to the himself instead of the area.
Answer: Yes.
For the following editions of Dungeons & Dragons:

D&D Expert Rules
AD&D 1st Edition
AD&D 2nd Edition
D&D 3rd Edition
D&D 3.5 Edition
D&D 5th Edition

The spell allows a saving throw for each edition. Most editions allow you to willingly fail your saving throw. For others, the rules are silent on whether or not you need to attempt a saving throw against an ally's spell or your own.
This article does an excellent job comparing and contrasting the feeblemind spell across editions up to 3rd Edition. The way the spell targets a creature has changed very little across editions. All of them target a single creature and offer no reason why you wouldn't be able to target yourself. Note that the 1st and 2nd Edition feeblemind spell can only target magic-using creatures or spellcasters.
As far as I know, 4th Edition does not have a feeblemind arcane power.
Comment: In Expert aren't you still encouraged as a GM to not give saving throws when players do stupid stuff/give saving throws when bad stuff would happen to the PC through no fault of the player?  If so, I'm pretty sure you wouldn't get a save if you straight-up feebleminded yourself.


How do I reset NPCs in Skyrim?

Question: I have been trying to play the Mage's College quest, but Mirabelle Ervine is frozen in place and can't go anywhere. I can still talk to her, but that's about all I can do. How can I reset her or reset NPCs in general?
Answer: I'd try the enable and disable console commands.
Make a save game first, and then in the game, open up the console by pressing ~, then click on  Mirabelle Ervine. Her RefID (0001C1B9) should show up in the screen. If the RefID is correct (meaning you have selected Mirabelle correctly, and not another object), type disable and then enable.
If it doesn't work, try teleporting her to your location, to try to 'unstuck' her. With Mirabelle still selected in the console (her RefID (0001C1B9) still showing up in the screen when you press ~ [if not, select her again]), type in moveto player.
Comment: Teleporting them has worked for me in the past. Esbern and Jensine got lost and never met up with me, but moveto unstuck them.
Answer: Try opening the console (` key by default), clicking on the NPC in question, and typing "resetAI". That should reset the NPC's AI and hopefully unstick her. If that doesn't work, you can try "recycleactor", but that may have side effects.
Answer: I was having a problem with the stuck Adrianne Avenicci. Following sequence of commands worked:
Console `
Click on the NPC in question - their code will show up.
Commands in sequence (don't have to put the ID if object selected)
1. ResetAI
2. Disable
3. Enable
The character will show up at their default position.
Answer: I had a problem in riverwood where I told the kid I had made him invisible and ever since then he just stood there not moving...
A few game days later, I returned to riverwood to find everyone just stopped in place outside the inn (near where the kid was) and nobody moved.
The "enable" "disable" command didn't work  on anyone.
What fixed it for me was to attack someone and then type "paycrimegold 0 0" on the console...
I lost the 40 gold for attacking a person, but I didn't get sent to jail nor did my items get taken, if you just use "paycrimegold" you will get taken to prison and items removed.
Best of luck :)
Answer: Open the console, click on the actor, and then type markfordelete, followed by disable. Close the console and move a few steps away, and then open up the console again and type player.placeatme <base ID of the actor>.
Answer: I know this is coming in 5 years late but as I just had this problem and none of the solutions here worked I figured I'd give the solution that worked for me:

Summon a hostile mob that will provoke the fight response of your target NPC with  player.placeatme BaseID NumberofObjects

(example: player.placeatme 0002D1DE 5 will summon 5 skeletons at your location)

Kill or remove the hostile mob(s) once your target NPC reacts to it. The NPC should then move somewhere on their own (this could solve the issue right here)

Use console command disable followed by enable on the target NPC. They should now respawn at their correct location with their correct behavior.
Answer: The reason why some of the NPCs in Skyrim won't talk to you is you may have the nightingale armor equipped, especially the hood.
Comment: The asker said they can talk just fine, but she won't move.

How do I reset NPCs in Skyrim?


Using Touch ID with Amazon App

Question: According to the update in the App Store, the Amazon app now supports login via Touch ID. Has anyone figured out how to use it?
Answer: The application keeps you logged in to your account once you log in unless you log out, but if you do anything that would require a password entry like managing your wish list, a Touch ID prompt comes up giving you the option to use your fingerprint instead of typing in your password
Comment: Note (2016-02-15): I just used the app, went to check out, and was prompted for *both* Touch ID and my password. Seems rather useless to me.
Answer: Go to settings, scroll down till you find a list of downloaded apps. Locate and tap Amazon app. You will find toggle switch to turn on/off touch id feature.
Good Luck.
Answer: I just received this email from Amazon that refutes the existence of the feature:

Hello,
Thank you for contacting Amazon.  I've researched "Touch ID" feature
  and found this feature it isn't available with the Amazon Appstore
  apps at this time. We're constantly adding apps and features to our
  selection, and features not unavailable now may become available in
  the future.
I've forwarded your message to our Appstore development team for
  consideration.
We look forward to seeing you again soon.
Best regards,
  Devender K
Comment: Umm. The Amazon Appstore is their Android app store that competes with Google Play, and has no bearing on iOS.
Comment: I thought the letter was worded funny. It seems they are more confused about the feature than we are!
Answer: Settings>Passwords & Accounts>Website & App Passwords>Tap "+"
 then type www.amazon.com
Then type username (your email address)
Then type a password of your choice
Worked for me. IPhone 6s iOS 13
Answer: You're not alone, no one knows how to turn it on (or off!)
Amazon app for iPhone adds Touch ID support, but nobody knows how to turn it on…or off
A friend of mine says it works on his iPhone 6+.  And so, I log into the same Amazon app on my iPhone 6, via name and password, I order products, manage my wish list, and never see the TouchID interface appear. So strange!
Answer: Ok, I just figured this out (finally), "and yes it does work".  But it seems to be a combination of several of the answers provided above.
Probably the most important thing to point out is Tpoccu's posting.
"The application keeps you logged in to your account once you log in unless you log out", but if you're anything like me and you log out every time you're finished with the App, continue reading...
The first thing you'll need to do is go to Settings and scroll down to the Amazon App on your iPhone 6 (minimum) with an "Up To Date iOS", then scroll down to "Use Biometric authentication when available" and turn that on as Nura suggested.
Once that's done go to Settings/Passwords & Accounts/Website & App Passwords and Tap the "+" (top right) to provide the credentials that the App needs, and type in www.amazon.com under the Website Address and then just type in your Username and Password as Mr D suggested and you're done.
Then the next time you open the Amazon App and tap the Sign In button the App will ask you if you want to associate the App with the password that you saved earlier, just tap Ok and touch the finger print reader and you will be logged into the App automatically.
I hope this helps!

Using Touch ID with Amazon App


Why would the Borg keep drones' assimilation profiles?

Question: In (VOY: "Collective"), Seven of Nine retrieves the children's names from Borg's assimilation profiles. Why would the Borg keep such individual-related profiles? How do they manage to record such profiles when a mass assimilation of billions is carried? At what stage of assimilation do they access one's biography and record it?
Comment: Hell, Google does it. Their capabilities are vastly inferior to Borg.
Answer: The Borg are information addicts
The Borg is a cybernetic hive mind/superorganism whose sole purpose is the pursuit of perfection. It does this through assimilation (in particular, of knowledge, technology and biology).
So when a species or population is assimilated, they are injected with self-replicating nanoprobes that infect the host organism. Upon infection, one of the immediate functions of Borg nanoprobes is the construction of a neural transceiver which links the host individual up to the hive mind—a virtual network of the minds of all Borg drones connected via subspace (sort of like a distributed computing cluster), resulting in a single collective consciousness.
The more species and populations are added to the collective, the more advanced/intelligent/powerful the Borg become. Although drones are robbed of their individuality, their creativity, their personality, etc., the experiences and knowledge of each drone feed the Borg's ability to improve itself, to adapt to threats and to strategize.
This is how and why the Borg assimilate. So it wouldn't make much sense for the Borg to just toss out the valuable knowledge and experiences of their drones — which is arguably a far greater prize than the physical technology they capture.
The Borg isn't interested in wanton destruction and much prefer efficiency over waste, so you'd expect them to save and catalog every bit of information they come across.
The Borg cluster has plenty of storage
As to how it's possible for the Borg to retain the knowledge of every individual they assimilate using the brains of every individual they assimilate? Well, just because you obtain a billion hard drives and shuffle the data around between all the hard drives and re-organize the data, doesn't mean the volume of the data has changed. Remember, the Borg don't really synthesize original knowledge on their own. They are almost slavishly dependent on assimilation for acquiring new knowledge and only recombine or make incremental improvements on assimilated research/technology (e.g. the Omega particle).
And that's before you even take into account the cybernetic enhancements that Borg drones receive, which allows Seven of Nine to become possibly the most advanced/intelligent (or at the very least the most knowledgeable) human alive in the 24rd century (with the exception of One and Reginald Barclay while he was under the influence of Cytherian control).
Answer: I suspect it's more of a side-effect of assimilation, than anything else.
In the flashbacks in VOY 6x02, Survival Instinct, we see 4 drones all start to remember who they are once they're disconnected from the Collective.  Their memories weren't ever erased, just suppressed.
When a drone is assimilated, they're given a cortical implant, which allows their mind to interface directly with Borg technology.  The cortical implant can also store neural patterns, as seen when a damaged vinculum started to bring those personalities to the surface of Seven's mind in VOY 5x07, Infinite Regress.
The personalities Seven experienced had to come from somewhere, either long-term storage in Seven's cortical implant or directly from the vinculum itself.  Either way, it would seem that the minds of assimilated drones are stored in computer systems, which means their memories should in some way be accessible from Borg terminals.
The specific information about their names probably wasn't purged due to the fluid nature of the Collective.  It is made up of the minds of billions of drones - selectively eliminating memories could have further repercussions inside the mind of that particular drone, making its contribution to the hive mind less than it otherwise could have been - and there's no way of knowing for certain that the information might not be useful later, such as the connection between "Picard" and "Locutus".
Finding, classifying, and then erasing irrelevant information would also become extra effort expended for no real benefit - a drone is a drone, not an individual.  The name is irrelevant, whether or not it is remembered.
Answer: Because it makes sense to have independent records.
Seven of Nine mentioned in the episode with the Vuadwar that the collective's memories from ~900 years ago are extremely fragmented, and it's possible that this problem is also present in other eras of data as well. The Borg know this is a problem. So it makes perfect sense form their perspective to use some forms of external storage, especially if it's information  you don't need very frequently, such as assimilation data of someone you already assimilated, backups, etc.
Comment: While true, this doesn't really explain why the Borg would even bother with saving that particular data: who those individuals used to be is of no importance to the Collective.
Comment: @BMWurm: Really? Who those individuals used to be is _literally_ the reason they were assimilated in the first place.
Comment: @LightnessRacesinOrbit Is it though? What their profession was, what (to the Borg) useful knowledge they had accumulated, for certain, but their names, date of birth and other personal information is literally irrelevant to the Borg.
Comment: @BMWurm: _My_ date of birth is pretty irrelevant to absolutely everybody, yet I still have to use it regularly for various reasons. Getting rid of knowledge for the sake of it is pointless.
Comment: Some of the info might be useful. For example, if a large number of drones keep die dying at a relatively young age of unknown causes, that info could be used.
Collective: "Hey! All of those drones were Betazoids! I guess the info we got from Locutus was right! That species IS useless!"
Also, certain species work better for certain drone types. Example, being queen is a hard task, so you must find a drone who is up to it. Checking the species of a drone would be a good idea.
Answer: Information is a raw resource, think of it like an ore.
Ore on its own is pretty useless until it is refined, even then refined Ore is still useless until....a use for it can be found but that use is not always going to be found in any decent time frame.
Just like ore, information takes time to refine and to structure but for a species like the borg that is less of an issue, they are adept at holding information, indeed it is what they do best.
Time is a concept the borg and any other species treat very differently, whilst an individual may look at a long time being their lifetime the borg may think of the passage of time on a much larger scale.
So why store information that on the face of it seems irrelevant to a species who purge individuality?
Well I would like to think the borg do not know themselves what to do with the information themselves but because they can they simply hold on to it just in case the information becomes relevant in the future.
Let us say they assimilate person a, 500 years go by and they assimilate person b, person b has information on relevant technology, specifically they know of an individual with knowledge of the omega particle.
it so happens that person b has a name to this individual, turns out that individual is a descendant of person a, if they removed all the information on person a's previous life they will not be able to leverage that information to achieve a standing, long term goal.
This is a stretch I know but i am trying to demonstrate that information is not always readily useful, patterns are not readily known and so on so forth, the borg know this, so regardless of what the information is they keep hold of it because they can do this easily.
Comment: Is there any indication this is the case? Or is this just speculation?


QGIS elevation and relief shade

Question: I am trying to generate a map with terrain and elevation in QGIS and as a beginner I have followed tutorials
on how to generate contours and hill shades succesfully. However, I don't know what are the next steps in order for me to
apply style/colors on based on the elevation. As for my project I am using Global Elevation GeoTIFF from https://www.iscgm.org/gmd/.
I am not sure though if this is the right base map/file that I should use to produce what I want, or if this produces accurate elevation
data. The map I need to achieve is a terrain + elevation map just like what SkyVector uses. Also, if I am able to do this, will there be a way to stitch or collage
multiple layers from different sections of a map since processing the entire map takes forever, whilst for a certain country only takes a minute.
Answer: I usually do the following. I place the DEM layer on top and the hillshade layer below the DEM. In order to assign a color palette to the DEM you have to choose the DEM layer right click and ask for the properties, go to the style tab and choose single band pseudo color for the render type. You have to choose a color palette and also to load min/max values and actual accuracy as shown in the image

One note, you are not going to find the color palette DEM Print in QGIS I downloaded the svg ramp from
http://soliton.vm.bytemark.co.uk/pub/cpt-city/views/totp-cpt.html
and defined as a ramp using the SVG2color plugin. In the site mentioned above you can find several color ramps that you can use. Just download the svg of the ones you like, convert them using the plugin mentioned and they will be available to be selected.
Now go to the transparency section of the DEM layer properties and define that you want a transparency of 50%.

Once you hit ok, you can see the DEM and the Hillshade at the same time, for instance

hope it helps
Gerardo
Comment: I'm not sure why the style is not applying to my layer. Is a DEM file .dem or .tiff and added as a raster or vector layer in QGIS?
Comment: According the site you mention, the elevation data  comes in BIL format. Download the elevation data. Then go to ad a raster layer and for the file type select "ESRI .hdr labeled (*.bil *.BIL)". When you load the data it could be in gray scale, but you can follow the answer to apply a color scheme to the DEM. You have to remember that elevation data could come in a variety of formats like *.tif (geo tiff) or even ascii (*.xyz). BIL is one of them.
Comment: It's still not working. I guess this is a bug in QGIS 2.10.1 Pisa for Mac OS X El Capitan. Are you using Windows or Linux?
Comment: It is working now with QGIS 2.8 on Mac OS X El Capitan.
Comment: Glad it worked. I am using both 2.8 and 2.10 on windows, I think the issue you faced is a Mac problem. Look at http://gis.stackexchange.com/questions/166180/unable-to-change-band-rendering-style-of-rasters-in-qgis-2-10-1

QGIS elevation and relief shade


Changing the brightness on a Hitachi HD44780 LCD screen

Question: I am finishing up a project- an LED game alarm clock. Seeing as this is a clock, I need to have a way to conserve power, which right now my Uno R3+ is eating up like a politician. My question is, how do I turn the screen off, or turn the back-light off using software only on a Hitachi HD44780 16x2 LCD screen? Or how do I set a sleep mode on one component? The way I plan on turning it off is with an ultrasonic range finder, if I get close it turns on the screen. If anything I say doesn't make sense, ask me to clarify, I'm in a bit of a rush.
Comment: Whether this can even be done is *entirely* dependent on how you have the LCD screen connected. The HD44780 command set has no provisions for backlight control. You would need to add some external mechanism of your own for controlling the backlight.
Answer: Place a transistor in series with a 33R resistor between the LCD pin 16 (backlight ground) and GND and switch the transistor on and off with a digital pin. That way you'll be able to turn the backlight on and off.
You can have a finer control over brightness if you put a PWM pulse on said pin. Just call analogWrite(D3, value) where value is the desired brightness.
The schematics is below. It's from Freetronics 16x2 LCD SHield.
Comment: @Madivad - I'm guessing it's to increase maximum dissipated power that the resistors can take. The two 68R resistors in parallel result in an equivalent 34R resistence but doubles the maximum power that can be dissipated through a single resistor. I don't remember what resistors were recommended by Freetronics, but in my case, I've used two 1/4W 68R resistors and the board is working ok. Also, I suppose that 68R resistors are more common. That certainly holds true for me as I have plenty of 68R resistors in my bins and no 33R ones.
Comment: @wara -  That's a Field Effect Transistor (FET), not a BJT. So you'll be looking to connect its drain, source and gate. In any case, you'll get better help by asking a separate question, linking to this one.
Comment: +1 for the schematic, although I'm not sure why there are two resistors (R7 & R8).
Comment: I know this is "old", but hope someone will notice this... I'm having trouble understanding how the transistor connects (as i'm not familiar with the icon above for the transistor), where does the E, B, C connect to?
Answer: Instead of tying the backlight directly to V+ and GND, connect it to a PWM pin (you may need to use a separate driver if the pin cannot source/sink enough current). This will allow you to control the brightness via analogWrite().
Turn the LCD display off (LiquidCrystal::noDisplay()) when not actively in use. The contents will remain in memory but the LCD segments will not be driven.
Set the various bits in the PRR register to disable any peripherals not it use.
And don't forget to sleep the CPU when it doesn't need to run. See the "Power Management and Sleep Modes" section of the datasheet for more information about this and the PRR register, as well as the <avr/sleep.h> documentation for AVR Libc.
Comment: Sleeping the MCU is pointless, since the rest of the parts on a common uno consume so much power it doesn't provide any meaningful reduction in overall consumption..
Comment: Really, if you want to actually get an arduino to be low-power, you need an arduino pro (or any other board with no onboard usb-serial), and then you'd need to put a regulator with decently low quiescent current draw on it. It's a bit involved.
Comment: Absolutely. Someone that wants to conserve every last bit of energy will design their own board and spec their components out accordingly.
Comment: Yep, but my point is that you can't even get meaningfully relevant power conservation on most any arduino boards, since even their vregs have horrible quiescent current (2 ma +, IIRC). Then there is the FTDI/ATmega16U2, which you can't turn off, etc....
Comment: @Mr.Floppy: IOW, pick something else. Something with fewer pieces.
Comment: @ConnorWolf Well, if you do actually **measure** the rail current of an Uno running the `delay`-based blink sketch vs a rewrite of the same based on timer interrupts and properly deep sleeping — you'll see that sleeping the MCU is not so pointless. In my case, the numbers were something like 30 mA vs 17 mA. Still quite a drain; but your point has been invalidated by an experiment.
Comment: 43% is... less terrible, but still not great.