Mixing C and C++ code
How to call C++ function from C?
How to debug EntityMalformedException? I've got fatal error EntityMalformedException: Missing bundle property on entity of type node. in entity_extract_ids() (line 7700 of .\includes\common.inc) when trying to access user/xyz.  I tried to retrieve info about the malformed node at line 7700, where the error message is built, thinks like :  if (!isset($entity-&gt;{$info['entity keys']['bundle']}) || $entity-&gt;{$info['entity keys']['bundle']} === '') {  dpm($info);// or dpm($entity);  throw new EntityMalformedException(t('Missing bundle property on entity of type @entity_type.', array('@entity_type' =&gt; $entity_type))); }   dpm($entity) returns an unexpected user object, and $info a huge qty of things.   Could somebody put me on the right way ?  I already read whatever I could find about Missing bundle property errors, but none helped solving.  dpm($entity) returns  uid (String, 2 characters ) 70 name (String, 9 characters ) John pass (String, 55 characters ) $S$DUwPuOuDPiDL4nRTYXqc7a5uOfMKey7pyhOFUEKka1XM... mail (String, 30 characters ) john@example.com theme (String, 0 characters ) signature (String, 0 characters ) signature_format (String, 13 characters ) filtered_html created (String, 10 characters ) 1396286331 access (String, 10 characters ) 1397146661 login (String, 10 characters ) 1396513460 status (String, 1 characters ) 1 timezone (NULL) language (String, 2 characters ) fr picture (NULL) init (String, 30 characters ) john@example.com data (Array, 5 elements) roles (Array, 1 element) og_user_node (Array, 0 elements) message_subscribe_email (Array, 1 element) field_bio (Array, 0 elements) field_name_first (Array, 1 element) field_name_last (Array, 1 element) field_facebook_url (Array, 0 elements) field_linkedin_url (Array, 0 elements) field_twitter_url (Array, 0 elements) user_trusted_contacts (Array, 1 element) group_group (Array, 1 element) group_access (Array, 1 element) metatags (Array, 0 elements) rdf_mapping (Array, 3 elements) realname (String, 13 characters ) John Doe content (Array, 13 elements) entity_view_prepared (Boolean) TRUE privatemsg_disabled (Boolean) FALSE Approximating $\arctan x$ for large $|x|$ I would like to know if there is reasonably fast converging method for computing large arguments of arctan.  Until now I've came across Taylor series that converges only on interval $(-1,1)$ and for increasing $|x|$ the rate decreases. Also I've found about continued fractions for arctan, which seems to converge more rapidly and can be used for any real number, but again with increasing $|x|$ I need to perform way too much iterations until I get at least 3 digits precision.  I'm therefore looking for a method that would allow me to compute arctan for large arguments with good precision and in reasonable amount of iterations. How to download Ubuntu Server backups automatically? I'm thinking of an investment in a new root server running ubuntu. Due to the fact, that the provider won't have extra backup-space, I need an other solution.  Is it possible to download the server backups automatically when my desktop machine is connected to the internet and in idle state? LINQ's Distinct() on a particular property The Wiki page on  says     The pair $(m, m+2)$ is twin prime, iff $4((m-1)! + 1) \equiv -m \pmod {m(m+2)}$.   This is obviously connected to Wilson's Theorem. Can anybody provide a proof for that, along the lines of thought given here, ? python: restarting a loop Let $S$ be the collection of all groups. Deﬁne a relation on $S$ by $G \sim H$ iﬀ $G ≈ H$. Prove that this is an equivalence relation. So $S$ is partitioned into isomorphism classes.   Proof: Let $S$ be a relation on S defined by $G \sim H$ iﬀ $G ≈ H$. Show reflexive, symmetric, transitive. It is obvious that $G≈G$ so $G\sim G$.  Assume $G\sim H$, thus $G≈H$, which implies that $H≈G$, so $H\sim G$, thus symmetric.  Assume $G\sim H$ and $H\sim K$, for $K$ a group in $S$. Thus $G≈H$ and $H≈K$. (I have already shown that if $G≈H$ and $H≈K$, then $G≈K$). From earlier this implies that $G≈K$, so $\sim$ is an equivalence relation.  Thus $S$ is partitioned into isomorphism classes. QED. I am trying to prove that:  Let $f$ be analytic in the closed unit disc with $f(z)\leq 1$ for $|z|\leq1$.  For a given $0&lt;r&lt;1$ and $|z_1|,|z_2|\leq r$, $z_1\neq z_2$ then,   $$\left|\frac{f(z_2)-f(z_1)}{z_2-z_1}\right|\leq \frac{1}{(1-r)^2}.$$  My attempt is: part a  of the question asks to prove $$\left|\sum_k^\infty a_nz^n\right|\leq \frac{ |z^k|}{1-|z|}.$$   So, \begin{eqnarray*}  \left|\frac{f(z_2)-f(z_1)}{z_2-z_1}\right|&amp;=&amp; \frac{|\sum_1^\infty a_nz_2^n-\sum_1^\infty a_nz_1^n|}{|z_2-z_1|}\\  &amp;\leq&amp; \frac{\frac{ |z_1 |}{1-|z_1|}+\frac{ |z _2|}{1-|z_2|}}{|z_2-z_1|}\\  &amp;\leq&amp;\frac{1}{(1-r)^2} \frac{   |z_2| ({1-|z_1|})+  |z _1| (1-|z_2|) }{|z_2-z_1|}\\ \end{eqnarray*} But could not prove that the last term is controlled by 1. Need to understand parallel query execution error Today we experienced a degradation in performance on our production sql server.  Durring the time this occurred we logged several "The query processor could not start the necessary thread resources for parallel query execution" errors.  The reading that I've done suggests that this has to do with how many CPUs to use when executing a complex query.  However when I checked during the outage our CPU Utilization was only at 7%.  Is there something else this could be referring too that I haven't come across yet?  Is this a likely culprit of the performance degradation or am I chasing a red herring?  My sp_configure values for this are as follows:  name                                minimum maximum config_value run_value cost threshold for parallelism      0       32767   5            5 BASH script to set environment variables not working I've written the following script to set some environment variables when needed.  #!/bin/sh export BASE=/home/develop/trees echo $BASE export PATH=$PATH:$BASE echo $PATH   Below the command and the results I can see on my terminal: the script runs, but the variables are not set at the end.  ~$: ./script.sh /home/develop/trees /bin:......:/home/develop/trees ~$: echo $BASE  ~$:    What's wrong? Thanks in advance. Mirko this is my first question on PhysicsSE (I'm already an user of MathSE).   I'm a mathematics students trying to understand Faraday's law, that is   $$\varepsilon= -\frac{d \Phi_B}{dt}$$  where $\varepsilon$ means electromotive force and   $$\Phi_B=\iint \mathbf{B}\cdot d\mathbf{S}$$   means flux of magnetic field. As my textbook points out, there is an interpretation problem here: if the change in magnetic flux is due to movement of the conductor, then free charges in it are subject to Lorentz force, which then causes a current. On the contrary, if the conductor holds steady in a changing magnetic field, the induced current must be explained in terms of an electric field $\mathbf{E}$, described by the equations   $$\begin{cases} \nabla \cdot \mathbf{E}=\frac{\rho}{\varepsilon_0} \\ \nabla \times \mathbf{E} = - \frac{\partial \mathbf{B}}{\partial t}\end{cases}.$$  Question Do those equations hold if we have a moving conductor in a stationary magnetic field? I guess not: this would mean $\mathbf{E}=\mathbf{0}$. How to solve this? How is arccos derived? Stupid question but I need to understand:  If $ \cos = \dfrac{\text{adjacent}}{\text{hypotenuse}} $  What is arcosine? $ \text{adjacent} \cdot \text{hypotenuse}$? Is this the same for arcsine and arctangent? When would you call java's thread.run() instead of thread.start()? Easiest process for me to apply textures, created externally, to my models For the first time I'm working with an artist who is going to be creating the textures for the models I create in Blender.  Up till now I had been building the models and the texturing them myself using pre-built textures from websites.  My question is: What is the easiest process for me to apply the textures our artist creates to my model?  Should I give the artist the UV Map from my model, or should I just get textures from the artist and fit them to the UV Map?  Basically I have no idea how this process works in a professional environment. How can I render an object with an hdr background? I have an object with an hdr for the background. What do I do in Cycles to render the background with my object?  How is this different from an ordinary render in Cycles?  The hdr is a big one, 350MB. Do multi-use keys get discarded when finished with? As with many resident evil games, you sometimes needs to collect certain keys to open certain doors, and resident evil 7 has plenty of these around.  Some keys are clearly single use, and get left in the lock in which you use them. However, there are a number of keys that can be used on multiple doors. For example, the Scorpion Key.  I am concerned that I might end up carrying these around needlessly and using up valuable inventory space, so...  Do these multi-use keys get discarded when you use them on all the doors they apply to? Or do you get a warning saying the key is no longer needed? (like previous games are known to do) Is the op-amp inverting or non-inverting? I am studying the function and characteristic of an op-amp to build a line-following robot with the schematics below. However, in many tutorials, the way to differentiate an inverting and non-inverting op-amp is by looking at the connection to ground via the inverting or non-inverting terminal.  However, in the schematics, the op-amp is considered to have connections to ground, thus in this case, how do I differentiate it then?  I may have understood the whole concept wrongly. Pls help!    EDIT: Please ignore the switch as it may have been drawn wrongly by the supplier. How do I survive in the Nether? Whenever I travel to the Nether in Minecraft, I almost instantly get blasted to smithereens and chopped up into little pieces.  How do I survive in the Nether, at least long enough to build some sort of shelter and get situated? How do I get the UI thread's Dispatcher? Can the editor for editing tag descriptions get updated to match the normal questions/answers editor? The text editor that is shown when editing tag descriptions still uses the previous behaviour for inserting links and images. Also, the placeholder text for links is still http:// instead of https:// compared to the new editor. Another &quot;nice to have&quot; feature that exists in the main editor is the ability to paste an image from clipboard directly to the text editor without having to press the &quot;insert image&quot; toolbar-icon first. Can it get updated to match the editor we use for questions and answers?  The following screenshot is an example of how it looks if I try to insert a link for a tag description:  In comparison, this is how it looks in the new editor: