How to create folder shortcut in ubuntu 18.4
How to create a soft or symbolic link?
I was writing some Unit tests last week for a piece of code that generated some SQL statements.  I was trying to figure out a regex to match SELECT, INSERT and UPDATE syntax so I could verify that my methods were generating valid SQL, and after 3-4 hours of searching and messing around with various regex editors I gave up.  I managed to get partial matches but because a section in quotes can contain any characters it quickly expands to match the whole statement.  Any help would be appreciated, I'm not very good with regular expressions but I'd like to learn more about them.  By the way it's C# RegEx that I'm after.  Clarification  I don't want to need access to a database as this is part of a Unit test and I don't wan't to have to maintain a database to test my code. which may live longer than the project. I can't open google-related sites I'm  getting timeout errors on google-related sites. If I try to open google.com, gmail.com, etc, it will keep displaying the "waiting reply" on the browser bottom, and the page won't open. If I am browsing another site that includes, say, www.google-analytics.com, ajax.googleapis.com, google fonts, etc, then it start loading, displaying a "connecting to [google-related site]" on the browser bottom, and stall at that point for a long time.  I can browse other sites fine and they load quickly. I can ping the domains with 0% loss and &lt;100ms times. I can ping 8.8.8.8, I am not behind a proxy, there is nothing on my hosts file, I am not at work or in a networked environment: it is a home network behind a router. I connect using wifi (I am too distant to use wired).   Other users on the same network don't have the issue. I can both ping and browse the sites. I have pinged ajax.googleapis.com from my android and my other laptop, and they return the same IP than on this laptop. They also share the same external IP address, according to   The issue happens on ubuntu 12.04, and as it is cyclic but not frequent enough to make sure, I don't honestly remember if it happens on Windows 7 as well (it is a dual-boot machine). Rebooting the router won't help. Rebooting the computer fixes the problem, until it happens again.  It's been happening for a few months now. The last time it happened (earlier today) I performed a ping before and after the reboot. Here's the results:  before  $ping ajax.googleapis.com PING googleapis.l.google.com (74.125.21.95) 56(84) bytes of data. 64 bytes from yv-in-f95.1e100.net (74.125.21.95): icmp_req=1 ttl=47 time=157 ms 64 bytes from yv-in-f95.1e100.net (74.125.21.95): icmp_req=2 ttl=47 time=163 ms 64 bytes from yv-in-f95.1e100.net (74.125.21.95): icmp_req=3 ttl=47 time=156 ms 64 bytes from yv-in-f95.1e100.net (74.125.21.95): icmp_req=4 ttl=47 time=165 ms 64 bytes from yv-in-f95.1e100.net (74.125.21.95): icmp_req=5 ttl=47 time=157 ms 64 bytes from yv-in-f95.1e100.net (74.125.21.95): icmp_req=6 ttl=47 time=155 ms 64 bytes from yv-in-f95.1e100.net (74.125.21.95): icmp_req=7 ttl=47 time=159 ms 64 bytes from yv-in-f95.1e100.net (74.125.21.95): icmp_req=8 ttl=47 time=157 ms   after  $ping ajax.googleapis.com PING googleapis.l.google.com (74.125.134.95) 56(84) bytes of data. 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=1 ttl=47 time=207 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=2 ttl=47 time=154 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=3 ttl=47 time=154 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=4 ttl=47 time=152 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=5 ttl=47 time=157 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=6 ttl=47 time=160 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=7 ttl=47 time=154 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=8 ttl=47 time=157 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=10 ttl=47 time=154 ms 64 bytes from gg-in-f95.1e100.net (74.125.134.95): icmp_req=11 ttl=47 time=152 ms   The issue happens on different browsers, I installed epiphany and it shows the same behaviour.  I have inspected the network tab on firefox and it shows a single, unreplied GET request:   I installed wireshark and listened for HTTP GET requests; on other sites it pops up on the report, but on ajax.googleapis it shows nothing. I listened then for DNS requests, there are some differences:     If connect via telnet to the port 80 of a random site and perform a GET it works, but I can't telnet to ajax.googleapis.com (or it's IP), the connection never completes. Illogical twoside margins Shouldn't the twoside option produce a wider margin at the binding/spine edge, rather than the other way around? I'm using \documentclass[twoside]{report}. I have just finished my homework.   I just finished my homework.      I think there must be a difference in meaning. Could anyone tell me the difference in meaning sentence 1 and sentence 2? Subdivision Surface on curved mesh I'm trying to delete those ugly lines visible in the cylindrical shape of the lens. What is causing them is the added edge loops I made for the protruding detail with the switch. The problem is that if I delete those edges, it'll look even worse because of the n-gons. Any ideas? Two of my friends are getting married. They're both huge Doctor Who geeks, and actually met through a DW RPG. Their wedding invitation contained a very subtle DW reference (you wouldn't have been able to tell unless you were very familiar with the show yourself.)   Doctor Who's been running long enough that there are quite a few nice quotes for basically every occasion in life. I was hoping someone would know a nice wedding-related one, or maybe one about love, that I could include in a wedding card? Permission Subscribe to Dashboards: Add Recipients depends on permission(s): Subscribe to Dashboards How do I create bookmarks with pdfLaTeX? I'm using MiKTeX and using pdfLaTeX. I can generate the PDF, but there are no bookmarks. In the .tex-file it is using:  \chapter \section \subsection   (with labels)  I originally used make with sphinx to output LaTeX. It must work somewhat or I wouldn't get the PDF. When I say bookmarks, I mean when you are in Acrobat and the left side has the Bookmarks panel.  I am reading   But I am not sure where to apply this.  EDIT:  I applied this, \usepackage{bookmark}, and got bookmarks, but I never get the subsection bookmarks. Convergence of cos, sin, tan functions In Radian mode, continually pressing the $\cos$ function of a number causes the result to converge to $x=0.739085133$, a fixed point of $\cos(x)$. Repeating this behavior with the $\sin$ function causes the result to converge to $x=0$, a fixed point of $\sin(x)$.   What happens if this is done using the tan function? It seems that $x=0$ is a repelling fixed point with no convergence in this case.  What would be the best way to explain these results mathematically? Prove $(x_1+.....+x_n)^2 \leq n(x_1^2 + .....+x_n^2)$ Prove that  $(x_1+\dots+x_n)^2 \leq n(x_1^2 + \dots+x_n^2)$  for all positive integers n and all real numbers $x_1,....,x_n$  I am attempting a proof by induction but wasn't sure if i need the Cauchy-Schwarz Inequality or perhaps another way other than induction to prove this.  Proof   $n=1$ true  assume true for $n=k$  Now for $n= k+1$  $(x_1 + \dots +x_k + x_{k+1})^2 \leq \dots$ How can I `alias sudo !!`? I'm trying to set an alias for sudo !! in Bash. I tried alias sbb='sudo !!', but it interprets that as a literal  !! and prints   sudo: !!: command not found   If I use double quotes, it substitutes the double bang in the string itself, so that doesn't work.  Is there any way to make this work? Or an alternative alias? ` How does asymmetric encryption work? I've always been interested in encryption but I have never found a good explanation (beginners explanation) of how encryption with public key and decryption with private key works.  How does it encrypt something with one key and decipher it with another key? I am running Ubuntu 15.10 with Gnome DE.  I installed KDE plasma to try it out but sudo apt-get upgrade started giving me errors so I ppa-purged the kde ppa and removed kubuntu desktop with the terminal in Gnome.  Now when I run sudo apt-get upgrade , I get the following error:    The following packages have unmet dependencies:     kde-telepathy-minimal : Depends: kde-config-telepathy-accounts      (&gt;= 15.04.0) but it is not installed.   sudo apt-get install -f does not resolve the issue. I tried sudo apt-get remove kde-telepathy-minimal to remove the package which gives me this error:    The following packages have unmet dependencies: kde-telepathy : Depends: kde-telepathy-minimal   Attempting to remove 'kde-telepathy' gives me the original error.  I am stuck. Please help me and thank you Ubuntu community! C's strtok() and read only string literals char *strtok(char *s1, const char *s2)      repeated calls to this function break string s1 into "tokens"--that is   the string is broken into substrings,   each terminating with a '\0', where   the '\0' replaces any characters   contained in string s2. The first call   uses the string to be tokenized as s1;   subsequent calls use NULL as the first   argument. A pointer to the beginning   of the current token is returned; NULL   is returned if there are no more   tokens.   Hi,   I have been trying to use strtok just now and found out that if I pass in a char* into s1, I get a segmentation fault. If I pass in a char[], strtok works fine.   Why is this?  I googled around and the reason seems to be something about how char* is read only and char[] is writeable. A more thorough explanation would be much appreciated. I have a small issue with configuring the lidR  for parametrizing the extracted raster files with grid_metrics() function.  My question is how to set in the catalog options that:   be able to overwrite the results with a second run if I want to run my script several times and I do not want to name each output differently. instead of .tif I would like to get .grd files as output.   My current code (which is working) is the following:  normalizedctg = catalog(workingdirectory) opt_output_files(normalizedctg) &lt;- paste(workingdirectory,"/clipped/normalized/{XLEFT}_{YBOTTOM}_height",sep="") height = grid_metrics(normalizedctg, max(Z),res = resolution)   But with a second run on the same code I get the following error:  Error in .getGDALtransient(x, filename = filename, options = options,  :    filename exists; use overwrite=TRUE Solve $\frac{d}{dx}f(x)=f(x-1)$ I am trying to find a function such that   $\dfrac{d}{dx}f(x)=f(x-1)$   Is there such function other than $0$ ? I am using eclipse and i get this error--I think it's an error with the way i imported becker.robots Gduated symbology not taking attribute into account using QGIS I m working on a project on QGIS. I have a point shapefile vector that represents my store. In the attribute table, i have bunch of data such as size, unit per transaction and most importantly store turnover. When I want to graduate the symbology, the turnover isn't present in the list I can choose from. Does someone know why, and how to fix it? What is happening here, when I use squared loss in logistic regression setting? I am trying to use squared loss to do binary classification on a toy data set. I am using mtcars data set, use mile per gallon and weight to predict transmission type. The plot below shows the two types of transmission type data in different colors, and decision boundary generated by different loss function. The squared loss is $\sum_i (y_i-p_i)^2$ where $y_i$ is the ground truth label (0 or 1) and $p_i$ is the predicted probability $p_i=\text{Logit}^{-1}(\beta^Tx_i)$. In other words, I am replace logistic loss with squared loss in classification setting, other parts are the same. For a toy example with mtcars data, in many cases, I got a model &quot;similar&quot; to logistic regression (see following figure, with random seed 0).  But in somethings (if we do set.seed(1)), squared loss seems not working well.  What is happening here? The optimization does not converge? Logistic loss is easier to optimize comparing to squared loss? Any help would be appreciated.  Code d=mtcars[,c(&quot;am&quot;,&quot;mpg&quot;,&quot;wt&quot;)] plot(d$mpg,d$wt,col=factor(d$am)) lg_fit=glm(am~.,d, family = binomial()) abline(-lg_fit$coefficients[1]/lg_fit$coefficients[3],        -lg_fit$coefficients[2]/lg_fit$coefficients[3]) grid()  # sq loss lossSqOnBinary&lt;-function(x,y,w){   p=plogis(x %*% w)   return(sum((y-p)^2)) }  # this random seed is important for reproducing the problem set.seed(0)  x0=runif(3) x=as.matrix(cbind(1,d[,2:3])) y=d$am opt=optim(x0, lossSqOnBinary, method=&quot;BFGS&quot;, x=x,y=y)  abline(-opt$par[1]/opt$par[3],        -opt$par[2]/opt$par[3], lty=2) legend(25,5,c(&quot;logisitc loss&quot;,&quot;squared loss&quot;), lty=c(1,2)) The dimension of the Hilbert space is determined by the number of independent basis vectors. There is a infinite discrete energy eigenbasis $\{|n\rangle\}$ in the problem of particle in a box which can be used to expand a general state $|\psi\rangle$ as: $$|\psi\rangle=\sum\limits_{n=0}^{\infty} C_n |n\rangle$$ Here, the basis implies that the Hilbert space has countably infinite number of basis vectors. But one could well expand $|\psi\rangle$ in any other basis as well, say the continuous position basis. Then that superposition, $$|\psi\rangle=\int dx \psi(x)|x\rangle$$ is also possible. But this basis $\{|x\rangle\}$ is continuous and uncountably infinite. Such sets cannot be equal because they have different cardinality. Then my questions is how many independent basis vectors are really there in this Hilbert space?