Why do Macs only have one mouse button?

Question: Why do Apple Macintoshes only have one mouse button? It seems useful to have at least a second one for options that aren't regularly used.
Comment: They's have two (or more) 'buttons' for a long while. I believe OSX has supported two+  buttons from day one.
Comment: Maybe Apple engineers where anticipating the trouble of right-clicking on a touchscreen back in 1983, already ;)
Comment: @funkylaundry haha maybe. Though Apple doesn't have touchscreens, which I believe is smart. Which is easier? Moving your fingers to press down a key or moving your hand all over the screen (and not being able to see the display while doing so). I personally think touch screens are severely overrated and we're experiencing hype right now over junk. Possible exception being smartphones, but why would a desktop need a touchscreen (and even Blackberries were fine without touchscreens)?
Comment: Duplicate or reverse? [Why have two mouse buttons when one is sufficient?](http://ux.stackexchange.com/questions/49564/why-have-two-mouse-buttons-when-one-is-sufficient)
Answer: It's because Apple explicitly mentions in its Human Interface Guidelines that all software providers should provide all functions available with a single click and they don't see any use case for providing a right click.
That said, it does support an option to have a secondary click as shown below which brings up the contextual menu

Now coming to the reason why Apple might have gone that route, there was a discussion in the slashdot forums why apple prefers to have a one button mouse.
The general consensus was that the reasoning behind the primary design decision was to remove the confusion among the average computer user for remembering which button to click and therefore increasing the intuitive usage of the Apple user interface.
To quote the article

The first reason deals with the technical ability of the average
  computer user. Having once worked doing technical support, let me
  explain one very common point of frustration for techs. Here is an
  example:
Me: Right click on "My Computer"
Caller: Right?
Me: The right mouse button
Caller: Oh, okay…Now there's a menu.
Me: Select "Manage"
Caller: okay
Me: Double click on 'Device Manager'
Caller: Left or right click?
I kid you not, ten times a day I would talk to someone who has never
  right clicked in their life. After they first do it, they will ASK YOU
  EVERY TIME if they should right click or left click. Now, though we
  may not be the typical computer user, Apple is always concerned with
  creating a user experience that is as intuitive as possible. Giving
  the average person a right mouse button is like giving a bald man a
  comb.
Secondly, Apple wants all developers to follow their interface
  guidelines. The reason for this is tied into what I wrote above. If
  every application can be expected to work the same way, the learning
  curve for the user is minimized. Apple has gone through great pains
  and great expense to study human-computer interaction. Because of
  these studies, one thing Apple insists on is that every feature of an
  application should be accessible through menu items. It's great and
  even encouraged to create additional ways of accessing features, but
  at a bare minimum, you should be able to reach it from the menu.

One of the slashdots post also has this to say

I am old enough to have read several "Byte" magazine articles about
  the Macintosh when it first debuted in 1984. The justification for the
  1-button mouse was that the Apple engineers wanted the operation of
  the pointer to be as simple as possible. They felt that having 2
  buttons would confuse the user since she would need to remember the
  specific functions associated with each button

All of this said, one of the big downsides of this single button option resulted in the headache of using double click which was introduced by Apple in 1984 when they introduced a single button mouse along with the first Mac.
To quote this coding horror article

It was basically forced on the industry by Apple Computer when they
  elected to use a single button mouse on the original Mac in 1984.
  Technically, double-click is an optional shortcut for clicking an
  object and then clicking the File,
Comment: But this reasoning is largely obsolete now, it's common for people to know that mice have two buttons.
Comment: Back in the day, one of Apple's ads touted the fact that the Mac mouse only had one button so a user didn't have to worry about pressing the wrong one.  At the time, btw, PC applications were woefully inconsistent about which button should be used for what purpose.
Comment: I'd like to add that the secondary click can also be archived with pressing _ctrl_ during the click. This is a hint that it is considered a feature for the advanced user
Comment: Hence the fact that these days, Apple mice act like 2 (or 3) button mice.
Comment: @Celeritas Apple don't like to admit defeat.
Comment: @supercat Thanks ! thats before my time so I didnt know..
Comment: it might be worth mentioning that this decision was made waaaaaay before the mouse was ubiquitous.
Answer: The mice that come with Macs today have effectively more than one button, a press on one side is considered the primary button and the other side the secondary button. The primary button is associated with selecting and dragging and activating (with double click), the secondary button usually pops up a context dependent menu.
Earlier Macs had only one button, supposedly less confusing than 2 or more buttons, but this proved fairly limiting. Two button mice were standard on early Windows systems, and software that relied on 2 button semantics (most software) treated control+mouse button as the secondary button on Macs. This required 2 hands, somewhat clumsy, especially when you're used to that second button on the mouse.
In 2005 Apple release the Mighty Mouse, their first mouse with more than 1 button, that had 4 effective buttons.
Answer: Having no right click may seem easier for the average user but if one is used to having a primary (left) click and a secondary (right) click, then for that person it would seem more natural. I have always used windows laptops and desktops, so it took me a while to get used to the single click on macs. I also noted that it can sometimes be a bit annoying because the trackpad will not always register both of your fingers so you may accidentally left click when you intended to right click.
Answer: Because Apple is still in their infancy stage and is unable to break out of that mold. I always used a 2-button mouse even when I exclusively used Mac, particularly back in Mac Classic. Even though I wasn't using a PC, I just never understood the reason for a one-button mouse; maybe for newbies but once you grow up, you join the big boys. Plus I never really cared for the feel of the Apple mouse when PC mouses were designed so much better. I remember just thinking how great "Finderpop" was. If you had a very large monitor, why go all the way over the AppleMenu, when you could just right click and be able to access the Apple menu. Or if you were using several monitors.
Comment: Apple is 40 years old, literally the biggest (revenue/profit) consumer electronics company in the world, and the iPhone and iPad are made by literally the biggest (employee) electronics company in the world; Foxconn. I'm no big fan of Apple, but your 'answer' is just an unsubstantiated rant.
Comment: Is this really the reason?
Comment: This sounds more like a personal rant than a useful answer.

Why do Macs only have one mouse button?


How to edit name on existing publications after a name change?

Question: Assume that I publish many papers in many journals and someday I changed the family name (my last name). How can I edit that where my papers have been published? and is it easy process?
Comment: I am voting to reopen. The other question is about indicating a name change *on a CV*, and all the answers focus on the wording to put on the CV. What is asked here is a different matter.
Comment: It would also be really confusing for all those papers that cited your earlier works. Are you going to try to submit corrections to the papers of everyone who has ever cited you?
Comment: You should check out the following post: http://academia.stackexchange.com/q/9003/4394 which involves the same type of issue. To answer your question: you cannot change your name on articles past.
Comment: @Zenon, you're probably thinking of Ben Barres.  See, for example, http://www.washingtonpost.com/wp-dyn/content/article/2006/07/12/AR2006071201883.html
Comment: Probably not. I can't remember the name of the professor who changed sex and a lot a few people though that he was much better than his "sister".
Answer: I am afraid that you can't easily change the name on a published article. Publishing is (at least theoretically) still done on print, so there is simply no way to change the physical journal once it has been sent to university libraries all over the world. Even for more important issues such as plagiarism or factually incorrect data, only an errata is issued, or the paper is marked as "retracted".
What you can do instead is advertising the double name on your webpage and CV, and ensuring that the academic databases (such as Web of Science and Scopus) correctly recognize and handle your name change, marking all of your papers as written by a single author. You will probably need to notify them using the "contact us" functions on their websites.
Several authors in the same situation choose to keep the old name also on new papers; this makes it simpler for other researchers to recognize you, at the price of using a name that you might have disowned and now consider a relic from the past. In practice, there is no requirement that your academical nom de plume coincides with the one that is written on your ID and that you use on legal papers, so you are free to sign your papers using a different version of it. Once you choose this route, however, it will be more practical if you consistently use the old name also when attending conferences.
If you are simply getting married, then signing your papers with both surnames is probably the easiest option. (I realize that probably you have already considered and discarded this option, but I thought it more appropriate to include it in my answer anyway.)
Comment: "In practice, there is no requirement that your academical nom de plume coincides with the one that is written on your ID" - unfortunately, this assumption can get endangered in situations where the two worlds touch; e.g. if people at a conference (who tend to rely on the author name indicated on the paper) need to see something issued by the university (which is based on legal documents), or vice-versa.
Answer: As others have pointed out, there is almost certainly no way to change your name in already published papers. In line with the previous answer, I would like to call your attention to initiatives like ORCID and ResearcherID that aim at creating unique identifications for each researcher, so you can collect all your scientific output under a single ID, more or less independently of a particular name or spelling.
Comment: +1, and plus as well for pointing out the spelling issue: I'm Hejda, but after publishing in countries using the cyrillic alphabet, I could easily become Cheida, Xeida, Geida, Gejda, ...
Comment: @tohecz a common situation for many scholars, think for instance of researchers with Chinese or Arabic names publishing in western journals and the inevitable mess with the transliteration of their names.
Comment: do you have any advice on which site should I use?
Comment: @Ooker use both!
Answer: There are two strategies that I have heard of that people with renowned accomplishments tend to employ when they get married (what is, I think, the most common situation when a person changes last name). It certainly depends on your legal system, but in my country they either: stay by the old name or use composite last name. The latter meaning that if a person's name was Smith and nupturient's name is Brown, then they change the name to Smith-Brown.


Renting a car without driver's license in Spain

Question: my wife and I are going on holiday to Menorca soon and we were thinking of renting a car. The problem is, she can drive and has a valid drivers license from non-EU country but doesn't have a credit card. I, on the other hand, have a credit card to my name but cannot drive. Most rental car companies that I'm finding online require that the credit card is on the name of the main driver. As you can see this is a big problem for us as I can't rent because I don't have a driver's license and she can't do it because she doesn't have a credit card.
Is there any way around this? We've travelled to Brazil for 3 months in the past and we're able to rent a car for the duration using my credit card and her driver's license so we were surprised when we found we couldn't do it in Europe.
Comment: Can you ask your credit card issuer to issue another card on your account in your wife's name?  Many card issuers in the US, at least, will do that.
Comment: Thanks, I've just applied to add her to my card. I didn't realise you could do that.
Comment: @phoog You should put that as an answer, because it's a good solution.
Comment: I have successfully done this in Germany travelling with a colleague.  The booking (and deposit) were in his name on a corporate card, but his licence had been temporarily revoked and I was driving.  However I had a credit card withme that I could have used if necessary, otherwise I would have been worried about it
Answer:
Is there any way around this?

Many card issuers will issue a second card on your account in your wife's name.  This should satisfy the rental agency.


How Eruv Tavshilin Works

Question: It's great that you make a Brocho, and say the declaration. But how does it allow you to cook for Shabbos on Yom Tov? What is it about it that makes it Muttar?
Answer: On a Biblical level you'd be allowed to cook on a Yom Tov even for a weekday, so long as there is enough time left in the day that you'd actually be able to eat the dishes you're preparing, if you're so inclined.
The Eruv Tavshilin, then, is needed only because of the Rabbinical enactment forbidding preparations on Yom Tov for afterwards. It represents the beginning of your preparations for Shabbos; then, the rest of the cooking (or whatever other activity you do) is a continuation of that. This serves two purposes:

It reminds people that Yom Tov is special, and that one may not cook on it for other days.
It also reminds you that Shabbos is coming, so that you don't end up using all the good food for Yom Tov and forget about Shabbos altogether.

(Beitzah 15a and Rashi there; Shulchan Aruch Harav 527:1)
Comment: (Your point about having time left in the day is debatable- that's according to those that hold the Biblical permit is based on "ho'il")
Comment: Yasher koach!  Beat me by 24 seconds!  (And a more complete answer too. But baruch shekivanti that it was basically.)
Comment: YDK: what's the other opinion? I was under the impression that everyone agrees to that principle.
Answer: It's debated in the Gemara, but the simple answer as I recall it is basically, it's allowed to prepare from yomtov to Shabbos.  But Chazal want to remind people that this is the special case for Shabbos, not that you can always prepare on yomtov for the next day.  Making an Eiruv is the way we remind people of this.

How Eruv Tavshilin Works


Messenger program for QQ on Ubuntu

Question: I use Ubuntu 11.04 and now I want open a QQ account with Pidgin. Pidgin
can open Yahoo and MSN for me but will not work for QQ.
Could someone help? Or does anyone know of other messenger for QQ in Ubuntu?
Answer: Unfortunately, the built-in QQ support in Pidgin broke recently when QQ updated their version. I've been testing out the libqq-pidgin, and it seems stable enough for now. It supports the QQ2010 protocol. I haven't had a chance to look through the source code yet.
Answer: The best option is having a virtual windows to run QQ (with nothing else in it). Not because there are not options in Linux, but because QQ is basically a virus. It will read your hdd searching for content that will be passed to other search engines; will also filter words used in the communication (with unknown targets) and others.
Think twice before using it for a serious communication or in a partition that it can access other files.
Answer: I've read on the QQ International official page on Facebook that they're rolling out a Web-based version of the QQ client (in English).
It's called QQ Chat and it looks like you need to run it from your own Facebook account.
I am a Linux user as well and I welcomed this news because I'd really like to use QQ on my box and so far the only option was either a virtual machine or WINE emulation (I've succeeded many times on different Ubuntu-based distributions).
I don't know where the user above got the news that QQ is a virus but I've been using it for years with no problems. Actually, his post got me paranoid and I tested my Windows QQ International copy with different AVs... no problems at all. Please do some research before making other people scared :)
Comment: He didn't say it was a virus, just that it acts in similar ways.

Messenger program for QQ on Ubuntu


Network speed between 2 EC2 instances in VPC

Question: I setup a vpc and launched 3 EC2 instances all in 10.0.0.0/16 subnet. I am wondering how these instances connected to each other, 100mbit, 1000mbit?
Answer: The physical interface is at least gigabit, and known to be 10 gigabit on Amazon's "HPC" instance types.
However, that information is largely irrelevant. Amazon's infrastructure has layers of abstraction to provide the scalability and manageability required for an operation at this scale. The network latency between regular EC2 instances can be surprisingly high, and varies a great deal over time.
Since your VPN runs on top of the regular EC2 networks, you'll have to consider this variance. So you will need to benchmark this yourself, and keep the benchmarks running for a day or two while your EC2 instance is under load -- to get a feel for how latency & throughput look 'on an average day'.
Answer: I think you would have to ask amazon, as they are hosting these virtual machines.


How does a seed determine when to start germination?

Question: I'm sure there are many different ways for seeds of different species, but what is a general rule? Is it some kind of ideal temperature & wetness that triggers a chemical reaction? What factors stimulate seeds to germinate?
Comment: Temperature and humidity are factors. Germination is also controlled by some hormones including Abscissic acid (ABA) and Cytokinins. With sufficient humidity ABA is dissolved and washed away and germination pathway is de-repressed. I had read this long-long time back; I'll verify this and post an actual answer.
Comment: Dormancy breaking (no article on wikipedia?!?) is sure related. As far a I heard, a cherry pit does not germinate unless it had experienced some very cold temperature.
Answer: Certain conditions are necessary for seed germination:

Moisture — seeds dry out during dispersal, but at germination the cells need to absorb water in order to rehydrate so that metabolic reactions can take place, which will eventually lead to the growth of the embryo tops and shoot. Furthermore, some seeds contain a hormone that inhibits germination and water is needed in order to wash it out of the seed. The water needed for these processes is absorbed by the micropyle.
Warmth —  many of the metabolic events of germination use enzymes, and these are sensitive to temperatures. Temperature will often be used as a trigger for germination.
Oxygen — many of the metabolic events that occur during germination use energy. This energy is produced by aerobic respiration.

Many metabolic processes take place at the start of germination, such as the synthesis  of giberrellin, this is a plant hormone that stimulates mitosis and cell division in the embryo. Other plant hormones include Abscisic acid (ABA), which regulates seed dormancy and germination. It has been found to stop germination once it has been placed in the soil, it causes the seed to enter a period of dormancy. This allows the seed to remain dormant until when the conditions are more favorable for the seed to grow.


Should I include Cover Letter if not asked

Question: I am applying for a job, but they don't ask for Cover Letter. Should I include a cover letter anyway. If I was on the hiring end, I would look straight at the applicant's resume, and if I am interested, invite them for interview.
Answer: I use the resume as a general purpose document. I customize the cover letter to specifically state in what ways my work experience and skills set fit the prospective employer's requirements.
The alternative to writing a good cover letter would be for me to create a different resume for each position I am applying for, and I am not about to drive myself crazy doing that.
You can send your resume as-is without a cover letter but if I were the recipient, I'd throw your resume in the trash. I'd figure that if you won't take the time to make the argument as to why you are a good candidate, I don't have to make the time to read your resume either.  I am not about to squint through your resume and make for you your argument as to why we should see you for an interview.
Comment: @Glowie Make it a good one :) I've seen a few too many carelessly written cover letters. Remember, the prospective employer doesn't know you from Adam, and you are really introducing yourself to the prospective employer in the cover letter.
Comment: @Glowie You don't need to be super tight on the tecnologies - more than one prospective employer has the unfortunate habit of listing a laundry list without mentioning which technologies are critical to them. In the cover letter, you don't just say you know javascript, you tell them that you are a full stack javascript demon. You are not just a systems engineer, you are a crack systems engineer.
Comment: OUCH!!!! I appreciate your candid reply, cover letter it is!!!
Comment: I certainly shall. As it is I tailor each resume to reflect what they are looking for. I make sure I highlight the technologies, and I use same adjectives they mentioned on job announcement
Comment: Well, I look at the list of technologies and if I ever used it, I explain how I used it to complete a task I am responsible for, i.e. I create PowerShell scripts to update our databases. But I do like "full stack javascript demon" :-)
Answer:
I am applying for a job, but they don't ask for Cover Letter. Should I
  include a cover letter anyway.

Unless you are applying through a forms-based website that prevents attaching a cover letter, or unless the job posting specifically mentions "no cover letters", then Yes - include a cover letter anyway.
A cover letter lets you expand on your fit for the position. It's less structured than a resume, and allows you to highlight specific areas that make you a great candidate for that specific job, in that specific company.
It makes sense to put some extra effort into your attempt to land a good job. Write a cover letter specifically for each individual application. Include it whenever you can.
Answer: A good resume is like seeing that a smartphone has a 4GHz processor and 8GB of RAM. A good cover is letter is like seeing the first cell phone or smartphone...seeing those pieces in action to spark a narrative in your head that can excite you about concrete possibilities. It's good to have the second ready to follow up if not to lead in.
More formally...Transition Cases:

Converting "Resume and Cover Letter" to "Resume" = when closing thumb and forefinger to grip paper, do not catch front page between fingers.
Converting "Resume" to "Resume and Cover Letter" = look up contact info, contact person, express what you want, wait some time, return to communication medium, download item, open item.

Option #1 puts them in an easy position to correct to the state they want.
Answer: No, don't provide a boilerplate cover letter unless there is something you truly need to share. Not all positions are special snowflakes, a good part of openings can be sufficiently covered by a well-written generic resume.
As of 2018, more and more recruiters are making the cover letter optional and in my opinion they recognize that in some cases it's just a noise, making life just a bit harder for both the candidate and for the recruiter.
Nowadays these positions that explicitly require cover letters have an  obligatory field in their online application form; these where it's optional have an optional field. No field? Assume they probably don't need a (boilerplate) cover letter.
If you need to share thoughts that are specific to your fit for that job/company, I am sure every recruiter will be happy to read your letter.
Answer: I do not read resumes submitted without cover letters. I can't take the time to go through your resume without some kind of introduction and sense of who you are outside of your laundry list of employment.
Comment: My manager just throws cover letters in the bin and then skims CVs for interesting stuff. I guess one's mileage varies quite bit on this issue.


How to backup ePubs and pdfs to iCloud

Question: Is it even possible? I have hundreds of books in all these formats sitting in my iBooks library on my Mac. Now, I do notice that I can safely delete my iBooks (purchased off iBooks Store) from my local library and the titles still show in my list, with a little cloud icon saying the book is still available for download off iCloud. Is there any way to do the same for books in other formats, i.e. PDF and ePub? I would love to move my entire library to iCloud and free up local space if this were possible.
Answer: Just drag your files ePub and PDF files in your iBooks and it will be synced through your devices(provided they use the same iCloud ID). ePubs should appear under books and PDF will have a category of their own.

How to backup ePubs and pdfs to iCloud


