Python string to two dimensionals list
How do you split a list into evenly sized chunks?
Alright, I have been doing the following (variable names have been changed):   FileInputStream fis = null; try {     fis = new FileInputStream(file);      ... process ...  } catch (IOException e) {     ... handle error ... } finally {     if (fis != null)         fis.close(); }    Recently, I started using FindBugs, which suggests that I am not properly closing streams.  I decide to see if there's anything that can be done with a finally{} block, and then I see, oh yeah, close() can throw IOException.  What are people supposed to do here?  The Java libraries throw too many checked exceptions. nginx support for .htaccess / rewrite rules? Differences from Apache? My daughter applied at the Italian Consulate in Philadelphia, and they gave her two entries for 20 days (we thought it was for 20 days each entry). She was in Italy 12 days, then went to England for 1 week and flew to Venice to take a 10-day cruise. She couldn't make it because they said she has only 8 remaining days, but she still has a land tour already paid this week.  What can she do? Can she extend the Schengen visa for 12 more days? Right now, she is in Madrid, but next week she has to fly from Barcelona to Paris to start with the tour. What would happen if she decides to take the tour with the expired visa? She is a US permanent resident. So I know I've heard this saying in American English before but I just can't quite find the original.  I have come up with several made up variations like:   I don't send the Navy (or whole army, or a battalion) when all you need is a diplomat. Don't buy the whole cow when all you need is milk.   What's the more commonly heard saying/phrase for this of expression? Why is \[ ... \] preferable to $$ ... $$? Direct "rate in iTunes" link in my app? Cannot find hard drives after installing Ubuntu 13.10 Why don't sandwich toasters have an on/off switch? The absolute majority of electrical appliances have an On/Off switch. However, the absolute majority of sandwich toasters do not - you just plug them into the socket and unplug them when you're done. At least, that's the case for all household sandwich toasters I've ever seen. I'm referring to this device, not the vertical toaster (where the lever doubles as a switch):    It looks like some models do have a switch, but apparently these are just the larger/industrial types, not the common variety.  Why is that? I was laying on my bed, reading a book when the sun shone through the windows on my left. I happened to look at the wall on my right and noticed this very strange effect. The shadow of my elbow, when near the pages of the book, joined up with the shadow of the book even though I wasn't physically touching it.   I have posted :The video seems to be the wrong way up, but you still get the idea of what is happening.  What is causing this? Some sort of optical illusion where the light gets bent?  Coincidentally, I have been wondering about a similar effect recently where if you focus your eye on a nearby object, say, your finger, objects behind it in the distance seem to get curved/distorted around the edge of your finger. It seems awfully related...  EDIT: I could see the bulge with my bare eyes to the same extent as in the video! The room was well light and the wall was indeed quite bright. Why does the Replace() string method not modify my string variable? Nvidia graphics card no longer works in Windows 10 (error: Code 43) but works in Ubuntu Currently, when I boot into Windows, one monitor stays black (undetected), and the other can only display 800x600 resolution.  When I look at Device Manager &gt; Display Adapters &gt; NVIDIA GeForce GTX 970 &gt; General &gt; Device Status, it says "Windows has stopped this device because it has reported problems. (Code 43)".  Details &gt; Problem Code says "00002b". Details &gt; Status says:  01802400 DN_HAS_PROBLEM DN_DISABLEABLE DN_NT_ENUMERATOR DN_NT_DRIVER   When I then click into the Events tab, it says "Device PCI\VEN_10DE&amp;DEV_13C2&amp;SUBSYS_29763842&amp;REV_A1\4&amp;25438c51&amp;0&amp;0008 requires further installation."  I have a EVGA Nvidia GeForce GTX 970 graphics card with the latest drivers (376.19 from 12/1/2016).  My Windows 10 Pro has the latest updates and is at Version 1607, OS Build 14393.576.  My ASRock Z170 Pro4 motherboard BIOS is also updated to the latest version (7.00 from 10/4/2016).  I have dual Acer monitors with 1920x1080 resolution.  I downloaded Ubuntu 16.04.1 LTS onto a bootable USB drive and booted into the Ubuntu operating system instead of Windows. Both monitors immediately worked at full 1920x1080 resolution. So the hardware seems functional! My remaining challenge is to figure out why my video card has stopped working within Windows.  What I Have Tried   I've tried using Display Driver Uninstaller from Guru3d in Safe Mode to delete all drivers and try to install fresh.   I've tried many different versions of the driver dating back more than 12 months. I've tried reseating the card. I've tried moving the card to a different slot. EVGA's phone support told me to reinstall windows (Windows &gt; Reset this PC &gt; Keep my files). Unfortunately, I followed their advice (and now don't have any of my programs), and I still get Code 43 with the EVGA Nvidia card.   What I Have NOT Tried   I would love to try installing this card onto a different Windows 10 computer to see what happens, but I don't have access to any other computers. If you live northeast of Atlanta, let me know. ;-)   I'd appreciate any other ideas you have!. Solve $x^2+2=y^3$ using infinite descent? Plurality of verb depending on plurality of list elements This question is also open on EL&amp;U:   Considering the amount of controversy it aroused, I believe it's past "Learners'" level.    An edit was suggested to my sentence.     There was were an orange, some grapes, two apples and a small pile of cherries on the plate.   In my native language plurality of the verb always follows plurality of the first element on the list. There were an orange,... sounds awkward to me, no matter what follows up. My simple solution was reordering:     There were some grapes, an orange, two apples and a small pile of cherries on the plate.   But that's not the first time I faced this situation and I'd like to know what the rules of grammar say about that — was my editor overzealous or am I trying to copy rules of my language that don't apply in English? Is `if (condition = value)` the correct syntax for comparison? Elegant proofs that similar matrices have the same characteristic polynomial? single email limit exceeded salesforce very frequently..? Terminal method of formatting storage drive I want to know how to format a storage drive from the terminal. Helpful things to provide in the answer would be often used options for commands and base knowledge that one can use to extrapolate future uses. Specifically I would like to know how to format in the different file systems such as NTFS, FAT32, EXT4, etc. Information on how to partition the drive via terminal is also wanted.  I am trying to format a high capacity external hard drive (EHDD) into NTFS - from the terminal.   I know I can use gparted for this as well as other GUI programs, but I still want to now how to do it from the terminal. Approximation of measurable function by simple functions Counting buffer overlap in QGIS For my thesis I'm modeling the identification of recreation areas.  Therefore, there has been a survey where people were asked to specify where they recreate. They had to indicate this place on a map and give a radius. Now I have to analyse which areas were most visited, and afterwards use the data to give a weighted rating with the travel distance.  So, I use QGIS to Buffer the data points by using the given radius. Now, I want to calculate for every point in the country how many times it was visited.  Any thoughts how to do this in QGIS? Is reusing old code for a new assignment considered self plagiarism? How to protect yourself if you consider it to be, and a group partner does not?