I have a long C code which gets segmentation fault because a pointer variable x is pointed to NULL somewhere in the code (there are many writes to this variable and I did not write the code myself), and later an attempt has been made to read it's value resulting in a segmentation fault.  Now I can get the line where the variable x was accessed which resulted the segfault using gdb, but I'm interested to know when it (x) was assigned to the value NULL. There are many writes to this variable in the code and checking this manually soon becomes tedious. Is there an automated way to find when some variable x is assigned to a specific value? Maybe using gdb or some value analysis tool?
I am running an application through gdb and I want to set a breakpoint for any time a specific variable is accessed / changed. Is there a good method for doing this? I would also be interested in other ways to monitor a variable in C/C++ to see if/when it changes.
What is the formula for percent of frame filled at a specific distance and focal length? Formatting each part/section/subsection Are there some magic lines to be placed in the preamble that would, like in CSS,  specify how each generic section or subsection in the whole document should be formatted? I don't mean people with low self esteem.  But there are people who feel happy at being able to make other people laugh at their own expense. I remember someone telling me there is a word for them, I can't find it.  Let me explain:  I sometimes, while sitting with a group of people, might just tell them a personal embarrassing story, which might be completely fabricated, to make other people laugh. And when they laugh, I feel happiness.  I'm also self deprecating, but not in a way that I hate myself, rather,  just my work (I'm a screenwriter) and knowing I can do better. I do not self deprecate myself in public (I don't praise myself either).   Edit: Now that its mentioned, I think the word I'm talking about was used to describe a person's sense of humor. Or it could be a word used to describe a psychological trait/disorder.  Edit: I just looked up humor styles on Wikipedia. And after reading it, I guess the word that closely matches what I'm looking for is 'Affiliated Humor' but in a 'Self Defeating' style. So, I'm working with OpenGL (I'm not exactly sure of the version), and I want to do an old-style lighting setup by essentially drawing a black rectangle over the screen, and drawing white circles over the areas that should be lit. I already have the rectangle and the circles, but I can't figure out how to make it so that the white circles are transparent when applied to the black areas. Any ideas? I tried to use blending modes, but it still evades me...  EDIT: Here's the code that I'm using (Python).  view_buf = Buffer(GL_INT, 4) glGetIntegerv(GL_VIEWPORT, view_buf) view = view_buf.to_list() if hasattr(view_buf, "to_list") else view_buf.list  glDisable(GL_DEPTH_TEST)  glDisable(GL_LIGHTING)  glEnable(GL_BLEND)  if logic.lights['smooth']:     glEnable(GL_LINE_SMOOTH)  # # Make sure we're using smooth shading instead of flat # glShadeModel(GL_SMOOTH)  # Setup the matrices  glMatrixMode(GL_PROJECTION) glPushMatrix() glLoadIdentity() gluOrtho2D(0, view[2], 0, view[3]) glMatrixMode(GL_MODELVIEW) glPushMatrix() glLoadIdentity()  #glAlphaFunc(GL_GREATER, 0.5)  glColor4f(0.0, 0, 0, 0.75)  glBegin(GL_QUADS);                              # Draw Black screen glVertex2d(0.0, 0.0); glVertex2d(view[2], 0.0); glVertex2d(view[2], view[3]); glVertex2d(0.0, view[3]); glEnd()  glColor4f(1, 1, 1, 1)  degtorad = 3.14159/180.0   glBlendFunc(GL_ZERO, GL_SRC_ALPHA)  def DrawCircle(x, y, radius, fill = 1, step = 11):      glVertex2f(x, y)      if fill:         glBegin(GL_TRIANGLE_FAN)     else:         glBegin(GL_LINE_LOOP)      for a in range(0, 360, step):         angle = degtorad * a         glVertex2f(x + (sin(angle) * radius), y + (cos(angle) * radius))      glEnd()   #for layer in range(len(logic.lights['layers'])): #   size =  for light in logic.lights['points']:     DrawCircle(light[0][0] * view[2], (1 - light[0][1]) * view[3], light[1], step = light[2])     if logic.lights['smooth']:         DrawCircle(light[0][0] * view[2], (1 - light[0][1]) * view[3], light[1], 0, light[2])  # Reset the state glPopMatrix() glMatrixMode(GL_PROJECTION) glPopMatrix() University rank/stature - How much does it affect one's career post-Ph.D? What I'm trying to understand is, to what degree does the status/rank of the University (where one completes his/her Ph.D) matter while shaping his/her career after graduation? I would like to know the weight given to one's school in both the following cases:   While applying for post-docs/faculty positions in academia While applying to industrial research labs   For instance, I've read on some forums (I can't locate the link now) that while considering prospective applications for tenure-track faculty positions, very few Universities accept a candidate who has completed his/her Ph.D from a lower ranked school having a lesser "brand" value, irrespective of the fact whether he/she has published equally original work as his/her counterpart from an Ivy league college. How much truth is in this statement? It would be really great if someone already in academia, either as a newly-accepted faculty or someone on the Faculty Hiring committee could share their experiences/statistics on this regard. I'm simply interested to know the answer, without commenting at all on whether such a practice is justifiable.  Similarly, what about recruitment to internationally acclaimed research labs (like  or ) - what importance do they place on the pedigree of a candidate's college, before taking into consideration what they published ?  I'm personally interested in answers related to the field of Computer Science (theory), but the question is applicable to any prospective grad student in any discipline in my opinion. Feel free to share your personal experiences post-Ph.D in detail, as that would give me (and future viewers of this question) about what its like to carve a career once you are out of school! Difference beween wiki page, application page, web part page and publishing page There are lots places in msdn sharepoint forums and blogs where these terms are used and I am confused between them. Can anybody clarify? Dropout: scaling the activation versus inverting the dropout When applying dropout in artificial neural networks, one needs to compensate for the fact that at training time a portion of the neurons were deactivated. To do so, there exist two common strategies:   scaling the activation at test time inverting the dropout during the training phase   The two strategies are summarized in the  below, taken from .  Which strategy is preferable, and why?    Scaling the activation at test time:    Inverting the dropout during the training phase: I know that an easy to handle formula for the CDF of a normal distribution is somewhat missing, due to the complicated error function in it.  However, I wonder if there is a a nice formula for $N(c_{-} \leq x &lt; c_{+}| \mu, \sigma^2)$. Or what the "state of the art" approximation for this problem might be. How can I restrict the Normal user to run the only limited set of commands in RHEL? Why don’t photons interact with the Higgs field and hence remain massless? small limits in the pointed category of a category with all small limits In Hovey, Model Categories, he says that given a category $\mathcal{C}$ with a small limits and colimits, if we form the category of pointed objects ,i.e. the category with objects as morphisms $*\rightarrow A$ where * is the terminal object, then this category $\mathcal{C}_*$also has all small limits and colimits.  To prove this, for any Functor $F:J\rightarrow \mathcal{C}_* $ where $J$ is small we compose it with the forgetful functor $\mathcal{C}_* \rightarrow \mathcal{C}$ and take the limit here. My question is how will this give a limit in $\mathcal{C}_*$? we will get an object in the category, but how do we get the arrow from $*$ to that object? Splitting string into pair of characters in Ruby I have a string (e.g. "AABBCCDDEEFF") and want to split this into an array with each element containing two characters - ["AA", "BB", "CC", "DD", "EE", "FF"]. AWS dynamodb support for "R" programming language What exactly are genes, DNA and chromosomes. How do they relate to each other and what is their function? So I am new to biology and I have been reading, and searching the web, but I couldn't understand the whole framework of a cell. So as I understood:    A DNA, is a double chain of Nucleotides (A,T,G,C and a sugar) and a phosphate residue. Some parts of a DNA code a gene and some do not, exons and introns accordingly. As I understand it these the sequences of exons hold genes and the whole sequence is called genome. Now I read in the book Introduction to Computational Molecular Biology by J. C. Setubal and J. Meidanis. that I cite Each cell of an organism has a few very long DNA molecules. Each such molecule is called a chromosome. So each X shaped thing called a chromosome holds one DNA molecule?   Or is each "hand" of the chromosome one complete double helix of DNA so we have 23 pairs of such chromosomes? or is it that each we 23 pairs Xs?   Shouldn't we have just one uniquely identifiable DNA sequence? I am asking this, because I have also read that each chromosome encodes a different part of one's genome. Does this mean we have several DNA sequences?   This is really bothering me, since I can't figure out the correct structure of a cell.   EDIT: Now if each chromosome contains a pair of DNA helices. We have 46 chromosomes so overall within the cell there are 92 DNA sequences? All of which are the same? Or are they different? If they are different how do they code for different aspects of one's genome? How was the first log table put together? Henry Briggs compiled the first table of base-$10$ logarithms in 1617, with the help of John Napier.  My question is: how did he calculate these logarithms? How were logarithms calculated back then?  I've found   to be fairly useful, but they don't seem to say much in the way of what I'm looking for. Any answers or useful references would be appreciated. Should we have a down-vote “safe zone” for new users with less than 50 reputation? Standard Visitor visa refusal (Deception, V3.6(b)) and procedure for reapplying My mother acquired a criminal record in UK in 2010 when she was given a conditional discharge for 12 months and charged £85. This time while applying the on-line applications for her, I accidentally missed the criminal records column and replied "NO". The visa was refused with appeal and administrative review not allowed.  Can someone please suggest my next course of action for reapplying for a visa  It is an extremely urgent family matter, and I want the visa as early as possible. While researching I found in a blog some mention of a forwarding letter while reapplying.  Can someone please enlighten me on the entire issue? SEO scope for multiple domains hosting on the same IP address Proving a function is constant, under certain conditions? The problem:  Assume $f: \mathbb{R} \rightarrow \mathbb{R}$ satisfies $|f(t) - f(x)| \leq |t - x|^2$ for all $t, x$. Prove $f$ is constant.  I believe I have some intuition about why this is the case; i.e. if $t$ and $x$ are very close, ($|t - x| = \epsilon$), then $\sqrt{\epsilon}$ will converge to 0, so $|f(t) - f(x)|$ will also converge to zero if you keep taking $t$ and $x$ closer and closer to each other. However, how do I formalize this argument? Thanks. Can abilities with a [Click] cost be used during a run? Some abilities have a [Click] cost to them, such as Crypsis' ability to add a virus counter to it.  Does it count as a "paid ability" for the purposes of the ? I.e. could I, mid-run, add a virus counter to Crypsis for the cost of one [Click]?