How does one pick a guard position (entry node) for one's Tor relay?

Question: I want to run a Tor server as an entry point of Tor network, so that the torstatus web page (torstatus.blutmagie.de) illustrate my server as a guard server. How do I accomplish this task?
Answer: You can't decide on your own to become a guard node. The Tor software makes the decision. All the details are laid out in Tor's directory specification.
So after you set up your Tor relay, it takes some time until it attracts traffic. Beginning on day 8 of your relay's lifetime it becomes eligible for the Guard flag. However getting the flag depends on the bandwidth, the uptime and the time it is known to the Tor network. So from my calculations on if your relay has more than 1,5MB/s bandwidth it can get the Guard flag. However this number might change and depends on the bandwidth of other guard nodes.
If you want the Guard flag for your relay, run it at least eight days, give it reasonable bandwidth and don't shut it down for longer periods of time. More details can be found at the blog post "life cyle of a new relay".
Answer: Tor does not let you decide whether to be a Guard or not by yourself. Since there are many security concerns with the Guard node, Tor has very strict conditions to flag a node as Guard node.
For your ready reference, you can look at session "5. Guard nodes" of this Specification file.
Comment: Maybe you could copy some of the relavant points from that link into this answer in case of link rot in the future? Thanks!
Answer: Although Jens and Windy provided answers to your question, depending on your intentions, there maybe a short cut to create a specific type of guard you maybe interested in. This short cut does not publish your relay as guard in this Web site: 'torstatus.blutmagie.de' or any other Web site. However, you may use this type of guard as your own entry node if you so desire. This particular type of guards is named 'bridge' and none of the stringent requirement of becoming a guard apply to bridges. If this remedy help you, you may use this solution.


Why doesn't T5 exonuclease have endonuclease activity in Gibson assembly?

Question: Gibson assembly uses T5 exonuclease to chew back the 5' end of dsDNA to generate overhangs. However, T5 exonuclease, in contrast to lambda exonuclease, is reported to have ssDNA endonuclease activity (https://www.neb.com/products/m0363-t5-exonuclease#tabselect0). Why doesn't his cause problems during gibson assembly? Is it just because these don't yield viable assemblies? Or is it because this activity is inhibited somehow, such as the T5 concentration is too low?
Answer: The buffer conditions used in the reaction also mitigate against the endonuclease reaction, so it should not be a problem if you stick to the protocols exactly. I've worked on this enzyme since 1988 and was the original "cloner' of the overproducer see http://www.sayers.staff.shef.ac.uk/fen/   for more information on these enzymes
Jon Sayers, University of Sheffield.
Answer: I've never actually done a Gibson assembly, but looking over the protocols at the New England Biolabs website, I think the answer must be that the ssDNA exposed by the T5 exonuclease is quickly protected from the ssDNA-endonuclease activity because it (the exposed DNA) anneals with the complementary sequence on the other component of the assembly reaction. Following that, any gaps are repaired and sealed by DNA polymerase and DNA ligase. All of these enzymes are of, course, present at the same time in the one-step assembly reaction.
In summary, under the conditions of the assembly reaction, the low-level ssDNA endonuclease activity of the T5 exonuclease is simply outcompeted by the other reactions taking place.
Comment: This idea is supported by the paper that originally discovered the endonuclease activity of T5 exonuclease: http://www.ncbi.nlm.nih.gov/pmc/articles/PMC328551/?page=1 . They report the level of endonuclease activity is low compared to exonuclease activity.
Comment: Yes, I found that too, and set off on a search expecting to find that the low Mg suppression of endo- activity would be the key, but apparently not.


How to Change the Categories Order in the Admin Dashboard?

Question: The order of categories on dashboard is alphabetical. Can I change it to custom order?
Answer: Found an answer in this answer.
add_filter( 'get_terms_args', 'wpse_53094_sort_get_terms_args', 10, 2 );
function wpse_53094_sort_get_terms_args( $args, $taxonomies )
{
    global $pagenow;
    if( !is_admin() || ('post.php' != $pagenow && 'post-new.php' != $pagenow) )
        return $args;

    $args['orderby'] = 'slug';
    $args['order'] = 'DESC';

    return $args;
}

The order may be ASC or DESC, and the orderby can be:

