I am getting following error in drupal 8 :   The website encountered an unexpected error. Please try again later.  Twig_Error_Syntax: Unknown "check_markup" function.  Twig template line :   {% set featured_portfolio_text = check_markup(featured_portfolio_array['field_portfolio_link_text']['#items'][0]['value'],'full_html') %}   Is there any alternative to check_markup function for twig?
I am trying to modify output in my twig file. In D7, I was able modify data in my array with this  check_markup($tweet-&gt;text, 'full_html');   and I see that this function still exists in D8. However, I'm not sure how I would use this in a filter in twig. This is what I have so far:  {% for tweet in params.tweets %} &lt;div class="tweet-wrapper"&gt; &lt;div class="tweet-profile-image"&gt;     &lt;img src='{{ tweet.user.profile_image_url }}'/&gt; &lt;/div&gt; &lt;div class='tweet-text'&gt;     &lt;!--check_markup($tweet-&gt;text, 'full_html');--&gt;     {{ tweet.text }} &lt;/div&gt;   &lt;/div&gt; {% endfor %}   I actually tried to do this before I sent it to the template as well, but it didn't change anything:   foreach($tweets as $tweet) {   $tweet-&gt;text = check_markup($tweet-&gt;text, 'full_html');   $cleanTweets[] = $tweet; } dpm($tweets); $params = array('tweets' =&gt; $cleanTweets); $tweet_template = array('#theme' =&gt; 'twitter_pull_tweet_listing', '#params' =&gt; $params); return $tweet_template;   What I'm trying to do here is make drupal create links for web links in the twitter tweet text. This worked fine for me in D7.
Continuous and bounded variation does not imply absolutely continuous Upgrade to the specific php 7.1/7.2 from php 7.0 in Ubuntu 16.04 How can I upgrade to php 7.1 from php 7.0 in ubuntu 16.04 ?  If I do a php -v I get this message:  PHP 7.0.8-0ubuntu0.16.04.3 (cli) ( NTS ) Copyright (c) 1997-2016 The PHP Group Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies     with Zend OPcache v7.0.8-0ubuntu0.16.04.3, Copyright (c) 1999-2016, by Zend Technologies How to extract and install .deb without the command dpkg? I am running Debian jessie stable in order to understand how the .deb package interacts with the system. What is the correct way to extract and install a packge_name.deb without the command dpkg? Styling an input type="file" button I am confused by the behaviour of Currency fields in Multi-Currency environments. My app does a calculation on day X and stores its result in a record.  The custom page which displays a SUM of those values should always display the same as a database query. But...it does not. If I change Exchanges Rates those values change.  Was it wrong to store currency values in a Currency field, am I querying incorrectly or do I need to display a values that is manually calculated?  How does Multi-Currency and Currency fields work together? When are currency values converted and which conversion rate is taken into account?  I am confused?! How to prove that $p-1$ is squarefree infinitely often? How to prove that $p-1$ is squarefree infinitely often, where $p$ is prime?  I had thought of using Dirichlet's theorem on arithmetic progressions.  The number of squareful values of $p-1$ less than or equal to $n$ is bounded by $\sum_{q}{\pi_{q^2,1}(n)}$, each term $\pi_{q^2,1}(n) \approx \frac{\pi(n)}{q \cdot (q-1)}$, and $\sum_{q}{\frac{1}{q \cdot (q-1)}} \lt 1$.  But using for example , the possibility is open that the error in each approximation for $\pi_{q^2,1}(n)$ may continue to increase with $q$, and since the sum runs up to $\sqrt{n}$, this argument is invalid.  Is there a more refined version of Dirichlet's theorem that can be used to circumvent this issue?  Or an entirely different way to prove this statement? A charged particle undergoing an acceleration radiates photons.  Let's consider a charge in a freely falling frame of reference.  In such a frame, the local gravitational field is necessarily zero, and the particle does not accelerate or experience any force. Thus, this charge is free in such a frame. But, a free charge does not emit any photons. There seems to be a paradox. Does a freely falling charge in a gravitational field radiate? Getting raw SQL query string from PDO prepared statements Is there a way to get the raw SQL string executed when calling PDOStatement::execute() on a prepared statement? For debugging purposes this would be extremely useful. I am currently in the process of trying to repair a power supply that has had one of its DC rails fail. A resistor in the PSU has exploded and I am trying to find what value it is.    Band 1: White Band 2: Brown Band 3: Silver (Possibly Grey?) Band 4: Gold Band 5: Green    The weird thing is that the middle band appears to be silver, which should be invalid as far as I can tell. If you assume the silver is grey (although this is unlikely, as there still needs to be a grey colour as well and the band is metallic), it produces a value of resistor which is incredibly uncommon to the point it does not exist (91.8 Ohms 0.5%).  Apologies for the noobie question, I'm just stumped after hours of trying to understand why this is and coming up short :). Prove that $A \smallsetminus (A \smallsetminus B) = A \cap B$ $A$ and $B$ are any sets, prove that $A \smallsetminus (A \smallsetminus B) = A \cap B.$ This formula makes sense when represented on a Venn diagram, but I am having trouble with proving it mathematically.  I have tried letting $x$ be an element of $A$ and continue from there, but it doesn't seem to work out as a valid proof anyways.   Could anyone please point me in the right direction?  Many thanks. I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}? How to calculate $(G/H)/(K/H)$? I have a group $G=\mathbb{Z}_{36}$ with normal subgroups $K$ and $H$, where $H$ is also a normal subgroup of $K$. What I'm really supposed to find is a bijection between $G/K$ and $(G/H)/(K/H)$ by using the third isomorphism theorem. I have already calculated $G/K$, $G/H$ and $K/H$, but I do not really know how to calculate $(G/H)/(K/H)$. Say that one of the elements in $G/H$ is $\{0,18\}$ and one of the elements in $K/H$ is $\{0,18\}$. Will one of the elements in $(G/H)/(K/H)$ be as follows? $$\{0,18\}+\{0,18\} = \{0+0,18+18\}=\{0,36\}=\{0\}$$ Another way I'm thinking it's possible to caluclate is $$\{0,18\}+\{0,18\} = \{0+0,0+18,18+0,18+18\}=\{0,18,18,36\}=\{0,18\}$$ Is any of these a correct way of calculating an element in $(G/H)/(K/H)$? Programmatical Setting of 'Store Relative Pathways' for multiple MXDs ArcGIS 10.1 I am looking to move large number of mxds to a different location on the same drive. Many mxds haven't got 'Store relative pathways' option checked therefore this operation will result in broken links to data. I've only started using ArcGIS 10.1 and it is now possible to programmatically update relative pathways for all mxds by using arcPy and setting relativePaths to be "True". I had a go at writing Python script which (in theory) loops through a top folder and searches for all mxds and then updates "Store relative pathways" setting to be on. When I run this script in PyScripter, it fails to complete, I get the following error:  "exceptions.NameError: name 'mxd' is not defined  Can anyone help ?!? Thanks in advance, Magda      import arcpy, os  folderPath = r"C:\My Folder Path\...\...\..."  for filename in os.listdir(folderPath):     fullpath = os.path.join(folderPath, filename)     if os.path.isfile(fullpath):         basename, extension = os.path.splitext(fullpath)         if extension.lower() == ".mxd":             mxd = arcpy.mapping.MapDocument(fullpath)             mxd.relativePaths = 'True'         mxd.save() del mxd How to read over 4k input without new lines on a terminal? So I have a lot of data WITHOUT NEW LINES on the clipboard (it's a large SVG file on one line). I went  $ cat &gt;file.svg   then tried to paste (in Gnome Terminal), but only the first 4kB characters were accepted.  I assume this is a readline feature/limitation.  Is there a way to read from STDIN that would avoid this problem?  EDIT  Test case: Create a demo file. This one will have ~4k "=" symbols followed by "foo bar".  { printf '=%.0s' {1..4095} ; echo "foo bar" ; } &gt; test.in   Copy that into your clipboard  xclip test.in   (if you want to middle-click to insert) or  xclip -selection clipboard test.in   (if you want to use Ctrl-Shift-Insert to past it in)  Then cat &gt;test.out, paste (whichever way). Press Ctrl-D to end the stream. cat test.out - do you see "foo bar"?  On my set-up (Ubuntu 12.04, Gnome Terminal, zsh) when I paste I only see the = and I don't see foo bar. Same when I inspect test.out. Someone told me that the English language is special (compared to German, at least) in the way that every noun could be used as a verb. I think this phenomenon is called supine. Is this correct?  Examples:   house → to house well → to well phone → to phone table → to table lamp → to lamp   At first it seemed to me that this would work with all nouns. But then I thought of the following nouns, and I think they can't be used as a verb, am I right?   person →(?) to person human →(?) to human baker →(?) to baker computer →(?) to computer example →(?) to example   It seems that nouns describing people (person, human, baker) are exceptions? But it works for "author" ("to author"). Hmm. "Computer" seems smiliar to a person's job to me (could be a human instead of a machine that computes).  But what about "example"? I think "to example (something/someone)" is not possible, is it? What would a native speaker understand/think if someone says:      He examples.      I want to example it/him.   Which are the nouns that can't be used as a verb? How to handle OutOfMemoryError in Java? Are the proofs for the properties of parallel lines, and that a triangle has 180 degrees, inherently tautological? I've noticed something while trying to prove the properties of parallel lines, and the properties that a triangle has 180 degrees. To prove the properties of parallel lines, such as alternate angles, you need to use the property that a triangle has 180 degrees. To prove a triangle has 180 degrees however, you need to use the properties of parallel lines. This really bothers me because of how circular it is. They are both reliant on each other to be true, and do not logically show, without being reliant on each other, why triangles have 180 degrees, and why parallel line properties are true.   So what I hoping for here is a way to prove parallel line properties without using the fact that a triangle has 180 degrees, or a way to prove triangles have 180 degrees without using parallel line properties. This way, things will be logical to me, and make sense.   Thanks in advance. Do photons truly exist in a physical sense or are they just a useful concept like $i = \sqrt{-1}$? Reading about photons I hear different explanations like "elementary particle", "probability cloud", "energy quanta" and so forth. Since probably no one has ever seen a photon (if "seen" it supposedly - and rather conveniently - ceases to exist) but many experiments seem to verify its properties (or are they maybe adjusted to fit the experiment). I thus can't help wondering if the "photon" is then just a physical/mathematical tool with inexplicable properties (like zero mass - but affected by gravity fields - and constant speed c in space) invented to explain some otherwise unexplainable phenomem and to supplement the elementary particles and their interactions. In short: Are they real or imaginary!  Does anybody know? Or maybe the answer is "blowing in the wind" because to most physicist it probably just does'nt matter as long as it works (as the alternative healers say). Sorry if I seem a little sarcastic here and there. How to implement a follow author (or user) function? Is it possible to implement a Follow button for authors of posts in Drupal 7, so that users can:   Follow any one they wish, and Be notified about the new posts of those authors.   This sounds like 'Mashable Follow button' for authors.  Do you have any suggestions about how to implement this? Since a few months, on one of the desktop Ubuntu 14.04 systems I use, CPU has regularly been going up to 80-100% for no apparent reason. htop would usually attribute responsability to file system processes, such as nemo or ntfs. To get CPU back down I would kill these process, which in some cases would lead to loss of access to the file system and a consequent restart.  Days ago I noticed that whenever this situation happened another process was always present also using high CPU: mediascanner-service-2.0. Some research lead me to  that simply advised its removal. So I did.  The end result has been unexpectedly positive: not only are the high CPU load episodes gone, the system is altogether much faster. The speed up of the Lens is dramatic: finding an application like Calc now takes 2 seconds at most when previously it took some 20 seconds. Finding a file takes now some 5 seconds, whereas before it took in the order of 30 seconds. Heavy programmes like Eclipse are starting up faster and workspaces are more fluid. There seems to be also an overall reduction in the frequency of disk access.  What is exactly this mediascanner2.0 package? Is it part of Unity 7 or a dependency that gets installed a posteriori? Is it possible to prevent its installation?  Update: following  it is possible to track this package down to indicator-session:  $ sudo aptitude why mediascanner2.0 i   indicator-session         Recommends indicator-applet (&gt;= 0.2) | indicator-renderer i A unity8                    Provides   indicator-renderer                             i A unity8                    Recommends unity-scope-mediascanner2                      pi  unity-scope-mediascanner2 Depends    mediascanner2.0                                  Apparently, mediascanner2.0 (and the Unity 8 shell) are part of the base 14.04 system. Left to answer is the exact function of this rogue package.