How can I install CUDA on Ubuntu 16.04?

Question: For TensorFlow I would like to install CUDA. How do I do that on Ubuntu 16.04?
Comment: WARNING: don't use the "run-script", like in the accepted answer. You'll F* your system when you apt-get-upgrade your kernel.
Comment: For CUDA toolkit 9.1 on Ubuntu 16.04, this hindsight post may be helpful: http://tech.amikelive.com/node-669/guide-installing-cuda-toolkit-9-1-on-ubuntu-16-04/ Similar with @Atlas7 post, the installation process also relies on the deb (network) method instead of using runfile (local) as seen in the accepted answer.
Comment: I have written a github readme.md file explaining every step in sufficient detail. You can have a look at it: https://github.com/bhavykhatri/Installing-_CUDA_toolkit_guide_LINUX/blob/master/README.md
Answer: Install CUDA for Ubuntu
There is an Linux installation guide. However, it is basically only these steps:

Download CUDA: I used the 15.04 version and "runfile (local)". That is 1.1 GB.
Check the md5 sum: md5sum cuda_7.5.18_linux.run. Only continue if it is correct.
Remove any other installation (sudo apt-get purge nvidia-cuda* - if you want to install the drivers too, then sudo apt-get purge nvidia-*.)

If you want to install the display drivers(*), logout from your GUI. Go to a terminal session (ctrl+alt+F2)
Stop lightdm: sudo service lightdm stop

Create a file at /etc/modprobe.d/blacklist-nouveau.conf with the following contents:
blacklist nouveau
options nouveau modeset=0

Then do: sudo update-initramfs -u
sudo sh cuda_7.5.18_linux.run --override. Make sure that you say y for the symbolic link.
Start lightdm again: sudo service lightdm start
Follow the command-line prompts

See also: NVIDIA CUDA with Ubuntu 16.04 beta on a laptop (if you just cannot wait)
Notes: Yes, there is the possibility to install it via apt-get install cuda. I strongly suggest not to use it, as it changes the paths and makes the installation of other tools more difficult.
You might also be interested in How can I install CuDNN on Ubuntu 16.04?.
*: Don't install the display drivers with this script. They are old. Download the latest ones from http://www.nvidia.com/Download/index.aspx
Verify CUDA installation
The following command shows the current CUDA version (last line):
$ nvcc --version
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Sun_Sep__4_22:14:01_CDT_2016
Cuda compilation tools, release 8.0, V8.0.44

The following command shows your driver version and how much GPU memory you have:
$ nvidia-smi
Fri Jan 20 12:19:04 2017
+-----------------------------------------------------------------------------+
| NVIDIA-SMI 367.57                 Driver Version: 367.57                    |
|-------------------------------+----------------------+----------------------+
| GPU  Name        Persistence-M| Bus-Id        Disp.A | Volatile Uncorr. ECC |
| Fan  Temp  Perf  Pwr:Usage/Cap|         Memory-Usage | GPU-Util  Compute M. |
|===============================+======================+======================|
|   0  GeForce 940MX       Off  | 0000:02:00.0     Off |                  N/A |
| N/A   75C    P0    N/A /  N/A |   1981MiB /  2002MiB |     98%      Default |
+-------------------------------+----------------------+----------------------+

+-----------------------------------------------------------------------------+
| Processes:                                                       GPU Memory |
|  GPU       PID  Type  Process name                               Usage      |
|=============================================================================|
|    0      1156    G   /usr/lib/xorg/Xorg                             246MiB |
|    0      3198    G   ...m,SecurityWarningIconUpdate<SecurityWarni   222MiB |
|    0      6645    C   python                                        1510MiB |
+-----------------------------------------------------------------------------+

See also: Verify CuDNN installation
Help! The new driver does not work!
Don't panic. Even if you can't see anything on your computer, the following steps should get you back to the state before:

Press shift during startup
Go into a root shell
Make it writable by running mount -o remount,rw / (- is ? and / is - in the american layout)
sh cuda_7.5.18_linux.run --uninstall
sudo apt-get install nvidia-361 nvidia-common nvidia-prime nvidia-settings

Graphics drivers
Installing the graphics drivers is a bit tricky. This has to be done without graphics support.

Log out from your current X session.
Ctrl+Alt+F4 (you can switch back with Ctrl+Alt+F7)
You should remove all other drivers before.

Search for them via dpkg -l | grep -i nvidia
Remove them via sudo apt-get remove --purge nvidia-WHATEVER

Stop lightdm via sudo service lightdm stop
You might need to reboot your pc / blacklist the nouveau driver (German tutorial)
Comment: It's a bit unclear to me whether to first follow the procedure at the third point, or to follow the instructions under Graphic drivers when I want to reinstall the graphic drivers
Comment: @Boern I'm sorry, I don't know. You could have a look at the Docker image for Tensorflow with GPU to check how they do it there.
Comment: @Boern I think you can just press 'q' to skip it
Comment: and always remember to run `sudo apt-get install linux-headers-$(uname -r) ` before running the installer. this makes sure kernel headers and development packages specific to what you are running is there and you wont be facing failed driver installations!
Comment: thank you, great! is there a way to skip the liscense term straight to the end?
Comment: You need to say no to the opengl drivers.  You can also pass the flag --no-opengl-lib to the .run install file https://www.linkedin.com/pulse/installing-nvidia-cuda-80-ubuntu-1604-linux-gpu-new-victor/
Comment: Thanks for this; I am trying but keep getting ```$ sudo sh cuda_9.1.85_387.26_linux.run --override
sh: 0: Can't open cuda_9.1.85_387.26_linux.run
```
Comment: In order to get things working, I had to add the lines
`export PATH=$PATH:/usr/local/cuda-10.0/bin` and
`export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-10.0/lib64`
to mi .bashrc file. Without this, the command `nvcc` was not recognized. Note that the specific folder would change according to the CUDA version and your system architecture.
Answer: I tried to install many times via the .run file, but some error always crept in and I either ran into a login loop or completely lost the display. Therefore I would recommend to use the .deb file and not fiddle with the display manager.
NVIDIA CUDA Installation Guide for Linux
is an excellent link that lists the complete details.Make sure you follow each step as it is given .
To install the Nvidia driver you can do the following:

In Ubuntu Search your Computer menu at the left top corner search Additional Drivers (You might also do System Settings > Software and Updates > Additional Drivers)

In the menu that appears select one of the Nvidia Drivers and click Apply Changes. (This step uses the internet. If it still fails then your proxy server might be blocking the download)

Reboot your system.

Open a terminal window and type nvidia-smi. If your driver has been installed correctly you should see something like:

+------------------------------------------------------+
| NVIDIA-SMI 3.295.41   Driver Version: 295.41         |
|-------------------------------+----------------------+----------------------+
| Nb.  Name                     | Bus Id        Disp.  | Volatile ECC SB / DB |
| Fan   Temp   Power Usage /Cap | Memory Usage         | GPU Util. Compute M. |
|===============================+======================+======================|
| 0.  Tesla C2050               | 0000:05:00.0  On     |         0          0 |
|  30%   62 C  P0    N/A /  N/A |   3%   70MB / 2687MB |   44%     Default    |
|-------------------------------+----------------------+----------------------|
| Compute processes:                                               GPU Memory |
|  GPU  PID     Process name                                       Usage      |
|=============================================================================|
|  0.  7336     ./align                                                 61MB  |
+-----------------------------------------------------------------------------+

You can easily install CUDA according to the previous link now. In brief:
sudo apt-get install linux-headers-$(uname -r)

Download a toolkit from here and then install the .deb file (replace name accordingly)
sudo dpkg -i cuda-repo-<distro>_<version>_<architecture>.deb

then run:
sudo apt-get update
sudo apt-get install cuda

Comment: I just installed this on a brand spanking new Linux Mint KDE setup (2017-05-24) with GeForce 1080 TI, and it worked. Choose the "deb (network)"-variant on the web page, as both just installs an apt-source in /etc/apt/sources.list.d/, but the "deb (local)" is a local file pointer, while the other ("network") is a normal link to a repo. It reads as such, and you can probably just enter itself, the file is called "cuda.list": `deb http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64 /`. Note that the install downgraded the driver from nvidia-381 to -375. I left it there.
Comment: @akshita007   When I go to additional drivers I see this message:  `Unknown: Unknown This device is not working`   It then asks me if I want to use `Processor microcode firmware for Intel CPUs`. Should I be using that? Thank you.
Comment: To everyone else reading @stolsvik's comment, there is a white space near the end.
Comment: This won't work. Besides the pre-steps, `sudo apt-get install cuda` will install the latest version (10.2 by now)
Answer: I also tried difference approaches so as to install Cuda 8.0 in Ubuntu 16.04. Finally, these are the steps which do the trick. I followed this tutorial and updated corrected steps as follows.

Update the system
apt-get update && apt-get upgrade

Download VirtualGL and install it. To install
dpkg -i virtualgl*.deb

Download and install CUDA 8.0 and install it. I suggest to do it vs through the internet. As like this,

Install required dependencies.
apt-get install linux-headers-$(uname -r)
apt-get install freeglut3-dev libxmu-dev libpcap-dev

Update system PATH in .bashrc which can be found in the home directory. Please note if you install those thing into difference location, please update path according to that.
export PATH=$PATH:/opt/VirtualGL/bin
export PATH=$PATH:/usr/local/cuda/bin

Install bumblebee-nvidia and primus.
apt-get install bumblebee-nvidia primus

Edit the bumblebee config file so bumblebee knows we are using the NVIDIA driver. Please update the path according to your system. Here is reference view which will help.
sudo nano +22 /etc/bumblebee/bumblebee.conf

Add:
[bumblebeed]
ServerGroup=bumblebee
TurnCardOffAtExit=false
NoEcoModeOverride=false
Driver=nvidia
XorgConfDir=/etc/bumblebee/xorg.conf.d
Bridge=auto
PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus
AllowFallbackToIGC=false
Driver=nvidia
[driver-nvidia]
KernelDriver=nvidia
PMMethod=auto
LibraryPath=/usr/lib/nvidia-367:/usr/lib32/nvidia-367
XorgModulePath=/usr/lib/xorg,/usr/lib/xorg/modules
XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
Driver=nouveau
[driver-nouveau]
KernelDriver=nouveau
PMMethod=auto
XorgConfFile=/etc/bumblebee/xorg.conf.nouveau

