jquery multiple url replace regex
What is the best regular expression to check if a string is a valid URL?
GCD in polynomial rings with coefficients in a field extension How long typically are paper reviews? Is there such a thing as “too long”? When you review papers submitted for publication, is there an “optimal” length for reviews? In my experience as an author and referee, I have seen a large range of review lengths (for reference, a paper in my field is typically between 3 and 8 printed pages):   Zero length: for some of the papers I have authored, the reviewer just clicked the “accept as is” or “reject” checkmark on the review sheet, without adding any comment (at least, not any comment visible to me). It's not so common, but it has happened. Short length: a lot of time, I received reviews who consisted of a single paragraph. Medium: one full page, maybe two pages.   Although I have never received any such long reviews, I have myself written on a few occasions reviews that exceed two pages, including once or twice a four or five-page review.  These were cases where the paper was good, but could be (in my view) much improved and some of the aspects/consequences had escaped the authors' consideration.  I am wondering how useful reviews of various length are to editors. I often consider that “unmotivated” reviews are useless, as they do not give any real insight about the paper to the editor. For example, if the editor gets two conflicting non motivated reviews, how is she to decide?  On the other hand, although I write some from time to time, I have never received long reviews, so… is this something frowned upon? Don't worry, I have written your name on the attendance sheet.   Or     Don't worry, I wrote your name on the attendance sheet. Notification for reviews shows way too many Want to delay startup of program but can't find it in Task Scheduler I'm trying to delay the startup of a specific program that loads at login. As per an answer in , I should be able to do it using Task Scheduler. The problem is, I can't find the program listed anywhere. Is there a particular pane I should be looking in? The program is Razer Synapse so I don't think it would be in the Microsoft or Western Digital folders.    If it's not in Task Scheduler, is there another way I can delay it at startup?  Out of curiosity how many ways are there for a program to be run at Startup in Windows? Why use apparently meaningless do-while and if-else statements in macros? In many C/C++ macros I'm seeing the code of the macro wrapped in what seems like a meaningless do while loop.  Here are examples.  #define FOO(X) do { f(X); g(X); } while (0) #define FOO(X) if (1) { f(X); g(X); } else   I can't see what the do while is doing.  Why not just write this without it?  #define FOO(X) f(X); g(X) Recovering Crashed Flash drive? So my friend has a USB flash drive that isn't working. I don't know a whole lot about "recovery" software so I figured I'd ask you guys.  What steps can I try (I have access to a Linux machine as well) to see....if I can get ANYTHING off the flash drive?  I've google'd around, but most of the stuff seems for windows. How do I merge 2 VMware disks in to a single one? I have installed an Ubuntu server on a VMWare workstation with a space of 20GB storage as seen below:    After the installation I've attached another 40GB worth storage to the existing Ubuntu server installation (seen below):    Now I want to add this 40GB to my / (root) directory it mean's  I want that my / directory became to 60G , like it will be resize from 20G to 60G (20G + 40G), i don't know what should i do, can any body help me ?  , my df -h result shows;  root@Userver:~# df -h Filesystem      Size  Used Avail Use% Mounted on /dev/sda1        18G  900M   16G   6% / udev            990M  4.0K  990M   1% /dev tmpfs           400M  308K  399M   1% /run none            5.0M     0  5.0M   0% /run/lock none            999M     0  999M   0% /run/shm none            100M     0  100M   0% /run/user root@Userver:~#   it must be 60G !  i have no graphic mode, then i can't use Gparted tools, i'm just have ssh access ! This is my last homework problem and I've been looking at it for a while. I cannot nail down what is wrong with this proof even though its obvious it is wrong based on its conclusion. Here it is:     Find the flaw in the following bogus proof by strong induction that   for all $n \in \Bbb N$, $7n = 0$.      Let $P(n)$ denote the statement that $7n = 0$.      Base case: Show $P(0)$ holds.      Since $7 \cdot 0 = 0$, $P(0)$ holds.      Inductive step: Assume $7·j = 0$ for all natural numbers $j$ where $0 \le j \le k$ (induction hypothesis). Show $P(k + 1)$: $7(k + 1) = 0$.      Write $k + 1 = i + j$, where $i$ and $j$ are natural numbers less than $k + 1$.  Then, using the induction hypothesis, we get $7(k + 1) = 7(i + j) = 7i + 7j = 0 + 0 = 0$. So $P(k + 1)$ holds.      Therefore by strong induction, $P(n)$ holds for all $n \in \Bbb N$.   So the base case is true and I would be surprised if that's where the issue is.  The inductive step is likely where the flaw is. I don't see anything wrong with the strong induction declaration and hypothesis though and the math adds up! I feel like its so obvious that I'm just jumping over it in my head. Making an invisible pressure plate I'm trying to build a teleporter. I want the player to be teleported from the first sign(left) to the right sign(right). So, when the player steps on the red wool on the left, he will automatically be teleported to the red wool on the right. I do not want to use any pressure plats.It might work with the testfor comment, but I didn't figure out, put that only works with a radius. BTW I'm in 1.10.2 bou I could probably change the version if necessary.     The testfor command block should activate the teleport command block,when the player is detected. Now, I'm not really the expert, so I know non of the commands that you would need to build this construction. Please help, I would highly appreciate it! If you need any more details, ask me! Use a .jar java library API in C#? I'm an entry level programmer so please be descriptive in your responses.  I am trying to use a Java API given as a .jar file in my C# .net application.  I don't know much Java, but this .jar file says "no main-class manifest attribute" when I try to run it so this means its a library?  This Java API also comes with a .java file which shows how to use the library but I cannot see the code inside the .jar.  I found  on this site, and one of the answers reads, "In simple way you can pack your java classes to jar file then In C# use Process class for execute and map IO stream."  I am semi-familiar with the Process class in C# but I don't understand how I could use it to use a Java library in my C# .net project.  Is this possible? or was that answer incorrect?  If so, could you explain how I can use the .jar library in my C# app. Square bracket notation for dimensions and units: usage and conventions Proving $1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$ using induction How can I prove that     $$1^3+ 2^3 + \cdots + n^3 = \left(\frac{n(n+1)}{2}\right)^2$$    for all $n \in \mathbb{N}$? I am looking for a proof using mathematical induction.  Thanks How does leave-one-out cross-validation work? How to select the final model out of $n$ different models? I have some data and I want to build a model (say a linear regression model) out of this data. In a next step, I want to apply Leave-One-Out Cross-Validation (LOOCV) on the model so see how good it performs.  If I understood LOOCV right, I build a new model for each of my samples (the test set) using every sample except this sample (the training set). Then I use the model to predict the test set and calculate the errors $(\text{predicted} - \text{actual})$.  In a next step I aggregate all the errors generated using a chosen function, for example mean squared error. I can use these values to judge on the quality (or goodness of fit) of the model.  Question: Which model is the model these quality-values apply for, so which model should I choose if I find the metrics generated from LOOCV appropriate for my case? LOOCV looked at $n$ different models (where $n$ is the sample size); which one is the model I should choose?   Is it the model which uses all the samples? This model was never calculated during the LOOCV process! Is it the model which has the least error? Show that $\partial_\nu T^{\mu\nu} = - j_\nu F^{\mu\nu}$ In a theoretical physics homework problem, I have to show the following: $$\partial_\nu T^{\mu\nu} = - j_\nu F^{\mu\nu}$$  Where $T$ is the Energy-Momentum-Tensor, $j$ the generalized current and $F$ the Field-Tensor. We use the $g$ for the metric tensor, I think in English the $\eta$ is more common.  I know the following relationships:   Current and magnetic potential with Lorenz gauge condition: $$\mathop\Box A^\mu = \mu_0 j^\mu$$ Energy-Momentum-Tensor: $$T^{\mu\nu} = \frac1{\mu_0} g^{\mu\alpha} F_{\alpha\beta} F^{\beta\nu} + \frac1{4\mu_0} g^{\mu\nu} F_{\kappa\lambda} F^{\kappa\lambda}$$ Field-Tensor: $$F^{\mu\nu} = 2 \partial^{[\mu} A^{\nu]} = \partial^{\mu} A^{\nu} - \partial^{\nu} A^{\mu}$$ d'Alembert operator: $$\mathop\Box = \partial_\mu \partial^\mu$$ Bianchi identity: $$\partial^{[\mu} F^{\nu\alpha]} = 0$$   So far I have set all the definitions into the formula I have to show, but I only end up a lot of terms from antisymmetrisation and product rule. I also drew all what I have in , but I still cannot see how to tackle this problem.  Could somebody please give me a hint into the right direction? I need a way to determine the type of an HTML element in JavaScript. It has the ID, but the element itself could be a &lt;div&gt;, a &lt;form&gt; field, a &lt;fieldset&gt;, etc. How can I achieve this? Proper Installation of Kali linux tools in Ubuntu I think everyone has known - we need to install katoolin to use Kali Linux Tools on Ubuntu. Before did anything I had looked through the internet and also found out these solutions: ,   So here are my steps:  apt-get install git git clone https://github.com/LionSec/katoolin.git &amp;&amp; cp katoolin/katoolin.py /usr/bin/katoolin chmod +x  /usr/bin/katoolin sudo katoolin   Then, to add Kali Linux repositories and update them, I selected option 1 from the katoolin Menu  Then, to view the available categories and install all available tools, I selected option 2 from the main menu of katoolin and then pressed 0.   But after that I got this:    What do you want to do ?>    1) Add Kali repositories & Update  2) View Categories 3) Install classicmenu indicator 4) Install Kali menu 5) Help   kat > 2  ************************** All Categories **************************  1) Information Gathering                      8) Exploitation Tools 2) Vulnerability Analysis                     9) Forensics Tools 3) Wireless Attacks                           10) Stress Testing 4) Web Applications                           11) Password Attacks 5) Sniffing & Spoofing                        12) Reverse Engineering 6) Maintaining Access                         13) Hardware Hacking 7) Reporting Tools                            14) Extra  0) All   Select a category or press (0) to install all Kali linux tools .  Furthermore, I got an error in Software Updater - it didn't let me do anything. Ubuntu just hung up. I solved this problem by deleting kali linux repositories in katoolin and then in Software Updater.  Does anyone know how to install Kali Linux tools in Ubuntu 16.04 in a proper way? Should you set all the objects to null (Nothing in VB.NET) once you have finished with them?   I understand that in .NET it is essential to dispose of any instances of objects that implement the IDisposable interface to release some resources although the object can still be something after it is disposed (hence the isDisposed property in forms), so I assume it can still reside in memory or at least in part?  I also know that when an object goes out of scope it is then marked for collection ready for the next pass of the garbage collector (although this may take time).  So with this in mind will setting it to null speed up the system releasing the memory as it does not have to work out that it is no longer in scope and are they any bad side effects?  MSDN articles never do this in examples and currently I do this as I cannot  see the harm. However I have come across a mixture of opinions so any comments are useful. What is the difference between String and string in C#? Example (note the case):  string s = "Hello world!"; String s = "Hello world!";   What are the guidelines for the use of each? And what are the differences? Calling PHP functions within HEREDOC strings In PHP, the HEREDOC string declarations are really useful for outputting a block of html.  You can have it parse in variables just by prefixing them with $, but for more complicated syntax (like $var[2][3]), you have to put your expression inside {} braces.  In PHP 5, it is possible to actually make function calls within {} braces inside a HEREDOC string, but you have to go through a bit of work.  The function name itself has to be stored in a variable, and you have to call it like it is a dynamically-named function.  For example:  $fn = 'testfunction'; function testfunction() { return 'ok'; } $string = &lt;&lt;&lt; heredoc plain text and now a function: {$fn()} heredoc;   As you can see, this is a bit more messy than just:  $string = &lt;&lt;&lt; heredoc plain text and now a function: {testfunction()} heredoc;   There are other ways besides the first code example, such as breaking out of the HEREDOC to call the function, or reversing the issue and doing something like:  ?&gt; &lt;!-- directly output html and only breaking into php for the function --&gt; plain text and now a function: &lt;?PHP print testfunction(); ?&gt;   The latter has the disadvantage that the output is directly put into the output stream (unless I'm using output buffering), which might not be what I want.  So, the essence of my question is: is there a more elegant way to approach this?  Edit based on responses: It certainly does seem like some kind of template engine would make my life much easier, but it would require me basically invert my usual PHP style.  Not that that's a bad thing, but it explains my inertia..  I'm up for figuring out ways to make life easier though, so I'm looking into templates now.