How do you check the internet connection in android?
How to check internet access on Android? InetAddress never times out
How to make Fedora user a sudoer? Stop setInterval call in JavaScript In Magic, at the start of the game, you draw 7 cards. How would you calculate the likelihood of drawing a specific card in your opening hand?  For example, let's say I have a 60 card deck, and I'm running 4 . What is the percent chance that I will have at least one Bird in my opening hand? What determines SPECIAL inheritance in children? Using a diode to ensure current flows in only one direction, without causing a voltage drop To power my microcontroller (ATmega8), I am using a ~5.4V voltage source. I want to ensure that I don't accidentally connect the voltage source in reverse, and figured a diode would be a nice way to accomplish this as from what I have learned so far, a diode allows current to flow in one direction, and blocks it in the other.  But what I also learned is that diodes create drops in voltage. I have a few of the typical diodes (1N4001, 1N4148, etc.), and would like to use them to achieve the aforementioned result without dropping the voltage as it would be too low to power the IC.  My question is, is there any way to do this with a diode? Or do I need some other component (if so, what would you recommend)? I installed Drush for the first time (so it may be a configuration error) and I'm trying to update to the latest core version of Drupal.  Drush is giving me this error - I'm on an OSX box.  dev5:clientnamedirectory my.name$ drush pm-update projects drupal-7.25 &lt;h1&gt;Additional uncaught exception thrown while handling exception.&lt;/h1&gt;  &lt;h2&gt;Original&lt;/h2&gt;&lt;p&gt;PDOException: SQLSTATE[HY000] [2002] No such file or directory in drupal_get_installed_schema_version() (line 155 of /Users/my.name/Sites/proface/includes/install.inc).&lt;/p&gt;  &lt;h2&gt;Additional&lt;/h2&gt;  &lt;p&gt;PDOException: SQLSTATE[HY000] [2002] No such file or directory in system_list() (line 165 of /Users/my.name/Sites/clientnamedirectory/includes/module.inc).&lt;/p&gt;&lt;hr /&gt;  Drush command terminated abnormally due to an unrecoverable error. Does a fighter's Action Surge trigger Extra Attack? Context  A player in my game will play a fighter with a greatsword. At 5th level he has Extra Attack and the option to use Action Surge. PHB p.72 states:     Action Surge. Starting at 2nd level, you can push yourself beyond your normal limits for a moment. On your turn, you can take one   additional action on top of your regular action and a possible bonus   action.      Once you use this feature, you must finish a short or long rest before   you can use it again. Starting at 17th level, you can use it twice   before a rest, but only once on the same turn.        Extra Attack. Beginning at 5th level, you can attack twice, instead of once,   whenever you take the Attack action on your turn.       The number of attacks increases to three when you reach 11th level in   this class and to four when you reach 20th level in this class.   Confusion  The questions and answers that I find on here deal with multi-classing or Two Weapon fighting specifically, which don't really give a clear yes or no on my question.  The way I read these two features is that when a fighter takes an Attack action, he gets the Extra Attack. After using Action Surge he gets the opportunity to take another Attack action, and with that another Extra Attack. This results in four attacks with the greatsword in one turn, which sounds amazing but also rather powerful. Is this correct, or am I missing something? Why do some games allow offline Steam achievements? I know of  where it is asked if you can get Steam achievements offline. The accepted answer to that was no.   But I do earn achievements for some Steam games while playing in offline mode!  For example, right now I am earning achievements for Cave Story+ as I play in offline mode. In other games I also earn achievements while playing in offline mode. Not just when I am disconnected but still in "online" mode as might be suggested in the linked question.  But what is really bugging me is that this does not happen with all games that have Steam achievements.  So, is allowing offline achievements something that Steam allows, the game devs allow, or is it something decided by a magical elf in the steam servers rolling some d20 dice around?  Edit:  As per request, I was able to attain visual evidence:    You should be able to see the achievement-get in action while in offline mode.  What is worth noting, (and something that I forgot to mention before) is that I only started earning achievements after I had went into online mode with the game installed. This is why I was able to earn this achievement with the ones after unlocked. I had started the game for the first time in offline mode, and did not notice that I was not earning achievements. When I had connected once, I did not have to start the game while online. I was able to earn achievements offline.  I also must state publicly: I do not play on easy. This was for testing purposes only people. It was for Science! Why would layout_width="wrap_content" take up the entire width of the screen? Objective: To separate text column from figures column in every page I don't know if this has been asked before. But so far nothing has come up with my search.  In some books, the figures are placed at the outer side of the page like in the picture below.    Is this achievable in TeX/LaTeX? That is how does one set up the page so that all text will appear in a 'text column' and the figures appear in a 'figures column' in every page? Code coverage for wrapper class is 0% ODBC and ADO connection to SQL Server: What protocol is used when connecting to \? How to execute a JavaScript function when I have its name as a string I have the name of a function in JavaScript as a string. How do I convert that into a function pointer so I can call it later?  Depending on the circumstances, I may need to pass various arguments into the method too.  Some of the functions may take the form of namespace.namespace.function(args[...]). Troubleshoot High CPU usage by the "System" process I have noticed that from some time my system is freezing and its probably caused by the high CPU usage which is caused by the system process.  All applications I'm running is the Skype, TeamSpeak and Chrome so it definitely shouldnt eat that amount of CPU.  You can see the problem itself and running processes in the screenshot below:    Sometimes CPU usage is reaching 90%, but the average usage is like 40-65%.  My PC parameters:   Windows 8 (customer preview) Intel Core i3 - 2350M 8 GB RAM   I'd appreciate any help attempt! Regards.  --UPDATE--  As the user below posted a great answer, I have noticed that the process that is eating the most CPU in the system is called Arthurx.sys, simple google tells that it's a TPLink driver (an wifi adapter, I have bought like 2 weeks ago!) drivers has been installed from the Windows MSDN, but also tried to install the drivers from the attached CD, but it doesn't help. From the system start, it is using like 5% of the CPU only, but after 2-4 hours of working it is growing up and reaching 40-60% of the CPU usage.  Device name: TPLink WN722N Penguin Brainteaser : 321-avoiding permutations There are $k$ penguins, $k\ge 3$. They are all different heights. How many ways are there to order the penguins in a line, left to right, so that we cannot find any three that are arranged tallest to shortest (in left to right order)? The penguin triples do not have have to be adjacent.  This problem is courtesy of someone I know only as "DaMancha." When a 'blur' event occurs, how can I find out which element focus went *to*? Suppose I attach an blur function to an HTML input box like this:  &lt;input id="myInput" onblur="function() { ... }"&gt;&lt;/input&gt;   Is there a way to get the ID of the element which caused the blur event to fire (the element which was clicked) inside the function? How?  For example, suppose I have a span like this:  &lt;span id="mySpan"&gt;Hello World&lt;/span&gt;   If I click the span right after the input element has focus, the input element will lose its focus. How does the function know that it was mySpan that was clicked?  PS: If the onclick event of the span would occur before the onblur event of the input element my problem would be solved, because I could set some status value indicating a specific element had been clicked.  PPS: The background of this problem is that I want to trigger an AJAX autocompleter control externally (from a clickable element) to show its suggestions, without the suggestions disappearing immediately because of the blur event on the input element. So I want to check in the blur function if one specific element has been clicked, and if so, ignore the blur event. How can I get fireworks? What are the requirements for making fireworks appear at the end of a level in the original Super Mario Bros.? What's the best way to season a cast iron skillet? I just purchased a new cast iron skillet. What's the best way to season it?   And if I need to re-season an old pan, is the process any different? I want to trace a border in a box or minipage like this model. A border customizable in left angle on top and right angle in bottom. Somebody can help me? Thanks a lot JPierre Are questions about (development) devices allowed on Stack Overflow? I've seen many questions on Stack Overflow asking which devices are best for developers. This made me wonder if questions asking for hardware device recommendations (best device for programming, best device within a certain budget, etc.) are on-topic for Stack Overflow, or if they should be asked somewhere else?  For Instance check these links:         etc.