Run the following and record the PCI address of your video card.
$ lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 5916 (rev 02)
01:00.0 3D controller: NVIDIA Corporation Device 179c (rev a2)

Edit the xorg.conf.nvidia file so it knows the PCI address(01:00.0 for me) of your video card. Update PIC address as below under section "ServerLayout"
sudo nano /etc/bumblebee/xorg.conf.nvidia

Add:
Section "ServerLayout"
    Identifier  "Layout0"
    Option      "AutoAddDevices" "false"
    Option      "AutoAddGPU" "false"
    BusID "PCI:01:00.0"

Reboot the system and have a fun with running some sample codes.
sudo shutdown -r now

Answer: This is a looooong answer as i was screwing my laptop several times while writing it. However, I rather to keep it long since it maybe useful for other people too ;)
The best part of my answer starts from Edited-Updated
Sooooo, I read all the answers here and other places, I dont know why, but each of them cause me an issue :(
After 4 days, re installing Linux back and forth here is the way that worked for me.
Before going to the main procedure i want to mention an alternative method.
alternative method if you are using a laptop:
So you can switch between your nvidia and your intel gpu on your laptop by using
sudo prime-select intel
sudo prime-select nvidia

In other words, you can switch to intel and install nvidia and the switch back to intel for normal usages and whenever you want to use deep learning switch to nvidia one.
Anyway,
let me talk about the main method that finally works for me (info here are mainly grabbed from Link):
Deleting and purging all existing nvidia/cuda stuff:
sudo apt-get remove --purge nvidia-*
sudo apt-get purge nvidia-cuda*
sudo apt-get purge nvidia-*
sudo /usr/bin/nvidia-uninstall
sudo /usr/local/cuda-8.0/bin/uninstall_cuda_8.0.pl
sudo rm -rf  /etc/modprobe.d/blacklist-nouveau.conf

Then, we just update everything:
sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo reboot

Now, there would be a possibility that you cannot log in and you get stuck in the loop...
No worries, I faced that more than 50 times...
press ctr+alt+F2
type your username and password
now type these:
sudo service lightdm stop

Optional, some people also need to type this, honestly idk what is the use of it: sudo init 3
sudo nano  /etc/modprobe.d/blacklist-nouveau.conf

add
blacklist nouveau
options nouveau modeset=0

to it and save it and exit.
Then type:
sudo update-initramfs -u

go to the file that you have cuda .run file there and type:
sudo sh cuda_8.0_linux.run --override
sudo service lightdm start
sudo reboot

Sooo, if you are lucky, you should be able to login now. As you may guess, i was not a lucky one, and I still could not f**** login.
So i had to press ctr+Alt+F2 again and do the following:
sudo ubuntu-drivers autoinstall
sudo reboot

Now i could login finally.
Now it is the time to set the paths and check the installations.
type:
export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-8.0/lib64                         ${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}

nvidia-smi
nvcc -V

it should show you that you have cuda 8.
Also just in case you can also do these:
export PATH=$PATH:/usr/local/cuda-8.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64

gedit ~/.bashrc

add these at the end:
export PATH=$PATH:/usr/local/cuda-8.0/bin
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/cuda-8.0/lib64

# Added by me on 2013/06/24
PATH=~/bin:$PATH
export PATH

Save and exit gedit.
Type:
sudo ldconfig /usr/local/cuda-8.0/lib64

A question for the people who knows more than me:
So everything sounds like working but when I shutdown/reboot my system for a few seconds it shows
So everything sounds like working but when I shutdown/reboot my system for a few seconds it shows "Failed to start Load Kernel Modules" I tryied this post but it is not helping, please let me know if you know how to fix it.
----------------
Edited-Updated
Guess what, I screwed again.
But this time I came with a much easier solusion. and here is the main point: Sometimes we need to say NO
Here is what works really good for me. after you purge and remove everything and sudo reboot do this:
sudo ubuntu-drivers autoinstall
sudo reboot

press ctr+alt+F2
type your username and password
now type these:
sudo service lightdm stop

sudo sh cuda_8.0_linux.run

IMPORTANT: during the installation, the first question asks for reinstalling the driver again, SAY NO to this mother f**** question
Say yes to the rest of them though  :D
after finishing.
sudo service lightdm start
press `alt+ctr+F7`

login to your dear PC
Did it work? Your Welcome :)
Comment: Man,your answer is invaluable as in my case I must hardcode the path into the file as you explained on pretty every machine I use. Very important info. Thanks.
Comment: @MichaelIV Not so. This answer has a lot of mistakes, redundant commands and in general shows a lack of understanding. This reads as a mix-match of things that the use probably read somewhere but didn't understand correctly. And that the user tried to be funny (childish) doesn't help either. Any other answer here is better and way more practical.
Answer: I got it to work after reading several posts:
I had an ATI card in the computer already which turned out to be very useful. I installed GTX 1070 along side of the ATI and started installing Kubuntu 16.04. Only the display connected to the ATI card had image initially, which allowed me to install the driver NVIDIA-Linux-x86_64-367.27.run  downloaded from the vendor's website. To install CUDA, I downloaded the cuda_7.5.18_linux.run file. I installed the cuda toolkit by using two switches:
cuda_7.5.18_linux.run --silent --toolkit
The cuda samples can also be installed from the .run file. One issue was cuda does not like gcc5. So I did sudo apt-get install gcc-4.8 and then changed the default gcc to this version by:
cd /usr/bin/
sudo unlink gcc
sudo ln -s gcc4.8 gcc
sudo unlink g++
sudo ln -s g++-4.8 g++

I replaced gcc to gcc5 after cuda is installed. Compiling the cuda samples also need to be done with gcc4.8, gcc4.9 might work but I did not try it.
Comment: The CUDA installer respects the CC environment variable, so you can set that to point to gcc-4.8, rather than needing to mess around with your system-wide symlinks.
Answer: I wrote a blog post on this a while ago - Nvidia CUDA toolkit installation - ubuntu 16.04 LTS - notes/
My environment: Dual boot Windows 10 and Ubuntu 16.04 LTS.

Posting some major learnings here. Please see the blog post for detailed instructions (just to avoid duplication)

Disable Secure Boot at UEFI Firmware setting (do this in BIOS mode / restart from Windows advanced startup). (I did try for ages hoping I could get it working with Secure Boot enabled. No luck Secure Boot stopped the Nvidia driver from installing properly on Ubuntu. Disabling Secure Boot turns out to be the only working solution for me - if you are able to get Nvidia driver installed without having to disable Secure Boot, do let me know)
Follow the Linux CUDA Installation Guide.
(my opinion) Use the Linux .deb (package manager) installation (for simplicity.). Download the .deb file in a browser. Install from terminal command line.
(my opinion) Don't use runfile installation (too complicated).
Answer: The steps that worked for me:

sudo apt-get install nvidia-cuda-toolkit OR 1'. the installation instructions here
You need to select from Software&Updates/Additional Drivers the nvidia driver (375, in my context)
Follow the blue screen when you restart and only from there disable secure boot by inputting your password set during nvidia driver install. (any secure boot disabling through the BIOS did not work for me).

Now the installation test output is successful.
Answer: A generally preferred method is to install SW is via deb files when available as they provide a more robust way to handle dependencies and a more reliable method for removing SW. The CUDA 8.0 release-candidate was available for 16.04 (in the dev zone) that way and now the CUDA 8.0 for Ubuntu 16.04 is available via deb files (local) and (network) :https://developer.nvidia.com/cuda-downloads
Comment: I've used this method for a while, but after putting a 1080 card in, which doesn't drive the display, and CUDA 8, my Ubuntu desktop is gone. Here we go again...
Answer: This worked for me
sudo rm /tmp/.X*-lock
sudo apt-get purge nvidia-*
sudo reboot
sudo service lightdm stop

Press Alt + f1
sudo rmmod nvidia
sudo sh cuda_8.0.61_375.26_linux.run
sudo service lightdm start

and reboot
Answer: Just a kind reminder, Ubuntu 16.04 might not install cuda at the assumed location /usr/local/cuda-8.0.61. Hence export PATH=/usr/local/cuda-8.0.61/bin${PATH:+:${PATH}} may not work.
When I was trying to install "cuda-repo-ubuntu1604-8-0-local-ga2_8.0.61-1_amd64.deb" on Ubuntu 16.04, I simply followed the instructions here http://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html#post-installation-actions. However, I was not able to compile
cuda-install-samples-8.0.61.sh \home
or nvcc -V
It turned out that Ubuntu installed cuda in /usr/local/cuda-8.0 instead of the assumed location /usr/local/cuda-8.0.61. Hence I changed export PATH=/usr/local/cuda-8.0.61/bin${PATH:+:${PATH}} into export PATH=/usr/local/cuda-8.0/bin${PATH:+:${PATH}} and I successfully installed cuda.
Answer: The accepted answer didn't work for my case. I was installing CUDA 8.0 on my labtop with following specifications:

Graphics Card: GeForce GTX 950M (cc 5.0)
CPU: Intel Core i7-6700HQ (with Intel HD Graphics 530)

The following guide installs the NVIDIA driver first, and then installs CUDA 8.0.

Installing CUDA 8.0 on a fresh installation of Ubuntu 16.04

Launch [Software & Updates]. Select [Additional Drivers] tab.
In the list, find your graphic card. Among the drivers that can be used for the card, choose the proprietary driver from NVIDIA. Then press [Apply Changes] button. In my case, under the graphics card name "NVIDIA Corporation: GM107M [Geforce GTX 950M]", there were two selections:

Using NVIDIA binary driver - version 375.66 from nvidia-375 (proprietary, tested)
Using X.Org X server - Nouveau display driver from xserver-xorg-video-nouveau (open source)

Delete default installed video drivers with $ sudo apt remove xserver-xorg-video*.
Reboot.
Download CUDA 8.0 Toolkit from here. Among the installer types, choose "runfile (local)". This downloads cuda_8.0.61_375.26_linux.run.
Run the installer with $ sudo sh cuda_8.0.61_375.26_linux.run.

[Optional] If your currently installed NVIDIA driver version is higher than the driver version contained in the downloaded installer, you can choose not to install the driver while installing CUDA. In my case, since I already have driver version 375.66, which is higher than 375.26 contained in the installer, I chose not to install.