count
description (it should, but didn't work so well for me, futher tests necessary)
name
slug

Plugins of interest
(may we call those Plinterests?)
The first two are very short and and can be easily incorporated into your code.

Category Checklist Expander : expands the height of the category list, so no scrolling is needed

Category Checklist Tree : this one rebuilds the Category Meta Box, so you can modify its code for further styling/adapting the box - and here's a screenshot of what it does

Gecka Terms Ordering : creates an auxiliary table in the database (wp_termmeta) to deal with the ordering. Has drag and drop capabilities.
Comment: Thank you very much! [in addition to those plugins, I also wrote a short code that performs categories in tree veiw]
Comment: I wonder, how can I show a particular term on the top?
Comment: Maybe, the easiest way would be jQuery DOM manipulation, check [this answer](http://wordpress.stackexchange.com/a/53143/12615) for inspiration :)
Comment: @s976 - forgot to tag you in my previous comment... scribu's plugin, CCT, has some jQuery to auto-scroll the list, you can get some ideas from there too.
Answer: Use the plugin Advanced Custom Fields (This plugin is handy in many different ways).  Then create an custom order field (category_order) with the rule 'Taxanomy_Term' is equal to 'Categories'.
Then in your theme functions.php (or somewhere relevant) use:
$categories = get_categories( $args );

usort($categories, function($a, $b) {
   return get_field("category_order", "category_".$a->term_id) - get_field("category_order", "category_".$b->term_id);
});

foreach ($categories as $category){
...

Where category_order is the field name you created with ACF.
This post inspired by this one here.
Comment: This was a exactly what I was looking for and it works fine for custom taxonomies too, just change 'category_' to the name of your taxonomy.
Answer: There's no default option for it, but there's two other ways.

Change it in the theme files http://codex.wordpress.org/Template_Tags/wp_list_categories
Use a plugin. Eg http://wordpress.org/extend/plugins/my-category-order/
Comment: I think that you sugestion is for users side. And I am looking for how to change the order on a admin side.
Comment: Both of those suggestions are for admins. Users really shouldn't have any access to the theme files, and if you look at the instructions for the plugin, it's clearly talking about admin use.
Comment: @user1337 - you are confusing the user "admin" (or having administrative powers over a site) with WordPress backend, also referred as Admin or Dashboard.
Comment: @brasofilo - Not at all. Either the user "admin" or someone who has plugin access to the admin or dashboard can install that plugin and change the order that categories are listed in. One can also use a roles plugin to delegate that ability to other roles beside the administrator.
Comment: Will the plugin work in [this meta box](http://cl.ly/1O3v332G0W0n3w1F1J3F)?


Is it possible to move action from one piano into another?

Question: I found an old upright with a sound I like but the action is old and crappy.  Can I transfer the action from another (different) upright into this piano?
Comment: Same make/model - maybe. Different - very little chance, without drastic alterations, I guess.
Comment: At the very least, you'd have to verify the key widths are identical, or the action won't even line up.
Comment: Key width isn't going to be the issue.  You don't have to re-learn how wide an octave stretch is every time you sit at a different piano!
Answer: Almost every piano maker uses their own design for the cast iron frame that resists the string tension, and the specific positioning of the strings.
If the two piano cases have different heights (measured from the ground) then the vertical height of the hammers above the keys will probably be different as well.
Therefore, the chances that you can successfully move an action from one model of piano to another are very small, because the hammers won't line up with the strings.


Cryptographically secure hash function vulnerable to length extension attacks both to front and to back?

Question: Is there any hash function where both $\text{hash}(m\|k)$ and $\text{hash}(k\|m)$ are vulnerable to length extension, but $\text{hash}(m)$ is itself secure?
Comment: Related question [here](https://crypto.stackexchange.com/q/61406/1172) about SHA-256. Maybe somebody would mind answering instead of relying on comments / hints?
Comment: A simple Merkle tree should meet the requirement s.
Answer: I think here it helps to examine the nature of length extension attacks, which have to do with the fact that practical hash functions are iterative.  They break up their input into a sequence of fixed-size blocks, and process each block successively, using the state produced by processing the previous block as an input into the processing of its successor.
Length extensions weaknesses exist because some hash functions are (mis?)designed so that their output reveals their state after processing the final block, and that allows the attacker to shortcut the computation of the hash result for messages whose block sequence extends that of the original.
One straightforward observation is that there while the most practical way to build such a hash function would be to process blocks in the same order they occur in the input message, there is no theoretical requirement to do so.  You could write a hash function that works exactly like SHA-256 but processes messages in reverse order.  It would be impractical because you would need to buffer whole messages in memory or in disk before you can hash them.
The fact that hash functions are vulnerable to length extensions at the end of a message but not at the beginning is just an artifact of that practical decision to process messages from start to end.


Version control system locally

Question: Is there any software that does the version controlling of a module locally.
Without actually using the internet can we just have a setup of all the versions of software internally.
Please recommend one.
Answer: Distributed version control systems such as Mercurial and Git allow you to create local repositories.  These can either be on a local network or just within a single directory tree.
Comment: You should consider having a remote repository at least to make sure your work is backed up.  But it doesn't have to be an online service.  Something as simple as a folder on a network share will suffice.
Answer: Git SCM is a great choice. You can use it on a single machine like your own PC or laptop. You can also set up a Git server in your Intranet, so you can still have a team working on a software. It's free to use even for commercial use.
There are the Git Extensions, which integrate into Windows Explorer. Depending on the IDE you use, it may even have Git support built in (e.g. Visual Studio or Pycharm).
Answer: Subversion is very popular. I have been using it for decades at work.
I also use it at home, on a single laptop (using XAMPP on Windows to get an Apache server).
The Tortoise SVN GUI makes it simple to use, although the command line is not difficult to learn.
Subversion is stable, popular and well documented & supported  (more than 116 thousand questions and answers on Stack Overflow alone)
Answer: Another possibility on linux is to use RCS, which is a tool to version individual files locally.  Dead simple to use, minimal amount of extra clutter, no server to set up, and especially appropriate for a lone developer.

Version control system locally


Adding visual interest to a website without cluttering it or making the visuals detract from the content

Question: In working on a redesigned website for my university program I feel like I've got a pretty solid foundation. The purpose of the website is to be both informational but, also, to be "fun" and "inviting." So, we have used some Google Web Fonts for typography and we've done some work with headings, line hight, and line length. Now, we would like to add some visual elements to make the pages more attractive but that don't detract from the content. What are some effective methods for adding visual interest? One suggestion was a "water mark" type image but I have issues with that because it could cause problems with older browsers.
Comment: this is too broad of a question to be answered easily. But, in general, think imagery (photos, illustration), color, balance, proportion, lines, etc
Comment: I was afraid that might be the case. I would provide a link, but I'm unsure that I'm allowed to being as the site isn't live yet. A specific question I have is this: the body content is broken into columns using Javascript and CSS (because CSS3 columns aren't supported yet). I was wondering what sort of guidelines exist for multi-column text. Right now I have it such that the text draws the reader's eye to the right-side menu which is where context-specific menu items appear (there is a horizontal menu that is static with persistent items).
Answer: Colors and inviting photos would enhance the appeal of the site.  In general, you should avoid doing anything too wacky, unless you have a strong reason to do so.  Keep it simple, and make it visually interesting with a clear design.  Trying to add too many "fun" elements can make a design look very crowded, which will actually drive users away if it's not usable.
Also I cringe a little at the thought of using Google Web Fonts for "fun typography" - hopefully you found a font that is a little more decorative but still very legible.  Usually people go overboard trying to make their sites look "cool" and "not boring" with some "fun" fonts, but they tend to look out of place on a professional site and impair readability (think Jokerman, Curlz MT).
Answer: It is a bit of a broad question but just for kicks I took this page and highlighted some of the things I saw that make it visually interesting.  What I noted is certainly not comprehensive but are things that jumped out to me and might be useful for you to think about implementing in your own design.
http://markup.io/v/3pphhada3j2w
Answer: When it comes down to adding more visual interest, I rather look at what I already have and refine the interface elements or the user experience. Additions to your design will send you in circles. Research the competition, choose a strong color palette, see how far you can take the standard web fonts and creating your own interface elements will give your site more visual interest. Images also work well, but make your decision with a clear direction - if you don't find what you are looking for, don't just slap a random in there and call it a day because it will create a juxtaposition from the rest of your work.
There is no beaten path for the best way, but there are and you can create best practices. Here are some great resources that I use everyday.
http://www.delicious.com/simien - my public bookmark list
http://www.typechart.com/ - Challenge yourself with using web font standards

Sorry, but I can only use a few links so I'll write out the rest.

fontsquirrel.com - @font-face web fonts ( could use for Headliners )
awwwards.com - Get excited.
verifyapp.com - put your design to the test.
methodandcraft.com - See what others are doing and how they do it. Design inspires design.
Cheers, Simien


Need to know more about this art

Question: This was a birthday gift I received a couple of weeks ago.  I'm trying to figure out where it came from, what the images mean, and about how old it is.  It's at least a hundred years old.
Comment: Consider asking here: https://dharmawheel.net/
Answer: This is most likely a Tibetan Thanka which depicts 3 "levels". Based on the depictions, it's probably Vajrayana, specifically Gelug-pa, lit. "yellow hats" - this is the Tibetan Buddhist branch to which the Dalai Lama belongs.
The top level depicts the Buddha surrounded by females, most likely Dakini.
The central level depicts 3 people with a very recognizable yellow hat, so probably they are  Tulku, possibly the Dalai Lama in the center, the Panchen Lama and the Samding Dorje Pagmo or Karmapa. They are depicted as slightly above the world since they are considered reincarnations of Bodhisattva
The building in the bottom section could be a depiction of the Potala.
The two figures depicted in the bottom section are most likely high monks, but I can't think of any specific persons or roles for these.
The many occurences of Green, Red, Blue, Yellow and White refer to Pancha-Varna
As for the age of the painting, it's very difficult to tell, as iconography in Tibetan Buddhist art has changed very little in the last few hundred years.
You might enjoy this video on decoding symbolism in Thanka
Comment: May be the bottom figures depict offering of bare necessities of a monk (Civara = robes, Pindapata = alms-food, Senasana = monasteries, Gilanapratya = medications) to Dalai Lama. I cannot see the top level Buddha as Dakini. I suppose that depicts Amitābha Buddha because of Samadhi mudra, and the appearance of begging bowl. But the color of the Buddha doesn't support that interpretation.

Need to know more about this art


Movie where a circus ringmaster turns people into animals

Question: I'm trying to remember a movie that was circus based where I think animals were turned into people.
They couldn't leave as they would die. The ringmaster did it with magic eye things(?)
Comment: And did he turn people into animals, as per the title, or animals into people as per the text?
Comment: Can you describe some more detail? Maybe add in when you saw the film? Whether it had a cinematic release? What language it was in? Any possible actors?
Comment: Seen within the last 5 years I think. Quite a dark movie I'm pretty sure kids saw it at the movies but they are older so not a little kid movie. English
Answer: You might be thinking of We're Back! A Dinosaur's Story. There are some time-traveling dinosaurs who manage to befriend a pair of children. These children, a boy and a girl, fall into the clutches of one Dr. Screweyes, who runs a creepy circus, and turns them into chimpanzees (y'know, for evil!).
Does this image jog your memory at all?
Comment: This sounds like a good match. Doesn't Dr. Screweyes have an evil eye too that he hypnotizes his victims with before he transforms them with pills.
Comment: I think so, but this movie traumatized me badly as a child, and googling images makes me feel slightly ill.
Answer: It might be the movie Animal Crackers (2017)
It takes place at a circus and some of the performers are humans transformed to animals. They can leave the circus, but they need to eat a human biscuit from the box that transformed them or they remain animals forever. The magic is not performed with a magic eye but with magic animal-shaped biscuits. Otherwise it seems to be a match.
Answer: I know I'm a bit late to the party, but I too was looking for this same info. I didn't find it at the time when I first read this post but today, I believe, I've found what we are looking for. It's the last two episodes of the first season of Creeped Out on Netflix. The episodes are called Side Show: Part 1 and Part 2. Does the main character looking to get away happen to be a dog?

A circus ringmaster, Zephaniah, introduces his star acts. Palooka, Nincom and Hijinx are clowns; Gudge and Puck are twin high-divers; Kid Herc is a strongman; and the rarest of them all is 'Ace, the Amazing Aromarologist'. Using only his sense of smell, Ace makes a series of guesses about members of the audience; to their surprise and delight, he turns out to be correct about everything.

....

The next day, Ace gives a lacklustre performance, making inaccurate guesses. Meanwhile, Indigo breaks into Zephaniah's trailer. As she is studying a series of glass eyes and marbles in an intricate case, he catches her. He admits that she and the others have been given false memories and tells her this power is held in a special charm – the glass eye he wears. She threatens to tell the others, but when he waves the eye in front of her face, she loses the ability to speak.

.....

 Small lights begin to fly towards each of the circus performers, and their true forms are revealed: they are all animals. Gudge and Puck are penguins, Kid Herc is a bear and the clowns are monkeys; the latter drag Zephaniah away. Indigo is revealed to be a hummingbird.
Comment: This looks like the start of a good answer. Can you flesh it out a bit more? Maybe an image from the episode, or some details about the ringmaster's powers to line up with the question?


Is there a difference between non-weighted and semi-weighted MIDI keyboards?

Question: Do the terms non-weighted and semi-weighted mean the same thing for MIDI keyboards? If they are different, what would be the difference?
Answer: They are different.
Non-weighted keyboards are based on springs, so the feel is very different from the keys of a piano. Weighted keyboards have counterweights or resistance on the spring to mimic the feel of a real piano. Semi-weighted is somewhere in the middle, they have counterweights or resistances that counter the springy feel of the keyboard, but the weights are not as heavy as in a fully weighted keyboards.
The feel of a non-weighted keyboard is springy, like most MIDI keyboards (specially the cheap ones) are. Semi-weighted feel is between a real piano (what fully weighted is supposed to feel) and a non-weighted keyboard.

If you want to mimic the feel of a real piano as much as possible, you go for fully weighted keys or hammer action keys.
If you want the feel of an old synth, or "spring" feel, you go for non-weighted.
If you want a feel that's between weighted and non-weighted, you go semi-weighted.

More about the pros and cons in this previous question: What are the practical advantages of keyboards with non-weighted keys vs. weighted hammer action?
Comment: Which MIDI keyboard would be easier to do a glissando, a non-weighted or semi-weighted?
Comment: @Edward_178118 Everything is easier in the keyboard you are used to, so it depends. In practice, it can be done roughly as easily in both, so don't worry too much about that specifically, but about stuff like what feel you prefer and portability (weighted and semi-weighted are heavier than non-weighted, for example).


How to display vertex markers in QGIS for non-editable layers?

Question: I've a PostGIS layer with read-only privileges. Is there any way to display the vertex markers of the layer?
Comment: Do you just want to style the nodes on the layer?  The vertex node markers are only used in edit mode.
Comment: Can't you generate a point layer from the read-only privileges layer using Vector > Geometry Tools > Extracts Nodes... and style accordingly if required?
Answer: No need to create a new layer. You can show your layer's vertices using the Outline: Marker line Symbol layer type.
Just add a new symbol layer

Add a new symbol layer;
Choose Outline Marker line (top right corner);
In the Marker placement, Choose "On every vertex"

You can even style the marker to look like the red cross symbol used on layers in edit mode.
Answer: Do you have your own schema in which you can make a view that refers to your source table? If so, you can create the following view:
CREATE OR REPLACE VIEW polygon_vertices AS
  SELECT row_number() OVER (ORDER BY (st_dumppoints(polygon.shape)).geom) AS objectid,
         polygon.field1, -- fields you want to keep in the vertices
         polygon.field2, -- that are in the polygon table
         (st_dumppoints(polygon.shape)).geom::geometry(Point,4326) AS shape
  FROM polygon;

This database view pulls apart each polygon and returns all the points (vertices) within the polygon's boundary.
Take note of the following:
(st_dumppoints(polygon.shape)).geom::geometry(Point,4326)

Calls the ST_DumpPoints function and then only the "geom" column returned by the function is kept. The type is explicitly cast. You will want to change that to the SRID of the "polygon" spatial column. (This isn't completely necessary, but I've found it to be good practice.)
row_number() OVER (ORDER BY (st_dumppoints(polygon.shape)).geom) AS objectid

Is necessary to create a unique identifier column, required by most desktop GIS applications, including QGIS.


Silverite Dragon Age Inquisition?

Question: I am playing as a Mage and collected the 8 pieces of silverite needed for the metal on some armor that is meant for rogues but when I make it, it will not allow me to equip it. Am I doing something wrong?
Comment: You might want to mention that silverite is supposed to make armor not bound to a class. Also, what crafting items are you using in what slot?
Answer: NOTE:  When crafting there are multiple slots you have to fill.  The middle slot of any item: Referred to as the "armor" slot for armor or "Damage" slot for weapons is the slot that determines the basis of the item being made.  The rest of the slots are additional functionality slots allowing better stats or abilities on the item.  In the information below, ONLY the "Armor" slot matters.  You cannot remove class restrictions on weapons.
1) Every pattern requires a specific type of material to make.  Light armor patterns require "Cloth" type materials in their "Armor" slot.  Medium armor patterns require "Leather" type materials in their "Armor" slot, and Heavy patterns require "Metal" type materials in their "Armor" slot.  A "Light" pattern will NEVER have "Leather" as the "Armor" slot material, and same with all others.  DO NOT GET CONFUSED: Crafted items have many slots, and other than the "Armor" slot (the slot in the middle of the pattern just below the "Masterwork" slot if it appears), the other slots on any given piece of equipment (whether light, medium or heavy) could be Cloth, Leather or Metal (many "Heavy" armors will require leather or cloth in their "utility" or "defense" slots, etc.)
1) Silverite removes restrictions on heavy armor only.  It must go in the "Armor" (main) slot of the armor, meaning only heavy armor.  If you're trying to create medium armor, you are required to put leather in the main (middle) slot...silverite won't fit and thus you can't remove restriction on medium armor with Silverite.  Also, Silverite in any other location (such as defense or utility slots) does not remove class restrictions.
2) Fade Touched Silverite does not make a difference and does not provide a benefit outside of it's masterwork ability (+5 guard on hit).  You DO NOT need fade touched Silverite to make non-class restricted armor.
3) The three "Remove class restrictions" materials are:

Dales Loden Wool - Used with light armor patterns to allow Medium/Heavy classes to wear it.
Snoufleur Skin - Used with Medium Armor patterns to allow Light/Heavy classes to wear it.
Silverite - Used with Heavy Armor patterns to allow Light/Medium classes to wear it.
Answer: Make sure you use the Silverite in the Main slot. Also make sure the rogue armor doesn't have a race restriction such as human or elf only. Silverite only removes class not race.
Answer: Silverite makes Warrior only armor in restricted. Each type of armor (light, medium, and heavy) requires a different material. I believe for medium armor it is snofleur (spelling may be wrong) leather.
Answer: Yes. You're a Mage not a Rogue.
Comment: Silverite is supposed to make armor not bound to a specific class, but the question should be edited to make this more obvious.

Silverite Dragon Age Inquisition?


Searching for Open Data Dataset That is No Longer Online

Question: Many questions are posted here in search of a specific dataset that is either no longer online, or has died from linkrot, or a combination of the two. What is the best way to get around this? Or rather, can these datasets be recovered?
Comment: I just posted a related question on the underlying causes: http://opendata.stackexchange.com/questions/5319/cases-where-open-data-has-been-removed
Answer: The Memento Web and the Wayback Machine are two possible solutions:
Wayback Machine
The Wayback Machine by the Internet Archive is your best friend for all things that were once online, and even some things that still are, if you want to compare changes.
From Wikipedia:

The Wayback Machine is a digital archive of the World Wide Web and other information on the Internet created by the Internet Archive, a non-profit organization, based in San Francisco, California. It was set up by Brewster Kahle and Bruce Gilliat, and is maintained with content from Alexa Internet. The service enables users to see archived versions of web pages across time, which the Archive calls a "three dimensional index."

If you have a dead link, simply paste it into the search input element of Wayback Machine.
Alternatively, you can type https://web.archive.org/web/*/DEAD_LINK'S_URL directly into the address bar of your favorite browser.
Memento Web
Los Alamos National Lab has been offering the Memento Web project which unifies search across the archives.

Main form to use for online search
Memento plugin for Chrome
Memento extension for Firefox

Other
Some search engines may provide you with a cached version of the page where the dataset resided (possibly, the dataset files as well).
If the steps above fail, you may consider

looking for papers which used the dataset (at arXiv or in academic journals),
contacting their authors,
looking at various bulletin boards for those who might have downloaded the dataset and contacting them.

You can also have a look at http://academictorrents.com to see if your dataset is present there.
Comment: In addition to this, a number of countries have implemented "digital legal deposit" and introduced national web archives. In the UK, for example, there is the [UK Web Archive](http://www.webarchive.org.uk/ukwa/), which allows free access to archived web pages over the internet where licensing allows, and full access to the restricted parts of the archive from the British Library reading room in London and a handful of other access points around the UK.


What's the best place to safely store a life hammer?

Question: This is not really a maintenance question, but I figured this would be a good place to ask. I have a life hammer in the glove compartment, but I'm having doubts about where to store it. I figure that if I'm ever in a situation where I need the hammer to cut my seatbelt, I won't be able to reach inside the glove box to get it. I am, however, reluctant to keep it out in the open, because it's exactly the sort of heavy pointy thing you don't want to have flying around in your car during a crash. I thought about securing it with Velcro straps somehow, but I'm not sure if they'll hold or be a pain to loosen in an emergency situation. What's the best place to store it, and how does one secure it?
Comment: Yes, what kind of car do you have? It really depends on the interior layout.
Comment: Use heavy duty velcro to secure it some place convenient.
Comment: This is exactly the problem with the life hammers that the [Res-Q-Me](http://www.amazon.com/resqme-Original-Keychain-Escape-Black/dp/B000IE0EZO/ref=sr_1_1?s=automotive&ie=UTF8&qid=1463098088&sr=1-1&keywords=resqme) is intended to address. It goes on the keychain and can pull off of its clip quickly in an emergency.
Comment: Center console?  It is really too variable on what kind of car you have and heck how long your arms are.
Comment: Good point. Center console does not really have any place to put it... there's an open compartment but it'll just fly out of there in the event of a collision and bury itself in somebody's head. I figure that if I'm held in place by the seatbelt, the only real option is somewhere on the side of the driver's seat, but then one wonders how to secure it.
Comment: Anecdote: Once in a bus in Geneva, there were 8 hammers - tidily mounted one next to the other at the panel above the first seat on the right. I quess the passenger of that seat has to pass them to the others in case of an accident...
Answer: Since you posted another question about an Aveo/Kalos i guess you are talking about that car.
Some come with the holder, with the possibility to attach it to the door or somewhere close to the knee but it can end being in the way and usually is too far.
I had a couple of bad accidents where the seatbelt locked and didn't slide anymore and I wouldn't have been able to reach too far if I wasn't able to just unbuckle it. Also don't plan on raising your arms over the head or bending sideways to grab it, after some accidents you wont be able to move like that (personal experience).
For these reasons its better to be a place you can reach sitting straight and with your back against the seat. You are right to think that close to the seatbelt buckle is a good spot: it is in reach, I think theres room in the Aveo, by just letting your arm fall at your side. The area is also reachable by a passenger and, if those are able to move, by the backseat passengers.

In that area some car seats have a small pocket, low on the side of the seat back towards the middle of the car, right above the plastic trim of the back adjustment knob... I don't think yours does but its easy to add one or sew in velcro loops using a curved needle. Eventually you can fashion something to attach it to that same seat plastic trim cover, or even between the cover and the seat padding (not completely tucked in there obviously), you might have to make a couple holes in the plastic to fix a pocket or loop but that's easy, if within reach you can directly use the same screws that keep the plastic trim attached to the seat.
Exactly how you make the holder depends on where you place the tool (and what kind it is) but I guess it could be even just a pocket or a pair of double  velcro loops held right against the side of the seatbelt buckle (made like an 8 one side holds the hammer and the loop on the other side grabs around the buckle).
As for holding, can be hit and miss, if the accident is bad everything that isn't directly bolted to the car just gets thrown around.
Another way could be attach a fastex clip on the side of the seat (sewing one with a bit of webbing or using the surface mount kind that require no sewing, and there are the fast release "one button" fastex too) the other side of the clip is permanently attached to the hammer, you just unclip and use it as needed, that would hold it there... There are tons of ways, just maintain it practical.
Thinking about pockets: there are the kinds with a flap that hold things like multitools or even the old cellphone pouches to somebody's belt, in some of those the belt loop is big enough (or it opens with some kind of fastener) that you can slide it around the belt buckle arm, in orizontal, or tie to it with a few loops of string, in vertical.
Comment: Your personal experience is exactly the reason I thought about moving it from its current glovebox home to somewhere more accessible from both the driver and the passenger seat.
Comment: I have an Aveo myself, yeah, but I figured this would be a general interest kind of thing so I figured I wouldn't mention the type of car, to see what others had come up with. It turns out my particular car indeed has a sort of pocket in that area: it's the dotted line to the right of the seatbelt holder in the picture you posted. I just have to fashion some sort of loop to prevent it from flying out towards the back seat in case of getting rear-ended. I like the multitool-flap like idea... I'll report back with what I've eventually come up with, maybe it'll inspire others.
Comment: @Bas, normally the pocket is shallow and vertical, make sure what you think its indeed a pocket is not just a flap of the seat upholstery (still easy to sew something on that one). Whatever the situation arrange things in a way that the tool wont fall inside a deep pocket, or whatever it is, and remains always "at hand"
Answer: You could attach a visor panel on your sun shade and place the life hammer there. Something like this MOLLE-compatible visor could work:

The MOLLE attachments give you plenty of versatility, and its size allows you to attach more than just the hammer.


What is a Battle.net account NID?

Question: When I try to make a Battle.net account, I'm asked to put in my NID. I have no idea what it means, and so don't know what to type in.
Comment: Yes they are. Some countries have additional fields and some don't have them. Btw, there is no need to shout. Calm down dude.
Comment: @JamesJiao - **Battle.net accounts ARE NOT region sensitive.**
Comment: Battle.net accounts are region sensitive, it probably serves to tell people the location of your account.
Comment: By the way, NID is your National ID number. Seems to be a requirement for Asian accounts. Therefore my previous comment still stands.
Answer: First, Battle.net is divided into two completely separate and distinct partitions, known as Worldwide and China, each of which has completely separate accounts and game servers. There is no connection whatsoever between the two partitions. An account on one partition does not exist on the other.
A Battle.net account exists within a partition.
Within each partition are regions. The regions are game-specific and so different games may use different regions. An account may play the same game in multiple regions, but will have different characters, achievements, etc., in each region, which do not transfer between regions.
The China partition has only one region, CN. In the Worldwide partition, there are multiple regions:

World of Warcraft uses the US, EU, KR and TW regions.
Diablo 3 uses the US, EU, KR and TW regions.
StarCraft II uses the US, EU, KR, SEA and TW regions.

An account may authenticate to any region in the partition, but still play games in a different region in the same partition. The only benefit to authenticating to a different region is the possibility of reducing the latency of the login process.

With all that out of the way:
In China, Blizzard (actually, the operator NetEase) is required to ask for players' National ID numbers. Everyone in mainland China has such a number, so it is mandatory to provide one if you register an account in the China partition. (However, the last time I checked, Blizzard doesn't actually verify these numbers with the government, nor does it check the validity of the ID.) Due to the unique state of Taiwan's political situation, it does not use the same system of NID as China. The same is true about Hong Kong and Macau, where both places have separate ID systems.
As such, it is optional to provide the NID if you register an account in the Worldwide partition.
Answer: As Jiao has said, NID means "National ID" and really only applies to Taiwan. Also, I've found that you can just leave it blank with no problem.
Comment: I've found you can ignore the NID box.
Comment: Where are you from? I'm 90% sure my account is a SEA account (Australia) and I never got this question setting up my account.
Comment: @MatthewScharley, I'm from Hong Kong.
Comment: Your answer is wrong. Not all SEA accounts ask for NID. Only certain Asian countries like Taiwan and Hong Kong. I take it you didn't read my comments to your question.
Comment: @Russell - Just create a non-SEA account.

What is a Battle.net account NID?


Is the age of Tony Stark consistent with the appearance of his father in the Captain America movie?

Question: Nick Fury told Captain America that he has been "asleep" for nearly 70 years. If Dominic Cooper was playing Howard Stark Senior (grandfather of Tony Stark) then it is fine, but if he was playing Howard Stark (father of Tony Stark) then after 70 years he should be around 90 or above.  Tony Stark, his son, should be 60 to 70 years.  Is that possible?  Tony doesn't look 70 years in The Avengers.
Comment: The exact birth date of Tony Stark is May 29, 1970 according to movie, March 2 or 3 by comics. http://i.stack.imgur.com/Gxqzq.png reference for movie version, not sure where to find a reference for the comics.
Comment: You don't see Howard Stark finally getting around to having one kid in his fifties? Given what we see of Howard, that sounds precisely right to me.
Answer: There are some plot problems, but not based on the assumption that Tony Stark was born when Captain America was frozen in ice. In the movies, we don't know Maria Stark's age when she had Tony; in fact we don't see her at all.
But we do know the following:
In the first Iron Man movie, we learn from a newspaper clip that at age 17, Tony lost both of his parents in a car accident. The date of the newspaper is December 17, 1991. That would place Tony's birth around 1974.

However, in Iron Man 2, Tony is looking at some old film footage of his father. The film is dated 9-15-73. Yet later we see a young Tony Stark playing in the background. He appears to be between 5-6 years old. This would put Tony's birthdate maybe around 1968.

So there is a bit of a problem as to when Tony Stark was born with these movie screens, but Tony Stark's birthdate is in the 1968-1974 range, which puts his age at the start of the MCU between his very late 30s and early 40s, which seems to be about right.
World War II took place between 1939-1945. In Captain America: The First Avenger, Howard Stark appears to be in his 20s. So he would be in his early 50s when he had Tony. He also looks that age in the Iron Man 2 old film footage. At his death in 1991, he would be about 70. This all seems about right considering how Robert Downey Jr. looks and portrays Tony Stark in the movies. And again we don't know Maria Stark's age, so she could have been much younger than Howard Stark.
To answer your question, the timeline of ages is about right, despite not having Tony Stark's real birth year.
Comment: Well caught. I never noticed that discrepancy of timelines.
Comment: @spong Take a look at Shisa's answer below, with files from the films, and you can see that you made one wrong assumption (that the newspaper referring to Starks graduation from MIT at 17 means he is still 17 now), and that pushed your dates off slightly. Other than Tony looking pretty old for a 3 year old in his fathers film clip, the dates actually match up.
Answer: This is an issue that the films inherited from the comics.  In the comics, some of the characters have been in use for half a century or more.  To avoid having everyone get old over that time, Marvel uses a sliding timescale.  So Tony Stark is perpetually an adult in the currently-published comics, even though this has been the case for decades.  The timescale breaks down when you have fixed reference points in this timescale.
World War II is one of those reference points.  The in-universe importance of Captain America, and the wealth of fiction that has been written around him causes issues.  In the real world, WWII was ~70 years ago and increasing.  So a character who in the 60's was written to be a child of someone who is linked to WWII, it makes perfect sense at the time.  But over the decades, that link to WWII makes less and less sense in the real world, as the character from the 60's has their personal timeline dragged into the future while the WWII link is perpetually fixed to the real life WWII.
This is what happened with Tony and Howard Stark.  Tony's the child of Howard, and this was established decades ago.  In Tony's personal history, his accident that resulted in him creating the first Iron Man suit has been updated over the years:

Writers have updated the war and locale in which Stark is injured. In the original 1963 story, it was the Vietnam War. In the 1990s, it was updated to be the first Gulf War,[12] and later updated again to be the war in Afghanistan. However, Stark's time with the Asian Nobel Prize-winning scientist Ho Yinsen is consistent through nearly all incarnations of the Iron Man origin, depicting Stark and Yinsen building the original armor together.

However, they haven't altered the father-son relationship of Howard and Tony.  They could have brought Howard forward in time, have him be a government defense contractor during the Cold War, Vietnam War, Gulf War, etc.  But doing so means he would no longer be linked to Captain America's origins.  Alternatively, they could retcon him into being Tony's grandfather, and introduce a new father for Tony.  Rather than alter continuity in some fashion to fix this, Marvel's let the issue fester.
Comment: +1|Excellent observation about the sliding scale of comics and their use of fixed historical points. If they maintain publication long enough, something has to be changed if the story is to be continued.
Comment: @Thaddeus Thanks!  I was kind of surprised they didn't take the opportunity to fix this particular issue when writing the films.  Although at least in *Captain America* they made sure to have Howard appear to be pretty young.
Comment: They have the same problem, only much worse, with Magneto.
Comment: When you said they use a "sliding timescale," I thought, "don't you mean Comic Book Time?" I guess it's true what they say: TVTropes Will Ruin Your Vocabulary.
Comment: I think it tends to be an oversight of translating one form of media to another. The translators are not REALLY familiar with the media so they never stop to do the math and realize Tony would be easily over 50. Granted, there is a lot going on, so I could see how it could be missed but isn't that what they pay all those "consultants" for? Perhaps I could get a job...
Comment: Let's not forget Peter Parker has been younger than 30 for the last 50 years.
Comment: Eventually, they'll just make Tony Stark Howard Stark's *grandson*, but probably not until they have to.
Comment: Not to mention that Batman, having been fighting crime since 1939, is at least 104 years old today.
Answer: Adding more concrete date sources to spoog's answer.
In the movies:
Howard Stark's DOB is 15 Aug 1917 [source: SHIELD character files; also CA1]

Tony Stark's DOB is 29 May 1970 [source: SHIELD character files]

Which makes Howard 53 years old at time of Tony's birth, which is completely biologically possible and narratively probable given his age in the video from 1974 as shown in IM2, when Tony would be around 4.
This also puts Howard as 74 and Tony as 21 at time of the Stark Srs' deaths on 17 Dec 1991. Tony's age being 21 at time of this event is corroborated by props from IM1.

This article from IM only says that Howard's son graduated MIT when he was 17, which implies that he is older than 17 at this point.

And this article explicitly puts Tony as 21 (in the 3rd column) at time of Howard's death.
So yes, Tony and Howard's ages are completely internally consistent.
Comment: Instead of "Source : SHIELD character file" can you add the movie you took the screenshot from, please ? I assume CA1 means Captain America 1, but what about the second screenshot ?
Comment: @Kalissar 2nd screenshot is not from a movie, but rather a fan-photo of the shield files provided with one of the commercial disc releases (Blu-Ray, i think) of the Avengers movie.
Comment: I like how their SSN's are the same except for the very last digit.
Answer: Howard had Tony at the age of 53.
Tony became CEO of stark Industries, thanks to Iron Man 1 during the short presentation when Roddy should give at Tony his award.
So, we could guess that in Avengers 1, Tony is 42.
So in 2014, he is 44.
Maybe Maria was younger than Howard, which it's not a surprise. Howard is describe as a playboy. We could easily picture him as someone who love young ladies whatever he's age.
Answer: Howard Stark was born in 1917.  His son Tony was born when he was 53.  Howard died 21 years later, when he was 73 or 74.
Not everything in the movies are the same as the comics.  In the comics, Pepper dated Happy, not Tony.
Answer: Within the Marvel Cinematic Universe (and Marvel in general) there are different Alternate Universe; aka things that may change according to the comic or the movies. There are comics where Pepper dates Tony and other that they don't like the fact that in Comic Ultron was created by Hank Pym not Tony Stark
I'm saying this because in the comics Tony is the adoptive son of the Starks due to the fact that they couldn't have there own and in another they had a son but there were complications, etc and still they adopted Tony.
I might be wrong but to this day I haven't seen somewhere that says that in one of the universe he is a biological son... so in context with the question it can be because since he is adopted they could have been both; e.g. Maria and Howard in there mid 40's and still adopt him and, yes, that was Tony's father.
Comment: I appreciate that English may not be your first language, but can you please make an effort to spell-check and use paragraphs.
Answer: It is not actually true that men do not decline in fertility... if fact they do.  it becomes more and more difficult as they get older.  by the time Howard was fifty ( and if her were trying to father a child ) it would take an average of 12+ months.  I was curious so I looked at some men's health sites to see if there was a decline.  as for women they on average go through menopause at 51 years of age. Since Howard Stark was portrayed as a player this last bit is more or less unimportant... Maria could have been much younger.  Please note that the chances of a woman getting pregnant decreases significantly after the age of 30 with an increasing number of birth defects.  these taken together mean that Tony Stark was fairly close to being a miracle baby.
Answer: According to me, it's a great deal to find his real age. But to find this I had read several article and blog post of people about it. Many have claimed that he belongs to a different planet, so he is forever young like the Asgardian Avenger, Thor.
As we all know, when Captain America wakes up after 70 years, he is as young as Thor. All the Avengers had visited different planets with Thor, and that's why they are ageless forever young people. That's why they are showing the same age of Tony Stark.
I also think that like the shapeshifters can change, he can also change his age. So now Tony Stark is in his thirties or maybe in  histwenties. After all, he is a great person and the centre of attention everywhere. He is wise, hardworking and knows how to handle all the limelight.
I think that the same case was with his father. I mean not exactly the same, but almost the same, because when he become the father of a child. he was 50. That's weird. Maybe this is the cause of their inventions as they both are great inventors. We know about Tony's breakdown when his whole nervous system was under the control of his ex/former-lover (I forget her name).  He has rebuilt it again, so I think he also done something for his age after at all his assets has gone through several breakdowns and he has rebuilt it.
So according to me, he is forever young.
Comment: "MANY HAVE CLAIMED THAT HE BELONGS TO A DIFFERENT PANET SO HE IS FOREVER YOUNG LIKE THE ASGARDIAN AVENGER THOR." I've *never* heard this theory before.
Comment: Also. Check your keyboard. Your caps-lock and shift keys seem to be broken.
Answer: But also a man can become a father at really any age after puberty. I mean a woman's eggs kinda go bad around 35 or 40 but a man can father healthy children up til his seventies and beyond. So the mere fact that Howard was in his 50's doesn't really matter.
Answer: I been reading the Marvel NOW! Iron Man comic, in which he mentions that he's in his thirties, so I guess he's 38, 39 maybe?
Oh and yes, he's adopted. He was used as a decoy to hide his brother Arno Stark. Also, Malekith tells Stark that he's a changeling.
Answer: Well, actually, the comic books say Tony is adopted (just check Wikipedia!) So really he could be ANY old age, so long as Movie Tony is the same as Comic Book Tony, know what I mean?


Added Difficulties of Space Flight on Gas Giant Moons?

Question: What additional difficulties might the inhabitants of a gas giant moon face when attempting to launch spacecraft beyond their moon's orbit, especially beyond the planetary system? I presume that they'd have to deal with the gravity of the gas giant in addition to that of the moon, but what other issues might they face due to the close presence of the gas giant and/or the other moons.
Comment: Can you specify some more what you are looking for? Forgetting the wallet home is an issue, too...
Comment: I am seriously loathe to VTC this question.  Within it is a fantastic and interesting question.  At first blush it feels too broad, as if an entire disertation would be needed to answer the question - but I'm not so sure.  Specificity is your friend, Literary Lord.  Would one of the moons of Jupiter serve as the basis for the question?  Are we still dealing with liquid fuel reaction engines?  Are we launching dry goods, colonial supplies, or people?  Perhaps with just that much clarification we'll attract some absolutely brilliant minds to weigh in.
Comment: I think you should try Kerbal Space Program, a space sim which features realistic orbital mechanics, and a gas giant planet named Jool. In short, I'll try later but I think you can use the gas giant as a gravity slingshot. Please edit your question with other details so we can discuss specific cases.
Comment: @Goufalite: defeinately a good idea to try out things like this in KSP, so you know Jool Gravity assists not only work, but are almost a must for larger craft to save on DeltaV. Jool's moon Laythe is a common planet to travel to, and you can save literally thousands of DeltaV with Jool Aero-Braking and Sling-shott maneuvers
Comment: @Goufalite: Not perhaps the gas giant itself, but you can certainly use the gravity of the other moons to do all sorts of orbital maneuvering.  See the Galileo & Cassini missions for examples.  This has a nice picture of Cassini's path: https://space.stackexchange.com/questions/19515/unravelling-cassinis-ball-of-yarn-orbit-around-saturn-tabulation-of-propulsi
Answer: It's kinda hard to tell what problems they face, there are a multitude of potential issues that all depend on many aspects and your question is relatively broad.
The first issue I see is a mathematical one. In the case of the earth, you can launch spacecraft and almost ignore the sun and moon because their gravitational pull is weak compared to earth's. With your moon orbiting a large gas giant, you put your scientists face-to-face with the three-body problem. This problem hasn't exactly been solved, but solutions can be approximated.
However, your advantage here is that you probably have a stable orbit of the moon around the gas giant and the spacecraft is too small to affect the moon/planet's orbits, which makes it much easier. On the other hand, other moons of the gas giant can make it a tad harder again.
Next issue is radiation. Gas giants like Jupiter can have massive electromagnetic fields, which trap ions and emit EM radiation of various wavelengths. These create issues for microelectronics, they can cause single event effects such as bit flips/freezes or have the total ionizing dose stack up until the electronic component breaks. This is already an issue with Earth's Van Allen belts, albeit a mostly "solved" problem, and might be a much bigger problem with a gas giants' radiation.
Can't think of any other noteworthy issues on top of my head.
Other than that, you actually have a ton of advantages. The moon would probably be smaller than earth, so escape velocity is easier to reach. Other moons might have advantageous orbits for sling-shot maneuvers. Depending on whether you want to get to the inside or outside of the planet's orbit, you can use gravity assists from the planet, too.
Answer: There actually may be quite a few advantages to having a large planet nearby.
It may be possible to, depending on the distance your moon is orbiting the gas giant, to use target the angle and speed of your spacecraft for a gravitational slingshot. This may enable your spacecraft to use less fuel, to gain speed and if calculated correctly allow ready access to other targets.
Depending on the size of your moon (lets say a Deimos sized moon) if the mass is not too large, it may be possible to have alternate launch methods other than rocketry, such as mass drivers or laser launching, using the slingshot method too.
Gas giants due to their gravity also potentially 'clear' their orbits from asteroids and space debris - Jupiter is known as our solar systems 'vacuum cleaner'.
Some disadvantages:

There is likely a ring system around most gas giants. Due to their large mass they attract a lot of small particle / ice and dust to form their ring systems. Your gas giant may be no different and this may cause increased difficulty in spacecrafts moving through such a ring system.
The gravitational pull of the gas giant may produce large stresses on your moon - which may make it unstable. The tidal forces may prove difficult for launch facilities on the moon.
Gas giants are normally (not always) found further from their stars, this may mean that solar powered craft may not have as much solar energy to draw from as when they are closer. However, gas giants do emit large amounts of radiation - it may be possible to use this as a power source given sufficient technological advances.
Jupiter has 69 moons of which most have elliptical orbits - although your moon may be one amongst many this may make navigational calculations more complex if you are launching craft in the same plane as these moons. There is evidence also of Jupiter and Saturn 'capturing' moons and large asteroids in irregular orbits, you would need to study these orbits to ensure they are incorporated too.
Jupiters magnetic field is 14 times stronger than Earth's - it is quite possible that yours would be just as strong. Your spacecraft would require significant shielding to protect both inhabitants and on-board computers.
Comment: The ring systems of anything are really really diffuse; they're nothing to worry about.


Is Almost-2-SAT NP-hard?

Question: Is a CNF SAT problem NP hard when the total number (but not the width) of the 3-or-more-term clauses is bounded above by a constant?  What about specifically when there's only one such clause?
Comment: If there's only one such clause $c$ with more than 2 terms, solving such formulas is trivially in $P$.  If $c$ has $n$ terms, try each of the $n$ partial assignments that satisfy $c$, then solve the remaining 2-SAT formula using the known linear-time method.  Eventually you'll find a solution for the whole formula or prove that it is unsatisfiable in $O(n^2)$ time, where $n$ cannot exceed the number of variables in the whole formula.
Comment: @DavidRicherby To satisfy the clause you only need make one of the literals evaluate true.  After that the clause can be ignored and you only have a 2-SAT formula remaining.  $k$ literals means you only have to try $k$ assignments.
Comment: @KyleJones But a single clause with $k$ literals has $2^k-1$ satisfying assignments, not just $k$. Since $k$ is not bounded in the question, this approach gives an exponential-time algorithm.
Answer: It is worth noting that the problem becomes NP-hard when the restriction is relaxed slightly.
With a fixed number of clauses that are also of bounded size, the average number of literals in a clause is as close to 2 as one wants, by considering an instance with enough variables.  As you point out, there is then a simple upper bound which is polynomial if the clause size is bounded.
In contrast, if the average number of literals per clause is at least $2 + \epsilon$ for some fixed (but arbitrarily small) $\epsilon > 0$, then the problem is NP-hard.
This can be shown by reducing 3SAT to this problem, by introducing new clauses with 2 literals that are trivially satisfiable.  Suppose there are $m$ clauses in the 3SAT instance; to reduce the average clause size to $(2+\epsilon)$, it is enough to add $m(1 - \epsilon)/\epsilon$ new clauses with two literals.  Since $\epsilon$ is fixed and positive, the new instance is of polynomial size.
This reduction also shows that even the version where the "large" clauses are restricted to 3 literals is NP-hard.
The remaining case is when the few large clauses are not of bounded size; each large clause seems to make the problem harder.  See the SODA 2010 paper by Pǎtraşcu and Williams for the case of two clauses: they argue that if this can be done in sub-quadratic time then we would have better algorithms for SAT.  There might be an extension of their argument to more clauses, which would provide evidence that your upper bound cannot be improved (modulo some form of the exponential time hypothesis).
Comment: only tangentially related, but there is a recent ECCC paper that formulates "almost 2-SAT" in a different way and proves strong hardness: http://eccc.hpi-web.de/report/2013/159/
Answer: Ok, I got it.  The answer is no.  This can be solved in poly-time.  For each 3-or-more-term clause, select a literal and set it to be true.  Then solve the remaining 2-sat problem.  If any one provides a solution, then that is a solution to the overall problem.  Since the number of 3-or-more-term clauses is fixed (say c), then if all such clauses have size <= m, then this runs in O(m^(c)*n).  O(m^c) for going through each possible selection, times O(n) for solving the remaining 2-sat problem.
Comment: But the question explicitly says that $m$ is unbounded, so this is not a polynomial-time algorithm.
Comment: It is, because m is implicitly bounded by the number of atoms.  Obviously, a clause can't have more literals than there are atoms in the problem.  Perhaps I should have clarified m <= n

Is Almost-2-SAT NP-hard?


Should a woman pray when she has discharge?

Question: I had my period a week ago and am back on the contraception pill, but experienced some discharge on my liner when I have gone to the bathroom a few times today and want to know if I can just clean myself and continue prayers for the day?  Or should I wait until tomorrow to see if it's cleared up and if so carry out the daily prayers.
Answer: All Praise to Allah Subhanahu wa Taala and blessings on Prophet Muhammad peace be upon him His family and companions

Narrated Fatimah daughter of AbuHubaysh: Urwah ibn az-Zubayr reported
  from Fatimah daughter of AbuHubaysh that her blood kept flowing, so
  the Prophet (ﷺ) said to her: When the blood of the menses comes, it is
  black blood which can be recognised; so when that comes, refrain from
  prayer; but when a different type of blood comes, perform ablution and
  pray, for it is (due only to) a vein. Abu Dawud said: Ibn al-Muthanna
  narrates this tradition from his book on the authority of Ibn 'Adi in
  a similar way. Later on he transmitted it to us from his memory:
  Muhammad b. 'Amr reported to us from al-Zuhri from 'Urwah on the
  authority of 'Aishah who said: Fatimah used to have her blood flowing.
  He then reported the tradition conveying the same meaning. Abu Dawud
  said: Anas b. Sirin reported from Ibn 'Abbas about the woman who has a
  prolonged flow of blood. He said: If she sees thick blood, she should
  not pray; if she finds herself purified even for a moment, she should
  was an pray. Makhul said: Menses are not hidden from women. Their
  blood is black and thick. When it (blackness and thickness) goes away
  and there appears yellowness and liquidness, that is the flow of blood
  (from vein). She should wash and pray. Abu Dawud said: This tradition
  has been transmitted by Sa'id b. al-Musayyab through a different chain
  of narrators, saying: The woman who has a prolonged flow of blood
  should abandon prayer when the menstruation begins; when it is
  finished, she should wash and pray. Sumayy and others have also
  reported it from Sa'id b. al-Musayyab. This version adds: She should
  refrain (from prayer) during her menstrual period. Hammad b. Salamah
  has reported it similarly from Yahya b. Sa'id on the authority of
  Sa'id b. al-Musayyab. Abu Dawud said: Yunus has reported from
  Al-Hasan: When the bleeding of a menstruating woman extends (beyond
  the normal period), she should refrain (from prayer), after her menses
  are over, for one or two days. Now she becomes the woman who has a
  prolonged flow of blood. Al-Taimi reported from Qatadah: If her
  menstrual period is prolonged by five days, she should pray. Al-Taimi
  said: I kept on reducing (the number of days) until I reached two
  days. He said: If the period extends by two days, they will be counted
  from the menstrual period. When Ibn Sirin was questioned about it, he
  said: Women have better knowledge of that.(Sunan Abi Dawud)

In Regard to your query the condition you mentioned is not menstrual period,fuqaha have mentioned that there must be 15 days difference in two menstrual cycles and minimum days for bleeding considered for periods would be 3 days and maximum would be 10 days but it depends on your monthly routine cycle ,assuming your condition it is the vein blood called as Istihadha which is considered as disease and in this disease one has to perform prayers,fasting etc,after menses one has to perform Ghusl and if someone suffers from istihadha now she just need to perform wudhu for every prayer ,Ghusl is not obligatory for every prayer so you could just clean it ,do wudhu and you have to perform your prayers.
Allah Swt and His Messenger knows best.
Answer: Adding to Faqirah's answer, here's a hadith from Sahih al-Bukhari, Book of Menstrual Periods:

Narrated `Aisha: Fatima bint Abi Hubaish said to Allah's Messenger (ﷺ), "O Allah's Messenger (ﷺ)! I do not become clean (from bleeding). Shall I give up my prayers?" Allah's Messenger (ﷺ) replied: "No, because it is from a blood vessel and not the menses. So when the real menses begins give up your prayers and when it (the period) has finished wash the blood off your body (take a bath) and offer your prayers." -- Sahih al-Bukhari 306 (sunnah.com)

There's a distinction between menses and other forms of discharge.  As you say, she should clean the private parts from impurity, and redo wudu before prayer.  E.g.:

These brown discharges or spots which you have before the menses are not menses. ...  Nonetheless, she is obliged to clean her private parts from the yellowish and muddy-colored discharges as these invalidate ablution.  -- IslamWeb; see also another IslamWeb fatwa
This brownish discharge that came after doing ghusl does not matter and is not regarded as menstruation ... -- Islam Q&A
The default is that anything that exits from either private parts nullifies ritual ablutions (wudu), for both men and women. Such things are also considered in themselves ritually impure (najis). [Haskafi, Durr al-Mukhtar, Bab al-Ghusl] -- SeekersHub
Answer: So if you have discharge before you get your period for the first time it's ok to pray but if it's after the period you can still pray but only if it's discharge but not spotting or  period blood
Answer: You cannot pray until even minor spotting is stoppped. and you cannot just Clean that blood and pray. if even there is small spot, you need to take Ghusl (obligatory bath) and then pray


Can I participate in trading Facebook shares on their IPO day from any brokerage?

Question: Can I participate in trading Facebook shares on their IPO day from any brokerage?  Or might accessibility be limited?  (I have some money in a Vanguard account and would like to use that if possible.)  Thanks.
Comment: I vote to close this question. If you have a brokerage account, ask them. If you don't have a brokerage account and are thinking of opening one real soon now in order to trade Facebook shares, ask various brokerage houses what their rules are and sign up with one that will let you play.
Comment: @xyz: stay away from FB, you might gain some money immediately, but you will loose a huge amount of money on the long run. FB it's just the next huge bubble.
Answer: Any retail equity brokerage will give you access to the NYSE, and thus Facebook shares as they become available.  However, it is important to note that you nor any retail investor will be able to purchase FB at the IPO prices ($33-38 IIRC).  The only people who will be able to buy in at that price are the underwriting investment banks and major investors who have subscribed to the IPO.  You, and all the other retail investors will only be able to buy in as those major investors offer shares on the secondary market.   This being Facebook, there will probably be a significant premium over the IPO price, both due to demand and systemic underpricing of IPOs to encourage the opening 'pop'.
So, if you're intent on buying in at the IPO, pay close attention as the date approaches.  Look at how the recent big IPOs have performed (GRPN, LNKD come to mind).  Know how much you're willing to commit and what price you want.  However, no one is going to know what the opening market price will be come Friday morning.  Be watching your financial data source / analysis of choice and be prepared to make a judgement.
Comment: Not so. Depending on the size of the offering, brokerage firms are often given some qty of shares. Schwab had an offering period where I was able to put in a request for shares. During the dotcom boom in the late 90's I received a small number (100-200 shares) for most IPOs I requested.
Comment: Second that, ETrade were accepting orders for this IPO.
Comment: As anecdotal evidence, I tried to buy Facebook stock at ETrade, and they gave me 50 shares (I had asked for more, but they only gave me 50; 50 was also the minimum). It didn't end up mattering much because there were several opportunities to buy it at $38/share the first day of trading anyway.
Comment: I stand corrected, I didn't know that the retail brokerages subscribe to larger IPOs.
Answer: Yes. The real question is whether you should. You should consider your investment options, and take into the account that there's much more hype than value in many companies.
Answer: By definition, an IPO'd stock is publicly traded, and you can buy shares if you wish. There's often an excitement on the first day that doesn't carry over to the next days or weeks.
The opening price may be well above the IPO price, depending on that demand.


Global Parent theme for all sites

Question: I have 15 different wordpress sites installed on my server. They are independent installations , not  multisite. I have developed a parent theme and copied it in all sites. Now whenever I have to make a change in parent theme, I have to access parent theme of all sites and make changes in each theme. Is it possible that I can globalize this parent theme such that I do change on one place and it reflects on all 15 sites (Without using Multisite feature). Though I wrote a php script that copies parent theme in all sites but not satisfied since I have to call that script everytime.
Comment: Then I would search the site for how to hook into the WordPress Update API, host the Theme somewhere yourself, and let the individual sites poll for updates. [See this question, for example](http://wordpress.stackexchange.com/questions/5220/automatic-updates-for-private-and-commercial-themes)
Comment: How would one stand-alone WordPress install know about another one? Why don't you want to use MultiSite, which would make your problem a non-issue?
Comment: They gave me 15 stand alone wordpress sites to work. :(
Comment: thanks. Will check it out. Can you make this comment your answer. I may consider accepting it :D.
Answer: Create a separate directory and a (sub) domain for your themes.
Lets say the domain is themes.example.com, and the directory is /extra/wp-themes/.
Now let all your installations use the new theme root. Or just do the same for plugins to manage all plugins from one place too.
Registering a new theme root is not possible with constants, you will need a plugin like this:
<?php
/* Plugin Name: Local Theme Roots */

add_filter( 'theme_root_uri', 't5_switch_theme_root' );
add_filter( 'theme_root',     't5_switch_theme_root' );

/**
 * Create a custom theme directory.
 *
 * @wp-hook theme_root
 * @wp-hook theme_root_uri
 * @author  Thomas Scholz, http://toscho.de
 * @param   string $in URL or path
 * @return  string
 */
function t5_switch_theme_root( $in )
{
    if ( 'theme_root_uri' === current_filter() )
        return "http://themes.example.com";

    // If we made it so far we are in the 'theme_root' filter.
    $new_root = '/extra/wp-themes';
    register_theme_directory( $new_root );
    return $new_root;
}

Be aware there is a bug in the WordPress' theme updater that doesn't let you update themes from the wordpress.org directory when you are using a custom theme directory. You have to run the updates for such themes either manually, or use my patch from Ticket #22501 until WordPress 3.6 is out.
Answer: Assuming you are on linux and all the sites are on one server you can use symbolic links
If your deployment location of the theme is /home/me/mytheme add an symbolic link in each site's theme directory to point to it
/home/site1/wp-content/themes/mytheme -> /home/me/mytheme
Once done every time apache will access the file /home/site1/wp-content/themes/mytheme/x.php the OS will load the file /home/me/mytheme/x.php, therefor a change in the /home/me/mytheme/x.php file will have an immediate impact in all of the sites.

Global Parent theme for all sites


How many Star Wars Storm Troopers have there been?

Question: How many different storm-troopers are there in the LEGO Star Wars sets
for the entire timeline?
Answer: Based on the LEGO wiki on Fandom, there have only been 7 different variants of the plain white Stormtrooper minifigure since they were introduced in 2001 (plus one Chrome-Silver variation).
If you also include Clone Troopers, Sand Troopers, Snow Troopers, Scout Troopers,  and other such armored soldiers from the Star Wars universe, that number would be much, much higher (also see 'Variations' at each of the links above).
Comment: Hi Christopher, welcome to Bricks.SE. [This post on Eurobricks](https://www.eurobricks.com/forum/index.php?/forums/topic/157676-compilation-list-of-lego-stormtroopers-ever-released-since-2001/) lists quite a large number of stormtroopers. I haven't compared all the minifigures. Does it confirm your answer? I think there are more than 7 white stormtroopers listed.
Comment: Thank you! Yes, that article does provide a more comprehensive list of stormtroopers (including sand troopers, storm trooper disguises worn by Luke and Han, first order troopers, and more). I suppose the answer to the question varies depending on your definition of what is a storm trooper variant and what is a different figure entirely.


Weird Blender Subsurface glitch

Question:
For some reason, when I add the Subdvision Surface modifier, I'm getting this. Does anyone know what might be causing this?
Answer: Subdivision surface only works well with quads, and from the looks of it your model isn't constructed in the most clean way. There are a few things you can try short of remodelling the mesh:

Remove doubles
Recalculate Normals
Add a bevel modifier, which might be able to clean up the edges for you so you can apply a subsurface modifier.
Add 2 edge loops around the perimeter of the object so that subdivision works better.
Comment: I've done the model with vertices(Drawing around a reference image) and then filled the edges to create a single face on top and on bottom, after that I extruded the face. I believe this might be the problem, how would you model it, with a cube? (I'm only a student so I have the time to remodel it all). Thanks in advance.

Edit: And it's a single model too, would you recomend separating it in different models?
Comment: Bevel modifier or adding edge loops(Ctrl+R) is probably the easiest way to fix it.
Comment: Neither one worked, so I'm going to remodel it as a cube. I think my problem is that the top part only has one face
Comment: The issue is the way the top face is connected to the sides. Polygons with more than 4 sides do not subdivide well. See this answer:https://blender.stackexchange.com/questions/3199/weird-deformation-between-large-ngon-and-edge-ring/3200#3200
Answer: My recomendation: Remodel it. Start from scratch and make sure that you are using squares to build it. Then, when the subdiv is applied it will look much cleaner and will be much easier to control.
Alternatively, you can try sculpting with Dynotopo enabled (Dynamic topology). This will allow you to add exactly as much detail as you need, or even more detail than you need (which you can reduce later with a decimate modifier).
Hope this helps.
Comment: Yeah man, that's what I'm going to do, I thought I could do it with vertices but I couldn't. Thanks

Weird Blender Subsurface glitch


How many hard drives can a Dell XPS M1330 have?

Question: I can't find this information anywhere. I currently have a SATA drive, but it'd be great if I add an additional SSD. Is this possible?
Answer: If you go to the dell website and put the service tag number in. You can get the original configuration and specs.
The service manual and owners manual can be find here the service manual only shows one hard drive.
I am assuming, as dangerous as that is, that you are asking about internal drives. The most likely answer is no, if it didn't come with two HD then you cannot add an internal one. I know some of the gaming laptops came with two HD installed as configured with RAID 0
If you have a PCMCIA slot I think it's called cardbus now you may be able to find a HD that will fit entirely in that slot.
Answer: After reading Jeff's blog post on the M1330 I assume there isn't room for an additional drive, else I think he would have stuffed one in it.


Are retired airline pilots allowed and able to help in an emergency situation?

Question: My dad is a pilot who flew over 15000 hours in 777.
Will he be able/allowed to help the crews if the same plane is in emergency?
Comment: Your father could had answered this: It is up to the discretion of the pilot in command.
Comment: could be a partial duplicate of this: https://aviation.stackexchange.com/questions/163/1467
Comment: @mins What do you mean by "general laws"? The only laws that are relevant are those pertaining to aviation, the very subject of this site.
Comment: There's an interview on YouTube with a B-1B pilot that was asked to assist the first officer after the captain became incapacitated.
Comment: This quesion is much too broad to be answered. Which type of emergency are we talking about? Are your dad on the plane or on the ground? Does he know there is something going on? Does the crew know that he is a pilot? And even if we had the answer to all these questions, any answer would probably be mostly opinion based.
Answer: United 232 might be close to what you're thinking about: a United flight training instructor on board helped the pilots to land the aircraft, although he wasn't retired. But for this scenario to happen you need a fairly specific combination of circumstances:

The passengers have to know there's an emergency
Your father has to believe he could help significantly
The cabin crew have to decide it's worth passing your father's offer to the pilots
The pilots have to decide it's worth bringing another, unknown pilot into the situation

The basic question would be: is your father's help going to be important enough that it's worth increasing the communication and CRM workload for the crew? That's not necessarily an easy decision to make, especially if time is very limited or the nature of the emergency isn't clear.
Being "allowed" to help isn't really a consideration here, by the way: pilots have very broad emergency authority to do whatever they think is best.
Overall, it's certainly possible and it would be the pilot in command's decision to accept your father's offer or not. It's just very, very unlikely.
Comment: Reference FAR 91.3, the emergency authority of the pilot in command: "The pilot in command of an aircraft is directly responsible for, and is the final authority as to, the operation of that aircraft." If the PIC wants someone's help, the PIC may get that person's help. (If the Captain is disabled or otherwise unable to perform the appropriate duties, the then-acting PIC would make the decision.)
Answer: There are two questions here: will he be able and will he be allowed.
Will he be able to help? Generally yes. The retired pilot's ability to improve the situation depends on a few factors, such as how long has he been not flying, his mental and physical condition, any disparities between the model which he flown years ago and the current model, updated airport locations which he may not know etc.
Will he be allowed to help? Again, generally yes, but it is the decision of the pilot in command (or whoever is in charge if the PIC is unconscious). The cockpit only has so much space, and if it is decided that the pilots on duty can handle the situation already, there is no reason to bring onboard a retired pilot from the passenger cabin. Or, perhaps he is known to the flight crew as a past coworker of the airline, and the pilots may wish to listen to the view of an experienced captain.
To conclude: it depends, with a generally yes.


openFDA: Can we print results for multiple patients at once?

Question: Is there any way to get multiple patients' results in one output? I've noticed it defaults to show one patient's results at a time - and skipping allows you to see other patients - but is there any way to have two or more show up in one result (e.g. change the limit of a "results" search)?
Answer: You're looking for the limit URL parameter which maxes out at a value of 100.
For example: https://api.fda.gov/drug/event.json?search=receivedate:[2012-08-09+TO+3000-01-01]&limit=100
This is explained at the "Query parameters" section of the API documentation at https://open.fda.gov/api/reference/#query-parameters
Answer: If you looking to search and filter through results, check out ResearchAE.com which I built for non-programmers to be able to search through OpenFDA/FAERS data.
Comment: Could you elaborate on what 'ad pan' is, and what features ResearchAE has that might help the person asking the question?  Also, if you have an affiliation with ResearchAE, please mention it.


MacBook Pro 3.1 german keyboard with Ubuntu 12.4 (@ and € keys)

Question: How can I with Ubuntu 12.4 type characters like @ or € with my MacBook Pro 3.1 german keyboard?
Answer: To view the present keyboard layout we open the gnome-control-center (click the cogwheel on the upper right to select "System Settings...") and choose the "Keyboard Layout" icon in the to row:

There you can change your present layout (press + for a selection) or view the present  keyboard layout by selecting the little keyboad symbol at the bottom right. This will open a window that shows all characters assigned together with their location:

Here the @ sign is on the fourth level of key 1, the € sign is on the third and fourth level of key E.


What is the role or importance of Data Structure & Algorithms (DSA) in testing?

Question: As per my understanding, use of DS/Algos is to solve some problems.No doubt DS/Algos are rarely coded directly in your daily work in test automation here is my question do we have the use of DS/Algos other than test automation?
Comment: You have a LOT of questions where you have not accepted the answers.  Please would you consider accepting some of them?  The people who've provided great answers would appreciate it.
Answer: As you say, Data Structures and Algorithms don't seem to appear much in everyday automation work.
At a higher, architectural level however Data Structures and Algorithms are very relevant and certainly do appear in test automation work in order to provide structure and organize complexity in test automation code.
At a practical level:
1 test may not need them.  2 tests may not need them.  1000 tests will certainly need them in order to have structure and easily maintainable and extendable code so that the automation is scalable.
For an example:
Using a Page Object factory is not relevant to 1 or 2 simple tests with less than a dozen or so element selectors.  When there are 160 tests and 500 element selectors however using that structure will be essential.
Without this aspect, test suites will simply grow and get longer over time and will increasingly be prone to intermittent errors.  I have seen suites in Ruby grow from 1 hour to 20 hours over time at one organization.  No-one ever refactored them with design pattern or algorithms and so we ended up with a big pile of crap.  This is as opposed to test suites that are constantly being refactored, tests deleted, etc with the code refactoring happening as the need becomes apparent to maintain high quality tests.
In the same way that application code will become a mess over time if not constantly refactored as it grow, the same principle applies to automation code.  The patterns and algorithms and structures are often similar, if not exactly the same (we're talking code here after all) as those found in application code.  Some design patterns are more relevant to application or automation code.
btw, many test frameworks also use design pattern implementations
Comment: +1, with scalibility , architecture become s more and more important, then the knowledge and usage of algorithms , data structures & design patterns shines.
Answer: While performing white box testing if a manual tester has knowledge of basic data structures and algorithms, he/she can find the faults or defects in a more convenient and fast manner. Because the tester knows the limitations of the data structures or algorithms. Even the tester can suggest a better and efficient data structure or algorithm.
Besides, some companies prefer proprietary or customized testing framework as per company's requirements. Hence knowledge of data structures and algorithms is needed for creating testing framework on their own. For example: in a previous company I worked for, I needed to create a test framework for testing a product where I had to use few data structures.
Answer: An algorithm is just a procedure to solve a problem. It can be something as simple as "Do the thing. Check that the thing was done." It can get more complex where you have to assemble a data structure (think of it as a simple object) methodically, piece by piece, and then you come back to the basic task of testing, "Do the thing. Check that the thing was done."
So yes, thinking in terms of data structures and algorithms can help your testing because it helps you to break down problems into smaller, more manageable chunks.
Answer: There's some wrong assumption that test automation is only about automated scripts. It's not.
It's also about creating tools that support testing. So tools for:

test data generation,
system configuration,
simulating external systems,
probing and analyzing system behaviour,
dectecting whether the system is in certain states,
recording system or user activity, etc.

Creating those tools requires programming skills. And thus - knowledge of data structures and algorithms.
Comment: Absolutely agree.I believe we can & should use automation to add value to the testing process in creative ways above and beyond just automating test cases.
Answer: The role of data structures and algorithms in testing? You might not find a lot of use coding your own data structures or developing algorithms in the tests you write. However...
The role of testing in data structures and algorithms is an interesting topic. You may find interesting results if you perform white box performance tests by comparing the results of different sorts, searches, etc. For example in big data applications sorting algorithms often switch between various forms of sorts based on various stages. Such optimization is possible through testing.
You may not write the data structures or algorithms inside your actual tests but that doesn't mean that it shouldn't play a role in what you decide what to test.
Answer:
The primary reason one learns the algorithms & data structures is to improve the general
  understanding of defining and solving problems more effectively.

Even though one manual tester, who does not do any coding at all, may get the benefits of seeing things more clearly and logically which might help him in test case design by covering all the edges of a feature.


Where do you get your type inspiration or how do you decide on the right type?

Question: Where do you guys get your inspiration for type and how do you decide the right typeface for your projects?
Comment: 30% Helvetica 69% Palatino 1% Goofy-Stuff
Comment: See also [Resources for finding good web font schemes/combinations](https://graphicdesign.stackexchange.com/q/20798/23061)
Answer: I've found this flowchart very helpful in selecting decent typefaces for various projects.
Comment: although useful, the infographic doesn't include any digital medium such as web or mobile apps
Comment: I follow a similar process to what is drawn in the flowchart (except in my head!) but additionally, I often google the font to check the history, what its purpose was. Also, I find the tags in [myFonts](http://www.myfonts.com/) to be extremely useful. They're not perfect but if you're looking let's say, for a 1920s feel, it can help you narrow your choices down a lot or at least get an idea of what was used back then.
Comment: @Luciano I agree, it's a shame the answer is already accepted as I would love to see more answers (or an addition to this one) that include digital media.
Answer: There are mountains of books and information on type choices and font pairings and it really can not be covered adequately on a simple Q&A site.
While the infographic in the other answer seems definitive, it is merely showing one person's preferences and is not the be-all-end-all. I really don't think it's possible in many instances to boil the design processes down to a series of "yes" and "no" decisions. It's similar to stating you can paint like Monet with the right paint-by-numbers kit. You can't. You may get an adequate result by following some set pattern, but it'll never be the quality of Monet's work.

But okay.. this is a very general, but my overall processes....

First the constants, or "general rules" to be aware of....

If it's digital, then typically sans serif, but serif is fine for call outs or headlines.
If it's print, then typically serif, but san serifs are fine for callouts, headlines, or smaller blocks of text.
Body text, paragraphs, large blocks of text - Digital: sans serif - Print: serif. The nature of readability has shown that in print, serif type increases readability. However digitally sans serif improves readability.

From here it's way more art than science. Any decision as to what specific typeface often comes down to the client, the message, the target audience, the brand to convey, etc. No one serif or sans serif typeface is correct or ever definitively appropriate in any usage.
Serif -----
If it's determined a serif is needed: What serif? If the message to be conveyed is one of a more friendly nature, then a Humanist Serif may be best. Humanist serifs include typefaces such as Jenson, Kennerley, Centaur, Stempel Schneidler, Jersey, ITC Stone, Goudy, Garamond, etc. Humanist serifs are generally more rounded and soft edged than their non-humanist cousins. And a humanist serif is generally more readable in nature due to the low contrast between the thick and thin strokes of the glyphs. (Meaning thin strokes aren't dramatically thinner than the thick strokes.)
Then after selecting a humanist serif.. what particular aspects of the typeface would serve the design best.... if there are large amounts of text and it is important to ease readability as much as possible, then it may be appropriate to use a humanist serif with large apertures. That is, a typeface where the counters in the o, e, a, d, b, etcetera are larger and increase the contrast between the strokes and negatives in the type. For example, ITC Stone has larger counters than something such as Stempel Garamond. Both are humanist serifs, but still quite different in this respect.
Sans Serif -----
Okay.. so what if I need a sans serif? Well, again, message, client, branding, audience, and personal preference all play a large role in any type selection. For digital body copy a low contrast, higher aperture, typeface is still a wise choice, however humanist sans serifs may not be a good direction. Humanist sans serifs tend to vary in stroke weights a bit too much for body text in digital mediums - just my opinion, not a "rule". The varied stroke weights lower readability in larger blocks of text. So choosing a non-humanist sans serif for digital body text such as Open Sans or Roboto may work well. The consistent strokes and counters aides contrast digitally.
However, for print, if using a sans serif a higher contrast more varied stroke in a sans serif isn't as much of an issue. There's a bit more room since the nature of ink on paper allows the user to read with less eye strain. So using a sans serif which is closer to a humanist sans serif may work very well.
Exceptions -----
Then there are things such as callouts, headlines, sidebars, lift outs, pull quotes, etc. These can break the guidelines above. Digitally it may be fine to use a serif headline. And in Print sans serif headlines are fine, often desirable. The overall key is in the font pairing. When mixing a serif and san serif typefaces in a design you should factor in things like the geometry of the glyphs, the contrast of the different typefaces, the x-heights of the typefaces, that sort of stuff. Using a serif with a tiny x-height and a sans serif with a huge x-height may not convey the continuity desired. However, that dichotomy may convey the message very well. A very thin sans serif to offset a very thick serif may be just the "mood" one is shooting for.
Others -----
And after all this.. there are scripts and display typefaces. When to use those and which ones to use again all come down to the message and usage. It's impossible to state when they are appropriate or inappropriate beyond, what I hope, is obvious - no script or display faces for body text, footnotes, disclaimers, etc.
Preference -----
And of course there are personal preferences beyond anything above. If one really dislikes what the glyphs in a particular typeface look like, such as Gil Sans, one never has to use it, even though it may technically fit given the general parameters of a design. Sure you can tell me Palatino works great in that design... but if I just do not like Palatino... I won't use it.

Tl;DR
Type choice and pairing is really an art in itself all dependent upon the message the designer wishes to convey. There are no rules and only some general, loose guidelines based upon the delivery method. Beyond that, it's entirely up to the designer to find typefaces they feel work well given the specifics of any projects. Much like color, balance, white space... type is as subjective as any other aspect of design.
This is by no means meant as a definitely guide to selecting any typeface. Much like the infographic in the other answer, this is just my process and a peek into how I choose typefaces. I expect other designers to have a different process and ultimately come to different conclusions. It's the nature of design that no two designers will arrive at the same destination as they travel through the design process.


What is the best 2D driver for GeForce4 MX 440?

Question: I still haven't upgraded to the latest version of ubuntu because of poor support for this video card. What is the recommended upgrade path to ensure maximum 2D performance?
Answer: What is the driver that you are use? by "Hardware Driver"? If you use the "Hardware Drier" to download the driver, you might want to try using the open source driver, take a look on this: http://www.nvidia.com/object/linux_display_x86_96.43.11.html
Answer: Have you tried running 10.10 via live CD to check performance?
I found this OMG Ubuntu post about fixing the Nvidia driver in 10.10 that may help if the default one is giving you issues, it also links to a Ubuntu Forums post but some of the comments on OMG may be useful.