How to establish material and texture link via python script?
How can I connect a texture node to a material with Python?
Pivot rows into multiple columns I have a SQL Server instance that has a linked server to an Oracle server. There is a table on the Oracle server called PersonOptions which contains the following data:  ╔══════════╦══════════╗ ║ PersonID ║ OptionID ║ ╠══════════╬══════════╣ ║        1 ║ A        ║ ║        1 ║ B        ║ ║        2 ║ C        ║ ║        3 ║ B        ║ ║        4 ║ A        ║ ║        4 ║ C        ║ ╚══════════╩══════════╝   I need to pivot that data so the results are:  ╔══════════╦═════════╦══════════╦══════════╗ ║ PersonID ║ OptionA ║ Option B ║ Option C ║ ╠══════════╬═════════╬══════════╬══════════╣ ║        1 ║       1 ║        1 ║          ║ ║        2 ║         ║          ║        1 ║ ║        3 ║         ║        1 ║          ║ ║        4 ║       1 ║          ║        1 ║ ╚══════════╩═════════╩══════════╩══════════╝   Any suggestions? wilcox.test usage in R I would like to know if there is a difference in the values taken from measurements of a given characteristic sampled at primary forest (Point=1) and secondary forest (Point=0)  I'm using two vectors, one with the data itself (DATA$Measurements), and the other one with the category of sampling point (DATA$Point).  How should I perform the wilcox.test fucntion?  I'm doing this way:  wilcox.test(DATA$Measurements~DATA$Point) But I notice that are other forms of performing this test:  wilcox.test(DATA$Measurements,DATA$Point) wilcox.test(DATA$Measurements,DATA$Point,paired=TRUE) Which one is more suited for testing my question of interest (Is there a difference between points for this given characteristic), and what is the difference between these options?? Showing range on hexagonal grid Here is the situation.  I have hexagonal board,and a unit on it,with speed or move value 4.Diffrent terrain has a diffrent cost.When i click on the unit,game should show me a move range.  My solution was to check each  hex in range of 4,with A* pathfinding,and if path cost was less than 4 then this hex was in range.Finally game nicely show me range of that unit.  My question is:   Is there other solution to search for range on hex grids or square grid,because even if i am really proud of what i did in my solution,i think,it is a little to exaggerated?:))  What make me ask this question?I noticed that when unit speed is 4 or 6 or even 8,time to computing range for my computer was really good,but when speed was 10 and more i noticed that i needed to wait few second to compute.Well in real games i rather dont see something like this and my A* pathfinding is rather well optimized,so im thinking that my solution is wrong.  Thanks for any replies. I often have to write up reports based on the analysis of some data. I use R to analyse the data and export tables, figures, and text. This is then included into a LaTeX document either using input or Sweave ().  However, when I collaborate with others, I sometimes need to provide a document in Open Office / MS Word format.  Question:  Thus, assume the simplest scenario   I have a LaTeX document with text, tables, and figures I need to export this reliably into Open Office or MS Word format: this includes mathematical formulas, table formatting, and quality figures) I don't need to go back from MS Word to LaTeX   What is a reliable, efficient, and preferably free process?  Initial Thoughts:   Export to HTML,  LaTeX - LyX - ODF Use odfWeave  that deals with some specific issues associated with LaTeX to Open Office conversion    I was hoping that there is an expert out there who has worked out a good system already. I'm using NetBeans, trying to change the familiar Java coffee cup icon to a png file that I have saved in a resources directory in the jar file.  I've found many different web pages that claim they have a solution, but so far none of them work.  Here's what I have at the moment (leaving out the try-catch block):  URL url = new URL("com/xyz/resources/camera.png"); Toolkit kit = Toolkit.getDefaultToolkit(); Image img = kit.createImage(url); getFrame().setIconImage(img);   The class that contains this code is in the com.xyz package, if that makes any difference.  That class also extends JFrame.  This code is throwing a MalformedUrlException on the first line.  Anyone have a solution that works? I have a hierarchical category tree and checkboxes next to each item that allow to enable/disable the correpsonding category.    I assume it is an expected default behavior that all subategories of natural environment become checked when I check the natural environment category. But what about unchecking it again: Should this automatically uncheck all subcategories or restore the previous state in case some were checked already?  Furthermore... Should unchecking one of the subcategories cause the parent category to become unchecked? Prove that if $k\mid m,$ then $Z_m$ has a subgroup of order $k.$ Prove that if $k\mid m$, then $Z_m$ has a subgroup of order $k.$  Ok, so this doesn't look like too hard of a problem. So do I just show that it is closed under multiplication and inverse? I just don't know how I would do that with a problem like this. Can anyone help me get started please? WinBUGS: Multiple definitions of a node So this question is about the BUGS modeling language. So you either know it or have no clue. I'm a newbie to this so it's been driving me mad. I want to define a simple two-state hidden Markov model (HMM) where the emission of each state follows a Normal distribution. I have an array data of Nxl dimension where each row is a subject and column is a continuous variable Time associated with the subject. So in WinBUGS, I would define the model as:   for(i in 1:N) { # for each subject     # Sample the initial observation     Time[i, 1] ~ dnorm(mu[State[1]], tau[State[1]])      for(j in 2:l[i]) { # for each observation         # Sample the observed variables         Time[i, j] ~ dnorm(mu[State[j]], tau[State[j]])         # Sample the hidden states         State[j] ~ dcat(P[State[j-1], ])     } }  # P is the transition matrix of the hidden Markov chain P[1, 1:2] ~ ddirch(Pinit) P[2, 1:2] ~ ddirch(Pinit)  # Set the initial states State[1] ~ dcat(Pinit)  # Sample the initial params mu[1] ~ dnorm(200, 1.0E-6) mu[2] ~ dnorm(400, 1.0E-6)  # The precision params tau[1] ~ dgamma(0.001, 0.001) tau[2] ~ dgamma(0.001, 0.001)   Initial values have also been provided via R2WinBUGS. The model is syntactically correct. But when I run, I got this error: "multiple definitions of node State[2]"  Can you please tell me why and how to solve this? I've searched around on the error but each has their own specific case and there's not a generic solution or explanation as to why this arises. Already I have lost all hope of looking at late answers etc. It's just a parade of meh. I can't make any kind of intelligent decision because I can't see the other answers to the question, for instance. There's no Looks Good, only Skip, and those feel different to me. So I've been more interested in .  But people keep approving crap while I'm looking at it. Two or three "the post was already approved; please visit to edit" and I'm just "screw this whole thing".  Can we do something like one reject bounces all existing votes: you need three approves in a row? Because a lot of people are stupidly approving and actually driving me away from the queue.    Note this is less about letting bad edits through and more about keeping reviewers motivated. How to show $\lim_{n \to \infty} a_n = \frac{ [x] + [2x] + [3x] + \dotsb + [nx] }{n^2} = x/2$? This question came from the prelim exam I took last month. I have a proof that seems a bit unwieldy to me (posted as an answer), so I'm opening it up to ask if there are other ways of showing this.     Let $x$ be any positive real number, and define a sequence $\{a_n\}$ by   $$ a_n = \frac{ [x] + [2x] + [3x] + \dotsb + [nx] }{n^2} $$   where $[x]$ is the largest integer less than or equal to $x$. Prove that $\displaystyle{\lim_{n \to \infty} a_n = x/2}$. counting triangles in a graph or its complement Given a simple graph $G$ [no loops or parallel edges] on six vertices,  let $G^c$ denote its complement. It is known that either $G$ or $G^c$ must contain a triangle  $T$ in it. [An example of a Ramsey number I think.]   My question came up when I tried to find such a graph on six vertices  which had only one $T$ in it or its complement.  I believe if I did things right there are none of these. This I tried to check by drawing a copy of each graph $G$  on six vertices which has a $T$ in it,  and then looking at the complements to see if any had  no $T$'s in them. I found none.  One way to pose my question for a general number $n$ of vertices  is then as follows: Consider the set of all graphs $G$ on $n$ vertices,  and for each one construct $G^c.$  Count the number of $T$ in $G$ and add that to the number of $T$ in $G^c.$  Finally find the minimal such sum for the given $n$  and call that say $M(n).$ So my above six vertex conjecture  is that $M(6)=2.$   By considering a cycle graph on five vertices we find $M(5)=0.$   So going further one could ask if anything is known  about this minimum function $M(n)$ for larger $n$ [such as bounds, etc.] And does it have a name?  I would also like to see a simpler way to handle the six vertex case, one not involving drawing all the graphs. I think I have found the final answer $\left(4 \left[\frac{2t \cosh(4t) - \sinh(4t)}{t^2}\right]\right)$ but need to verify it. Motion tracked Video doesn't show up in the render or in the compositing tab I tried to add a 3D object to a clip by following a youtube video. But clip doesn't show up in the render or in the compositing tab. It show up even in the camera view. I didn't change any settings. please help. Thank you.    And the  rendered images has only the cube in it like in the picture above. Can't open a folder in windows 7 64bit, by double clicking, it shows me that the default option for opening folder is "cmd" (it's highlighted when i'm right clicking a folder, and the "open" option comes next). I've tried running some registry fixing tools, but it didn't fix it. Can someone suggest me what should I do. Method defined as testMethod do not support web service callouts, test skipped I have been struggling with this error for a few days now. I get this error every time I try to run a test for a method that has an httpCallout. I followed the architecture from  , but to no avail. I thought it could be something I was messing up in my code, so I copied all three of the classes from the documentation, and I am still getting the error when I try to run the test. All of the classes are on Salesforce API 29. Has anyone run into this before? It's been said that .  It the corresponding statement true for typical cryptographic hashes, like MD5, SHA-1, SHA-2 or SHA-3?  For example, would SHA-512 be bijective when hashing a single 512 bit block? How long does the Truffle take to move in after building the mushroom biome? I currently find myself in a pickle because even after I've built the mushroom biome and met all other requirements, the Truffle NPC won't move in.   I've defeated not only the Wall of Flesh but Ocram already. Created a surface mushroom biome. Built a house made out of mushrooms with mushroom furniture.   I have no idea how long it takes for the NPC to move in or if I'm wrong in any of the steps. Prove that if $A$ is transitive, then $\mathcal{P}(A)$ is transitive too. My book on set theory says     Prove that is a set $A$ is transitive, then $\mathcal{P}(A)$ is also transitive, where $\mathcal{P}(A)$ is the power set of $A$.   I don't know understand how. Let $A=\{a,b\}$. Clearly it is transitive. Now $\mathcal{P}(A)=\{\{a\},\{b\},\{a,b\},\emptyset\}$. This is clearly not transitive. Proving that $\sum_{n=0}^\infty \sum_{k=0}^n \frac{(-1)^n}{(k+1)\times (n-k+1)}$ converges How to clear the interpreter console?