After install, config your binary path and library path (You can follow the directions from the instller). If you choose to configure ld.so.conf and the following error occurs: libEGL.so.1 is not a symbolic link, follow the direction from this link.
Answer: I initially tried doing that sudo lightdm stop stuff, but it lead to a login loop. So I found a new method:

Copy the file cuda_9.0.176_384.81_linux.run (in my case it was runfile) to any directory in /home/<your_username> like Downloads or Documents or anywhere.
After that restart your computer and when Ubuntu boot menu appears go to 'Advanced Options → Recovery Mode' (if it does not appear hold down shift key while booting)
Select 'drop to root shell', press ENTER to proceed when asked for pressing enter or Ctrl-D.
Edit: Run mount -o rw,remount / to get read-write priviliges.
Go into that directory where you have copied the cuda installation file.
Run the command on the basis of type of file, it can be found at https://developer.nvidia.com/cuda-downloads after selecting your desired target as you have done earlier. In my case it was sudo sh cuda_*.run
This is important step and proceed slowly and carefully, when the long information/agreement ends ACCEPT it.
Then it will ask about the NVIDIA DRIVER INSTALLATION press yes(y).
Then it will probably ask about OpenGL libraries installation, skip it because it may override your normal driver installation and cause problems, in my case it did. So Press no(n).
Then go ahead with all the installations and it will complete automatically and at last show the logfile in /tmp.
Now reboot the system by entering the reboot command at the recovery mode shell.
After your system starts it might not show the CUDA sample files, because you need to complete these two mandatory post-installation steps :

[A] Add the correct path for cuda.
[B] Add correct path for LD_LIBRARY_PATH

Add the path to ~/.bashrc file and run source ~/.bashrc to make the path permanent so that it didn't vanish after reboot, confirm it by closing the current terminal and running the second command in step 12 again in another terminal.
Refer to Go to 7. Post-Installation Actions
To check whether CUDA is installed properly or not run both of the below mentioned commands and check if nvcc -V give output or not
cat /proc/driver/nvidia/version

nvcc -V

Go to ~/NVIDIA_CUDA-9.0_Samples/1_Utilities/deviceQuery, then run these:
make

./deviceQuery

and match the output with this Image, your might be different but the  output format should match.
Congrats you installed CUDA Toolkit successfully. After that go here and try some examples Go to 7.2 Recommended Actions .

COURTESY - CUDA TOOLKIT DOCS
P.S - Any type of criticism is welcome, apologizes in advance for any mistakes, this is my first answer on askubuntu.com.
THANK YOU SO MUCH FOR READING:)
Comment: You could add that first selecting 'enable networking' will remount the as read/write without fuzz., or add the line where you remounted to read/write from command prompt.
Comment: @Videonauth Thanks for the edit. I didn't understand your point, I didn't do any remounting. Please explain. Thanks.
Comment: That is weird because afaik Ubuntu mounts the drive in read only mode when dropping to root shell at the start.
Comment: It's true but in my case root shell disappears after sometime which it do generally and then I again selected it and it worked fine for me. Did you mean  that I should give reference to that chmod  and  mount remount stuff?
Answer: Having done this multiple times, successfully/unsuccessfully loosing my display, coming here - gaining insights - some cuda libs not in path, missing , not installed - the sane way is to just install the linux drivers for your nvidia-card https://medium.com/techlogs/install-the-right-nvidia-driver-for-cuda-in-ubuntu-2d9ade437dec
and work on nvidia-cuda docker images - base or devel.
Do volume mapping from your code folder to the container - install what you want -
Same with working with keras or tensorflow or just pure opencv

docker run --net=host --runtime=nvidia -it -v ~/coding:/coding  nvidia/cuda: /bin/bash

Note TF also comes with its docker
Answer: I have tested these steps to install cuda for several LTS including 20.04 and 22.04 ... most answers here are obsolete and should be avoided
Its helpful to run a LTS version of Ubuntu which happens every even numbered year as in 16.04, 18.04, 20.04, 22.0 etc ... because its less of a moving target for driver owners AND the cuda download site specifically only lists LTS versions
First purge any nvidia drivers you may have installed
sudo apt purge *nvidia* -y   # this will auto give you nouveau graphics drivers

confirm above by listing all related packages
dpkg -l | grep nvidia # do above purge if need be

Delete any files in dir /var/crash   or install below will error out
reboot

Goto cuda download page https://developer.nvidia.com/cuda-downloads    Linux -> x86_64 (unless U are on ARM) ->  Ubuntu -> pick matching LTS of your Ubuntu install
then in a terminal issue all commands listed in above site
reboot

Now confirm you have cuda installed by issuing
nvcc --version

NOTICE - above will auto install appropriate nvidia graphics drivers to match your Ubuntu LTS release, cuda version and your hardware

How can I install CUDA on Ubuntu 16.04?


Broken Nexus 6p Recovery

Question: So while I was overseas in Vietnam I dropped my Nexus 6P and broken the screen.
The screen is completely black and completely unresponsive however when I use the fingerprint scanner it still vibrates.
Stupid me decided to restart the phone by holding down the off button, which I immediately regretted as of course, Now I must enter my PIN to be able to get into my phone.
SO basically, Im asking if its possible to recover any data from my Nexus 6P with a completely unresponsive screen, and requiring PIN on startup.
I Believe that debugging was enabled
Comment: Plug in an OTG adapter then a USB mouse?
Answer: Yes, you can. Connect your phone to a PC and use ADB to backup your data. Follow this guide to setup ADB, Fastboot and the Android SDK Platform tools on your PC: https://forum.xda-developers.com/nexus-6p/general/guides-how-to-guides-beginners-t3206928
Load your phone into fastboot mode by holding the power button and the volume down button at the same time, from there you can choose recovery mode by the volume and power buttons navigation of your phone, then access and copy your data from your PC by ADB.
Alternatively you could temporarily load a custom recovery as suggested here:  can fastboot be used to backup device?
For more Info see this answer here: Enabling ADB on Nexus 6 with dead screen

Broken Nexus 6p Recovery


Share User folder along different versions of Ubuntu running Gnome classic desktop

Question: Whenever I did installed several versions of Ubuntu in order to test and choose, I would like to know how can I share the same /home Folder or the same /home/user Folder. All these installations have the same user name with the same password. Specially I would like to share the Firefox History & Bookmarks, also than the Download folder. Anywhere I run the Gnome classic desktop. All the installed distributions are in the same disk.
Answer: You really don't want to do this. Newer versions of applications may make incompatible changes to the configuration, which the older versions can't handle. As a result, when you do run the newer versions of Ubuntu, you may then have issues running the older versions, due to such incompatible changes.
For Firefox history/bookmarks, you probably should use Firefox Sync perhaps; though I don't know that it supports syncing history. For the Downloads folder, you could have it be on external storage, and simply mount that partition/drive under all the versions of Ubuntu, or you could use Ubuntu One to sync the folder as well.
Comment: I agree with you, but I was not sure, so my real problem is that I would like to update Firefox bookmarks and tabs from another Firefox running inside a different distro.
Comment: Sorry. Updated the answer to address the bookmarks/downloads parts as well.
Answer: If you are dual booting multiple *buntu flavors (or any Linux distro really), I would highly recommend a separate /home partition. It removes configuration time for programs that are common to all your different distro installs. Firefox will use the config from your /home right off the bat instead of the default. Gnome, as well, will use the existing /home config files. At that point you only need to fill in the holes, installing the additional programs you prefer.
There is a more important reason than ease of configuration for a separate /home. Every time you install a new distro on the hard drive, you will be removing /home from that process. This helps to ensure that your other personal items (pics, docs, music etc.) will not be corrupted or over-written during the install. If you already installed without a separate /home this will guide you to remedy that. A more complete explanation of partitioning can be found here.
Comment: I finally used Firefox Sync, between 3 different profiles at two different distros, it supports history also. I had to remove repeated items.
Comment: That's cool, glad you found a solution.


Find patents by a specific patent attorney

Question: Many (pharmaceutical) companies have their own IP department employing many patent attorneys. On espacenet, which search field allows me to look for patents issued by a specific patent attorney at a specific pharmaceutical company? Usually, the PA is not the inventor, so I guess "inventor" is not where I should enter the PA.
Comment: I do not see a field for that in the Espacenet help section but WIPO'd PatentScope does have fields for this.

For queries related to LEGAL REPRESENTATIVES:
Fields     codes  examples
all data   RPA    RPA: (gearge, new port)
address    RAD    RAD: (colombettes)
country    RCN    RCN: KR
"Main Legal Rep" Name  RPF     RPF: (Jons)
Answer: Espacenet doesnot provide search interface for legal representative filed applications. However PAID databases like Orbit, Thomson Reutors total patents etc provide such services.
Further if you wish you can search in WIPO search as they provide search for patent applications filed by legal representative.


In how many cases of K, P vs. K, N, N endings can the stronger side force checkmate?

Question: For instance, it wouldn't be possible if the Pawn was on the verge of queening.  But is it always possible if the Pawn started off on its original square?  Is it usually possible?  Or is it only rarely possible?  How is it accomplished?
Answer: Let's assume that white is the side with the two knights, and black has the single pawn. The endgame study composer A. A. Troitzky gave an analysis (in a lengthy supplement to his 1937 Collection of Chess Studies) that established what is now known as the "Troitzky line":

So long as a white knight has the black pawn securely blockaded on one of these squares (or further back), then white can win no matter the other arrangement of the pieces. Now there are also times when white can still win with the pawn already advanced beyond the Troitzky line, but then it usually depends on the location of the black king; that is, the board usually breaks down into a drawing region for the black king, and a losing region for the black king. Establishing that was also part of Troitzky's work.

I'd be way out of my depth trying to say anything about the details of Troitzky's analysis, and besides, he spent a good 60 pages or so working out the things that he did. But it's not too hard to get the conceptual idea behind the Troitzky line. The most basic winning approach for white is this: to blockade the pawn with one knight, then use the king and other knight to corner the black king, and finally release the pawn to move while bringing the blockading knight in to deliver checkmate.
In order for this to work, white needs a fortuitous combination of (1) the pawn not being too quick to queen, and (2) the white knight not being too slow to deliver checkmate. Since the knight is most mobile - has the most travel options - in the center of the board ("A knight on the rim is dim" and all that), it stands to reason that the further away from the center the knight starts, the more time it will need for a win to be guaranteed in general, and so the further back the pawn needs to be from queening. This reality is reflected pretty clearly in the inner V shape of the Troitzky line.
But what about those far advanced rook pawns in the Troitzky line? Well, as often happens with rook pawns, they lead to special cases. Here, the reason white has this additional leeway is because of Stamma's mate, as is pointed out, for instance, in section 35.03 of this article on ChessCafe by Karsten Müller (of Fundamental Chess Endings fame).

