Calculating Euclidean distance in QGIS 2.18.27 I want to calculate Euclidean distance of animals trails from roads. Is this possible as both layers or vectors? Or is there another way to calculate distance my animal trail network is from a road?
Measuring the distance between lines and points in QGIS Using QGIS - I have a vector of fault lines.  I have point data in the form of a csv which I have also loaded into QGIS.  I need to know how far each point is from the nearest fault line then enter this distance in a new column in the csv file. Any ideas?
My inline-block elements are not lining up properly In what order are the dated ordered by? Certainly not alphanumeric order.  ls -lt sorts by modification time. But I need creation time. How do I capture the moon and its surrounding context? I wanted to photograph the full moon against a beautiful deep blue sky. I ended up with blown-out highlights of the moon:    So I switched to spot metering and captured the moon, losing the blue sky in the process:    I want a single photo that shows both the moon and the surrounding context (in this case, the blue sky). Doing an exposure fusion in Photomatix Essentials did not help:    Nor did HDR fusion (again in Photomatix):    Notice that the detail in the moon was lost in both cases, and the sky was also messed up in both cases: exposure fusion lost the beautiful blue color, while HDR created more texture than was actually present in the sky. I toggled Photomatix's option to remove ghosts, but that didn't help, either.  How do I photograph the moon together with its surrounding context (in this case, the blue sky, but in other cases, a tree, buildings, etc) without blowing highlights or shadows? I'm using a Sony NEX-5R, with the longest focal length lens I have, and with manual focus when needed.  Thinking I should fuse the photos manually, I tried opening the images as layers in Acorn, with the darker photo on top and with opacity set to 50%, and tried all 15 - 20 blending modes (normal, dodge, lighter, darker, multiply and so on), but none of them seemed to work. I'm afraid I don't know enough to use layers effectively. What blending mode and opacity and order of layers should I use for this task?  I don't have Photoshop, but do have Lightroom 5, Acorn and Nik Collection.  (In case you are about to recommend software, please note my requirements: I use a Mac, I would be willing to pay $20-30, and I don't want to use command-line software.) I'm writing a linguistics paper that uses a large amount of linguistic examples from a wide variety of languages, using the gb4e package. I want to be able to label each example with information about the language it comes from, as I've seen in some texts, sort of like this:   Language (family, citation, etc.)      (1) example text          glosses        'translation'    gb4e is great at formatting the examples themselves, but I can't seem to get the label placed where I want it, that is, placed immediately before the example and without an indent. Here's some example code:  \documentclass{article} \usepackage{gb4e} \usepackage{lipsum}  \begin{document} \lipsum[2]  Hungarian (Finn-Ugric, \emph{reference})   \begin{exe}   \ex \gll    J\'anos h\'aza\\               John house.his\\       \glt    `John's house'   \end{exe}  \lipsum[3] \end{document}   If the label text is outside the exe environment, it's treated like a regular paragraph, but if I try to put it inside, it gives me an error. How can I make it look the way I want? I've looked at other packages that do numbered examples, but they don't seem to have solutions either, and they also don't have the same functionality as gb4e that I need.  Any help would be greatly appreciated. Is a rational-valued continuous function $f\colon[0,1]\to\mathbb{R}$ constant? Let $f\colon[0,1]\to\mathbb{R}$ be continuous such that $f(x)\in\mathbb{Q}$ for any $x\in[0,1]$. Intuitively I feel that $f$ is constant, since $\mathbb{Q}$ is dense in $\mathbb{R}$.  How can I formally write this down? Relativistic speed/energy relation. Is this correct? What is the definition of how to count degrees of freedom? resulted, rather as by-product, the discussion on how to count degrees of freedom (DOF). I extend that question here:   Are necessary1 derivatives such as velocities counted as individual DOFs or together with the respective coordinate2? Should complex valued DOFs be counted twice as in "two real-valued DOFs" or once as in "one complex-valued DOF"? (I mean, when one does not want to specify this explicitly)   Please answer with some reference, unless it turns out this is actually a matter of taste rather than a strictly defined thing.    1) I mean those a value of which is required as an initial condition 2) I count fields in QFT as coordinates as well, while space-time-coordinates are parameters to me, if that matters. I know a field actually has $\infty$ (or rather, $2^\aleph$) DOFs itself, but let's say e.g. "one $\mathbb R^3$ continous DOF" in that case Chirp Transform and Convolution I was reading about the discrete fourier transform from the CLR algorithms book and I came upon an exercise whose hint confuses me. The exercise reads as follows:  The chirp transform of a vector $a=(a_0,a_1,\ldots,a_n)$ is a vector $y=(y_0,y_1,\ldots,y_n)$, where $y_k=\sum_{j=0}^{n-1}a_j (z^{k})^j$ and $z$ is any complex number. The DFT is therefore a special case of the chirp transform, obtained by taking $z=\omega_n$. Prove that the chirp transform can be evaluated in time $O(n\lg n)$ for any complex number $z$. (Hint: use the equation $$y_k = z^{k^2/2}\sum_{j=0}^{n-1}(a_j z^{j^2/2})(z^{-(k-j)^2/2})$$ to view the chirp transform as a convolution.  My question is about what is a convolution. I am familiar with taking two vectors $a=(a_0,a_1,\ldots,a_n)$ and $b=(b_0,b_1,\ldots,b_n)$ and forming the convolution $c=(c_0,c_1,\ldots,c_n)$ where $c_k = \sum_{j=0}^k a_j b_{k-j}$. Here the index of $j$ runs from $0$ to $k$ unlike in the hint given above where the index runs from $0$ to $n-1$. In what sense is the hint above a convolution? Wifi losing connection, weak signal, Intel 7260 adapter I yesterday upgraded from Windows to Ubuntu 15.04 but I have problem with my wireless adapter Intel Corporation Wireless 7260 (rev 73). It randomly loses internet connection. Restarting adapter always helps. (same it did with Windows, except that sometimes restarting adapter didn't help).   Additionally, I have weaker connection then I had with Windows.  Thank you! Script for modifying file content in specified files I tried searching previous questions but none worked, or I couldn't adapt them to my needs.  I want to write a script that asks for:   folder criteria old string new string   And replace every file in the specified folder and subfolders (and force user to type one) with specific criteria (for example, it must be a ".cue" file), and:   If the file is read-only, disable it. Search for specified old string in the file content and replace it with new string , and save changes in same file. If the file was read-only, enable it again.   I have this code so far, but I don't know what to do in the do part:  @echo off   setLocal enableDELAYedexpansion  :START set "var2=" set /P var2="type folder "  if "%var2%"=="" goto ERROR  set /p old="old string ? " set /p new="new string ? " set /p files="what criteria ? " echo modifying files...  for /r "%var2%" %%v in (%%files) do (  ???  ) pause  goto START  :ERROR echo type something!! goto START Consider a stochastic process $\{X_t, t = 1, 2, \ldots\}$ following the model $$X_t = \alpha X_{t-1} + e_t,$$ where $e_t \thicksim f$.  Can I say that the distribution of the initial point, $X_1$, is the same as $f$? Can I say that the stationary marginal density, if it exists, of $\{X_t\}$ is same as $X_2 (\stackrel{D}{=}\alpha X_1 + e_2)$?  I think that the stationary marginal density, if it exists, of $\{X_t\}$ is the same as $X_2$, but not necessarily same as $X_1$. How to calculate the costs of a weapon enchantment? Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About mod_rewrite Rules but Were Afraid to Ask I have two rasters: a digital elevation model (DEM) and a Landsat band. The grid resolution of both is 30 m, but the grids are not coincident (see image: the dark raster on top is the DEM; the light raster underneath is the Landsat band).  I want to perform some transformation of the Landsat band so that its grid aligns perfectly with the DEM grid. I've tried resampling the Landsat band to 30 m in ArcGIS using the DEM as a Snap Raster in the Environment settings, but this does not have any effect. I've also tried clipping the Landsat band to the extent of a vector polygon (that the DEM is also clipped to), while setting the DEM as the Snap Raster, but to no avail.  I suspect this is happening because both rasters are already at the same resolution (just on different grids), but I really need their grids to be aligned to be able to do any further analysis.  Can I do this in ArcGIS Desktop? Gave up waiting for root device on Ubuntu Is there a way to make the following return true?  string title = "ASTRINGTOTEST"; title.Contains("string");   There doesn't seem to be an overload that allows me to set the case sensitivity.. Currently I UPPERCASE them both, but that's just silly (by which I am referring to the  issues that come with up- and down casing).  UPDATE This question is ancient and since then I have realized I asked for a simple answer for a really vast and difficult topic if you care to investigate it fully. For most cases, in mono-lingual, English code bases  answer will suffice. I'm suspecting because most people coming here fall in this category this is the most popular answer.  answer however brings up the inherent problem that we can't compare text case insensitive until we know both texts are the same culture and we know  what that culture is. This is maybe a less popular answer, but I think it is more correct and that's why I marked it as such. How to book this complex multi carrier roundtrip flight I found on ITA? I am trying to book a roundtrip ticket from Chicago O'hare (ORD) to Mumbai, India (BOM). Traveling on Aug 9th and returning on Aug 24th. Now, I've been looking for several days (almost 10days!) for ways to book this itinerary I found on ITA. All other websites like Expedia, Kayak, Travelocity, Momondo, RouteHappy, and even google flights are quoting around $1200 roundtrip cost, sometimes as low as $1150. But the ITA Matrix website shows me several options, the lowest is $916 roundtrip.      You can see there are several flights in the $900 range.     For the return trip there is only one option to get the low price.  Selecting the flights this is what I get:      I'm not sure how to use the fare codes the ITA website provides to purchase this itinerary.  These are some of the things I have tried to book the complex multi-carrier flight from ITA:  My first method was to try coding into HIPMUNK, using the multi-city option, my departure, connections, airlines flights number and dates. Following this method:     And the results page:    Here's what my code into HIPMUNK looks like:  ORD::LH9151 FRA LH756 for the first journey and   BOM::LX155 ZRH SN5104 BRU SN8803 for the return trip.  Don't think I'm making any mistakes in coding it, but there are two adjustments I also made which failed:   I used the dates of the first leg of the flight then tried using the other dates as well. So for example Aug 9th and Aug 10th. I used the codes for the operating carriers and when it didn't work, the marketing carrier leaving the flight number unchanged.   This always returned no results. Breaking up the itinerary to just the oneway from ORD to BOM worked but gave me a price of $624. For some reason the second return trip was creating problems. I tried breaking he return trip down into different segments but no luck. Anyone knows why the return trip is creating difficulties? Coding issues/ hipmunk doesn't have such a large database?   Then I tried method 2: Calling up the airlines  United was able to find all the segments, even price it correctly sometimes (sometimes not) and gave me a confirmation number. I was to call them in 12hrs to check if they were able to procure the seats but when I did call they were not able to get the seats for the SWISS flight from BOM to ZRH and/or from ZRH to BRU. I've tried this at least 5 times changing small things everytime, but the same result. It seems Lufthansa waits for SWISS to confirm the seats but SWISS doesn't respond in time and I'm not able to book.  I tried calling Lufthansa but they were not even able to find the segments and instead told me to look at booking online where I will be able to find it cheaper.  Any insights into the methods that failed or suggestions on how to book this itinerary at the $900 price will be much appreciated. Thanks in advance. How can I get dramatic shallow DOF with a kit lens? Is irrational times rational always irrational? Is an irrational number times a rational number always irrational?  If the rational number is zero, then the result will be rational. So can we conclude that in general, we can't decide, and it depends on the rational number? How can I bootstrap? How can I bootstrap Drupal 8 from an external script?  This an example script from the .  require_once __DIR__ . '/vendor/autoload.php'; use PhpAmqpLib\Connection\AMQPStreamConnection;  $connection = new AMQPStreamConnection('localhost', 5672, 'guest', 'guest'); $channel = $connection-&gt;channel(); $channel-&gt;queue_declare('task_queue', false, true, false, false); echo " [*] Waiting for messages. To exit press CTRL+C\n"; $callback = function ($msg) {   echo ' [x] Received ', $msg-&gt;body, "\n";   sleep(substr_count($msg-&gt;body, '.'));   echo " [x] Done\n";   $msg-&gt;delivery_info['channel']-&gt;basic_ack($msg-&gt;delivery_info['delivery_tag']); };  $channel-&gt;basic_qos(null, 1, null); $channel-&gt;basic_consume('task_queue', '', false, false, false, false, $callback);  while (count($channel-&gt;callbacks)) {   $channel-&gt;wait(); }  $channel-&gt;close(); $connection-&gt;close();   Within a worker script like this, I need to be able to create nodes.  How can I bootstrap Drupal 8 in this script?  ? and  bootstraps passing a fake request to the kernel, which to me looks like a work-around.  In Drupal 7 you could do something like this, apparently.  // Bootstrap Drupal. include_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);