I want to do a simple coding by storing the product of calculation using command bc into variable.   answer="$varnameX % $num1" | bc echo "the result is $answer"   it did not show the product of calculation once i run the command   the answer is
Using echo "20+5" literally produces the text "20+5".  What command can I use to get the numeric sum, 25 in this case?  Also, what's the easiest way to do it just using bash for floating point? For example, echo $((3224/3807.0)) prints 0 :(.  I am looking for answers using either the basic command shell ('command line') itself or through using languages that are available from the command line.
How can I really disable the Cmd to Win key mapping in Parallels Desktop 5? Removed it from System Preferences &gt; Keyboard. No go. Remapped ⌘ Cmd to be Ctrl. No go. Ripping out the ⌘ Cmd key shouldn't be the solution. Anyone?... I was looking for a derivation of the expression for the energy density at any point in a static magnetic field. I do know that it is  $$u_B=\dfrac {1}{2 \mu_0}\left|\mathbf{B}\right|^2,$$ I was just wondering if there was a derivation that could be built up the way one derives the energy density, $$u_E=\dfrac {\epsilon_0}{2}\left|\mathbf{E}\right|^2$$ at any point in an electric field, by considering the energy needed to build up a 'source' charge bit by infinitesimal bit.  Whatever proof I have come across seems to bring inductance into the picture -- is there a way of doing it without that? I ask because the corresponding proof for the electric field does not seem to need the definition of capacitance anywhere. How to change maximum number of cores? It says in  that there is a maximum number of 8 cores supported by default in Ubuntu 12.04 Desktop/Server 32-Bit. What is the way to increase the maximum number of cores from the default of 8 to a higher value, like 12?  The reason I ask is because I have just built a machine with 6 hyper threading cores.  There were issues installing the 64-bit version of the software from a CD (it "panicked" and crashed several times).  The 32-bit installed with no problem, but I only see 8 of the 12 cores.  The BIOS is fine.  If I turn hyper-threading off and reboot, I see 6 cores as expected.  I am nervous to try and compile a kernal, I am still new to all of this.  Is there a config setting somewhere that I should change? Simultaneously merge multiple data.frames in a list How does body fat leave your body? So I know that it’s not from tears or sweat because they are composed of mainly water and sodium, it’s not from going poo or pee as poo and pee are made of the parts of food that supply your body with no nutrients and your body also doesn’t “burn body fat” because there is a theory that no matter is ever destroyed so it’s none of those but another thing is it’s not your hair, ear wax, finger nails or anything of that sort because people can lose over 17 pounds in 3 months but you can’t build up that amount of hair , ear wax or whatever else in three months so how does body fat leave your body Hilbert space of harmonic oscillator: Countable vs uncountable? Hm, this just occurred to me while answering another question:   If I write the Hamiltonian for a harmonic oscillator as $$H = \frac{p^2}{2m} + \frac{1}{2} m \omega^2 x^2$$ then wouldn't one set of possible basis states be the set of $\delta$-functions  $\psi_x = \delta(x)$, and that indicates that the size of my Hilbert space is that of $\mathbb{R}$.  On the other hand, we all know that we can diagonalize $H$ by going to the occupation number states, so the Hilbert space would be $|n\rangle, n \in \mathbb{N}_0$, so now the size of my Hilbert space is that of $\mathbb{N}$ instead.  Clearly they can't both be right, so where is the flaw in my logic? How do you unlock the Dream Suite? I want to create a standalone python script using QGIS python API (PYQGIS) for education. First I create a model and export that model to python script.  original python script from the export :  ##=name ##raster=raster ##stat=output html outputs_QGISRASTERLAYERSTATISTICS_1=processing.runalg('qgis:rasterlayerstatistics', raster,stat)   Next I read this  and I tried to follow this tutorial to create my script.  Final script :  import sys from qgis.core import QgsApplication from PyQt4.QtGui import QApplication app = QApplication([]) QgsApplication.setPrefixPath("/usr", True) QgsApplication.initQgis()  # Prepare processing framework  sys.path.append('/home/username/.qgis2/python') from processing.core.Processing import Processing dem='aster.tif' slope='slope.tif' aspect='aspect.tif' outputs_SAGASLOPEASPECTCURVATURE_1=processing.runalg('saga:slopeaspectcurvature', dem,6,1,1,slope,aspect,None,None,None,None,None,None,None,None,None,None) Processing.initialize()  # Exit applications QgsApplication.exitQgis() QApplication.exit()   If I run this script it works fine without error but I don't take some export like aspect and slope (these can't be found?). Any idea why I can't take exports ?  I use Ubuntu and python 2.7 and QGIS 2.18.1.    i try to this script :  import sys from qgis.core import QgsApplication sys.path.append('/usr/share/qgis/python/plugins') import processing a=processing.alglist() print a processing.alghelp("saga:slopeaspectcurvature")   and i take that print any idea why ?  Algorithm not found   but if i use this module in QGIS work fine. Any positive linear functional $\phi$ on $\ell^\infty$ is a bounded linear operator and has $\|\phi \| = \phi((1,1,...)) $ Nested Mathematical Functions This question has bugged me for a while. I want to write a nested function, f(g(x)). If I naively enter it:  \begin{align}     f(g(x))=y \end{align}     The problem is that each and every parenthesis is the same size as all of the others. Shouldn't the outer parentheses be larger? But if I do this:  \begin{align}     f\left(g(x)\right)=y \end{align}     Now it looks even less like the functions are nested. What's the proper way to do this? 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 am considering buying my first DSLR.  How do I know whether I need a 18-200 lens, 17-85, or 18-55? Or something else? iCloud has sucked up all my laptop's files - can you transfer files directly from iCloud to Google Drive? I'm trying to disconnect my macbook from iCloud, as it's been creating some problems.  I was told by an Apple Support employee that doing so is only recommended once you've backed up everything from your Mac somewhere, to ensure you don't lose any files - so my goal is to upload everything to Google Drive before messing with my laptop's iCloud settings. The problem is, almost none of the projects that I want to back up to Google Drive are truly on my laptop - instead I mostly just have folders full of file names, which are placeholders for the real files that have been sucked into iCloud. This means I have to re-download everything to my computer before uploading it all to Google Drive. Another crucial piece of information is that I only have 1 GB of storage left on my macbook, which prevents me from re-downloading any complete projects/folders at a time. So unfortunately my current method is this: downloading 1-5 files at a time, uploading these few things to Google Drive, deleting the copies from my laptop and trash, repeat (thousands of times). So, I was wondering if anyone could offer any alternative methods for uploading stuff to Google Drive in this situation - for example, is there a way to transfer files directly from iCloud to Google Drive without having to download them to my laptop first? I should probably mention that I've scoured my laptop for duplicated files and applications I no longer use, make sure to empty my trash regularly, etc (I also asked Apple Support to help me make sure I wasn't missing out on any other ways to maximize storage space). The most obvious culprit of my lack of space is the massive 150 GB iCloud folder on my laptop, which appears to contain duplicates of everything on my computer. I can't seem to do anything about it until I've disconnected from iCloud itself (its reasons for existence are unclear to me in the first place...but that's beside the point lol). How can I convert a Unix timestamp to DateTime and vice versa? There is this example code, but then it starts talking about millisecond / nanosecond problems.  The same question is on MSDN, .  This is what I've got so far:  public Double CreatedEpoch {   get   {     DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime();     TimeSpan span = (this.Created.ToLocalTime() - epoch);     return span.TotalSeconds;   }   set   {     DateTime epoch = new DateTime(1970, 1, 1, 0, 0, 0, 0).ToLocalTime();     this.Created = epoch.AddSeconds(value);   } } I am trying to determine if the sum $\sum_{n=1}^\infty \frac{n+4^n}{n+6^n}$ is convergent or divergent.   In attempting to solve this problem I began by seeing if I could do the divergence test - in this case it is not helpful. The terms $4^n,6^n$ look like geometric series type terms but the $n$ in the numerator and denominator are troublesome. I first tried factoring $n$ out of the expression:  $$\sum_{n=1}^\infty \frac{n+4^n}{n+6^n} = \sum_{n=1}^\infty \frac{1+\frac{4^n}{n}}{1+\frac{6^n}{n}}$$  Next I tried comparing to the series $$\sum_{n=1}^\infty \frac{\frac{4^n}{n}}{\frac{6^n}{n}} = \sum_{n=1}^\infty \frac{{4^n}}{{6^n}} = \sum_{n=1}^\infty{\left(\frac{2}{3}\right)}^n$$  This is a convergent geometric series as $r = \frac{2}{3}\lt1$  now I reason that the series $\sum_{n=1}^\infty \frac{1+\frac{4^n}{n}}{1+\frac{6^n}{n}}$ is neither smaller not greater than the series $\sum_{n=1}^\infty{(\frac{2}{3})}^n$ Am I able to conclude anything in this case by a direct comparison test or can I only conclude that the first series is convergent if the second is greater than the first?  Thanks I have a dataset with a large number of Yes/No responses. Can I use principal components (PCA) or any other data reduction analyses (such as factor analysis) for this type of data? Please advise how I go about doing this using SPSS. UIToolbar tint on iOS 4 I try to share my internet connection from my laptop (win7) via virtual wifi to my android phone (Samsung Gio). In an elevated cmd I enter  netsh wlan set hostednetwork mode=allow ssid=VWiFi key=xxx keyUsage=persistent netsh wlan start hostednetwork   The android phone connects to VWifi, but the internet connection is hardly usable on the phone while the internet connection on my laptop is very good at the same time (some Mbps)  What works: I can start WhatsApp, type and receive text messages, so I guess there's no general problem, i.e. config can't be completely wrong - but when I try to send pics or audio or try to receive pics or audio messages then I see from the network monitor on my laptop that the connection doesn't even try to send or receive anything (0 kbps up/down).  What sometimes works: connection to some websites with acceptable speed - but sometimes I don't get a single byte. Also this is not reproducible - the same website sometimes shows up, sometimes android tells my the site was not available.  What never worked so far: connecting to Google Play Store. It always tells me to check my connection and try again.  What I tried so far: I read on problems with IPv6, but no matter if I enable or disable IPv6 in the settings of the virtual Wifi, it doesn't help.  I also read about problems related to static/dynamic IPs, my netsh interface ip show config tells my that dchp isn't enabled on my virtual Wifi connection. If I try to enable it by netsh interface ip set address "myWificonnection" dhcp the android phone won't even connect anymore to the virtual Wifi at all. So there may be a solution here if android would connect with dhcp enabled.  I also read about problems with MAC filters, but this is no router, there's no MAC filter in the virtual Wifi.  When I directly connect to a real WLAN router, everything is fine and working. I have the problems only when trying to get into the internet via the virtual Wifi.  Any ideas what may be configured wrong? Either on laptop or on android? Thanks. Compactness of a Sphere This fact is mentioned liberally in literature along with subsequent mention of Heine-Borel and I am trying to get my head around it. What would be a formal proof of this if we take for example, a unit sphere in $\mathbb R^3 $?  In addition, how could it be shown, non-trivially of course, that this sphere is not homeomorphic with $\mathbb R^2 $? As I understand this involves finding a bijective function with continuous inverse? Group of even order contains an element of order 2