How to avoid tons of `instanceof` in collision detection?
Updating entities in response to collisions - should this be in the collision-detection class or in the entity-updater class?
Proving an inequality involving the logarithm function: $\frac{1}{n+1} \leq \ln \left(1+\frac 1n\right) \leq \frac 1n$ The question is to prove the inequality $$\frac{1}{n+1} \leq \ln \left(1+\frac 1n\right) \leq \frac 1n\\\forall n \geq 1, n\in \mathbb N$$  I tried using Taylor expansion but couldn't figure out anything. Any ideas? Thanks. How to connect an LED indicator to a circuit? I would like to know how can i add a safety switch with an LED indicator to a circuit , so that if the safety switch is on then the LED lights , and when i want to use the device , all what i have to do is to press the normally-open switch.   I have attached this schematic and im not sure if it will work correctly  ,as i am a very beginner in electronics   Thanks How do you create product mock-ups? Conjugate class in the dihedral group List all the conjugate classes in the dihedral group of order $2n$ and verify the class equation.  The dihedral group is generated by two elements $r$ and $s$.   The order of $r$ is two since $r^2=e$ and $s$ is $n$ since $s^n = e$. And I know all elements can be produced as either $s^k$ or $rs^k$. How can I list all the conjugacy class? How do I make Ubuntu not require a password to supend? Are there tips and tricks to overcome a fear of flying? Are there tips and tricks for people with fear of flying that can makes them have a more pleasant experience when flying? I know drugs can do magic, and . I'm ideally after official advice and recommendations, but other tips and tricks would be nice as well. OpenCV argc and argv confusion Has anyone had any success using twitters typeahead.js within visualforce pages? I am trying to get  to work within salesforce visualforce pages.  I have a basic vf page from  example, but it does not respopnd, I suspect there may be some "unknown" workaround needed? Does anyone know?  &lt;apex:page standardController="Contact" showHeader="false" sidebar="false" docType="html-5.0"  standardStylesheets="false"&gt;  &lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"&gt;&lt;/script&gt; &lt;script src="http://twitter.github.io/typeahead.js/releases/latest/typeahead.bundle.js"&gt;&lt;/script&gt;      &lt;div id="the-basics"&gt;   &lt;input class="typeahead" type="text" placeholder="States of USA"/&gt; &lt;/div&gt;  &lt;script&gt;     var substringMatcher = function(strs) {       return function findMatches(q, cb) {         var matches, substrRegex;          // an array that will be populated with substring matches         matches = [];          // regex used to determine if a string contains the substring `q`         substrRegex = new RegExp(q, 'i');          // iterate through the pool of strings and for any string that         // contains the substring `q`, add it to the `matches` array         $.each(strs, function(i, str) {           if (substrRegex.test(str)) {             // the typeahead jQuery plugin expects suggestions to a             // JavaScript object, refer to typeahead docs for more info             matches.push({ value: str });           }         });          cb(matches);       };     };      var states = ['Alabama', 'Alaska', 'Arizona', 'Arkansas', 'California',       'Colorado', 'Connecticut', 'Delaware', 'Florida', 'Georgia', 'Hawaii',       'Idaho', 'Illinois', 'Indiana', 'Iowa', 'Kansas', 'Kentucky', 'Louisiana',       'Maine', 'Maryland', 'Massachusetts', 'Michigan', 'Minnesota',       'Mississippi', 'Missouri', 'Montana', 'Nebraska', 'Nevada', 'New Hampshire',       'New Jersey', 'New Mexico', 'New York', 'North Carolina', 'North Dakota',       'Ohio', 'Oklahoma', 'Oregon', 'Pennsylvania', 'Rhode Island',       'South Carolina', 'South Dakota', 'Tennessee', 'Texas', 'Utah', 'Vermont',       'Virginia', 'Washington', 'West Virginia', 'Wisconsin', 'Wyoming'     ];      $('#the-basics .typeahead').typeahead({       hint: true,       highlight: true,       minLength: 1     },     {       name: 'states',       displayKey: 'value',       source: substringMatcher(states)     }); &lt;/script&gt; TeX support works fine in question and answer bodies, and comments can be rendered manually by tapping and selecting Render MathJax. See related question .  However, the titles are not rendered which makes the browsing experience less than perfect. See screenshot below.   Are there any plans to implement MathJax support in titles?  (I'm running Stack Exhange iOS App Version 1.0.0 on an iPhone 4S with iOS 7.1.1)    EDIT: I was just informed about  asking for the same functionality for the Android app. I guess I shouldn't hope too much then... SQL Server 2012 and 2016 Standard:  If I put if-else logic in a stored procedure to execute one of two branches of code, depending on the value of a parameter, does the engine cache the latest version?  And if on the following execution, the value of the parameter changes, will it re-compile and re-cache the stored procedure, since a different branch of the code must be executed? (This query is quite expensive to compile.) I've tried everything I can think of. Resetting the router, changing the channel number and band.   The internet connection is fine, and then just hangs for a minute or 2, then returns to normal.   The wifi icon remains connected, and I have the latest 10.10.4 update installed. At first I thought it was a DNS bug with Yosemite, and have played with the settings such as changing DNS provider, changing the IPV6 to IPV4 only etc.  Driving me nuts. Has anyone had a similar problem? I've checked the surroundings with wifi scanners and have chosen the best channel available.     One thing I have noticed, it seems a lot more reliable on 5GHz as opposed to 2.4Ghz It seems to affect my Macbook Pro Retina 13in Early 2015 a lot more than the other devices on the network. I'm using a Virginmedia  1. Adding columns to production tables What's the best way to add columns to large production tables on SQL Server 2008 R2? According to Microsoft's books online:     The changes specified in ALTER TABLE are implemented immediately. If the changes require modifications of the rows in the table, ALTER TABLE updates the rows. ALTER TABLE acquires a schema modify lock on the table to make sure that no other connections reference even the metadata for the table during the change, except online index operations that require a very short SCH-M lock at the end.   (http://msdn.microsoft.com/en-us/library/ms190273.aspx)  On a large table with millions of rows, this can take a while. Is taking an outage the only option? What's the best way to handle this kind of situation? Sole survivor of attack on mining vessel, abandoned by his employer, has ability to teleport There's a story my grandpa use to tell me when I was younger, about the sole survivor of of an attack on a mining vessel in space. The man lives in space for months/years, ignored by the company he worked for and never rescued. Then when he thinks he is being rescued, it's actually another set of raiders who attack him and kidnap him.  He then wakes up in captivity in some sort of prison inside of an asteroid, and has a word tattooed on his forehead. My grandpa called him Ronin (that's what the tattoo on his forehead said) but I don't know what the character's real name is. Anyways, he learns that he has the ability to teleport after having a brush with death and decides to make his way back to Earth so that he can exact revenge on the mining company who abandoned him and left him floating to die.  Does anyone know what this story or book may be? My grandpa told it to me when I was little, he said that he got it from a book he use to love reading when he was younger. I'm assuming the book is very old (possibly pre 1940's as he was born in the 20s). I can't ask him as he is no longer alive. I'm also unsure as to whether or not all the details in the story he told me, are the same as in the original. Set same icon for all my Forms Is there any way to set the same icon to all my forms without having to change one by one? Something like when you setup GlobalAssemblyInfo for all your projects inside your solution. How do I run an executable using Lua? Deciding whether two metrics are topologically equivalent in the space $C^1([0,1])$ Consider the space $C^1([0,1])$ and the function $d:C([0,1])\times C([0,1]) \to \mathbb R$ defined as $d(f,g)=|f(0)-g(0)|+sup_{x \in [0,1]}|f'(x)-g'(x)|$. Decide whether the metrics $d$ and $d_{\infty}$ are topologically equivalent in $C^1([0,1])$ (where $d_{\infty}=sup_{x \in [0,1]}|f(x)-g(x)|)$  My attempt at a solution:  If two metrics are topologically equivalent, then they have the same convergent sequences. Honestly, I couldn't do anything. I am trying to define a sequence of functions $\{f_n\}_{n \in \mathbb N}$ such that $f_n \to f$ in, for instance, $(C^1([0,1]),d)$ but $f_n \not \to f$ in $(C^1([0,1]),d_{\infty})$. Could it be this two metrics are topologically equivalent? If this is the case, how could I prove it? If not, I would appreciate any hint to find an adequate sequence of functions that works for what I am trying to prove. How do I get the difference between two Dates in JavaScript? I'm creating an application which lets you define events with a time frame.  I want to automatically fill in the end date when the user selects or changes the start date.  I can't quite figure out, however, how to get the difference between the two times, and then how to create a new end Date using that difference. What does “{} \;” mean in find (in Linux)? Sometimes I see a command like  find . -name * -exec ls -a {} \;   I was asked to execute this.  What does {} \; mean here? How to make putty to not break my session after some time? Should I install graphics card drivers from Windows Update?