One caveat in all this is that the Troitzky line does not take into account the 50-move rule; though there are wins in all those cases, some of them take longer than 50 moves to convert against perfect play. In the article I just mentioned, Müller raised the question of determining a "second Troitzky line" that does take the 50-move rule into account. And in a followup article he announced that Helmut Conrady solved that problem by using Rafael Andrist's Wilhelm program to analyze the Nalimov tablebases. This second Troitzky line is

So if a white knight securely blockades the black pawn on one of these squares (or further back), then white can always win in under 50 moves. Note that while there's no guarantee of a 50-move win with either a b- or g-pawn, Conrady's analysis also showed that if the pawn is blockaded on b6/g6 or further back (as in the first Troitzky line), then for over 99% of the possible positions there is a win in under 50 moves.
Comment: +1 Very detailed, comprehensive, and engaging!  I'll have to try out some of these endgames!
Comment: You can practice on [chessvideos.tv](http://chessvideos.tv) with their endgame simulator: [Position #1](http://www.chessvideos.tv/endgame-training/two-2-knights-vs-pawn-12.php), [Position #2](http://www.chessvideos.tv/endgame-training/two-knights-vs-pawn-ii-17.php)
Answer: Not exactly an answer, but comments on the question and following post.
(a) It is possible in certain cases with the pawn on the verge of queening. See the positions shown in the section "Role of the pawn in two knights v pawn ending" here (there are others).
(b) There are exceptions to the Troitzky line rule  as stated. See "Proposed changes to the Troitzky line article" here The positions shown also answer in the negative your question regarding pawns on their starting squares.
(c) The second Troitzky line rule tells you nothing about the win within the 50 move rule if some moves are needed to effect the blockade. E.g. the pawn can be securely blockaded on c5 in the position below, but I don't think white can win under the 50 move rule (I don't have a DTM50 database to check that).
<code>K1k5/8/8/2p5/4N3/8/8/N7 w - - 0 1
</code>
(d) Further to (c), it is stated that Helmut Conrady solved the problem using the Nalimov databases. I'm not saying he didn't, but this would have been extremely difficult using the Nalimov databases at the time because the databases took no account of the 50 move rule and the play they suggest can be incorrect for either side if the 50 move rule is taken into account.
(e) All of the exceptions to the Troitzky line noted in (b) are, of course, also exceptions to the "second Troitzky line" rule. Though one is shown on the knight's file it can be relocated two files to the Queen's side and remain an exception.
Comment: Martin, welcome to the site. I notice you have taken up the issue of Troitzky line elsewhere, e.g. in [a post at chessforums.org](http://www.chessforums.org/general-chess-discussion/13475-two-knights-v-pawn-endgame.html). I think the position and question you raise in that post, of whether it's an exception to the Troitzky line or not, would make a good question in its own right here at chess.SE.


Availability data

Question: I'm creating a simulator for a large scale P2P-system. In order to make the simulations as good as possible I would like to use data from the real world. I'd like to use this data to simulate each node's behavior (primarily it's availability). Is there any availability-data that has been recorded from large P2P-systems (such as BitTorrent) available?
Answer: I'm not too sure about other P2P protocols, but here's a stab at answering the question for BitTorrent:
You should be able to glean some stats from a BitTorrent tracker log, in the case where the tracker was centralised (as opposed to decentralised tracker, or where a decentralised hash table is used).
To wrap your head around the logs, have a look at one of the many log analyzers, like BitTorrent Tracker Log Analyzer.
As for actual data, you can find them all over the web. There's a giant RedHat9 tracker log here ☆, for instance. I'd search Google for "bittorrent tracker log".
☆ The article Dissecting BitTorrent: Five Months in a Torrent's Lifetime on that page also looks interesting.
Answer: Another way of appropaching this is to simulate availability mathematically. Availability will follow some powerlaw distribution, e.g. the vast majority of nodes are available very rarely and for short periods of time, and a very few nodes are available nearly always over long periods.
Real world networks will of course have many other types of patterns in the data so this is not a perfect simulation, but I figure it's pretty good.
Answer: I've found two web-sites that have what I was looking for. http://p2pta.ewi.tudelft.nl/pmwiki/?n=Main.Home and http://www.cs.uiuc.edu/homes/pbg/availability/

Availability data


Comparing field values to update new field using ArcGIS for Desktop?

Question: I am currently doing an analysis in ArcMap 10 using python.
I have two shape layers, one is a point layer and the other one is a line layer. The point layer have attributes for point's unique ID, as well as X and Y coordinates (expressed as coord_X, coord_Y). The line layer include line's ID, and its has coordinates for starting point and ending point. Here they are expressed as FromID_X, FromID_Y, ToID_X, ToID_Y. There are also two empty column in line layer's attribute table as FromID and ToID for points.
All coordinates in both point and line layer are already know by field calculation, but the FromID and ToID of starting point and ending point in line layer is empty. I want to figure out the ID of point from point layer and fill them in the table of line layer, i.e. FromID and ToID.
I have an idea to compare the coordinates of FromID_X (line's layer) with Coord_X(point's layer), if they are the same, output the Point's ID to line layer as FromID and repeat this for ToID.
But now, I am not familiar with python in ArcMap 10, I am wondering if you can tell me some idea or grammar which I can look into so I could use python in ArcMap to do this work? Or you know some tools for such kind of work?
Answer: You could join the features by attributes, select matching x, then calculate field.


Shouldn't the fourth dimension be energy/mass, and not time?

Question: First of all, I am in 8th grade. That doesn't mean you have to make your answer simple and easy to understand, but I ask you not to be too critical of my query/theory, because I don't consider myself an expert in this in any sense of the word.
So, imagine gravity. What is the Newtonian equation for gravity? The gravitational constant times the sum of the masses of the two objects (gravitated and gravitator) divided by the square of the radius of the gravitator squared. The gravitational constant times the sum of the masses of the two objects This illustrates the relation between density and gravitational strength.
Now, if we consider that mass and energy are, in a sense, parallel expressions of one another (i.e. parallel lines with the same slope, but one with a y-intercept of 1, the other with a y-intercept of whatever the speed of light squared is), than we come to the conclusion that they are, in their parallelity, almost interchangeable (of course, they must be converted into each other). So, really, mass is concrete energy and energy is abstract mass. Mass is a measure of matter, correct? If so, dense objects are objects with small volumes and great amounts of mass/energy.
Now, as the first three dimensions are dimensions of space, and therefore incompressible, as objects merely are in space, but not actually "using" or literally "taking up" space,(imagine it this way...if you draw a cube on a piece of paper, along with just it's length, width, and height, there is no possible way to calculate the cube's mass, weight, etc.) then space is stagnant without the introduction of a fourth dimension to bind, change, and affect space (this is how we know there is a fourth dimension, because otherwise, change, movement, and other principles would be inconceivable).
So, what should this dimension be? Well, it must be a duality. It must be concrete, to influence concrete objects in concrete ways, but it must be abstract, to influence the abstract (concepts, things, objects?) in abstract ways. Well, if we need such a duality, we can try the concept of energy/mass. Does this work? There are a few ways to check.

Does this "dimension" affect concrete objects? We use energy/mass to move and influence objects.
Does this "dimension" influence abstractions? Energy/mass is crucial to many abstractions, as we know.
Is there a "real-world" proof of this new "dimension"?

To make sure this is valid, we apply our new "dimension" to a proven concept/theory/law. And so, we return to gravity. We already decided that density is a direct correlation between mass/energy and space. In Newtonian terms, the gravitational constant times the sum of the masses of the two objects (gravitated and gravitator) divided by the square of the radius of the gravitator squared. In more planar, abstractual terms, imagine the three dimensions of space, incompressible by just "space-taking" objects that only expand in those three dimensions (remember...if you draw a cube on a piece of paper, along with just it's length, width, and height, there is no possible way to calculate the cube's mass, weight, etc.). Now, how does mass/energy fit into this?
Well, if mass/energy is also a planar value, it has some different properties than space (mass/energy would not be invariant). Because that you now have mass/energy, different objects have different masses and amounts of energy in different amounts of space. This means that mass/energy must be compressed differently into different spaces, right? So, the plane of mass/energy has been distorted, warped, compressed. Because or new "dimension" has now created "space-energy/mass" as a four-dimensional, universal fabric, space has also been distorted, warped, compressed as well.
Now objects and abstractions traveling through the universe naturally take the path of least resistance and follow the now-curved and distorted planes of "space-mass/energy", creating the gravitational effect. The more space/mass is distorted, the more space is distorted, and thus the more powerful gravity is. There is more to this theory, but, until I receive validation of this theory, I will wait to digress more. Please contact me as soon as possible.
Answer: [John, I should first point out that the moderators will likely move both your question and any answers over to physics.stackexchange.com. Also, your question is not showing up except for the first few words. When I answered below, I only had your title and first few words to go by. I do not know what your full argument was.]
Best answer is: No, but mass/energy and time have a very close relationship nonetheless.
Mass/energy is to time (t) what momentum is to space (xyz), so the correct pairing at a quite deep level really is time and space. However, quantum uncertainty creates a profound and mathematically precise relationship between both pairings. Most folks have heard about the uncertainty relationship between space and momentum -- that is, if you know exactly where a particle is, its momentum (speed) becomes very, very uncertain, and vice-versa.
The less know pairing is between time and mass/energy, but it works exactly the same way. Thus if you know very precisely what the mass/energy of a systems is, something paradoxical happens: You lose track of when it is in time! Richard Feynman covers this idea nicely in Volume III of his Lectures on Physics, if you happen to have access to that.


Can two different impulse responses give the same frequency response?

