I am trying to detect if an iphone/ipod is jailbreak. Then I thought the application could try to access a file outside its area, for example, try to see if MobileMail.app is there...  here is the code  NSString *filePath = @"/Applications/MobileMail.app"; if ([[NSFileManager defaultManager] fileExistsAtPath:filePath])     {         NSString *title = @"problem";         NSString *message = @"you are using a jailbroken iphone";         NSString * buttonOK = @"OK";          UIAlertView *alert = [[UIAlertView alloc] title message                           delegate:self  cancelButtonTitle: buttonOK   otherButtonTitles:nil];           [alert show];           [alert release];        }   as jailbroken iphones can access areas outside its sandbox and the normal iphone can't, this code, in theory, would show if a device was jailbroken or not, but this is the problem.  Someone raised the point that Apple could not approve an application using this code as it may think the Application was trying to access a file outside its sandbox.  Is this true? If yes, can you guys suggest any other code that could verify if the application is running on a jailbreak device?  thanks for any help.
If I want my app to behave differently on a jailbroken iPhone, how would I go about determining this?
$$\sum_{n = 1}^\infty \frac{(-1)^n}{p_n}$$ where $p_n$ is the $n$th prime.  I have computed this to 10000 rather than infinity. My results suggest that convergence does happen but it's very slow. But I can't even be sure about the first few digits: $-0.26959$?  I have looked at the "questions that may already have your answer" and some of the "similar questions," but they involve somewhat different formulas. How do I model the fighter's Great Weapon Fighting fighting style in Anydice? I was trying to create an AnyDice function to model the Great Weapon Fighting fighting style (which lets you reroll 1s and 2s), but I couldn't get it to work on any arbitrary dice.  I've found this one:  function: reroll R:n under N:n {    if R &lt; N { result: d12 } else {result: R} } output [reroll 1d12 under 3] named "greataxe weapon fighting"   And it works fine. But I don't know how to make the function generic so i don't need to change the d12 every time i want a different dice to reroll.  I've tried  function: reroll R:n under N:n {    if R &lt; N { result: d{1..R} } else {result: R} } output [reroll 1d12 under 3] named "greataxe weapon fighting"   but it is not giving the right probabilities. Maybe if I could fetch the die size inside the function... Can a 3rd party app *technically* take better pictures? I've seen in several forums that some phones have very good cameras and the photos  taken are compressed too much and the details are lost.  I was wondering whether a 3rd party application (forgetting the post processing done by the application) have access to the full resolution image without any compression.  So can another application access the raw data from the camera or all applications gets the same raw data when they access the camera? Combining multirow and multicolumn What should be done with questions that have been resolved as a comment instead of an answer? I'm trying to go through and provide answers to every unanswered question (search &quot;closed:0 answers:0&quot;), somewhat following the spirit that was blogged about at  .  However, I'm finding this much more difficult than it needs to be, as many of the questions have already been answered without the use of an &quot;answer&quot; - but instead, in the form of a comment by either the OP or another poster. I wouldn't mind reading through and skipping these, as long as there was some appropriate action I could take to at least assist with preventing these questions from being seen again from the same query - either by myself or another SO member.  Is there such an appropriate action?  Should we vote to close?  If so, using what reason? Even if I vote to close, what are the chances that 4 other users will also view the question and also vote to close?  (i.e., will my individual vote even do any good?  Is there any report to show recent close votes, so that others may also review and contribute supporting close votes?) Should we post some sort of an answer - even just something to the effect of &quot;this was already answered by the OP's own comment to his answer (above)&quot;? Would something like this be appropriate to flag for moderator attention, and let the moderators deal with it?  (Or would this be considered too trivial?) Should we rename the question title to something standard that can be used in a search exclusion?  (Maybe &quot;SOLVED:&quot;?)  Basically, how can I help to denote questions as &quot;This question is no longer in active search of an answer - though better answers may still be appreciated.&quot;? I've already reviewed , which was closed as a duplicate of  - but this requires effort on part of a user who may very likely no longer be active. Otherwise, is there something I should be doing to improve my search to filter out these types of questions? I've run across this many times, so I don't consider it to be a rare issue.  However, the last question like this I just ran across, prompting this question, was .  In this case, the question was self-answered by the OP in the form of a comment, this question is the OP's only question, the OP has no other visible activity on SO, and the OP hasn't been seen on SO since he registered and posted the question 5 months ago. Another one I just ran across is .  However, here the &quot;answer&quot; comment was posted by a reputable and recently active SO member.  Should I leave a comment directed at him, asking him to re-post his comment as an answer, or should I post my own answer echoing his comment?  (Or something else?) Yet another is .  Interestingly, the OP actually self-edited the question to include the &quot;SOLVED:&quot; prefix on to the question, instead of posting his resolving comment as an answer (and ideally accepting it) as he was asked to do by another comment.  This brings up another good idea - is there a &quot;standard&quot; we should use to rename the titles on these &quot;resolved but unanswered&quot; posts that could be used as a search exclusion?  (Also added to the above list.) I am developing an application and can not figure out a proper abstract term that would fit an interface that defines an object as Movable and Resizable (In essence, something that has a defined size and defined position). Calling it Movable and resizable is kind of silly. Layout was a term that came to my mind but it is not good as layout is something that is responsible for defining position and size, not containing it. Thanks a lot. I have an odd error that I have been unable to find anything on this. I wanted to change the user comment with the following command.  $ sudo usermod -c "New Comment" user   This will work while logged onto a server but I want to automate it across 20+ servers. Usually I am able to use a list and loop through the servers and run a command but in this case I get a error.  $ for i in `cat servlist` ; do echo $i ; ssh $i sudo usermod -c "New Comment" user ; done  serv1 Usage: usermod [options] LOGIN  Options: lists usermod options  serv2 Usage: usermod [options] LOGIN  Options: lists usermod options . . .   When I run this loop it throws back an error like I am using the command incorrectly but it will run just fine on a single server.  Looking through the ssh man pages I did try -t and -t -t flags but those did not work.  I have successfully used perl -p -i -e within a similar loop to edit files.  Does anyone know a reason I am unable to loop this? How do I handle partially correct edits in the Suggested Edits review queue? Contradicting Instructions While going through the suggested edits review queue, one sometimes stumbles upon partially useful edits like . Trying to follow the instructions listed in the descriptions doesn't lead to a conclusive answer. Considering our example:   Approve edits that clearly improve the post ↳ No, not *clearly* Improve Edit when you can make additional improvements to the post ↳ I most definitively can Reject and Edit to replace an ineffective edit with your own substantive changes ↳ It is ineffective in the sense that it made the post worse overall (imho) Reject edits that fail to improve the post or that make it worse ↳ Like the last option: yes Skip if you are not sure and want to go to the next suggested edit ↳ Well, yes. But that is really why I am here, asking this question   Reasoning about the remaining Choices This leaves us with three choices: Improve Edit, Reject and Edit and Reject (the last one slightly modified):  Improve Edit  + Acknowledges that some things in the edit where correct - Learning effect for author might vanish, as the improvement might get overlooked - Can't leave a custom message for edit author (except in comments, which pollutes the thread) - Doesn't trigger the system which &quot;punishes&quot; users who repeatedly have their edits rejected - Rewards the edit author with reputation for a poor edit   Reject and Edit  + Clearly shows the author that there were problems with the edit - Still can't leave a custom message explaining the problems of the original post. - One has to partially redo parts of the edit that have just been rejected, which might feel unjust to the original editor   Reject with a custom note and come back immediately to make a good Edit  + Clearly shows the author that there were problems with the edit + Possibility to leave an explanation as to what was wrong with the edit - One still has to redo parts of the edit that has just been rejected - Seems to be a weird workaround for Reject and Edit   Something else?   Each of the three options come with their distinct advantages/disadvantages making it non trivial to decide which one to pick.  Or does the answer simply depend on the quality of the edit? Like:  Improve Edit for subjectively slightly positive edits Reject and Edit (Or Reject and Edit) for subjectively slightly negative edits How to find distance from the latitude and longitude of two locations? I recently got the book "selected problems in real analysis", and I'm stuck solving the very first problem  $(u_n)$ is a binary sequence iff it only contains $0$ and $1$ in the sequence  Let $A$ be the set of all binary sequences  I have to prove that $A$ and ${2}^{\mathbb{N}}$ have the same cardinality, that is to say there exists a 1-1 function from one set to another  I've thought about maybe considering integers as base-2 numbers  Thanks for your help When I use any variation of English, US international (with dead keys,altGr dead keys or alternative) on my Linux Mint machine I always encounter this behaviour. When I press one of these keys: ' " and then follow them with a 'non-accentable' character like a [ or a b no output comes out at all.    Whereas in Windows US-International it would print [ or b. If I wanted to type this I would have to escape each dead key with a space instead of with any 'non-accentable' character. This is annoying when programming (not really, but I trained with the Windows 'Qwerty International' on typing.io and switching back and forth between the systems is irritating).    Is there any way to change that so it works like in Windows? I'm currently an M. Phil student in Math and I failed a course last semester because I was not able to hand in a home work assignment (which was worth 40% of my grade) on time (I was 30 minutes late).   Apart from that I'd say I'm a fairly decent student, I got an upper second class honours bachelors degree, I have a B+ and A's for all my other courses in my current programme and I'm almost finished with my first paper to be published.   I've however been deeply worried about this failure as it would reflect poorly on my transcript if I were to apply to a Ph.D or another Master's programme.   Will my failing grade affect my chances of getting into a competitive programme or greatly lower my chances of getting a scholarship? Derive a formula to find the number of trailing zeroes in $n!$ Possible Duplicate:          I know that I have to find the number of factors of $5$'s, $25$'s, $125$'s etc. in order to do this. But how can you derive such a formula for any number $n$? Arrow keys, Home, End, tab-complete keys not working in shell I have installed ubuntu minimal(mini.iso) on my vm. I then used recovery mode to login as root and create an account with useradd -m admin and then set a password with passwd admin.  When I login on the new account, instead of the normal prompt I only see a $ sign. If I try to tab-complete a command or file name it prints a normal tab. If I try to use the arrow keys it prints ^[[A, ^[[B, ^[[C or ^[[D. Also, ls no longer adds colors.  None of these problems were in recovery mode. How can I fix this? Why would turning off a sink faucet stop the shower? Zero-dimensional ideals and finite-dimensional algebras Can I use Wi-Fi and cable (Ethernet) networking at same time? I am on an intranet that is not connected to the Internet and a Wi-Fi router with connection to the Internet. When I am connected to the wireless network, I can browse the Internet, but I cannot browse my LAN with my Ethernet cable connected.  How can I browse the Internet via my Wi-Fi router and at the same time browse my local LAN web application via my connected Ethernet cable? I'm trying to set up a way for me to just type newjournal, and a new journal entry named year-month-date-time.txt is created in a year subdirectory in ~/documents/journals.   I've got it set up as an alias using the following:  alias newjournal='nano /home/username/documents/journals/'$(date +%Y)'/'$(date +%F-%k%M).txt''   So the year subfolder resolves correctly, and seemingly so does the first half of the date command. Tried appending the alias with sudo, didn't help.  Issue: For some reason, when I do this command the time value (%k) resolves to a few minutes ago... or maybe the last time nano ran this filename, maybe it's called an old buffer?   When I logoff it makes the correct file, then I save, wait a few minutes and try again, and it edits the old file instead of making a new one. Even if I remove the old file, it creates a new file with the old filename (incorrect time).  Here's a screenshot of what I'm trying to explain. Here I create a newjournal, save in nano within a second or two of executing the command, print the correct date/time, list the file that was created. Note the incorrect filename time (1249, as apposed to 13:11):    Anyways, it might be something simple, but I've tried different methods in the alias, such as putting double quotes around the whole thing and escaping properly, single quoting, escaping and spacing, etc.  Thanks for the read/help. Ubuntu 16.04 server.  EDIT: Here's the final alias that worked:  alias newjournal='nano /home/user/journals/"$(date +%Y)"/"$(date +%F-%H%M).txt"'   Needed to double quote the date commands inside the overall single-quoted alias. \documentclass[11pt]{article}  \begin{document}   The above equations on application of Laplace Transform become:  $$sL_1\hat{i}_{L1}(s) = D\cdot \hat{v}_{C1}(s) + D\cdot \hat{v}_{C2}(s) - D\prime \cdot \hat{v}_g(s) + (C_{C1} + V_{C2} - V_g + V_D)\cdot \hat{d}(s)$$ $$sL_2\hat{i}_{L2}(s) = -D\prime \cdot \hat{v}_{C1}(s) + D\cdot \hat{v}+{C2}(s) + D\prime \cdot \hat{v}_g(s) + (C_{C1} + V_{C2} - V_g + V_D)\cdot \hat{d}(s)$$ $$sC_1\hat{v}_{C1}(s) = -D\cdot \hat{i}_{L1}(s)+ D\prime \cdot \hat{i}_{L2}(s) + (-I_{L1} -I_{L2} - I_1)\cdot \hat{d}(s) -D\prime \cdot \hat{i}_l(s)$$ $$sC_1\hat{v}_{C1}(s) = D\prime \cdot \hat{i}_{L1}(s)- D\cdot \hat{i}_{L2}(s) + (-I_{L1} -I_{L2} - I_1)\cdot \hat{d}(s) -D\prime \cdot \hat{i}_l(s)$$ $$sL_l\hat{i}_l(s) = D\prime \cdot \hat{c}_{C1}(s) + D\prime \cot \hat{v}_{C2}(s) - D\prime \cdot \hat{v}_g(s) +(V_g - V_D - V_{C1} - V_{C2})\cdot \hat{d}(s) - R_l \cdot \hat{i}_l(s)$$  \end{document}   Error:   181 Underfull \hbox (badness 10000) in paragraph at lines 181--181 181 Overfull \hbox (22.63293pt too wide) detected at line 181 I mean are we certain that they will be able to provide us a huge improvements (in some tasks) compared to clasical computers?