loop through paragraphs ID's in node template In a custom twig template for content type "legal", I'm trying to loop through a 3-field paragraph called "legal_section." It's referenced by my content type, using an entity reference field called "field_legal_section" - set to allow unlimited entries. For each, I want to print the paragraph id. I'm not quite sure how, in this scenario. Maybe there's a little more involved than I thought?  I'm currently trying something like this, in the twig template:   {% if content.field_legal_section %}  {% for item in content.field_legal_section %}   id: {{ content.field_legal_section.id }}&lt;br/&gt;   show the 3 fields: {{ content.field_legal_section }}  {% endfor %} {% endif %}   If relevant, the individual fields within the paragraph called legal_section are:    field_legal_section_title  field_legal_section_subtitle  field_legal_section_body
How to print paragraphs in twig template? I have a content type, basic, where i have added a Paragraph field field_pr that has two fields: field_text, field_color. I have a twig template node--basic--full.html.twig where I want to print the value of the paragraph field node.field_pr.   node.field_pr can have between one and ten paragraph values.   When I print the array for content.field_pr, I get a huge array. However, I only want the values from the field_pr.field_text and field_pr.field_color. How would I be able to do this from the node twig template?   I have tried the following but cannot seem to access the values. What am I missing?  {% for field in content.field_pr %}    {{ field[loop.index0].entity.field_text.value }}    {{ field[loop.index0].entity.field_color.value }} {% endfor %}  {% for field in content.field_pr %}    {{ field[loop.index0]['#paragraph'].field_text.value }}    {{ field[loop.index0]['#paragraph'].field_color.value }} {% endfor %}   Here is an image of the array that is printed for the node.field_pr field.
Boolean Modifiers not working normally When using a Boolean modifier on an object, the "Operation" choices (Difference, Union, Intersect) are all not working normally. Choosing "Union" makes it do the effect of "Intersect" and "Difference" makes it do what "Intersect" is supposed to do. What's the deal here?   This is happening with following a simple tutorial. It's a simple primitive cube and primitive cylinder. No normals or doubles problems.   My specs are:  Macbook Pro 13" Retina early 2015 512GB i7 with 16gb RAM upgrade OS-X version 10.11.4 The PS4 is now released in the EU, but due to shipment shortages is not available for sale unless pre-ordered a long time ago. Luckily, it seems as though Dualshock 4 controllers are availble for sale in a number of shops already.  I've long decided to buy the PS4 as well as a second Dualshock 4 controller, so I've been considering buying the "second" controller now in order to replace my old Xbox 360 controller, whose D-Pad is useless and whose RB button no longer responds correctly. But before I buy the Dualshock 4 early, I wanted to know how well my PC will support it.  I already know that , but what exactly does work, and what doesn't?  Can I expect the same key-mapping on the PC as on a PS4?  Basically, can I replace my Xbox 360 controller with a Dualshock 4 and still play games like Batman Arkham Asylum/City/Origins as if I were using the old Xbox 360 controller? I'm having trouble restarting a 2D game when the user presses the "New Game" button.  Structure of my game:  The game has several 'screens': Opening screen, instructions screen, main game screen, and a game-over screen.  Each screen is an instance of a class: OpeningScreen class, GameScreen class, etc.  There is a class named Main. This class has three roles.   It's the JFrame (the window) of the program. It has the main method - first class to run. It has a method that change's screens.   When the program starts, this class runs. When it first runs:   Creates a new instance of itself (it's a JFrame-type class). Creates an instance of every 'screen-class'. The constructor of each 'screen-class' takes the instance of Main as an argument: (aka: GameOverScreen gameOverScreen = new GameOver(this)). Creates a new JPanel named mainPanel, and adds it to the JFrame. Any screen to be displayed will be contained in this JPanel (The screens are also JPanel-type classes).   How the changeScreen() method works:  The signature of changeScreen() is this: changeScreen(JPanel from, JPanel to).  Whenever a screen needs to be changed, the current screen that is displayed calls this method, like so: main.changeScreen(this, main.InstructionsScreen). It removes the previous screen from mainPanel and adds the new screen to mainPanel. As said, these screens are created when the program launches.  This is the method that changes screens:   public void changeScreen(JPanel from, JPanel to){      mainPanel.remove(from);     mainPanel.add(to);      mainPanel.revalidate();     mainPanel.repaint();  }   My problem:  After a game is finished, the Game class calls the changeScreen method: main.changeScreen(this, main.GameOverScreen) .  This replaces the game screen with a game over screen. Pressing the "New Game" button in the game-over screen, calls main.changeScreen(this, main.GameScreen) .  The problem: Pressing the "New Game" button in the game-over screen, indeed displays once again the instance of the Game class. But this is the old instance, so the game is not restarted. It's already finished.  I tried to do the following changes in changeScreen():  public void changeScreen(JPanel from, JPanel to){      mainPanel.remove(from);      if(to.equals(gameScreen)){         gameScreen = null;         gameScreen = new GameScreen(this);     }     mainPanel.add(gameScreen);      mainPanel.revalidate();     mainPanel.repaint();  }   This should reset the gameScreen object. But this creates a delay of about 10 seconds when pressing the "New Game" button.  What would be a good way of restarting the game?  Thank you How to prove that orthochronous Lorentz transformations $O^+(1,3)$ form a group? Orthochronous Lorentz transform are Lorentz transforms that satisfy the conditions (sign convention of Minkowskian metric $+---$) $$ \Lambda^0{}_0 \geq +1.$$ How to prove they form a subgroup of Lorentz group? All books I read only give this result, but no derivation.  Why is this condition $ \Lambda^0{}_0 \geq +1$ enough for a Lorentz transform to be orthochronous?  The temporal component of a transformed vector is  $$x'^0=\Lambda^0{}_0 x^0+\Lambda^0{}_1 x^1+\Lambda^0{}_2 x^2+\Lambda^0{}_3 x^3,$$ the positivity of $\Lambda^0{}_0$ alone does not seem at first glance sufficient for the preservation of the sign of temporal component.  And how to prove that all Lorentz transform satisfying such simple conditions can be generated from $J_i,\ K_i$?    For those who think that closure and invertibility are obvious, keep in mind that $$\left(\bar{\Lambda}\Lambda \right)^0{}_0\neq \bar{\Lambda}^0{}_0\Lambda^0{}_0,$$ but instead $$\left(\bar{\Lambda}\Lambda \right)^0{}_0= \bar{\Lambda}^0{}_0\Lambda^0{}_0+\bar{\Lambda}^0{}_1\Lambda^1{}_0+\bar{\Lambda}^0{}_2\Lambda^2{}_0+\bar{\Lambda}^0{}_3\Lambda^3{}_0.$$  And I'm looking for a rigorous proof, not physical "intuition". Can we have a way to edit bounty custom message? Let $A_n$ denote an $n \times n$ tridiagonal matrix.  $$A_n=\begin{pmatrix}2 &amp; -1 &amp; &amp; &amp; 0 \\ -1 &amp; 2 &amp; -1 &amp; &amp; \\ &amp; \ddots &amp; \ddots &amp; \ddots &amp; \\ &amp; &amp; -1 &amp; 2 &amp; -1 \\ 0 &amp; &amp; &amp; -1 &amp; 2 \end{pmatrix} \quad\text{for }n \ge 2$$  Set $D_n = \det(A_n)$  Prove that $D_n = 2D_{n-1} - D_{n-2}$ for $n \ge 4$. What are the C++ coding and file organization guidelines you suggest for people who have to deal with lots of interdependent classes spread over several source and header files?  I have this situation in my project and solving class definition related errors crossing over several header files has become quite a headache. From Wikipedia :     Suppose you're on a game show, and   you're given the choice of three   doors: Behind one door is a car;   behind the others, goats. You pick a   door, say No. 1, and the host, who   knows what's behind the doors, opens   another door, say No. 3, which has a   goat. He then says to you, "Do you   want to pick door No. 2?" Is it to   your advantage to switch your choice?   The answer is, of course, yes - but it's incredibly un-inituitive. What misunderstanding do most people have about probability that leads to us scratching our heads -- or better put; what general rule can we take away from this puzzle to better train our intuition in the future? How to make a "reflective tape" material in cycles? How can I make a cycles material that gets very bright when a light is shown on it, yet still has normal colors? I'm talking about the "" that can be seen on road signs, the tape on big trucks (like in the image below), traffic barricades and clothing.  Image by TollGroup on    This reflective stuff has a interesting property where the colors show up perfectly well, but when exposed to a light source they seem to reflect much more light the normal.  has lots of good reference images.  I have tried different combinations of glossy and diffuse shaders, but none work as I have yet to get the super bright reflections.  How can cycles make a material that reflects so much light, and keeps the colors correct? Javascript function only works if there's an alert Does anyone know what song plays at about ? Shorten title on each beamer slide In a beamer presentation the title is long but ok for the first slide. The problem is that when the title appears below on each slide it is very long and I would like to use here some sort of running or shorter title, how can this be done? Where is the open source project for the WMD editor used on this site? A question on limsup How do I remove "Ubuntu" in the bios boot menu? (UEFI) Prove $f(S \cup T) = f(S) \cup f(T)$ Almost every time I turn my XBox on and start up Fallout 4, I am unable to use the "Continue" option because the most recent save is corrupt.  I instead use the "Load" option. Here, I can see that the last save I manually performed is perfectly fine, and load it with no problem. However, there is an additional, corrupt save with the same time stamp immediately after it.  This doesn't happen quite every time, but often enough that I'm surprised when there's no corrupt save waiting for me to delete it.  I've tried a few things to solve this, including exiting to the game's main menu before turning the XBox off, going out to the guide before turning the XBox off, turning it off immediately after saving, and waiting a while after saving.  Why do I get all these corrupt saves? Do others have this problem? How do I fix it? What does the "private" modifier do? Considering "private" is the default access modifier for class Members, why is the keyword even needed? Workaround for Android 4.4 not being able to write to SD cards? Yesterday I upgraded my Samsung Galaxy S4 to Android 4.4 KitKat and had the bad surprise that it cannot write to my SD card anymore... I know this problem is widely documented everywhere, but has any workaround been found for it yet? (Other than removing the card physically from the phone and opening it on my PC) Also, because of the KNOX flag I can't downgrade to 4.3...  (PS: Rooted or not, it makes no difference) I want to add the Apache user (www-data) to the audio group. I've read the man page for useradd, but I'm not having any luck. I'm running xubuntu 11.10. Here's what I'm doing:  $ sudo useradd -G audio www-data useradd: user 'www-data' already exists   If I leave out the -G option, bash, prints the help info for useradd:  $ sudo useradd  audio www-data Usage: useradd [options] LOGIN Options: -b, --base-dir BASE_DIR       base directory for the home directory...   It's not clear to me from the man page what options I should use to make this work.