how to get a character from stdin without waiting for user to put it?
How to avoid pressing Enter with getchar() for reading a single character only?
The current process for self-deletion of a user account has several problematic aspects, both in the process itself and in the end result. Some of these issues are:   The process requires manual intervention of a mod or SE employee, leading to delays and sometimes mistakes. It is more complicated than it has to be, which can lead to the impression that SE is imposing some rather arbitrary-looking restrictions and steps one has to take. This can give the impression that the user isn't really in control of his private data at SE. It is irreversible once the account is deleted, although an account can be partially reconstructed with a lot of manual effort from an SE developer. There is no real protection against mod/SE employee errors, if an account is deleted in error, there is no easy way to undo the damage. Because it is manual, it consumes the time of SE employees that have to deal with it  (unless  is used), removing useful voting information and annoying users that lose reputation that way.   I'm proposing an alternative way of handling self-deletion that would be automated, and also reversible to some extent, while still being pretty much a hard-delete (and not a soft-delete that would be problematic with respect to user privacy). The process would work roughly like this:   The user clicks a "delete profile" button in his profile. There should be a way to indicate if you want to delete all profiles on all SE sites, only on this site and a way to select multiple sites from a list where the profile should be deleted. It is verified that the user has true access to the account in some way (confirmation mail?) and not just someone that found the unlocked computer of the user. A countdown until deletion is started (I'd go with 48h, but that could be different). The timer shouldn't be too long, but long enough to correct mistakes and leave users a bit of time to reconsider. Alternative options would be to enable users to override the countdown if they really want to nuke their account immediately. Another option would be to soft-delete the account immediately, and make the countdown only for hard-deletion of the user data. Upon deletion, the posts of the user and his votes are transferred to a newly created blank account, the original account itself is hard-deleted with all the remaining data it contains. The dummy account that holds the user's data should be flagged in some way as deleted, so that the profile links will be disabled, the profile won't be accessible and it won't appear in any user lists.  The user receives a private code that can be used to claim ownership of the account. Other ways are not possible as all private information is removed about the account. This allows for an automatic way of reclaiming most of the important parts of a deleted account. The ability to restore a deleted account might have to be somewhat restricted to avoid misusing it to get rid of the account history. It is more meant as an additional safeguard so that account reconstruction is more easily possible in rare cases. Such additional safeguards might be necessary as the deletion itself would be automatic and without oversight from SE or moderators.   I personally think that the information which posts and votes were connected to a (now anonymized) account is not sensitive enough that it would have to be removed on account deletion. My idea is that this would be close enough to a hard-delete that it satisfies any privacy concerns, but still allow reassociation of posts with a recovered account. The partial reversibility would alleviate concerns about removing the manual oversight by mods and SE employees over the account deletion process. I'm planning to attend a Californian university as a visiting scholar (not paid by the university) on a J-1 visa, for a total of four weeks; a colleague of mine will do the same, but for 12 weeks. I've been told (personally, ie. no citable sources) that, if you're staying on a J-1, you're effectively a California resident for the time you're there, and, therefore, need a Californian driver's license.  I've read up on this and found  that states:     If you are a visitor in California over 18 and have a valid driver   license from your home state or country, you may drive in this state   without getting a California driver license as long as your home state   license remains valid.      If you become a California resident, you must get a California driver   license within 10 days. Residency is established by voting in a   California election, paying resident tuition, filing for a homeowner's   property tax exemption, or any other privilege or benefit not   ordinarily extended to nonresidents.   I'm not planning to vote in any elections, nor will I own a home there, but I'm not sure what would constitute "privileges or benefits not ordinarily extended to nonresidents".  Do we need to get driver's licenses in California, or can we use our foreign licenses? How about day trips to Arizona or Nevada?  Note: this seems to be related to , but my question is specifically about staying there on a J-1. Does a character with 10 Constitution only need to eat every 4 days? According to the food rules,     A character can go without food for a number of days   equal to 3 + his or her Constitution modifier (minimum   1). At the end of each day beyond that limit, a character   automatically suffers one level of exhaustion.   A normal day of eating resets the count of days   without food to zero.   According to this, a character with a Constitution modifier of 0 can eat normally every 4th day*, and get no penalties from hunger despite only eating twice a week. This seems a tad ridiculous, and I'm wondering if there are other rules that I'm missing that make it a bad idea to eat less often like this, or if eating every 4th day is a totally fine thing to do, by the rules.  * They can get away with four days, because they'll only get the exhaustion penalty if they don't eat by the end of the fourth. This is even assuming the 'minimum 1' doesn't apply to the con mod portion. When $f(x+1)-f(x)=f'(x)$, what are the solutions for $f(x)$? The question is:     When $f(x+1)-f(x)=f'(x)$, what are the solutions for $f(x)$?   The most obvious solution is a linear function of the form $f(x)=ax+b$. Is this the only solution?  Edit  I should add that $f:\mathbb R\to\mathbb R$ to the question. Do Indian passport holders with UK Tier 2 need to get a tourist visa for Mexico? I'm an Indian passport holder currently resident in the UK under a Tier 2 (General) visa and planning on going to Mexico on a holiday. So I was looking into the rules on the Mexican embassy in the UK and :     According to the new regulations who entered into effect on 18th, May   2016 (article 26 of the Guidelines and Requirements for Migratory   Services) regarding foreign nationals visiting Mexico, holders of a   valid UK visa, regardless their nationality, are not required to apply   for a Mexican visa as a tourist, business (Non-Lucrative Activities)   or transit visitors for a stay of up to 6 months. This regulation does   not apply to British Travel Document holders.   However, :     PERMANENT RESIDENT IN THE UK (ILR / ILE / PERMANENT RESIDENTS)        According to Mexican regulations which came into force in June 2009,   Permanent residents in the United Kingdom wishing to travel to Mexico   do not require a visa to enter the country as tourists or business   visitors for up to 180 days and as visitors in transit for up to 30   days, regardless their nationality.   So which one is correct? Are Tier 2 holders with an Indian passport allowed visa-free / visa on-arrival entry to Mexico? Using Vim I often want to replace a block of code with a block that I just yanked.  But when I delete the block of code that is to be replaced, that block itself goes into the register which erases the block I just yanked. So I've got in the habit of yanking, then inserting, then deleting what I didn't want, but with large blocks of code this gets messy trying to keep the inserted block and the block to delete separate.  So what is the slickest and quickest way to replace text in Vim?   is there a way to delete text without putting it into the register? is there a way to say e.g. "replace next word" or "replace up to next paragraph" or is the best way to somehow use the multi-register feature? What are these  error below ?  Package natbib Warning: Citation `Krishna2014' on page 16 undefined on input li ne 502.  [16 &lt;./figure/aks smr.png&gt;] [17] [18] ! Undefined control sequence. l.560 \Bibliography                    {figure/bib} How do I find the particular solution of this second order inhomogenous differential equation? (Using undetermined coefficients).  $y''-4y'+5y = 4e^{2x} (\sin x)$  I can find the generel homogenous solutions but I need help for the particular. Is there a command where I can teleport myself to a specific kind of block? I can't find my house and I have specific kind of blocks in it like beacons, enchantment tables, furnaces, stuff like that. I didn't put a bed and I never viewed the coordinates. How do I uninstall xcode 5 command line tools? "I only teach you" vs. "I teach only you" vs. "I teach you only" I only teach you.   I teach only you.   I teach you only.      I think that all the sentences have same meaning, but my teacher says that they are different from each other.  I think that the expressions are different but their meaning are same.  Can you help me understand the meaning of each sentence? CSS Display an Image Resized and Cropped I want to show an image from an URL with a certain width and height even if it has a different size ratio.  So I want to resize (maintaining the ratio) and then cut the image to the size I want.  I can resize with html img property and I can cut with background-image.  How can I do both?  Example:  This image:     Has the size 800x600 pixels and I want to show like an image of 200x100 pixels   With img I can resize the image 200x150px:  &lt;img      style="width: 200px; height: 150px;"      src="http://i.stack.imgur.com/wPh0S.jpg"&gt;    That gives me this:    &lt;img style="width: 200px; height: 150px;" src="https://i.stack.imgur.com/wPh0S.jpg"&gt;       And with background-image I can cut the image 200x100 pixels.  &lt;div      style="background-image:            url('https://i.stack.imgur.com/wPh0S.jpg');      width:200px;      height:100px;      background-position:center;"&gt;&amp;nbsp;&lt;/div&gt;    Gives me:        &lt;div style="background-image:url('https://i.stack.imgur.com/wPh0S.jpg'); width:200px; height:100px; background-position:center;"&gt;&amp;nbsp;&lt;/div&gt;      How can I do both?  Resize the image and then cut it the size I want? Why is there a mismatch between size reported by LVM and the size reported by df -h? I'm new to LVM and have been very confused by this:  I am transfering a large file to a partition that I thought had about 1.5 terabytes of space on it.  Near the end of the transfer, rsync exits with an error claiming that the partition is full.  I investigate and find the following:  $ sudo lvm lvs   LV        VG     Attr   LSize   Origin Snap%  Move Log Copy%  Convert   home      system -wi-ao  97.66G                                         log       system -wi-ao  48.81G                                         log.audit system -wi-ao   9.75G                                         root      system -wi-ao 341.59G                                         swap      system -wi-ao   4.88G                                         temp      system -wi-ao  97.66G                                         var       system -wi-ao   1.46T     This seems to imply that /var (the partition that I'm transfering to, has the amount of storage I expect.  However, then I see:  $ sudo df -h Filesystem            Size  Used Avail Use% Mounted on /dev/mapper/system-root                       331G  1.3G  313G   1% / /dev/mapper/system-temp                        95G  188M   90G   1% /tmp /dev/mapper/system-var                        95G   90G     0 100% /var /dev/mapper/system-home                        95G  188M   90G   1% /home /dev/mapper/system-log                        48G  264M   45G   1% /var/log /dev/mapper/system-log.audit                       9.5G  340M  8.7G   4% /var/log/audit /dev/sda1              99M   25M   70M  26% /boot tmpfs                 8.0G     0  8.0G   0% /dev/shm   I'm guessing this has something to do with the volume being resized at some point.  While I have reliable backups, I'd rather not interrupt services for the time it will take to get the backup and restore.  Thus, is there anyway to make the filesystem seen by the OS match the space available according to lvm without losing data? I want to return two objects from a Java method and was wondering what could be a good way of doing so?  The possible ways I can think of are: return a HashMap (since the two Objects are related) or return an ArrayList of Object objects.  To be more precise, the two objects I want to return are (a) List of objects and (b) comma separated names of the same.  I want to return these two Objects from one method because I dont want to iterate through the list of objects to get the comma separated names (which I can do in the same loop in this method).  Somehow, returning a HashMap does not look a very elegant way of doing so. Do separate autofocus motors exist for entry level Nikon DSLRs? Ragged Right linebreaking, such that the last line is fullest, and the first most empty Omitting the Milliseconds in a Date How to add context menu item for files in general, in Windows? in order to add context menu for directories and explorer background, one can follow instructions .   To add context menu for specific file extensions, one can follow instructions   but I can't seem to find a way to add context menu items for all files? Why is there a B in my flair? This was originally noticed and fixed back around the beginning of July. As of August 1, this problem seems to have returned. New bug report is here:   I just happened to notice that my SO flair has some sort of a B icon right before my username (instead of the expected site icon) Snapshot of the unknown icon:    My current (live) flair for monitoring:  It currently showing up like this for all users on all sites, but not on Combined or Meta flairs. For example Jon Skeet flair on programmers:    Live flair: How to determine if string contains specific substring within the first X characters