How to do an aligned realloc?
How to allocate aligned memory only using the standard library?
What are the minimum root filesystem applications that are required to fully boot linux? Fatal error: Call to undefined function add_action() - an untouched problem The question was asked many times in many ways, but unfortunately is not covered well in most of the answers. I'm having the same issue doing things using include-files.  In my TwentyFourteen child theme's functions.php I used:  require_once get_stylesheet_directory_uri() .'/admin-panel/theme-options.php';   And I'm using . I've used it in many of my projects, the same way mentioned here, without having the error. But recently I'm having the issue in several of my projects. If I take the code to functions.php then everything's fine. But it's occurring only when I'm trying to include/require external file.  I'm having the error:     Fatal error: Call to undefined function add_action() in C:\xampp\htdocs\project\wp-content\themes\my-theme\admin-panel\theme-options.php on line 2   In this case I'm having the error using a child theme (of T14). But even in one of my parent theme I'm facing the issue. But in the same environment my other projects are running well with all the includes and/or requires (where several add_action()s are defined). I'm having issues in ALL the add_action() calls, like CPT assigning, Custom Taxonomy assigning etc. But I'm successfully developing another two projects including external files from inc/ folder where all my CPTs are assigned and their meta boxes too.  I tried reinstalling WordPress, deactivating all my plugins, tried from Child Theme, tried only the same thing by modifying TwentyFifteen (applying default theme), tried require(), require_once(), include(), include, require_once, and require one after another with failure. And I'm using WP 4.1.1 in all the good and problematic installs.  Majority of the previous questions are answered with a simple line:     As the message says, you haven defined the function add_action() and yet you're trying to use it.   But,   how come (isn't it already defined by WordPress)? and why it's differing project to project in the same environment (How come it's out of the scope now only in particular project[s])? How can we print line numbers to the log in java How to print line numbers to the log. Say when outputting some information to the log, I also want to print the line number where that output is in the source code. As we can see in the stack trace, it displays the line number where the exception has occurred. Stack trace is available on the exception object.  Other alternative could be like manually including the line number when printing to the log. Is there any other way? I am having a strange problem in ArcGIS Toolbox.  I am trying to use the  tool from ArcToolbox. When I open the tool, there is no possibility to input Simplification Tolerance. Please see the attached image.  I can run the tool as a batch and from the Python window without any problem.  I am using ArcGIS 10(Editor) with Service Pack 5 on Windows 7 64Bit (English) and Windows Server 2008 64Bit (German). On both machines, I have the same problem. Any ideas?    I have reinstalled the software but the problem remains. How does atan2 work when getting angle of a vector? I know that atan2 gives me the absolute angle of any vector. But it doesn't give a value from 0 to 360 degrees. Instead, it gives a value (if I'm not mistaken), between 0 and 180, or between 0 and -180. For example, instead of giving angle 270, it will say -90.  This is a little confusing for me. Let me try to describe how I think this works, and please tell me if I'm correct. Actually, I'll draw it.    Is this correct? I'm having a little trouble understanding this. Thanks Why commutator subgroup is normal to G? If $G$ is a group and $G'$ is generated by $\{xyx^{-1}y^{-1}|x,y\in G\}$, then $G'\trianglelefteq G$ and  $G/G'$ is Abelian.  At first, I thought this is easy because I thought $g[x,y]g^{-1}=[gxg^{-1},gyg^{-1}]$. But it was a mistake. I could not prove that it is also subgroup of G and $G/G'$ is abelian. I need help. Would a Bayesian admit that there is one fixed parameter value? In Bayesian data analysis, parameters are treated as random variables. This stems from the Bayesian subjective conceptualization of probability. But do Bayesians theoretically acknowledge that there is one true fixed parameter value out in the 'real world?'  It seems like the obvious answer is 'yes', because then trying to estimate the parameter would almost be nonsensical. An academic citation for this answer would be greatly appreciated. Deriving the Lagrangian for a free particle I'm a newbie in physics. Sorry, if the following questions are dumb. I began reading &quot;Mechanics&quot; by Landau and Lifshitz recently and hit a few roadblocks right away.  Proving that a free particle moves with a constant velocity in an inertial frame of reference ($\S$3. Galileo's relativity principle). The proof begins with explaining that the Lagrangian must only depend on the speed of the particle ($v^2={\bf v}^2$): $$L=L(v^2).$$ Hence the Lagrance's equations will be $$\frac{d}{dt}\left(\frac{\partial L}{\partial {\bf v}}\right)=0,$$ so $$\frac{\partial L}{\partial {\bf v}}=\text{constant}.$$ And this is where the authors say   Since $\partial L/\partial \bf v$ is a function of the velocity only, it follows that $${\bf v}=\text{constant}.$$  Why so? I can put $L=\|{\bf v}\|=\sqrt{v^2_x+v^2_y+v^2_z}$. Then $$\frac{\partial L}{\partial {\bf v}}=\frac{2}{\sqrt{v^2_x+v^2_y+v^2_z}}\begin{pmatrix} v_x \\ v_y \\ v_z \end{pmatrix},$$ which will remain a constant vector $\begin{pmatrix} 2 \\ 0 \\ 0 \end{pmatrix}$ as the particle moves with an arbitrary non-constant positive $v_x$ and $v_y=v_z=0$. Where am I wrong here? If I am, how does one prove the quoted statement?  Proving that $L=\frac{m v^2}2$ ($\S$4. The Lagrangian for a free particle). The authors consider an inertial frame of reference $K$ moving with a velocity ${\bf\epsilon}$ relative to another frame of reference $K'$, so ${\bf v'=v+\epsilon}$. Here is what troubles me:   Since the equations of motion must have same form in every frame, the Lagrangian $L(v^2)$ must be converted by this transformation into a function $L'$ which differs from $L(v^2)$, if at all, only by the total time derivative of a function of coordinates and time (see the end of $\S$2).  First of all, what does same form mean? I think the equations should be the same, but if I'm right, why wouldn't the authors write so? Second, it was shown in $\S$2 that adding a total derivative will not change the equations. There was nothing about total derivatives of time and coordinates being the only functions, adding which does not change the equations (or their form, whatever it means). Where am I wrong now? If I'm not, how does one prove the quoted statement and why haven't the authors done it? A story about the world split into three realms This is a series I read partially something like 15 years ago (I think). It is set in a universe with magic of some sort - I think the magic was derived from geological processes (?). One of the things I remember - which was the reason I abandoned the series - was that it grew ever more gory; when I stopped reading, one of the main protagonists was flayed alive.   I only remember fragments - there were hints that the universe had been magically split into three or four parts, three relatively normal parts and The Void. I remember there was a powerful person/ruler called Tensor, and a kind of monstrous race with powerful magic, called 'Lorsk', which originated in the void and had evolved from humans that had been trapped there.  I'm a bit ambivalent about reading the series again - it seemed to be a never-ending death spiral of soap operatic proportions, but I'd like to see if my impression from then was actually right. Order of an element in a finite cyclic group Let $G$ be a cyclic group of order $m$ generated by an element $a$.  I want to show that the order of $a^k$ is $m/d$, where $d:=\gcd(k,m)$.  I have a simple proof, but want to make sure I haven't overlooked anything since the other proofs I've seen (such as in Dummit and Foote) look more complicated.    The order of $a^k$ is the cardinality of the set $\{a^{ks}: s \in \mathbb{Z}\}$, which equals the cardinality of the set $\{a^{ks} a^{mt}: s,t \in \mathbb{Z} \}$ since $a^m$ is the identity.  But the set $\{ks+mt: s,t \in \mathbb{Z} \}$ is the set $d \mathbb{Z}$ by the basic properties of integers. So we have that the cardinality of the set is $| \langle a^k \rangle| = |\{1, a^d, a^{2d}, \ldots, a^{m-d} \}| = m/d$. I realised, reading another Phys.SE question about  that I don't really understand how  works. Particularly concerning, for a SCUBA diver.  The top answers to that question seem to claim that balloons get their "sense of down" from a pressure differential. They continue: when a car accelerates, the air at the back of the car becomes more dense, and at the front less dense, changing the plane of the pressure differential and so also, the balloon's sense of up. I find that extremely hard to credit. However, I realised that I don't really know why less dense things float in more dense things.  I'm fairly sure it's something to do with displacement of heavier things by lighter things, and I think pressure acting on the lighter thing's surface has something to do with it, but that's about it. Can an irrational number raised to an irrational power be rational? Divisor function asymptotics Define $\tau_{r}(n) = \sum_{d_1...d_r = n}1$.   One exercise in a book on sieve theory asked for an elementary proof by induction of the fact that   $$\sum_{n\le x}\tau_r(n) = \frac{1}{(r - 1)!}x(\ln x)^{r - 1} + O\left(x(\ln x)^{r - 2}\right)$$  The base case $r = 2$ is easy with reversing the order of summation.  The only other progress that I made was the fact that $\sum_{n\le x}\tau_{r}(n) = \sum_{d\le x}\left\lfloor\frac{x}{d}\right\rfloor\tau_{r- 1}(d)$, but I don't know how to proceed. Prove that formula is not tautology. Show Kripke's model proving that the following formula isn't tautology in intuitionistic logic. $ \neg ( p \wedge q ) \implies (\neg p \vee \neg q) $  Please help/hint me ;) Why are springs shaped the way they are? Why are springs coiled the way they are? Why not some other shape? Is the shape due to its elasticity or something? How to break out of multiple loops? Given the following code (that doesn't work):  while True:     #snip: print out current state     while True:         ok = get_input("Is this ok? (y/n)")         if ok.lower() == "y": break 2 #this doesn't work :(         if ok.lower() == "n": break     #do more processing with menus and stuff   Is there a way to make this work? Or do I have do one check to break out of the input loop, then another, more limited, check in the outside loop to break out all together if the user is satisfied? MySQL strip non-numeric characters to compare Certificate error when using Citrix Receiver Flying with a desktop computer (as checked luggage) On an upcoming trip, I will be taking a desktop computer and monitor as checked luggage (on a United/Continental flight). What should I be aware of when doing this? What needs to be done to properly protect all the components? Are there any airline policies I should be aware of? Remove Meta Privilege for MSE (only)