Django 1.5 manage.py shell doesn't keep up with database - need to disable caching?
How to disable Django query cache?
Traveling to the US with new passport, visa on the old one I have a valid B1/B2 US visa expiring about a year from now. The passport it's in expired a few years ago, and I recently got a new one.   The passport number does not match, but the national ID number, mentioned in both, does (it used to be the same as your national ID, but not anymore)  Can I travel to the US carrying both passports? Or is it asking for trouble? (I read a few years ago that it was possible, but that might have changed)  Should I just get a new visa to avoid potential complications? In The Force Awakens, we see Rey pouring some flour-like polystarch rations into water so that the flour amazingly transforms into something that looks like bread. What are these rations? Is there any documentation of the fictional chemistry and biology that makes the starch rations behave as they do? How do I convert, NSDate to NSString so that only the year in @"yyyy" format is output to the string? Limit $ a_{n+1} = \frac{1}{3}(2a_n + \frac{5}{a_n^{2}}), a_1 > 0 $ Let $ a_{n+1} = \frac{1}{3}(2a_n + \frac{5}{a_n^{2}}), a_1 &gt; 0 $. Show the sequence converge and find it's limit.    I did the following:  We see that $a_n$ is positive for every n obviously (considering $a_1 &gt; 0$). Then:  $$ a_{n+1} - a_n = \frac{2a_n^{3} + 5}{3a_n^{2}} - a_n = \frac{5 - a_n^{3}}{3a_n^{2}}$$  We see that for each $a_n &gt; ^3\sqrt{5}$ the sequence is decreasing. That means the proof collapses to prove  $a_n &gt; ^3\sqrt{5}$ in order for $a_n$ to be decreasing. Suppose $ a_n &gt; ^3\sqrt{5}$ then obviously $a_{n+1} = \frac{2a_n^{3} + 5}{3a_n^{2}} &gt; \frac{2(\sqrt[3]{5})^{3} + 5}{3(\sqrt[3]{5})^{2}} = \sqrt[3]{5}$ so we deduced $a_{n+1} &gt; ^\sqrt[3]{5} $.  (It's important to note $a_1$ might be less then $\sqrt[3]{5}$, hence the sequence will decrease from the second element.) So we observed $a_n$ is always positive and decreasig hence it's bounded below so it's bounded. As for it's limit:   $$\begin{align} L = \lim_{n \to \infty} a_{n+1} = \lim_{n \to \infty} \frac{1}{3}(2a_n + \frac{5}{a_n^{2}}) = \frac{1}{3}(2L + \frac{5}{L^{2}}) =  \sqrt[3]{5}\end{align}$$  I'm not sure as of the correctness of the solution. I'm aware that it's not a contradiction because it only implies it's in the epsilon-environment of $\sqrt[3]{5}$, or rather in this case $(\sqrt[3]{5}, \sqrt[3]{5}+\epsilon)$.  Is it correct?  EDIT: If anyone encounter a question in the likes, to sum it up you obviously should show the sequence is montonic and bounded. In this case for example we can show it using AM-GM inequality to see the sequence is bounded by $\sqrt[3]{5}$ and then in the difference of two consequective elements we see the difference is negative due to every element being greater then the third root of 5. From here we know the sequence is bounded below and decreasing hence it's bounded. If we plug in the limit of the sequence to itself we will see it's the third root of five. And that's it. Is an expanding map on a compact metric space continuous? I have this problem as part of a school assignment:  NOTE: In case it's hard to read in the image above, here's the directory tree: $ tree . `-- sample_dir1     `-- sample_dir         |-- admin         |-- cambridge         |   |-- cafeteria         |   |-- library         |   `-- security         |       |-- annex         |       |-- building         |       `-- parking         |-- faculty         |-- history.exe         |-- markham         |   |-- annex         |   |-- building1         |   `-- parking         |-- oxford         |   |-- outline.doc         |   |-- programming         |   |   `-- report.pdf         |   `-- security         `-- stenton             |-- gen_ed             `-- lib_arts                 |-- english.txt                 `-- match.doc  15 directories, 11 files  I tried doing the command: $ cp ../cambridge/security/parking ./parking2  ...but it isn't working. The question in the image above states that the current directory is stenton, and that we need to make a copy of the file named parking (from the security directory), and to name the new file parking2, and place it in the current directory, stenton, using relative pathnames. What am I doing wrong? My cp command seems to be correct. iPhone Apps section not showing up in iTunes Neural networks output probability estimates? Suppose my training data contains ~100 variables, and each example is tagged as "success" or "failure".  I understand how a neural network can be used to try and predict success vs failure based on the variables.  However I am interested in the neural network outputting the posterior probability rather than success or failure. In fact, I evaluate the efficacy of the NN based on how accurate the probabilities are (eg. AUROC over the entire dataset) rather than % of cases with correct prediction.  Are NN's the right tool for the job here and if so how do you structure the NN to output this?  (NOTE: I'm a ML newbie!) Find all natural numbers $n$ such that ${(n+1)}^{1/2}-{(n-1)}^{1/2}$ is rational I am looping over the features of a shapefile containing multiple polygons. If  certain criteria are met, I want to save the current feature in a new shapefile.  I am doing this using GDAL 1.10.0 with Python 2.7.3  The code runs, creates the files I want, calculates the area correctly. In the shapefile that is created, the attribute table contains the propoer fields ('name' and FID). Two things are wrong:   No polygons are visible (in ArcMap). This seems to me particularly weird, because the polygons seem to me proper, in the sense that they are closed (and the area is calculated properly).  The coordinate system seems off (in Arc Catalog there appears in the bottom -20,9667 0,0000 (are these degrees??)), despite the fact that I am creating a projection file (they are in German national grid 3)   Any hints as to what the problems could be? I tried to put the relevant excerpt of the code below:  from osgeo import gdal, gdalnumeric, ogr, osr, gdalconst  ### prepare shapefile into which to save driver = ogr.GetDriverByName('ESRI Shapefile') path_matched = r'.../.../path' datasource = driver.CreateDataSource(path_matched) lyr_matched = 'matched_%s' % cur_id  # from above # Remove output shapefile if it already exists name_shpfile = lyr_matched + '.shp' if os.path.exists(os.path.join(path_matched, name_shpfile)):     driver.DeleteDataSource(os.path.join(path_matched, name_shpfile)) layer = datasource.CreateLayer(lyr_matched, geom_type=ogr.wkbPolygon) #layer.ResetReading() field_name = ogr.FieldDefn("name", ogr.OFTString) layer.CreateField(field_name)  ### prepare file in which I want to write the areas of matched polygons path_area = path_matched file_area = 'matched_area_%s.txt' % (cur_id) fobj_area = open(os.path.join(path_area, file_area), 'w')  ### original shape file containing all polygons shp = ogr.Open(shp_all)  # os fobj from above lyr = shp.GetLayer()  # loop over polygons in original shameful for FID in featList:     feat = lyr.GetFeature(FID)      # this is from the shapefile      cur_name = feat.GetField(1)      # ... work on conditions ...      if condition = true:         myPoly = ogr.Geometry(type=ogr.wkbPolygon)         cur_poly = feat.GetGeometryRef()         myPoly.AddGeometry(cur_poly)         cur_spat_ref = cur_poly.GetSpatialReference()          cur_area =  cur_poly.GetArea()         cur_area_string = "%s \t %f \n" % (gw_name_EZG, cur_area)         fobj_area.write(cur_area_string)          featur_dfn = layer.GetLayerDefn()         feature_abc = ogr.Feature(featur_dfn)         feature_abc.SetGeometry(myPoly)         feature_abc.SetField("name", cur_name)         feature_abc.SetFID(FID)         layer.CreateFeature(feature_abc)         myPoly.Destroy()         feature.Destroy()   # generate projection file prj_filename = lyr_matched + '.prj' file = open(os.path.join(path_matched, prj_filename), 'w') targetSR = cur_spat_ref targetSR.MorphToESRI() file.write(targetSR.ExportToWkt()) file.close()   datasource.Destroy() I would like to convert a large LaTeX project (i.e. spanning multiple files) into plain text. The purpose is generation of statistics, so representing mathematics is not an issue. In fact, all mathematics is ideally ignored.  I have found  but could not get it to run. It seems unfinished, but is exactly what I am looking for otherwise. Why does a RegExp with global flag give wrong results? Midpoint-Convex and Continuous Implies Convex How to select the most recent set of dated records from a mysql table I have two PHP scripts, both using the same session by calling session_name('MySessID').  When the first script calls the second script using curl, the second script hangs when session_start() is called.  Why would this happend? Force NTFS permissions inheritance for newly created files How to customize Latexian to use other TeX engines or biber? The Mac editor Latexian has built in methods for compiling using latex+dvips, pdflatex and xelatex.  Furthermore, it assumes bibtex and makeindex to deal with bibliographies and indexes, respectively.  How do I customize Latexian to use, e.g. LuaTeX for compiling or Biber for bibliographies? List of all active modules used in a site I want to create posters for my poster presentation on a conference. What tools or LaTeX classes are available for preparing posters ? I assume the difference in the number of Stack Exchange sites/communities is a mistake... correct?