I want to get the device whether is it Mobile,Tablet,Iphone or desktop based on the screen width. I know about breakpoint and picture module. But I need to change some HTML based on that condition. How can I get the condition in tpl file.
Using Drupal 7.14 with the PHP filter on I have the following in a Basic Page content type:  &lt;?php if ($is_mobile == TRUE):?&gt; &lt;div class="fb-like-box" data-href="http://www.facebook.com/a page" data-width="710" data-height="600" data-show-faces="false" data-border-color="#73AA4B" data-stream="true" data-header="false"&gt;&lt;/div&gt; &lt;?php else: ?&gt; &lt;div class="fb-like-box" data-href="http://www.facebook.com/a page" data-width="900" data-height="600" data-show-faces="false" data-border-color="#73AA4B" data-stream="true" data-header="false"&gt;&lt;/div&gt; &lt;?php endif; ?&gt;   I get the error message:  Notice: Undefined variable: is_mobile in eval() (line 1 of D:\websites\modules\php\php.module(80) : eval()'d code).  I sort of understand - I'm trying to grab a variable from the Drupal system but is there any way to do this? Maybe using Tokens?
How to identify predatory publishers/journals What are the best strategies for assessing if a journal is a &quot;vanity&quot; or &quot;predatory&quot; journal that should be avoided (both for publishing in and reviewing for)? For example, how would one go about determining if a journal/publisher belongs on ? Are Jedi bound by a code of honor or morals? In The Phantom Menace alone, Qui-Gon (and in part Obi-Wan) are quick to use Jedi mind tricks and not only gamble but also cheat at it. They seem happy with this fact.  Do Jedi have morals and ethics, or a code of honor? pfsense more than 2 isp provider is it possible to bridge more than 2 isp provider using pfsense? what router or device can bridge 2 or more isp providers in a router? i am planning to bridge at lease 5 isp providers to create a very good internet connection, what can i do to link all 5 providers in 1 router? What does the @ symbol before a variable name mean in C#? Possible Duplicate:          I understand that the @ symbol can be used before a string literal to change how the compiler parses the string.  But what does it mean when a variable name is prefixed with the @ symbol? How does Ubuntu partition the disk when we choose "Erase disk and install Ubuntu" during installation? How will Ubuntu automatically allocate the disk partition sizes when we select Erase disk and install Ubuntu during installation?    Can the settings for automatic space allocation be changed? As a result, I am able to be understanding and accommodating to the people that I work with, including clients, which I believe is an important asset for a professional to have.   I wanted to make sure it is absolutely known that I mean to acknowledge clients as a class of people I can work with. Is this the right way to include it with commas? FM Transmitter oscillation problem I've been trying to get this simple FM transmitter to work over the past few days and I could use some help in a few areas.      First iteration was on a breadboard with all parts included.  The exception being I didn't have a 0.1uH coil handy but I had another coil rated at 0.7uH (using my LCR meter).  I also didn't have a C4 value of 4.7pF but I had a 10pF value.  I figured I could just tune it later.  I hooked a scope up to it and got no oscillation.  I tried connecting the probe to the gate and the collector separately and together.  Still no oscillation.  Second iteration.  I removed the audio component of the circuit.  Essentially everything to the left of C2.  I had gotten that working no problem anyway so I figured I would concentrate on the oscillator.  This time I tried different values for the inductor ranging from 20uH to 1mH and different fixed values for the variable cap (10pf, 20pf, 30pf).  These were all ceramic caps. No love.  Third iteration. I tested the transistor to make sure that wasn't the issue.  Seems fine.  PN2222A variety. (Also tried 2N3904 and BC547). I then modeled this up on a piece of perf board.  I even found a SMD inductor of 0.1uH so now I thought I would be good.  Tested all the pieces on the meter before installation. Still nothing. I'm not seeing anything on the spectrum analyzer either.  Questions:   Do you think my benchtop power supply is causing a problem?  All the various versions of this type of FM transmitter circuit on YouTube and the Internet all seem to use a battery.  Any chance the 60Hz main power is messing with things?  I've put .1uF and higher caps on the power rails. I have a 200Mhz SIGLENT SDS1202X-E scope.  I've built and tested other oscillators up to a few MHz before with no issues.  Any thoughts on that being the issue?  I would expect to see something on the scope right? Any chance the probe is dampening the oscillations?     I know there are a lot better FM transmitter circuits out there I was just experimenting with this (and others like it) and couldn't get any to work. Monic $f(x)\in\Bbb Z[x]$ has no rational root if $f(0)\ \&\ f(1)$ odd [Parity Root Test, Modular Root Test] A polynomial problem from my old algebra textbook:     $f(x)\in\Bbb Z[x]$ with leading coefficient $1$, $\deg f(x)\ge 1$, and both $f(0)$ and $f(1)$ are odd numbers, prove:   $f(x)$ has no root within $\Bbb Q$   Eisenstein's criterion seems to be of little help here because we know virtually nothing about the coefficients. So I tried some other approach. Let $$f(x)=a_0+a_1x+a_2x^2+\cdots+a_{n-1}x^{n-1}+x^n\in \Bbb{Z}[x]$$ What we have known so far is $$f(0)=a_0\text{ is an odd number}$$ and $$f(1)=a_0+a_1+a_2+\cdots+a_{n-1}+1 \text{ is an odd number}$$ from which we can also conclude that $$f(1)-f(0)=a_1+a_2+\cdots+a_{n-1}+1\text{ is an even number}$$ To be honest I don't know how to proceed now. It isn't until just now that I realized "irreduicible" is not equivalent to "has no roots".. So all my previous attempt is fundamentally wrong.. Can anybody help or drop a hint? Best regards! ArcPy importing error after setting path? This questions has been asked before too and I did go through most of the suggestions. Things I have tried so far: setting up correct  path variable environment, installing anaconda 32 bits, python 2.7, or even switching to python 2.7 in cmd while initially using Anaconda 3 , adding Desktop 10.4.pth file with  following path.  C:\Program Files (x86)\ArcGIS\Desktop10.4\bin C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcToolBox\Scripts   I also added those paths in environment variable   These suggestions help me to reduce the error. But Now I am getting a different error. Looks like python can find arcpy but missing another package.  Getting this error while trying to import arcpy in python 3.6.   File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\__init__.py", line 22, in &lt;module&gt;     from arcpy.geoprocessing import gp    File "C:\Program Files (x86)\ArcGIS\Desktop10.4\ArcPy\arcpy\geoprocessing\__init__.py", line 14, in &lt;module&gt;     from _base import *  ModuleNotFoundError: No module named '_base'   Any suggestions? I just need to check the reasoning in my proof is correct, I think it is valid although I'm not totally convinced because I can't follow the logic; does proving that $x$ is an integer prove that $ac|bd$?  Theorem: Let $a$, $b$, $c$, $d$ be integers. If $a|b$ and $c|d$, then $ac|bd$.  Proof: $aj=b$ and $ck=d$ for integers $j$, $k$. Then, $ac|bd$ implies $acx=ajck$ and thus $x=jk$ for some $x$. Since the product $jk$ is an integer, $x$ is an integer and thus $acx=ajck$ and thus $ac|bd$. How do I send a file as an email attachment using Linux command line? I've created a script that runs every night on my Linux server that uses mysqldump to back up each of my MySQL databases to .sql files and packages them together as a compressed .tar file.  The next step I want to accomplish is to send that tar file through email to a remote email server for safekeeping.  I've been able to send the raw script in the body an email by piping the backup text file to mailx like so:  $ cat mysqldbbackup.sql | mailx backup@email.com   cat echoes the backup file's text which is piped into the mailx program with the recipient's email address passed as an argument.  While this accomplishes what I need, I think it could be one step better, Is there any way, using shell scripts or otherwise, to send the compressed .tar file to an outgoing email message as an attachment?  This would beat having to deal with very long email messages which contain header data and often have word-wrapping issues etc. What is the origin of "a cut above/below the rest"? Custom hard edges in Blender How do I get the last column text to be at the bottom of the row?  That is I want the XXX to be aligned with the line containing the arrow. I tried playing around with \multirow{3}{-3ex}{XXX}, but obviously I don't understand \multirow. Code: \documentclass{article} \usepackage{tabularx} \usepackage{booktabs} \usepackage{multirow}  \begin{document}     \begin{tabularx}{\linewidth}[t]{l X p{1.3cm}}         &amp; Header &amp; Title \\\cmidrule(lr){2-2}\cmidrule(lr){3-3}         a. &amp; Some text text text text text text text text text text text text text text              text text text text text text text text text text              Want XXX on this line $\rightarrow$%          &amp; XXX\\     \end{tabularx} \end{document} How can I get this 'Version: 0.1.0 - 94" value from the  tag in selenium webdriver? How can I get this Version: 0.1.0 - 94 value from the &lt;div&gt; tag in selenium webdriver? and here is my code:  &lt;div _ngcontent-qbk-c3="" style="text-align: center;"&gt;Version: 0.1.0 - 94&lt;/div&gt; How can I instantiate a generalized hash function? I've come across a bunch of "strange" hash function notations, such as the following ones and now I don't know how to choose / instantiate them.  Can you please explain me what this notation means and how I can actually instantiate such a hash function?  The notation in question: $$H_1:\mathcal M \rightarrow \mathbb F_p$$ $$H_2:\mathcal M \rightarrow \mathbb Z_n^*$$ $$H_3:\mathcal M \rightarrow \{0,1\}^l$$ $$H_4:\mathcal M_1\times ...\times \mathcal M_k\rightarrow \mathcal S$$  where $\mathcal M\in\{\mathbb F_p,\mathbb Z_n^*,\{0,1\}^*,\mathbb G,...\}$ where $\mathbb G$ is a generic (but there instantiated) group and $\mathcal S\in\{\mathbb F_p,\mathbb Z_n^*,\{0,1\}^l\}$ How to make skill use on investigations "important" but failure not derail the plot? Well guys, following previous recommendations here I was able to build a Horror Themed Savage Worlds campaign that has made my players excited. However they're still getting used to the style, as well as I am. In order for them to hurt the major evils of the adventures they have to find their Form (physical appearance, name), Truth (How the creature came to be) and Reason (What the creature wants to), so they have to do research, kill lesser creatures, and run away from the big baddie of the adventure as they seek what it is.  Well, this is my problem:  How can I make them use skills significantly?  I'm used to railroading my players, even with mysteries, and I don't know how to put their skills for significant use. An example is, they usually require Streetwise or Investigation to gather clues and such, however, I wonder what to do if they fail the roll... If they fail they're not supposed to find anything, so chances they never finish the adventure are well, high, that and I have no idea how to give them additional, interesting ways for them to find the truth. So do I give it no matter what they rolled? How do I make use of their skills important and not just busy-work without having a failure on a roll completely stop their progress in the investigation? I have a song that Windows can't play because there is a question mark in the name of the file.  "Where Have All the Cowboys Gone?.ogg" // as an example   So I try to rename it and Windows complains whether I try it in Explorer or from command prompt.  Error I get when trying to copy, rename, or move is:     The Filename, directory name, or volume label syntax is incorrect   Is there a Windows way to force a rename in this case?   Update  I'll keep an eye on this question, but after 13 answers and many attempts (aside form 3rd party solutions) it seems that Windows can't do this (or at least my windows can't, no short names). So I'm accepting the answer which was my original solution anyway of using Linux. It would be nice to see Windows handle this somehow, so don't stop just because I've accepted this answer, the question still stands! What is the simplest way to convert char[] to/from tchar[] in C/C++(ms)? This seems like a pretty softball question, but I always have a hard time looking up this function because there seem there are so many variations regarding the referencing of char and tchar. My laptop running Windows 7 Ultimate (non OEM) died on me today and it has tonnes of stuff on it - my projects, Visual Studio and office installations, etc. etc.  I am getting a new laptop from somewhere and was wondering if I could just unplug the hard disk from my original (dead) machine and plug it into the new one.  I remember trying this once with Windows Xp (on a desktop) and the OS crashed on boot and I had to reinstall everything again.  I have read about  but by the looks of it, it can be used only when the host computer is alive and kicking -- which mine isn't.  My old laptop was a Compaq Pressario v3000 (3 years old) on an AMD and the new one is going to be a new dual core Intel HP laptop.  Any ideas?  Thanks!