Question: I have two different impulse response each with different length, is it possible that they have the same frequency response?
Answer: No. The impulse response and frequency response of an LTI system are related by the Fourier transform, which is one-to-one.
Comment: Can two functions defined on different domains be identical? Not unless the longer one is identically zero on the entire interval that the shorter one doesn't cover. Then, for all but the most pedantic purposes, the two signals are the same.
Comment: Um.. can 2 impulse responses with different length be identical? Thank you.
Answer: To add on to what has been said, what you're asking is, if you have $h_1$ and $h_2$ as impulse responses of a LTI systems (continuous-time or discrete time) and $H_1$, $H_2$ their respective frequency responses, is it possible that:
$$h_1\neq h_2 \overset{?}\implies H_1=H_2$$
The Fourier Transform is injective, that is:
$$\mathcal F\left\{h_1\right\}=\mathcal F\left\{h_2\right\}\Longrightarrow h_1 = h_2$$
$$\equiv h_1\neq h_2\Longrightarrow  F\left\{h_1\right\}\neq\mathcal F\left\{h_2\right\}$$

In the discrete case, the injectivity holds as it is.
In the continuous case however, it is possible to have $h_1\neq h_2$ at jump discontinuities and isolated points and have $\mathcal F\left\{h_1\right\}=\mathcal F\left\{h_2\right\}$. [1]

[1] D. Cohen, Performance Analysis of Standard Fourier-Transform Spectrometers, p 124.
Answer: Let me play with fire, since I agree with @Jason R answer.
Some consider, loosely, that the frequency response is magnitude only (which is not correct, as a frequency response should have a  phase as well). Then, impulse responses with different supports (shown below), and  related through the Hilbert tranform, may exhibit the same absolute "frequency response". I like the way it shows that the same amplitude spectrum might be shared with quite different functions, one piece-wise constant, the other with singularities.
Comment: the semantics i would use is *"magnitude response"* or *"magnitude of frequency response"* if you're indifferent to phase.  otherwise, the semantic *"frequency response"* means **both** magnitude and phase response.
Comment: I am not indifferent, and knew I was playing with fire (not FIR). If you look for "frequency response" in Google images, you might see phaseless graph. I wondering if the OP had the distinction in mind.
Comment: @LaurentDuval I had no thisdistinction in mind. Thank you for highlighting it, but the two impulse response are mentioned to be zero-phase.. so? They must be identical.. Am I right? Even though they have different length.
Comment: With the Hilbert transform $H$ and Fourier $F$, you have  $F(Hf(t))(\omega) = (-\imath \mathrm{sign}(\omega)). F(f)(\omega)$
Answer: Questions a little vague.
Well certainly not of different length, but if one impulse is a permutation of the other (if the coefficients are shuffled), if it possible for them to have the same magnitude response.
Spectral Factorization works primarily on this principle. In the z-domain, the zeros on the pole-zero plot that are outside the unit are reflected inside about the unit circle and vice-versa. As an example written by Prof. Ivan Selesnick:

Extra help: If you are confused about how the frequency response can be directly plotted from the z-domain diagram, click here to see an explanation by Barry Van Veen
Edit: If the two impulse vary in length only in terms of zero padding, then the frequency response does not change
Comment: I would be more precise: circularly shifting a signal will yield a new signal with the same *magnitude* response, but the complex-valued frequency response will be different (the phase will change).
Comment: Ah, i should've mentioned my answer is true if the impulse response signal has only real values. Thank you @JasonR
Comment: It's still not true, even if the signal is real. The magnitude response will match, but the phase response will not.
Answer: If you mean the magnitude frequency response, then yes it is possible, as shown in other answers. Another way to demonstrate this is by all-pass filters, which have a gain of 1 at all frequencies and a non-zero phase. If you make a cascade of a given filter and an all-pass filter, you get a composite filter the impulse response of which is a convolution of the two filters' impulse responses. Its phase frequency response will be different than the original filter's. A very simple all-pass filter is:
$$y[k] = x[k-1],$$
a one-sample delay.


What are some good resources for philosophy in laymen's terms?

Question: What are some good resources for a layman to get a basic overview of modern philosophical theories, positions, and open questions in plain language?  I'm reminded somewhat of Bryan Magee's videos, only looking for something a little more up to date.
Comment: Just in passing, this is pretty close to this question http://philosophy.stackexchange.com/questions/256/where-and-how-can-i-get-started-in-contemporary-philosophy (you may find some of the answers there useful, at least)
Answer: A good description of most major philosophical positions, arguments, and so on, is The Philosopher's Toolkit: A Compendium of Philosophical Concepts and Methods by Baggini.  It's a little dry, so if you're not already interested in philosophical concepts it's unlikely to sell you on the interesting aspects of philosophy.  Also, it is written like a reference, not a conversational introduction.  But the descriptions are clear and brief; I've not found a better source to get quickly up to speed on the basics.
Answer: Just to clarify: Are you looking for complex modern philosophical theories written for the layperson, or are you looking for introductory philosophy materials? If it's the latter, the following sites might be a start:
http://simple.wikipedia.org/wiki/Philosophy
http://www.trinity.edu/cbrown/intro/
http://www.galilean-library.org/site/index.php/page/index.html/_/essays/introducingphilosophy/
In some cases the standard wikipedia articles will probably be more appropriate than the simple versions (in terms of accuracy and thoroughness). Honestly though, I think a decent introductory philosophy book would go a long way if you're really interested in a broad, relatively neutral overview of many areas in philosophy.
Answer: I would say that the Internet Encyclopedia of Philosophy is a good source of accessible articles on just about any topic in Philosophy. It is much easier to read and comprehend then Stanford Encyclopedia of Philosophy, not thereby saying that it's better.
Answer: I quite like the lectures Rick Roderick made for the teaching company, they're available (I think legally) online nowadays (just google Rick Roderick or check YouTube), since they're out of print from the teaching company.
Comment: An excellent resource--and I definitely would recommend http://rickroderick.org/ for a full overview of his lectures, with notes/outlines etc.  But just as a note--I would say from first impressions that Rick comes from the [Continental](http://en.wikipedia.org/wiki/Continental_philosophy) school of philosophy (few [Analytic](http://en.wikipedia.org/wiki/Analytic_philosophy) philosophers would accept his characterization of Anselm's ontological argument for example).  Perhaps someone could add an Analytic source to balance him out?


Can I set my camera to add my name to each picture?

