C++ - storing pointers to stack variables
In what cases do I use malloc and/or new?
My images are blurry! Why isn't WPF's SnapsToDevicePixels working? I'm using some Images in my WPF applcation.  XAML:  &lt;Image Name="ImageOrderedList"        Source="images/OrderedList.png"        ToolTip="Ordered List"        Margin="0,0,5,5"        Width="20"        Height="20"        SnapsToDevicePixels="True"        MouseUp="Image_MouseUp"        MouseEnter="Image_MouseEnter"        MouseLeave="Image_MouseLeave" /&gt;   But, they appear fuzzy.  Why doesn't that SnapsToDevicePixels="True" line prevent this problem? Is this arthropod non-intrusive and recommended to be left alive? $\sum a_n$ be convergent but not absolutely convergent, $\sum_{n=1}^{\infty} a_n=0$ Let $\sum a_n$ be convergent but not absolutely convergent, $\sum_{n=1}^{\infty} a_n=0$,$s_k$ denotes the partial sum then could anyone tell me which of the following is/are correct?  $1.$ $s_k=0$ for infinitely many $k$  $2$. $s_k&gt;0$ and $&lt;0$ for infnitely many $k$  3.$s_k&gt;0$ for all $k$  4.$s_k&gt;0$ for all but finitely many $k$  if we take $a_n=(-1)^n{1\over n}$ then $\sum a_n$ is convergent but not absolutely convergent,but I don't know $\sum_{n=1}^{\infty} a_n=0$? so I am puzzled could any one tell me how to proceed? Divisibility Rule for 9 I'm working through an elementary number theory course right now and I think I've come up with a proof here but wanted some feedback on my logic.    Question:  If the sum of the digits in base 10 is divisible by 9, then the number itself is divisible by 9.    Proof: Suppose that $9|d_1+d_2+...+d_n$ then $d_1+d_2+...+d_n=0\mod9$  Now consider $d_1(10^{n-1})+d_2(10^{n-2})+...+d_{(n-1)}(10^1)+d_n(10^0)$ Each power of $10$ is equivalent to $1\mod9$   therefor  $d_1(10^{n-1})+d_2(10^{n-2})+...+d_{(n-1)}(10^1)+d_n(10^0)=(1\mod9)(d_1+d_2+...d_n)$  $9|(d_1+d_2+...d_n)$ by our assumption, thus $9|(1\mod9)(d_1+d_2+...d_n)$  Thus we have shown that if 9 divides the sum of the digits in base 10, 9 divides the number itself.    The only question I really have is whether I'm jumping the gun on my assumption concerning the powers of 10 being $1\mod 9$.  I think this is fair game here but not 100% confident.  Thanks. 0:root@SERVER:/root # echo "something" | sed -e 's/^/\t/g' tsomething 0:root@SERVER:/root #    AIX/ksh .. why doesn't it works? I just want to put a "tab" before every line! Does the Dueling Fighting Style prevent using a shield? The Dueling fighting style doesn't seem to state anything about shields, stating that the character can only wield one weapon while fighting to gain the benefit. Does a shield count as a weapon or otherwise stop the damage bonus from occurring? Does my enemy get to make a saving throw for half damage for absolutely any spell I cast? So me and a group of friends recently started to play D&amp;D. I became a sorcerer. My question is: can the enemy I am attacking, no matter what spell I use, make a saving throw for half damage or does that only apply for certain spells?  For example, when I use my cantrip fire bolt, does the targeted opponent get to roll a saving throw for half damage against the spell, even though the description doesn't say anything about saving throws? Legal issues for a "fangame" of a commercial franchise? I've played around in the past of the 2D Flash fan-made version of the popular Valve game Portal.  It has basically the exact same mechanics, but as a 2D side-view flash game.  Lately I've toyed around with creating a simplified flash version of some of my favorite franchises (such as Zelda, Mario, Splinter Cell, etc.).  Of course, nothing is "stopping" me from just using the same mechanics and just changing the name to something not copyrighted.  I have witnessed projects that have tried to directly port a 3D game into a 2D simplified version, with the exact same plot and puzzles (Ocarina of Time in 2D comes to mind), and I have seen them being shut down.  But I am not likely going to exactly duplicate any game...just borrow some of the source material and basic underlying mechanics.  For example, if I were to make a Zelda-influenced fan game, I would have items such as the Hookshot, Boomerang, and all other sorts of ones from the Gameboy Zeldas; just with a custom plot and dungeons.  With likely the same mechanics.  What are the legal issues involved in this?  I used to think it was a "Don't do this ever; it's a bad idea."  But then I've seen the Portal clone, and now I'm curious. I have a process I can't kill with kill -9 &lt;pid&gt;. What's the problem in such a case, especially since I am the owner of that process. I thought nothing could evade that kill option. What are the grammatical rules determining whether to use which or what?  I usually go by intuition. It's "What car are you looking at?" and "What bicycle do you like most?" but "Which song did you sing?" Quite often, I don't know whether to use what or which.  How can I tell? So, somehow over the weekend, my 1GB USB flash drive has managed to become write-protected.  There is no switch on the stick, so I'm concluding that something has corrupted at some point.  Obviously I can't format it or remove.  The output from dmesg | tail is:  Buffer I/O error on device sdb1, logical block 328168 lost page write due to I/O error on sdb1 sd 73:0:0:0: [sdb] Unhandled sense code sd 73:0:0:0: [sdb] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sd 73:0:0:0: [sdb] Sense Key : Data Protect [current] Info fld=0x0 sd 73:0:0:0: [sdb] Add. Sense: Write protected sd 73:0:0:0: [sdb] CDB: Write(10): 2a 00 00 05 08 00 00 00 01 00 Buffer I/O error on device sdb1, logical block 328200 lost page write due to I/O error on sdb1   I think the second and final lines are a giveaway to corruption, but I don't know how to interpret this output.  Could someone help to see if this output gives any indication?  I usually eject the drive before removing it, but I may have been lax once or twice.  The data isn't critical, it's just bugging me.  Any suggestions on how to fix it (if the drive even can be) would be greatly appreciated. The attribute image.itemtype has an invalid value I am using JSON-LD format for Structured data. In home page @type=website &amp; in details page @type=Article. Logo property of Organization section in details page showing following warning in Google Structured Data Testing Tool But home page is not although in both page value is same.      (The attribute logo.itemtype has an invalid value.)   Home page JSON-LD  &lt;script type="application/ld+json"&gt;     {     "@context": "http://schema.org",     "@type": "WebSite",     "url": "http://kothaboli.com/",     "name": ".....",     "alternateName" : "....",     "description" : "......",     "potentialAction": {         "@type": "SearchAction",         "target": "http://kothaboli.com/search?keywords={search_term_string}",         "query-input": "required name=search_term_string"     },     "sameAs":[         "https://www.facebook.com/kothaboliDotCom/",         "https://twitter.com/kotha_boli",         "https://plus.google.com/+kothaboli"     ],     "publisher" : {         "@type" : "Organization",         "name" : "....",         "alternateName": "...",         "logo": "http://kothaboli.com/media/1018/ka.jpg"         }     } &lt;/script&gt;     Details page JSON-LD      &lt;script type="application/ld+json"&gt;     {     "@context" : "http://schema.org",     "@type" : "Article",     "url": "http://kothaboli.com/interviews/intellectual/arundhati-roy/",     "name" : "... ....",     "headline":  "...--’",     "datePublished" : "7/26/2016 1:10:05 AM",     "dateModified" : "8/12/2016 1:50:54 AM",     "image" : "http://kothaboli.com/media/1088/33333333.jpg",     "articleSection" : "....",     "articleBody" : ".....’ ",     "mainEntityOfPage": "..",     "author" : {         "@type" : "Person",         "name" : "....",         "alternateName": "Arundhati Roy"         },     "publisher" : {         "@type" : "Organization",         "name" : "...",         "alternateName": "Kothaboli",         "logo": "http://kothaboli.com/media/1018/ka.jpg"         }     } &lt;/script&gt; How do I preload a program for faster start? Is it possible to "preload"(actually not preload, but kinda emulate the startup) e.g. nautilus (or firefox) startup at login, so the first time I launch it myself it launches faster? Probably to start it on another desktop and close after some seconds? Prove that $\lim \limits_{n \to \infty} \frac{x^n}{n!} = 0$, $x \in \Bbb R$. How to prevent unification when animating in photoshop? I am trying to create an animated gif where text drops down and smashes into the background and cracks it. Whenever I try and transform it though, the transformation is applied to all frames. How do I prevent this? I'm using Adobe Photoshop CS6 (64-bit) Add 'Page' above page numbers in Table of Contents I am using my school's latex . Unfortunately, since this package was last updated, we are now required to add the word 'Page' above the topmost page number on each page of the Table of Contents. This cls file includes the following bit of code, which puts 'Page' at the top of the first page, but not any subsequent pages (see attached)  \newcommand\chapteruaf{ \if@arabic\relax\else\if@chapterone\setcounter{page}{1}\else\relax\fi\fi \@chapteronefalse                     \if@openright\cleardoublepage\else\clearpage\fi                     \thispagestyle{myheadings}%                                                                                                    \global\@topnum\z@                     \@afterindentfalse                     \secdef\@chapter\@schapteruaf} \def\@schapteruaf#1{\if@twocolumn                    \@topnewpage[\@makeschapterheaduaf{#1}]%                                                                                     \else                    \@makeschapterheaduaf{#1}%                                                                                                     \@afterheading                  \fi} \def\@makeschapterheaduaf#1{%                                                                                                    {\parindent \z@ \centering     \reset@font     \normalsize \bfseries  #1\par                                                                                                  \vspace{-18.3pt}\hspace{143mm} Page                                                                                            \nobreak   }}   First page of the TOC:   second page of the TOC:   Any thoughts here? I have played with this a bit, and can't get it to work. Thanks. Do you gain current HP when you level up? Is there a closed form expression for $\text{n}^{\text{th}}$ coefficient of Maclaurin series of  $$\ln(1-x+x^2)$$ A nasty integral of a rational function I'm having a hard time proving the following $$\int_0^{\infty} \frac{x^8 - 4x^6 + 9x^4 - 5x^2 + 1}{x^{12} - 10 x^{10} + 37x^8 - 42x^6 + 26x^4 - 8x^2 + 1} \, dx = \frac{\pi}{2}.$$  Mathematica has no problem evaluating it while I haven't the slightest idea how to approach it. Of course, I would like to prove it without the use of a computer. Is this an explicit form of a special function I fail to recognize? How does MySQL process ORDER BY and LIMIT in a query?