How do I convert this PHP function to recursively search my directories?
php--glob for searching directories and .jpg only
Combinatorial proof for Stirling number of 1st kind's generating function So I see this identity a lot but I can't find a detailed combinatorial proof for it.  $$n(n+1)...(n+k-1)=\sum_{j=0}^k \begin{bmatrix}k \\j \end{bmatrix}n^j$$ Can someone please help? How can I search the bash history and rerun a command? Can I search history in bash and run the result? Solving $f(x+y) = f(x)f(y)f(xy)$ On my work computer I have two USB hard drives that I use rarely. They have a power save mode that sends them into sleep after a couple of minutes of them being idle.   Whenever I open a context menu on a file, the drives are woken up (most likely caused by the "send to" handler).  So I eject the drive, but I can't find a way to get it back, other than unplugging and replugging it in.  Is there a way to unmount the drives, and then remount them only when I actually need them? (On Windows 7 Ultimate.) I'm trying to measure the execution time of a process that I call via the command line (i.e., I want to find out how long it takes to for the process to finish). Is there any command that I can add to the command calling the process that will achieve this? Why shouldn't I care what model/make/year my bicycle is? Which arena do free and crown chests use when determining the cards you will get? Understanding the definition of the order of an entire function in Ahlfors's Complex Analysis Let $f: \mathbb C \to \mathbb C$ be an entire function. The order of $f$ is defined by $$\lambda=\limsup_{r \to \infty} \frac{\log \log M(r)}{\log r}, $$ where $$M(r)=\max_{|z|=r} |f(z)| .$$  Ahlfors in his Complex Analysis claims that     "According to this definition $\lambda$ is the smallest number such that       $$M(r)\leq e^{r^{\lambda+\varepsilon}} $$ for any given $\varepsilon &gt; 0$ as soon as $r$ is sufficiently large."   Why is this true?  My attempt:  We know that $$\lambda=\lim_{\rho \to \infty} \sup_{r \geq \rho} \frac{\log \log M(r)}{\log r}. $$  From the definition of the limit we have that for any $\varepsilon&gt;0$, there exists some $\rho_0&gt;0$, such that $$\left\lvert \sup_{r \geq \rho} \frac{\log \log M(r)}{\log r}-\lambda \right\rvert \leq \varepsilon ,$$ for every $\rho \geq \rho_0$. In other words $$\frac{\log \log M(r)}{\log r} \leq \lambda+\varepsilon $$ for every $r \geq \rho_0$. From here it is easy to see that $$M(r)\leq e^{r^{\lambda+\varepsilon}}, $$ for all $r \geq \rho_0$. I cannot see why $\lambda$ is the smallest number with this property.  Thanks in advance. Selecting points within polygon and updating attributes using ArcPy? I have two feature classes, a polygon of sales areas for a city, and point layer of addresses. I want to select the addresses based on the sales area they are in and update their attribute table to show the sales area. I have searched python+point+in+polygon for other posts and I know how to select the polygons but I can't figure out how to populate the address points.   I found the following script that works but takes almost two hours to run.  import arcpy import os  # Allow overwrite  arcpy.env.overwriteOutput = True  # Script user input parameters polygonLayer = arcpy.GetParameter(0) pointLayer = arcpy.GetParameter(1) workspace = arcpy.GetParameter(2) copyField = = arcpy.GetParameterAsText (3)   # Add new field to target feature class  fieldList = arcpy.ListFields(pointLayer) fieldNameList = [] for field in fieldList:    fieldNameList.append(field.name) fieldType = arcpy.ListFields(polygonLayer,copyField)[0].type if not copyField in fieldNameList:     arcpy.AddField_management(pointLayer, copyField, fieldType)  arcpy.MakeFeatureLayer_management(polygonLayer, "PolygonLayer")  pntCursor = arcpy.UpdateCursor(pointLayer) for pnt in pntCursor:     rowID = pnt.OBJECTID     arcpy.MakeFeatureLayer_management(pointLayer, "PointLayer", '"OBJECTID" = ' + str(rowID))      # Polygon selection based on CONTAINS selection method     arcpy.SelectLayerByLocation_management("PolygonLayer", "CONTAINS", "PointLayer")      # Copy field values from polygon to point layer         polyCursor = arcpy.SearchCursor("PolygonLayer")             for poly in polyCursor:         pnt.setValue(copyField, poly.getValue(copyField))         pntCursor.updateRow(pnt)      arcpy.Delete_management("PointLayer")          del pntCursor, polyCursor, pnt, poly   I don't think I need to create a new field so I have simplified my script too:  # Import arcpy module import arcpy import os  # Allow overwrite  arcpy.env.overwriteOutput = True  # Script user input parameters polygonLayer = arcpy.GetParameter(0) pointLayer = arcpy.GetParameter(1) workspace = arcpy.GetParameter(2) fsaPoly = arcpy.GetParameterAsText (3) #FSA in FSA_Boundaries fsaPnt =  arcpy.GetParameterAsText (4) #FSA in Addresses   # Select all Address in FSA     polyCursor = arcpy.SearchCursor("PolygonLayer")      for poly in polyCursor: # Select based on CONTAINS      arcpy.SelectLayerByLocation_management(poly, "CONTAINS", "PointLayer")  # Add FSA to Address         pntCursor = arcpy.UpdateCursor("pointLayer")               for pnt in pointCursor:             pnt.setValue(fsaPnt, fsaPoly)             pntCursor.updateRow(pnt)   del pntCursor, polyCursor, pnt, poly   I know my update cursor is wrong but i'm stuck on how to update one feature class using information selected from the other.   I know I can do this manually but I need to do it for multiple cities so I would like to automate the process.   I am using Arc 10.2.2 to run my python script. MySQL search in comma list Where will changes and fixes to guides and manuals for 5e be found? I'm interested in a grappler build, among others, and don't know where to look to see if the last bullet for the grappler feat has been changed. The grappler example aside, it should be useful to know for future fixes. How can I get the source code of a Python function? Suppose I have a Python function as defined below:  def foo(arg1,arg2):     #do something with args     a = arg1 + arg2     return a   I can get the name of the function using foo.func_name. How can I programmatically get its source code, as I typed above? Do Stack Overflow and other Stack Exchange sites have an app I can use? NullPointerException accessing views in onCreate() Is there a general formula for image size vs. print size? What size images do I need for common print sizes, such as wallet size, 8x10, and 16x20?  Is there a general formula?  How could that size change if, for example, a 16x20 was printed on canvas rather than photopaper? I have a document divided into \part \chapter \section and \subsection. I have 3 parts and in each part I reset all the counters.  I want that, when I do a crossref to something that is in the 1st part, chapter 3 and section 5, that LaTeX prints something like I-3.5, but  I don't want that in the tableofcontents part that LaTeX prints the part number. For example, what I want is:     Part I      chapter 1 section 1.1 section 1.2      chapter 2   AND NOT     chapter I-1 section I-1.1 section I-1.2      chapter I-2   The command that I've tried   \renewcommand{\thechapter}{\thepart-\arabic{chapter}} \renewcommand{\thesection}{\thechapter.\arabic{section}}   does exactly what I've said  Can anyone help me? I'm looking for a word which describes a task which I think is poorly designed and will lead to either mediocre results or failure, but which I have to do anyway, especially in a work setting.   The word "Dilbertian" comes to mind, however this word is obviously made up and is only meaningful to someone who is familiar with the Dilbert comic strip, so I'm looking for something which captures both the futility and compulsory nature of the task in a way which is meaningful to a broader audience. Quick Look support for non-native video files (.avi, .mkv) on Mavericks In the past, we've been able to get codecs for DivX/XviD/MPEG4 and support for containers like AVI, MKV in Mac OS X's Quick Look feature using  (as per ).  As noted on the Perian site, development has ceased, and future versions may or may not continue to work. It seems with the upgrade to OS X 10.9 "Mavericks", the OS or Quick Look API has changed sufficiently that Perian no longer works.  Are there any alternatives? Ideally a one-app-does-all like Perian, but even a list of individual codecs and/or plug-ins for video container files would be useful.  NB: This question isn't about video players—there are many that support more than those playable via the built-in QuickTime player. This question is about codecs/plug-ins for QuickTime on OS X to allow it and Quick Look (and apps which rely on the OS to play videos) to open/play video files/formats lacking native support. Is normality testing 'essentially useless'? A former colleague once argued to me as follows:      We usually apply normality tests to the results of processes that,   under the null, generate random variables that are only   asymptotically or nearly normal (with the 'asymptotically' part dependent on some quantity which we cannot make large); In the era of   cheap memory, big data, and fast processors, normality tests should   always reject the null of normal distribution for large (though not insanely large) samples. And so, perversely, normality tests should   only be used for small samples, when they presumably have lower power   and less control over type I rate.   Is this a valid argument? Is this a well-known argument? Are there well known tests for a 'fuzzier' null hypothesis than normality? Lie Algebra of $SL_n(\mathbb H)$ The Lie algebra of $SL_n(\mathbb C)$ are the matrices where the trace is $0$. But what is the Lie algebra of $SL_n(\mathbb H)$ where $\mathbb H$ is the quaternions?