Question: I have a Sony W690 PointAndShoot camera, and I'd like to know if it's possible to add my name to each photo that I take, similar to adding the date on our pics. I have seen pics that have the photographer's name.
Comment: possible duplicate of [Which is the best batch image watermarking software?](http://photo.stackexchange.com/questions/25915/which-is-the-best-batch-image-watermarking-software)
Comment: Search the site with word "Watermark". For example ["What are the pros and cons of using a watermark?"](http://photo.stackexchange.com/questions/38944/what-are-the-pros-and-cons-of-using-a-watermark) and ["Is watermarking worth it?"](http://photo.stackexchange.com/questions/856/is-watermarking-worth-it)
Answer: I took a quick look thru the Sony W690 user manual, and it looks like there's no option for freely chosen text (your name) being added on the photos.
But you can do it with a photo editor, only it happens in computer, not in-camera. The word "watermark" sounds a bit too fancy, when at its simplest form it could be just plain text drawn over the photo, preferably in a corner or such a spot where it does not jump on your face when looking at the photo. See "How do I position a watermark?"
You can also add your name and other info inside the photo so that it does not become visible on the photo but stays inside the data of the file. That info is called metadata, and also with word EXIF. You can use a photoeditor to write into metadata, or with some cameras you can put some info automatically into each and every photo you take. See "Adding data to an EXIF file". Though that info stays inside the file and is not showing on the photo if and when you print it on paper.
Comment: Thakns for the info Esa
Answer: I'm not sure if your camera supports it or not, but another alternative to visibly watermarking an image is to embed your name and a copyright message in the EXIF data of the image.  I know my camera automatically does this for me, but I also have a high end DSLR.
I'm not sure if it is possible for your camera, but if it is, it would put information in the photo that informs people about who took it without disturbing the image itself.  (You can also normally get the date from the EXIF info as well.)
You could also then use just about any watermarking program to take the copyright information of the image and place it over the image if you wanted to watermark it.
Answer: The related questions that Esa Paulasto gave links to them are great to understand what is a watermark and helps you understand the cons and pros.
If you want to know if it is possible to add a watermark automatically via your camera like the date that was added, then NO. Moreover, even if it was possible it would probably be a bad idea

It might cover something important in your shot and will ruin it.
You can forget it "ON" and use it on your best friend wedding. Wedding/family photos with watermark looks odd to me and definitely unnecessary.
Comment: Thanks Itay!! This is not possible even in DSLRs?
Comment: This "feature" does not require a big sensor or something special that DSLR have and P&S does not have. It is purely software and can be done on any camera. This is why you have to check the manual of a specific camera to see if it can be done. In the cameras I know it doesn't exist but I can't say that there is no camera that enables it.
Comment: It is possible under certain circumstances.  Although it doesn't stop doing it in the first place from being a remarkably bad idea!
Comment: Yeah i think company's should provide it as an option..
Answer: It is possible on certain Canon point and shoot cameras which can have their features extended via the Canon Hack Development Kit (CHDK).
This example outlines some ways in which a watermark might be useful at the time of recording and shows how a perceptual coding / hidden watermark being added to captured images in near real time.  With a bit of work this technique could be used to overlay an image of your choosing instead.
As to if it's wise to watermark your only copy of an image (especially if the camera doesn't detect orientation correctly) - that's a whole other ballgame and the CHDK wiki a user asks about overlaying date/time using CHDK and is met with a brief and dismissive response.


Can Mage Hand be used to indirectly trigger an attack?

Question: Since mage hand cannot attack, would I be able to will it to pull a string tied to a trigger mechanism such as crossbow?
Comment: Welcome to the site! Please take our [tour] when you get a chance to learn more about the site. If you have any questions or  confusion please check out  [this post](https://rpg.meta.stackexchange.com/questions/9184/im-confused-about-how-this-site-works-where-can-i-go-for-help) for how and where you can go to seek help/answers. For starters, you can ping me in a comment below this question by typing "@rubiksmoose [message]" and I'll do my best to help out. Just remember, we are here to help! We hope to see you around. :)
Answer: In order to do what you are talking about, the crossbow needs to:

be mounted in a fixed location
be pre-aimed at a spot where you hope the target will be when the crossbow fires
have a string attached to the trigger mechanism in a manner that will fire the crossbow when the string is pulled.

What is being described here is not a weapon, it is a trap.
It is a trap that is triggered manually instead of automatically (such as by attaching the string to a tripwire), but it is still a trap.
If your DM allows you to use Mage Hand to remotely trigger traps that you find while exploring then there is no reason for them to disallow triggering your own trap the same way.
You should take a look at What are the options for player characters to create traps? for some rules and ideas about constructing traps.
Comment: @findusl: The Mage Hand cannot aim, though, the Wizard does. And aiming (properly) requires rotating with the crossbow, which requires an action too. At this point, it'd be easier to just handle the crossbow yourself.
Comment: @findusl good luck with all the actions that would require. The fact that the crossbow shot would be treated as a trap remains.
Comment: @MatthieuM.: yup, trying to aim a crossbow *without* sighting down it is going to be low accuracy.  Like maybe hitting a huge target, but not a humanoid unless they're standing still *and* very close.  And you're not trying to do it at all quickly.  (e.g. combat hasn't started yet.  crossbow hidden from the target in something too small for a humanoid, so they aren't expecting to be shot from there.  Then maybe, and easy to miss, or hit their armor / non-vital spot.  i.e. some penalty on the attack roll even though it takes multiple rounds aiming.)
Comment: What if the crossbow would be mounted on a turntable platform? The magehand could be used to turn the crossbow first (manipulate object) and then trigger the firing next round.
Comment: @MatthieuM. I assume that is not possible, maybe the crossbow is behind a portcullis or similar.
Answer: Yes, assuming the  crossbow is being held and aimed by someone or something else
The stat block for Mage Hand says:

You can use the hand to manipulate an object, open an unlocked door or container, stow or retrieve an item from an open container, or pour the contents out of a vial.

If you can open a door, grab an item from a bag,  pour out a  vial, or do any other object manipulation task, you can pull a string, even if it's connected to a crossbow trigger. So, what about the ban on attacking:

The hand can't Attack, activate magical items, or carry more than 10 pounds

By "Attack", this paragraph is referring to a specific concept in the rules. So,  what is an attack? This question (What counts as an attack?) covers it in more detail, but the basic rule is this:

... the rule is simple: if you're making an attack roll, you're making an attack

So, you can certainly hold a sword or pull the trigger of a crossbow with mage hand, but you can never make a real attack that involves an attack roll against a target's AC. You can move and manipulate objects, including weapons, and, if the target is totally defenseless, for example cutting a sandwich with a knife or firing an aimed crossbow at a target, you might (with DM approval) even damage it, but if the attempt isn't an automatic success, then it would be an automatic failure (since you can't roll for the attack).
Answer: The mage hand cannot make an Attack (capital A, i.e. an attack roll).

It could pull a pin that's holding the roof up.
It could pull a lever that releases a trap door.
It could trigger a crossbow by pulling a string.

They are all manually activating traps and get treated as such.
Comment: Also, related to your first line: [What does upper-case-A-Attack action vs. lower-case-a-attack mean?](https://rpg.stackexchange.com/questions/105781/what-does-upper-case-a-attack-action-vs-lower-case-a-attack-mean) "Attack", capitalized, is used for the attack action; an attack roll is just what defines an "attack", no capital necessary.
Comment: Welcome to RPG.SE! Take the [tour] if you haven't already, and check out the [help] for more guidance. Can you support your answer by citing relevant evidence (e.g. the rules, or designer statements)?
Answer: I think it's allowed
One interpretation is that the hand itself cannot hit a creature. Full stop.
This would allow for all sorts of things ranging from "I use the hand to drop Alchemist's Fire on such and such monster" to "I use the hand to hold a spear and then hit a monster with the spear".
Pulling the trigger of a crossbow seems fine under this interpretation.
...However, you might not want to
Mage hand isn't a sentient hand. It's an extension of your hand. How good would your aim be if you were firing a crossbow without being able to line up the sights on your target?
If I was the DM, I would impose a pretty large penalty to hit with a weapon via Mage Hand. And, don't forget, manipulating an object with Mage Hand costs your action.
Saying that Mage Hand can't attack at all is valid
All that said, your DM could rule that the spell can't be used for attacks at all. This would be a fair reading of the rules.
Comment: I would treat the crossbow as a trap and give the target a dex save attempt with a set DC for the trap rather than require a to hit roll.  Having to roll to hit in this case makes it more like the Mage Hand is making an attack, which is prohibited by the spell description.  If an added layer of difficulty is desired, perhaps a str check for the mage hand is more appropriate since the spell description specifically says it can only carry up to 10 pounds.  It would then be up to the DM to determine how many pounds of pressure the trigger on a crossbow is under to determine the DC for the check.
Comment: The spell description doesn't specify if it's the Attack action (and the 'A' isn't capitalized) so I think it's still valid to argue that the hand cannot hit something, but could hold/use an object capable of inflicting damage.


Login with Twitter or Facebook - How to link accounts

Question: I've been developing a site and I've been trying to come up with a method to make sure all Social Network accounts of a certain user are linked together. I've had one snag from the start, and maybe someone here has an idea of what to do.
This is the problem. Let's say someone comes to my site and they click login with twitter.
My site

creates an account (adds user to member database)
adds twitter credentials to database for that user
logs the user in

Now let's say this person logs out, and the next time they come to my site they login with Facebook.
My site

checks member database for a user with the same email as the one sent from Facebook on authentication
If there is no match, I create a user
add Facebook credentials for that user

Here is where my problem comes in. Twitter does not send an email of the user on authentication. So my database and script, when someone logs in with Facebook after they've already logged in with Twitter previously, does not recognize the accounts should be linked and creates a whole new user.
Is the only possible way to keep track with cookies? Or am I mjust missing something in the logic of it?
Any ideas would be great.
By the way this is for a website, using php + mysql

Question update

Hey Demian,I took a look at edit logins and noticed they don't have a twitter option. My issue isn't when the user is already logged in, everything works great and connects the accounts. It's more like this.
Lets say a user logs in to my site for the first time with twitter. I give them a unique user ID in my "members" database table, then add their oauth credentials for twitter in my oauth table, linking it to their member ID.
\Now let's say a month goes by and a user comes back. This time, though, they login with Facebook. There is no way for me to tell which user they are in my database from their previous login with Twitter because I don't have that unique member ID to link it to.
That's why I'm thinking storing the unique member ID in a cookie is a good idea, but what if they delete the cookie?
Comment: A product exists that takes care of this, it may be of interest - See: http://www.janrain.com/janrain-products-overview
Answer: Take a look at how StackExchange does it. Go to your profile page and click "edit logins" and follow that flow. Honestly, it seems to be the most reasonable of those that I've seen.
Essentially, you'll store a single user object in your database and add login providers (through a table with a FK perhaps) as your user chooses them. Now, when your user logs in with any of the providers, you know which distinct user (in your system) it represents.
Comment: updated question


把 grammar and when it MUST be used, not when it CAN be used

Question: Is there such case in which 把 must be used or otherwise a sentence is incorrect?
I am not interested in when it can be used because that's an issue that is rather widely covered.
我感谢你们的帮助。
Comment: When it's a measure word, for sure.
Comment: What is the reason for the 2 downvotes?
Answer: The short answer is that the "ba" construction is required when a direct object representing a human or an animate item or a non-specific indefinite inanimate item is moved before the verb. Moving such an object before the verb is done for the purposes of topicalisation or adding focus to it.
For example:

He hit the ball.
他球打了
他把球打了

In the above 把 is optional, although having it makes it clearer. The optional nature of the 把 comes from 球; it is inanimate, so does not require 把.

He hit me.
*他我打了
他把我打了

Here, 把 is obligatory when 我 is put before the verb for emphasis. Why? Because it is animate (and because it is a pronoun).
Why you would have to put an object in front? It depends on the verb, and specifically: when certain verbs can take two objects or "arguments", only the indirect /positional one fits after the verb, and so the direct object must go before the verb in Mandarin. The most well-known one is 放, but others like 送 / 丢
/ 仍 also exist.

He puts the cake on the plate.
*他放蛋糕在盘子上
他把蛋糕放在盘子上

Notably however, this restriction is relaxed in dialectal Mandarin and in other Chinese topolects like Cantonese: it is not obligatory to use 将 (the Cantonese equivalent of 把) for verbs like 放:

He puts the cake on the plate
Cantonese only
佢將蛋糕放喺碟上
佢放蛋糕喺碟上
Answer: The question is not so specific. Maybe you can give some example cases as the beginning of your question.
It takes me several minutes to think about "把字句" (the sentences using 把). 把 is not necessary in most of the cases, because it can be change to another formation we called "被字句" (the sentences using 被, passive voice).

我把你的问题回答了 = 你的问题被我回答了

Please read this for more info: https://baike.baidu.com/item/%E6%8A%8A%E5%AD%97%E5%8F%A5/9464755
However, even if you use it as a measure word, 把 can be substituted by other measure word. For example:

一把稻草 = 一束稻草
  一把枪 = 一支枪 = 一杆枪

Even if the measurement is just small around the size of your hand. It is mostly not a fixed phrase:

一把沙土 = 一握沙土
  一把手枪 = 一支手枪

Now the only thing I know is "一把手", here the specific verbal word means the top power person of an organization, especially the government department.
Answer: Whenever you emphasize the object associated with your action, then use 把.
example:  I put a cake on a chair
我放下蛋糕予椅子上
我放低蛋糕落張凳
我把蛋糕放在椅子上
我將舊蛋糕放低落個凳度


Using text2pcap (or equivilent) to merge multiple plain text packets into one pcap

Question: I'm trying to merge multiple plain text packets into one large pcap file. I have been using text2pcap on each individual text file, then using mergecap on all the pcaps to create my final output. However, that's really slow, as it involves writing out that each pcap file, merging them all together, and then deleting all the single pcaps. I'm looking to speed that up by sending multiple text files into text2pcap at once.
Unfortunately, from what I understand, text2pcap requires the ofsets on the text file to be correct, and since I'm merging multiple different packets, I'm starting over at 0000 multiple times, and I think that's causing my errors.
So, assuming I have a packet that looks like this:
0000 30 00 20
0010 59 23 00

and another packet that looks like this:
0000 23 50 2c
0010 a4 23 f1

How would I best convert the two of them into a single pcap file?
Answer: You can also use PDD - Packet Dump Decode.
You can find an example in my article at LoveMyTool.