Print stacktrace without throwing exception
print python stack trace without exception being raised
Recurrence Inequality Define sequence ${a_n}$ as follows: $a_1 = \frac {1}{2}, 2ka_k = (2k-3)a_{k-1}.$  Show that for any natural number $n, \sum_{k=1}^{n} a_k &lt;1$ (No calculus is allowed).  I'm really just stuck on the right way to approach this. It is sufficient to show that $\sum_{k=1}^{\infty} a_k &lt;1,$ but this isn't a series I am familiar with. I tried defining a partial sum series $b_n$ such that $b_n = \sum_{k=n}^{\infty} a_k,$ but that didn't help to find a non-trivial relationship. I have a dataset in csv file format that I'm loading into pgfplotstable. I can't change the format of the original csv, and being financial data it has a column of item names and two or three explanatory data points at the top of the table. e.g.  \documentclass{article} \usepackage{array,datatool,pgfplotstable}   \begin{filecontents}{sample.csv}     item,2008,2009,2010,2011      ,Actual,Actual,Forecast,Forecast      ,GBP,GBP,GBP,GBP      ,('000),('000),('000),('000) rounded     Area 1 OP, 1000000,1500000,1750000,250000     Area 2 OP, 400000,500000, 450000,-50000     Area 51 OP, 300000,375000,390000,15000     No P, 1250000, 1000000, 950000, 50000     Residuals, 800000, 80000, 90000, 10000   \end{filecontents}  \pgfplotstableread[col sep=comma]{sample.csv}\mystuff   I'm stumped at the next stage which is to typeset \mystuff so I have comma separators and can add a row that sums the 'Area' columns. At the moment to display the table I have to do something like  \begin{document}  \pgfplotstableread[col sep=comma,header=false]{sample.csv}\mystuff  \pgfplotstabletypeset[   columns/0/.style={string type},   columns/1/.style={string type},   columns/2/.style={string type},   columns/3/.style={string type},   columns/4/.style={string type}]\mystuff  \end{document}   How do I tag the top three rows as string and the rest of the last four columns as integer type so I can format and transform them? Is it possible to include the tag-wiki associations in the Data Explorer? To do this would require two additional columns in the postTags table that associate a tag wiki excerpt and a tag wiki to their tag.  The tag wiki data is already available in the posts table. But there is no way to associate this data with its tags. The SEDE schema lacks the required columns to link the tag excerpt and the tag wiki to the tags table.  Additionally, the postTypes table only lists three posts types. It makes no mention of tag-wiki and tag excerpt posts. Perhaps the postypes table can be updated to reflect the additional post types? How to read the content of a file to a string in C? Prove : $$ \text{If } \; x-\lfloor x \rfloor + \frac{1}{x} - \left\lfloor \frac{1}{x} \right\rfloor = 1 \text{, then } x \text{ is irrational.}$$  I think the way to go here is to falsely assume that $x$ is rational, thus having $x=\frac mn$ with $m,n$ integers and go with that, we also know that $x$ with the celling belongs to the integers and that $\frac 1x$ with the celling gotta be a $0$. Still can't prove it. Thank in advance ! cardinality of all real sequences I was wondering what the cardinality of the set of all real sequences is. A random search through this site says that it is equal to the cardinality of the real numbers. This is very surprising to me, since the cardinality of all rational sequences is the same as the cardinality of reals, and it seemed fairly intuitive to me that if cardinality of a set $A$ is strictly greater than the cardinality of the set $B$, then cardinality of $A^{\mathbb{N}}$ should be strictly greater than cardinality of $B^{\mathbb{N}}$. It turns out to be false.  Some technical answers have appeared in this forum elsewhere but I do not understand them. As I am not an expert in this topic, could some one explain me in simple terms why this is happening?  Also is the cardinality of all functions from reals to reals also the same as the cardinality of reals? I want to know the correct form:     He and I will go there   or   He and me will go there.   Which is correct? find the number of analytic functions which vanish only on $S$? After purge mussels 6 time in salt water 20 mins each, why they still exude much grime? I  buy mussels at Pusateri and Whole Food Market for a year in Toronto. They sell them on ice and dry, not in running water.      , Bart teaches add salt to cold water and  soak for 20 mins. But I repeat 6 times...so 20 mins x 6 times = 120 mins of soaking!!! Mussels exudate less black grime every next time, but even after 6 times, water still has much black grime! See my pic under! Why? This happening for a year!     Part 2,  has GIF that shows you what I mean. How does QGIS Zonal Statistics handle partially overlapping pixels? There are a couple Stackexchange posts asking this question, but neither of them were sufficiently answered:       I am writing Python scripts that perform essentially the same operations as Zonal Stats, and I have been using Zonal Stats to check my scripts' outputs.   I have noticed that when there are many cells in the polygon being queried, my results match perfectly, but there are discrepancies when there are only a few raster cells in the polygon. The following is an example of this. I am computing "count" for each polygon.  Exhibit 1:   The returned count is 0.45, which looks roughly correct if pixels can be treated fractionally rather than simply in/out.  Exhibit 2:   Similar result; count is 0.39.  Exhibit 3:    With a larger poylgon, now we see the count is exactly 2. Note that there are exactly 2 pixel centers contained in the polygon.  Exhibit 4:    Here, only one pixel center is within the polygon. The count is 1.008, though. If you exclude the polygon area from the pixel whose center is in the polygon, the remaining area is obviously greater than 0.008 of a pixel.   From these exhibits, it seems that Zonal Statistics treats these cases specially. It looks like to me that if there are less than 2 pixel centers within the polygon, it performs some kind of averaging such as polygon_area/raster_cell_area to return the count. I should note that I have 48 of these polygons, and all returned counts greater than or equal to 2 are integers; fractional counts are only returned for &lt;2.  How are these fractional-pixel counts incorporated into the other statistics output by Zonal Stats?    indicates strange behavior with max/min when using large raster cells, and my own testing returns mean values not congruous with simple "pixel center in/out of the polygon." To reiterate, I get exact agreement when the underlying raster contains many pixels within the polygon. I couldn't find any documentation about this, and it may be important when people have never had problems with Zonal Stats but use a coarse raster and remain unaware that there is a different behavior when there are only a few pixels within the polygon. Mean or sum of gradients for weight updates in SGD Google Spreadsheets Enter/Return Key Behavior In Microsoft Excel, the default behavior of pressing the Enter (return) key is this:     If you are in a cell, and tab over as   you input data, at the end of the   series when you click Enter, the focus   will go to the cell directly under the   cell that you began the series of   tabs.      For example, if you are in cell A1,   tab over to C1, and then click Enter,   the focus will go to cell A2.   Is there any way to get this behavior in Google Spreadsheets? Possible Australianism - netbank = a website + app by which an Aussie can do their banking, including transferring money to other people.  A while ago, I ended up with $1000 transferred into my account, which in the description looked like a netbank transfer, not like a cheque, cash deposit etc, and which looked like it had already cleared and landed in my account. Usually when something is still working through the bank's system it displays as 'pending', but did not in this case.  I received a phone call from someone, saying that they had accidentally typed in the wrong account number, and wanting me to send them the same amount of money back via netbank.   Surely bank account numbers have a checksum, which make it relatively difficult for a typo to result in a payment going to the wrong person? What are likely sources of them being able to find my phone number to call me? Obviously, the bank either being hacked, or giving it out in response to a query from this person (but surely the bank is unlikely to tell me my own mobile number if I claim to have forgotten it?). Presumably either my phone, or the phone of someone I have sent money to/received money from could be compromised. Has anyone heard of any instances of this happening?  I then went to my bank, explained the situation and said that I did want to refund the money through the officially sanctioned methodology. After the laughter died down, the bank told me to ask the person to fill out a form, then they would get me to fill out a form that would authorize undoing that exact payment.  I rang up the person to tell them this, and over the course of about a week received an increasingly elaborate story about how that wasn't working, they needed the money immediately, there was a fee to fill out that form and they couldn't afford to pay it etc.  After that, I never heard back from them again. I check my netbank for several weeks after, expecting the money to magically disappear, but it did not. This was probably a year ago, and I'm pretty vague with money so may not have noticed if it disappeared more recently. How were they expecting to benefit?  Were they hoping to get the transfer from me, and undo the transfer to me, to leave them $1k up? If so, how can an internet banking transfer be 'undone' once it has already shown as 'received'. Or was this to do with money laundering? The account they requested me to send money to was the same as the one that the money appeared to come from. This was a scam, right? Ways to get free and legal access to research papers as a researcher I’ve discovered that website like ResearchGate offer the possibility to ask the paper editor to provide his paper for free. Many are collaborating.  Are there any other ways for researchers to obtain free access to papers? How to redirect output to a file and stdout In bash, calling foo would display any output from that command on the stdout.  Calling foo &gt; output would redirect any output from that command to the file specified (in this case 'output').  Is there a way to redirect output to a file and have it display on stdout? The rulebook states that carrying capacity is the strength score times 15 (lbs). Find familiar allows me to get a hawk, which has a strength score of 5. This results in a carrying capacity of 75 lbs. This is well within the range of weights for small people such as gnomes or halflings. Does this mean my familiar can carry them and fly away (given they do not struggle)? How to preserve custom number formatting after closing a workbook? How do you do AppBar docking (to screen edge, like WinAmp) in WPF? How does the Schengen 90/180 rule work? I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation? Am I going to have trouble flying without my full name on the ticket? In my passport, my name is Firstname middlename1 middlename2 lastname, and in the ticket is LASTNAME/FIRSTNAME MR.  Will be a problem? I'll travel from Brazil to Bali, Indonesia and according to the agency I bought the ticket from, there's no problem and it's common.  The airline is Qatar Airlines and I have looked , which says that the passenger name can't be changed after the booking has finished.  But I don't know if it is a problem.