Sum of digits of $11\dots 11^2$ where $11\dots 11$ is a 1992 digit number with all digits $1$
Sum of digits of repunits
How do I get a selected vertex and it's corresponding uv vertex?  A vertex I can get with  bpy.context.active_object.data.vertices[0]   A uv vertex I can get with  bpy.context.active_object.data.uv_layers['UVMap'].data[0]   But the index is not the same for uv and mesh vertex. I was wondering if there was a method to alter object settings at a set point in an animation in blender.  For example, I want to make the color of an object blue for the first 20 frames, but after 20 frames I want its color to change to green. Is there any known method of doing this? I could not find anything when I searched. Is it safe to give out one's bank account number? I'm managing the utility of the house and I'm sharing with another person. He asks me to provide my bank account number, so that he can transfer his money to my account when paying the utility.    I wonder if it is safe to give out my bank account number?   For example, if I'm correct, many online payments just need the account number to draw money out of it. Is giving out the bank account number safer than handing a check to another person, since there is also the account number printed on the check? How to select the nth row in a SQL database table? Registering a domain name with a trademark in it I wrote a script to create a big number of heat maps for a given scenario. I would like to save the result of every heat map as an PNG image. I have figured it out doing it with simple Map Rendering but the quality of the result is too low. Furthermore I would like to export to OpenLayers using the same code, which does not seem to be possible with simple rendering.   Now I am trying to do it with QgsComposition instead. Manually in the Map Composer you can just set the paper color to transparent and disable the background of the map canvas.   This is the code that I have so far. I just cannot figure out why it is not working. The result png-file always has a white opaque background.   My OS is Windows 7 and I'm using QGIS 2.6 Brighton.  I hope someone can help me out here.  # PARAMETERS mainPath = 'path/to/folder/' filename = 'filename' imageType = "png" imageWidth_mm = 400 imageHeight_mm = 160 dpi = 300  mapRenderer = iface.mapCanvas().mapRenderer()  c = QgsComposition(mapRenderer) c.setPlotStyle(QgsComposition.Print)  c.setPaperSize(400, 160)  x, y = 0, 0 w, h = c.paperWidth(), c.paperHeight() composerMap = QgsComposerMap(c, x ,y, w, h) c.addItem(composerMap)  # get all items and disable the backgrounds itemList = c.items() c.removeItem(itemList[2]) c.removeItem(itemList[2]) itemList[2].setBackgroundEnabled(False) itemList[3].setBackgroundEnabled(False) # add them to the composition c.addItem(itemList[2]) c.addItem(itemList[3])  c.refreshItems() c.refreshDataDefinedProperty(QgsComposerObject.AllProperties)  c.setPrintResolution(dpi) dpmm = dpi / 25.4 width = int(dpmm * c.paperWidth()) height = int(dpmm * c.paperHeight())  # create output image and initialize it # image = QImage(QSize(width, height), QImage.Format_ARGB32) image = QImage(QSize(width, height), QImage.Format_ARGB32_Premultiplied) image.setDotsPerMeterX(dpmm * 1000) image.setDotsPerMeterY(dpmm * 1000) #image.fill(0)  imagePainter = QPainter(image)  # This part does not seem to have any effect #brush = QBrush(Qt.BrushStyle(0)) # transparent brush # #imagePainter.setBackgroundMode(0) #c.setBackgroundBrush(brush)  c.renderPage( imagePainter, 0 ) imagePainter.end()   imageFilename =  mainPath + filename + '.' + imageType image.save(imageFilename, imageType) print 'image saved' print 'done' Get file size before uploading "Open shaming of anyone..." Open shaming of anyone who spoke out discouraged responsible dissent.   How does open with shaming work, grammatically and meaningfully?   Is discouraged modifying "responsible dissent? Why doesn't GCC optimize a*a*a*a*a*a to (a*a*a)*(a*a*a)? Dirac delta function as a limit of sinc function Big-O proof showing that t(n) is O(1) Let t(n) = $\sqrt{n^2+100n} - n$  Show that $t(n)$ is $O(1).$  I tried solving this using the formal definition of O( ) but am not getting anywhere. Quite confused on how to tackle this question. Extracting numbers from string field using Python Parser of ArcMap Field Calculator? I am trying to calculate field test2 with only the numeric values from a string field test. The entire script is like:    def makestr(test)      list=[]      for s in test:          if s.isdigit():              list.append(s)      for a in list:          str=''.join(list)     But I keep getting an error:    Any ideas? Using the expression "the same" for a previously mentioned item I frequently use &quot;the same&quot; as in the following sentence.  I need the details of XYZ project. Could you please send me the same as soon as possible?  Is this grammatically correct? I have not been corrected till now, but I have not seen the usage from native speakers very much either. Update: Seems like my example sentence was ambiguous. Hope the following sentence is better.  I need the documents for the meeting. Could you please send me the same as soon as possible? I see all of these software that claim that they can recover messages deleted from your iPhone. Do they actually work?  For example, if I received 2 text messages from my friend and I immediately deleted them. Is it possible to recover them? Is there any hint of of the first Wizarding War being an international event? Let $R$ be a commutative ring with unit, $I$ an ideal of $R$ and consider the following three constructions.   The  $R_I$ of $R$ at $I$ (i.e. the localization of $R$ at the multiplicative system $R\setminus I$) gives a morphism $$ f_1:\operatorname{Spec}(R_I)\to \operatorname{Spec}(R)=:X $$ The  $\widehat{R}_I$ of $R$ at $I$ gives a morphism $$ f_2:\operatorname{Spec}(\widehat{R}_I)\to X $$ For the special case $I=(a)$, the localization $R_a$ (i.e. the localization of $R$ at the multiplicative system $\{1,a,a^2,\ldots\}$) gives a morphism $$ f_3:\operatorname{Spec}(R_a)\to X $$   My question is:     What is the geometric meaning of all three constructions and how are they related?   This is what I ''know'' already or describes at least the style of answer I would appreciate. As remarked in the comments, $I$ has to be a prime ideal.   $R\to R_I$ is injective iff $R\setminus I$ contains no zero divisors which is the case if $I$ is a prime ideal. The scheme $\operatorname{Spec}(R_I)$ is the intersection of all the neightbourhoods of $I$ in $X$. This is a little contra-intuitive for me since the last statement sounds like ''$f_1$ is injective'' but the $\operatorname{Spec}$-operator should turn 'injective'' and ''surjective'' around somehow (I know this is literally not true but I only want to get a feeling like ''is contained'', ''is bigger'', ''is smaller'', etc.). $\operatorname{Spec}(R_a)$ is somehow the opposite of $\operatorname{Spec}(R_{(a)})$ (= the intersection of all the neightbourhoods of $(a)$ in $X$) because $\operatorname{Spec}(R_a)$ seems to be something like the union of all the open sets of $X$ not containing the point $(a)$. $R\to\widehat{R}_I$ is injective iff $\cap I^n=(0)$ and this holds very often (e.g. for $R$ noetherian and either an integral domain or a local ring). Hence (this is probably false intuition as remarked before), $f_2$ should be something like a ''projection'' (from something ''big'' into something ''small''). But what is geometrically the difference between localization and completion. I don't have a geometric idea of completion at all.   As remarked by Qiaochu Yuan in the comments below, one should not think of $\operatorname{Spec}$ as injective-surjective switching. Noncoalescing and bouncing droplets if you set a dish filled with water onto a loudspeaker or other vibrator and make vibration, When it oscillates, it is possible to hold small droplets on its surface for a long time. I mean, when you put a droplet of water on vibrating water surface, it doesn't coalesce with the water and bounce on the surface of water.( see this video  )  As we know, drop reaches its minimal potential when coalescing with water ( that's why drops coalesce)  what exactly cause this? why doesn't the drop coalesce with the water? IF/ELSE script in sender profile I'm trying to create a dynamic sender profile where the from name and from email change if a value is present in a specific field of the data extension. I want the Lead First Name value and Lead Last Name values to appear. I'm trying to keep all the logic in the sender profile. %%=IIF(EMPTY(AttributeValue(&quot;X&quot;)), &quot;Bill&quot;, AttributeValue(&quot;LeadFirstName&quot;) AttributeValue(&quot;LeadLastName&quot;))=%%  Not sure why, but doing the test, the script shows up as the sender and isn't resolving. Zip all files in directory? How do I use large bitmaps in .NET? I'm trying to write a light-weight image viewing application. However, there are system memory limitations with .NET.  When trying to load large bitmaps (9000 x 9000 px or larger, 24-bit), I get a System.OutOfMemoryException. This is on a Windows 2000 PC with 2GB of RAM (of which 1.3GB is used up). It also takes a lot of time to attempt loading the files.  The following code generates this error:  Image image = new Bitmap(filename); using (Graphics gfx = this.CreateGraphics()) {     gfx.DrawImage(image, new Point(0, 0)); }   As does this code:  Stream stream = (Stream)File.OpenRead(filename); Image image = Image.FromStream(stream, false, false); using (Graphics gfx = this.CreateGraphics()) {     gfx.DrawImage(image, new Rectangle(0, 0, 100, 100), 4000, 4000, 100, 100, GraphicsUnit.Pixel); }   Also, it is enough to do just this:  Bitmap bitmap = new Bitmap(filename); IntPtr handle = bitmap.GetHbitmap();   The latter code was intended for use with GDI. While researching this, I found out that this is in fact a memory issue where .NET tries to allocate twice as much as is needed in a single contigous block of memory.    I know from other applications (Internet Explorer, MS Paint etc.) that it IS possible to open large images, and rather quickly. My question is, how do I use large bitmaps with .NET?  Is there anyway to stream them, or non-memory load them?