So I have some fundamental gap in understanding. I create Path object - Path p = Paths.get("/"); So Path is interface thereby it cannot be instantiated. But Paths.get() method has Path return type. I know it is common practice to use interface object reference. But how does it work under the hood? I thought it creates some anonymous class implementing Path interface. But the I tried to invoke .getClass() method on Path object and it returned: class sun.nio.fs.UnixPath. Please explain briefly how does it work.

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I'm doing a past exam paper and this is the question I am stuck on.  Define the conditions on a subset $I$ of a ring $R$ to be an ideal of $R$. Show that the set $I = \{f ∈ \mathbb{R}[X]|f(1) = 0\}$ is an ideal of $\mathbb{R}[X]$.  I know the conditions for I to be an ideal of R, but I'm confused about what the set actually means? What is the result of $f(a+b)$ if $a,b∈ \mathbb{R}$  Thanks in advance for any help!

In $\mathbb{F}[x]$, where $\mathbb{F}$ is a ﬁeld, let $J$ be the set of elements of polynomials that have coefficients that add to zero (so $a_0 + a_1 + ... + a_n = 0$). Show that $J$ is an ideal of $\mathbb{F}[x]$. I know that the proof of this statement is meant to be very short, but I don't know how to go about it.


I have been using Latex for a few years, and have several articles written in Latex. I want to share some of these articles on blogs, and I am very new to the blogging world.   Just wondering if there are any blogs which support a latex file/folder upload? If not, may be a way to get an output and upload it to the blog with hyperlinks etc?  Ideal would be a package that can publish directly from my Eclipse / RStudio UI to the blog, or even a command line tool would be just awesome.  Many thanks.

Is there a converter that will convert LaTeX to HTML? I have tried several services but the LaTeX diagrams and some of the maths came out weird.  I actually converted the Latex to PDF without a problem. Then I used  to convert from PDF to HTML. The square root signs did not appear properly and some of the Cartesian coordinate plane diagrams had nothing on them except the grid.   \documentclass[12pt,a4paper]{report} \usepackage{amssymb} \usepackage{amsthm} \usepackage{amsmath} \usepackage{pstricks,pst-plot} \usepackage{pst-eucl} \addtolength{\hoffset}{0.2cm} \addtolength{\textwidth}{1.1cm} \addtolength{\textheight}{1.0cm} \addtolength{\voffset}{-0.7cm} \linespread{1.3} \begin{document}  If $x$ is non-positive then $x \leq -\sqrt{\frac{1}{2}}$     $\hspace{30 mm} $     (6)\\  (4) and (6) tell us that\\  (4)  $-1 \leq x \leq 0$  \\  (6)  If $x$ is non-positive then $x \leq -\sqrt{\frac{1}{2}}$\\  Therefore $-1 \leq x \leq -\sqrt{\frac{1}{2}}$\\  \vspace{50 mm}  \begin{align*} \psgrid[unit=2cm](0,0)(-2,-2)(2,2) \pnode(-1.8,.87){b}\uput[50](b){b} \pnode(-1.8,1.8){a}\uput[50](a){a} \psset{linecolor=green} \psline[linewidth=1pt](-1.8, 0)(-1.8,4) \psset{linecolor=green} \psline[linewidth=1pt](-1.8, 0)(-1.8,-4) \psset{linecolor=blue} \psellipticarc(0,0)(2,2){0}{180} \psset{linecolor=red} \psline[linewidth=1pt,linestyle=dashed,dash=2pt](-2,2)(-1.41,1.41) \psset{linecolor=red} \psline[linewidth=1pt](-1.41,1.41) \psset{linecolor=red} \psline[linewidth=1pt]{->}(4,-4) \psset{linecolor=red} \psline[linewidth=1pt]{->}(-2,2)(-4,4) \end{align*}  \end{document}   PDF output:    PDF->HTML output:


I need to install ubuntu 0n more than 300 PC. So is there any way to install it simultNIOUSLY.

I would like to install Ubuntu  for almost 120 users. But it's very difficult in using USB and drives.  Any suggestions?


One day I was watching TV show. It was based on Fire Dragon. They stated that if the dragon provide greater warmth to the egg, then a male Dragon will hatch. And if the Dragon provide less warmth to the egg it will be female Dragon.  This was totally Science Fiction!!   But is there any possibility that, the Temperature decides the Gender of progeny.

This applies to most if not all reptiles, but I'll write about leopard geckos since that's what I know.  Incubation temperature of the eggs makes a big difference in the development of the gecko. Obviously excessively high or low temperatures will kill the embryo, but inside the safe temperature range there are some interesting effects. The most well-known is Temperature-Dependant Sex Determination (TDSD).  Studies have been done and it is quite well-documented that:   Incubating eggs at the mid-point of the safe range results in predominantly male offspring. Incubating eggs at the high or low end of the range both result in predominantly female offspring.   According to my gecko book, there are also some interesting effects regarding males that hatch from female-biased temperatures being more sexually active but less aggressive to females than the "macho" males produced at male-biased temperatures, females at female-biased temperatures being the most fertile and high-temperature females being more aggressive than lower-temperature females.  (Incubation temperature also affects colour - specifically melanin production levels. AFAIK it's not known whether this is a direct effect of the temperature or an indirect effect from the changes in sex hormones at the different temperatures. It's probably a different enough issue to warrant a separate question, though.)  Going back to TDSD, my question is: what theories have put forward to explain this sex determination? Evolutionarily speaking, how did this come about? Are males less likely to survive so they are only produced at safe temperatures? Does the optimal male:female ratio for propagating the species change in adverse conditions?  I'm not looking for random guesses. I'm interested in knowing if there have been any theories put forward from knowledgeable and reputable sources.


There are some very good questions in SE network. Some of the best questions do not have answers. I do not really have examples now. So can we bring out a feature say "Follow Question" button near the question, So clicking on the button will subscribe us to the question and when someone answers it the notification would go to those who have clicked the "Follow Question" the question.  Or is there already a feature like this ?

What does bookmarking a question mean? How do you bookmark a question? Do users get updates on their bookmarked questions? Are my bookmarks publicly visible? How do you see your own bookmarks? How do you see other users' bookmarks? How do you see which users have bookmarked a particular question? What impact does the bookmark system have on the voting system? Can I "un-bookmark" a question? Can I search within my bookmarks?


I'm trying to understand what "Got to own your own, you have to got to own your own" means, it could interpreted as something you can use like a motivational phrase or is translated literally like "you have to be on command of yourself"? This is from the lyrics of the song of Yazmin Lacey - Own Your Own


So I have a bash scripts that does some things (pull from github, delete folders .. etc ..) pretty basic stuff. I usually run it whenever I need a new version of the web app on the server.  The thing is there isn't anything that stopping this script from running simultaneously by different people (almost all developers connect to this server and they execute the same command).  So far, it didn't happen that the script is run by more than 1 developer at a time.  How do I make sure that this script cannot be run if it's already running by another user? Folder locking or checking if the script is running by another user (is this doable?) something else?   All users that can run this script are sudoers.  EDIT: Well after checking my colleagues turns out that not all of them are using the script .. some of them are executing the commands by hand so I need to lock the folder itself.

Is there a script or a way in linux that when I try to execute a shell script/process, if the same is running, it will prompt that same is running and will exit otherwise it will continue.


I have been looking all over my jungle in Terraria and I can't seem to find the Lihzahrd temple anywhere. Does anyone have any tips on how to find it?

On my 1.2 Terraria Map I have been mining from left to right in my large underground jungle using my rocket launcher. Despite this, I have had no luck on finding the Underground Jungle Lihzahrd Temple. I have been searching the layer above where lava constantly spawns. Have I simply spawned in a world without one or am I searching in the wrong place? I have also considered using the clentimator with Dark Blue ammo to provide light, should I do that?


Recently, I updated my Ubuntu 16.04 and now I am facing problem with my boot space. How can I fix this problem? Is there any way to reallocate the /boot space?

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


Wordpress generates  for each tag.  I read a discussion where someone says these urls are "not important" and they negatively affect SEO. Is this true?

I'm working on SEO for my WordPress page, and I'm having second thoughts about having my tag archive indexed. I'm not using categories at all, so I've set robots to noindex, follow for category overviews, making tags the main taxonomy.  Part of me says that having tag archives indexed is useful because those pages are full of content around one specific keywords, and they also link to more pages concerning those keywords. Also, the posts are truncated with a 'read more' link, so there's not going to be a problem with duplicate content.  On the other hand, these pages might dilute the pagerank for my actual posts. What is the use of people finding my tag archive pages if they could also find actual articles? Wouldn't it be better to just follow the links in my tag archives but not have those pages indexed?  Should I index them or just let google follow the links?


I'm attempting to implement a Metropolis-Hastings Algorithm to evaluate integrals of the following form:  $$I =\frac{1}{\sqrt\pi}\int_{-\infty}^{\infty} {f(x)\exp(-x^2)} \text{d}x$$  Now we can rewrite this as:  $$I =\int_{-\infty}^{\infty} {f(x)P(x)} \text{d}x$$  Where:  $$ P(x) =  \mathcal{N}(\mu=0,\,\sigma^{2}=\frac{1}{\sqrt2}) $$  Now I believe we should generate $X^*$ from some density $q(X^*|X_n)$  Generally we use $q(X^*|X_n) \sim \mathcal{N}(X_n,\,\sigma^{2}) $  We accept $X^* \ as\  X_{n+1}$ with probability:  $ \alpha(X^*, X_n)= min(1, \frac{P(X^*)}{P(X)})$  Else  $X_{n+1} = X_n$  So that's how we sample values.   Will the integral then tend towards:  $I \approx \frac{1}{N} \sum f(X_i)$

In the Metropolis-Hastings Algorithm, one usually considers a symmetric proposal distribution:  $$ J(\theta^*|\theta^{(s)}) $$  where $\theta^*$ is a proposal point and $\theta^{(s)}$ is the accepted value at iteration $s$. The symmetry states that:  $$ J(\theta^* = \theta_b|\theta^{(s)}= \theta_a) = J(\theta^* = \theta_a|\theta^{(s)}= \theta_b) $$  An example usually stated is a Normal or Uniform distribution. My questions are:  1) the Normal and Uniform are symmetric probability density functions themselves, is this notion of "symmetry" the same as the "symmetry" above?  2) Is there an intuitive way of seeing the deeper meaning behind the symmetry formula above? Why is it needed?  Thanks!


I had this problem from my last question: Given that: $X \sim \text{Uni}(a,b)$. I know that the density function is: $$f_X(x) = \begin{cases} \dfrac{1}{b-a} &x \in [a,b] \\ 0 & \text{otherwise}. \end{cases}$$ Then How can this help me to find the density function of : $-X$? Note: what is the right way to write the density function of : $-X$? will it be $f_{-X}(-x)$ or $f_{X}(-x)$ or $f_{-X}(x)$?

I had this problem from my last question: Given that: $X \sim \text{Uni}(a,b)$. Then why does this say that: $-X \sim \text{Uni}(-a,-b)$ and in general how can I prove such claims? Please show a formal explanation to help me understand every step. My book only has this definition of the density function: $$f_X(x) = \begin{cases} \dfrac{1}{b-a} &x \in [a,b] \\ 0 & \text{otherwise}. \end{cases}$$


How does one export a file containing all the control points of the bezier surface in a Blender object?  Here is an image showing my work.  The .obj file I export unfortunately doesn't contain those.  I am pretty new to  blender. I don't know any python.  Blender 2.7

Is it possible to convert/export 2D curves to an svg?  I know you could render it to a raster image and then convert it with inkscape/potrace, but it would be nice if you could keep the splines the way they are in blender.


When I compile a C (no pluses) program using GCC, there are several levels of messages possible, like warning, error, and note.  The note messages are useless and distracting.  How do I make them go away using the command line?  (I don't use any sort of IDE.)    Example: /home/user/src9/AllBack3.c:129:9: note: each undeclared identifier is reported only once for each function it appears in.

When compiling, errors are often accompanied by a lengthy series of notes (cyan). Is there a g++ flag to disable this, only showing the error itself?


This one is part b) of the problem I asked a day ago. Special thanks to MarkMitchison and sbp on the first part. I finally got it. ().   Alright, back to topic.      Let $\rho(r)$ be an arbitary charge distribution now. Under what circumstances does the dipole moment of the displaced charge distribution $\rho '(\vec{r})=\rho(\vec{r}-\vec{b})$ differ from the one not displaced at all.    Now this one is even nastier (excuse my language) than the one before. In hindsight, the one before was easy because I could express the integral in spherical coordinates.   But how do I approach this one? Am I supposed to solve $p=\int r'\cos\theta' \rho d^3r'$ in carthesian coordinates? And what would the boundaries be like?

a) There's a radially symmetric charge density $\rho(r)$ centered around the origin. Determine the dipolemoment of that charge density. b) Let $\rho(r)$ be an arbitrary charge density now. Under what circumstances does the dipole moment of the displaced charge density  $\rho '(\vec{r}) = \rho (\vec{r}-\vec{b})$ differ from the one not displaced at all.  Here were my ideas so far: a) Just thinking about the situation it has to be zero, right? I mean, since there's no real dipole. But how do I show that mathematically? I was thinking of just going like this (it may be wrong): Let the charge density be $\rho (r)=kr$, then we can get the charge q by integrating: $$q=4\pi \int_0^R kr\cdot r^2dr=\pi k R^4$$ I'm looking at the charge distribution as a spherical electron cloud with radius $R$. Then, since $p=qd$ and $d$ is zero because there are no two different charges the dipole moment is zero. Is that sufficient as an answer? b) I don't know how to approach this one. My guess is that its dipole moment is also zero because we're only looking at a displacement here. Anyone got any idea? I would appreciate any advice on this.


i have string like     string test = "0x527AE53437CAED39D3E2A8B3E90FFC3BA9073B6D933BC05FF6677B5521DC34"   How can i convert the string to byte[]?

How can you convert a byte array to a hexadecimal string, and vice versa?


I am new to Java, tried various ways to resolve this but there is no luck.  The TestFeedService interface object (testService) value is showing null on testService.sendMessage(dataBO, false) call. This is there inside the method I'm calling from the test case. I am not sure why this is happening. I tried creating Object in the setup() but still it is failing. Can someone please help me in this.  Below is the Test case code   public class testApiControllerTest { private MockMvc mockMvc; private TesApiController testApiController; private TestFeedService testService;  @Before public void setup() {   testApiController = mock(TestApiController.class);   testService = mock(TestFeedService.class);   testService = new TestFeedServiceImpl(); }  @Test public void testProcessMessage() {   TestApiController testApiController = new TestApiController();   TestForm2 testForm2 = new TestForm2();   testForm2.setType("PROMO_CODE");   testForm2.setUserId("1");   testForm2.setMessage("Welcome");   ResponseEntity<?> responseEntity = testApiController.processMessage(testForm2);   assertEquals(HttpStatus.OK, responseEntity.getStatusCode()); }}   Java Code:    public class TestApiController { @Autowired private TestFeedService testService; // This is an interface   @RequestMapping(path = "/api/process-message", method = RequestMethod.POST) public ResponseEntity<?> processMessage(@RequestBody TestForm2 testForm) {   DataBO dataBO = convertBO(testForm);   testService.sendMessage(dataBO, false);  // here I am getting testService = null and causing exception   return ResponseEntity.ok().build(); } // Some more code

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I'd like something similar to \xrightarrow and \xleftarrow but for squigy arrows \leadsto in LaTeX. I need to do this because I sometimes have to overset the \leadsto with some equation/label that can be long. Any ideas? Thanks!

I am currently trying to write text over a squiggly arrow (\rightsquigarrow). For normal arrows, I use the extarrows package, which provides commands like \xlongrightarrow and \xLongrightarrow which dynamically stretch the arrow depending on the text length. However, the package does not provide commands for squiggly arrows and I was not able to find another one which does so.


Problem :  Let a be a positive real number and let $M_a=\{z \in C^* : |z+\frac{1}{z}|=a\}$ Find the minimum and maximum value of $|z|$ when $z \in M_a$   My approach :   $|z+\frac{1}{z}|=a$  Squaring both sides we get :   $\Rightarrow |z+\frac{1}{z}|^2=a^2$  $ \Rightarrow (z+\frac{1}{z})(\overline{z}+\frac{1}{\overline{z}}) =|z|^2+\frac{z^2+(\overline{z})^2}{|z|^2}+\frac{1}{|z|^2}$  $\Rightarrow |z|^4-|z|^2.(a^2+2)+1 = -(z+\overline{z})^ \leq 0$  Now how to approach further please suggest will be of great help. Thanks.

$z$ is a complex number, by the way.  I've tried a lot of things and always end up with a huge algebraic mess and I've wondered if anyone of you has any idea on how to approach this problem.  One of the most "satisfactory" things I've done so far is to expand both the real and imaginary parts for the equation \vert z + 1/z \vert^2 = a^2. These parts yield the constraints:  $2xy(1+1/(x^2+y^2)^2)=0$ ;   $x^2-y^2+\frac{2(x^2-y^2)}{x^2+y^2}+\frac{(x^2-y^2)}{(x^2+y^2)^2}=a^2 $  I've graphed the equations and supposedly the intersection should be my set of points, but this method is far from analytical.  What can I do? Any hints on how to approach this?


I unwrapped the ball, and placed the .png file in position in the uv editor. Then, I added a material, and applied the uv map to the image texture as shown below:     it shows up in the material panel, but not on the ball!   Thanks,

I'm designing this animal-type creature, and want to add a transparent .png image to its face with the face features (object has a subsurf). On the left is the image with the features, on the right is the part of the object where I want it to be.    I tried to import the image as a plane, but matching the shape of the plane with the face didn't work, and the lines of the face left shadows on the head, and could be seen as a different object from some angles (although it's the closest I've gotten yet). It looked like this:    So , I tried selecting the faces of the head that the features should go over, and create a new material for it. Unfortunately, since the .png is transparent, the result produced was this:    (where it's impossible to tell the transparency from a black background default color, and where I wouldn't know where to start to adjust size and position).  I also tried UV mapping, but then the whole object became black with the features repeated all over.   Is it something I have to go into Nodes for? I'm kind of stuck here. Creating a new material and applying it is simple, but applying a material that is an image is a bit more complex it seems... Ideally, I would reproduce the same technique for the adhesive bandage on its arm (seen on the right of image 1).


I'm trying to enumerate my equations using this command:  \begin{equation}  w(H)\le (g^2-5g+10)/2  \end{equation}   I have this in the log:  ! Missing $ inserted. <inserted text> $ l.1026 \end{equation} I've inserted something that you may have forgotten. (See the <inserted text> above.) With luck, this will get me unwedged. But if you really didn't forget anything, try typing `2' now; then my insertion and my current dilemma will both disappear. ! Display math should end with $$. <to be read again> \endgroup l.1026 \end{equation} The `$' that I just saw supposedly matches a previous `$$'. So I shall assume that you typed `$$' both times. [21]...   I've already tried to put this $$ or $$$$ and nothing happens.  I need help.  Thanks

I am giving a LaTeX course and have the idea to let the students find and solve problems within a few documents. Basically they shall learn how to create minimal examples and read error messages.  However, currently I have no document with 'typical' errors around.  If someone has such examples from him- or herself or within this forum I would like to have the code or link. It does not matter if its short or long. It should just be enough to let the students play with it for some minutes.


How do I change the font locally for one word in Beamer? I want to type the Greek letter Phi in uppercase and lowercase. The uppercase in Beamer show  but I want to have it looks like the varPhi which is  . Is there a way (I am thinking of changing the font type) so that the Phi also looks like a straight up varPhi? Thanks in advance for any help!

In a LaTeX article, the math characters are more "curvy" than the text characters:  \documentclass[12pt]{article} \begin{document}  $x^2 + y^2 = z^2$ \end{document}     In a beamer presentation, the math characters do not have the same curves:  \documentclass{beamer} \begin{document} \begin{frame}  $x^2 + y^2 = z^2$ \end{frame} \end{document}     Question  How can I get the beamer math to look just like the article math?  I would prefer if the solution was a single line (that I could place at the top of my LaTeX file) as opposed to something that needs to appear next to every piece of math.


\documentclass[12pt]{article} \begin{document}  Inductive step-\\ Assume the statement holds for $n \in \left\{ 1, 2, ... n\right\}$  \end{document}   Changing the 12pt in documentclass to something bigger doesn't change the size. Any idea what's wrong?    Am I the only one who thinks that the default font size is too small and the margins are too big?

I'm trying to make a document that has a very small font throughout, I tried this:  \documentclass[0.5mm, a4paper]{article} \documentclass[7pt, a4paper]{article}   But it doesn't seem that they allow me to go anything below 10pt.  This hack make it work, but not for the section headers:  \fontsize{4mm}{5mm}\selectfont   Does anyone know any better ways to do this?


According to canon, is there anything preventing one from concealing one's Horcrux inside a building/place and then simply protecting it with the Fidelius charm, with one being the one and only secret-keeper?  It seems huge flaw to me that V allowed his Horcruxes to be found (and eventually destroyed) that easily. Especially the ring and locket. They were both in some kind of rooms. Using the Fidelius charm would make them simply unobtainable, thus making big V REALLY immortal.

I have seen many discussions here about locations where Voldemort hid his Horcruxes. The fans settle down with this: Voldemort chose those locations where he himself could easily reach.  Why didn't Voldemort just vanish his Horcruxes using Fidelius Charm and became Secret Keeper himself? This way only and only he could reach it (making him 100% immortal). And, there's no flaw to it.


I have this folder which contains a program i can launch by double clicking on its executable, but it doesn't run from the console.  some info:     ➜  knime_3.5.3 file knime       knime: ELF 64-bit LSB executable, x86-64,   version 1 (SYSV), dynamically linked, interpreter   /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.9, with debug_info, not   stripped      ➜  knime_3.5.3 ls -l knime      -rwxr-xr-x 1 rob rob 80393 apr  4 22:18 knime   Stuff i've already already:   right click on it, go to permission, check the "Allow execution as program"     ➜  knime_3.5.3 knime zsh: permission denied: knime  ➜  knime_3.5.3 sudo knime [sudo] password for rob:  sudo: knime: command not found

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


For this equation:  P_{\lambda \sigma} = 2 \sum\limits_{i}^{\hbox{occupied  molecular  orbitals} } c_{\lambda i} c_{\sigma i}   I want the words "occupied molecular orbitals" stacked 3 high.  I tried \vbox, but that did not work.

I have the following equation, where there is a lot of stuff under the sum symbol:  \begin{equation} d(\vec{x},\vec{y})=   \sum_{Z_{xy}\in\vec{Z}_{xy},\forall x\in\vec{x},\forall y\in\vec{y}}      f(Z_{xy}) \end{equation}   In the resulting document, I find it kind of hard to read. Is there a way to write the equation to make the result more readable, e.g. putting the stuff under the sum symbol on different lines?


When an hypervisor like XenServer or vSphere can be run on diskless nodes (eg. by booting from flash cards or from the network) and VM storage is handled via a SAN, is there any good use for local disks?  Would it be better to have those disks even if not used to boot the hypervisor or to hold VMs? What are the reasons, if any, to choose completely diskless servers VS having some local storage?

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


Does a US citizen traveling by plane in Mexico (international flight), for example from Mexicali to Mexico City need to have a passport?

If a Mexican citizen, residing in Mexico, wants to fly domestically, what documents are needed?   Example: Flying from Torreon to Cancun (different states in Mexico)


I recently came across this meme:  (Source:  on Twitter) How can you create that second symbol in LaTeX? Apparently, several packages do include \nlessgtr, but they have a diagonal slash rather than a vertical strikethrough. (\not\lessgtr produces the same thing.) How can you create a vertical strikethrough through a lessgtr sign?

If I wanted \not< but with vertical strikethrough rather than a diagonal strikethrough, how would I make it?


How to set the permission of content types for a specific user role?

How do I set content permission so that specific content types become visible/usable to the admin user only, while other content types may be visible by other user roles?  After I added new content types, I checked the rebuild permissions.   Content access is working fine but the problem seems to be the fact that the enw content types aren't made visible / accessible to the other roles...


I have a Hard Drive. But I don't remember what is there. I think is Linux File System or MacOS File System. How I can see what is on that Hard Drive using Windows or some LiveCD ?

Is there any way or software to read/write HFS+ partitions in Windows?


I recently got Electronic Travel Authorization (eTA) approved to travel to Canada by air. One thing I worry is that one alphabet letter in my passport number in the eTA approval email is not capitalized. Should I reapply for the eTA in this case?

I recently got Electronic Travel Authorization (eTA) approved to travel to Canada by air. One thing I worry is that one alphabet letter in my passport number in the eTA approval email is not capitalized Should I reapply for the eTA in this case?


As I understand it, the terms Classless Inter-Domain Routing (CIDR) and Variable-Length Subnet Masking (VLSM) effectively refer to the same thing.  Is there any noteworthy difference between the proper definitions of these terms?  What is the history or relation between the two?

This is a  about IPv4 Subnets.      Related:               How does Subnetting Work, and How do you do it by hand or in your head?  Can someone explain both conceptually and with several examples? Server Fault gets lots of subnetting homework questions, so we could use an answer to point them to on Server Fault itself.   If I have a network, how do I figure out how to split it up? If I am given a netmask, how do I know what the network Range is for it? Sometimes there is a slash followed by a number, what is that number? Sometimes there is a subnet mask, but also a wildcard mask, they seem like the same thing but they are different? Someone mentioned something about knowing binary for this?


I ran into a question with proving the reduction formula: $$ \int \cos^n x \ dx = \frac{1}{n}\cos^{n-1}x\sin x + \frac{n-1}{n}\int\cos^{n-2}x \ dx $$ I then attempted to prove by differentiation with respect to $x$, but something strange happened (have I just violated the Fundamental Theorem of Calculus?)  After differentiation, the resulting expression is:  $\displaystyle\cos^n x=\bigg[\frac{1}{n}\bigg]\bigg[(n-1)\cos^{n-2}x(-\sin x)(\sin x)+\cos^{n-1}x\cos x+\frac{n-1}{n}\cos^{n-2}x\bigg]$  $\displaystyle=\bigg[\frac{n-1}{n}\cos^{n-2}x\bigg]\bigg[\cos^2x+\cos^n x\bigg]$  $\displaystyle \frac{n-1}{n}\bigg[\cos^nx+\cos^{2n-2}x\bigg]$  Edit: I corrected the derivative, but problem not solved.

I want to show that for all $n\ge 2$, it holds that $$ \int \cos^n x\ dx = \frac{1}{n} \cos^{n-1} x \sin x + \frac{n-1}{n}\int \cos^{n-2} x\ dx. $$ I'm not even getting the result for the induction base $(n=2)$: Using integration by parts, I only get $$ \int \cos^2 x\ dx = \cos x \sin x + \int \sin^2 x\ dx. $$ I'm suspecting that I need to use some trigonometric identity here.


I have a pair of users on an ssh Server. lets call them UserX & UserY. UserX has the home Dir /home/userX UserY has the home Dir /home/userX Both are members of the userX group.  UserX has no problems, everything is cool, and working fine. UserY may read Files in his home directory, but cannot write files.  How can I give full access permissions (rwx) to UserY?

Suppose I installed ubuntu with the user usr1 then I added usr2. I then create a group grp1 where this 2 users are added. A folder is owned by usr1 and has group grp1. But when I login as usr2 I cannot write. The folder has permissions 755...  usr2@kmserver:/media/data/www$ groups usr1 usr1 : grp1 ... usr2@kmserver:/media/data/www$ groups usr2 usr2 : grp1 ... usr2@kmserver:/media/data$ ls -l total 20 drwx------ 2 root root 16384 2011-05-12 10:53 lost+found drwxrwxr-x 2 grp1   grp1    4096 2011-05-12 15:15 www   Whats wrong?


I am reading vc crt source code and found following code snippet.  /* Asserts */ /* We use !! below to ensure that any overloaded operators used to evaluate expr do not end up at operator || */ #define _ASSERT_EXPR(expr, msg) \         (void) ((!!(expr)) || \                 (1 != _CrtDbgReportW(_CRT_ASSERT, _CRT_WIDE(__FILE__), __LINE__, NULL, L"%s", msg)) || \                 (_CrtDbgBreak(), 0))  #ifndef _ASSERT #define _ASSERT(expr)   _ASSERT_EXPR((expr), NULL) #endif   I can not understand why do we need !! in the above macro . Could you give a example that a overloaded operator could end up at operator ||?

I just came onto a project with a pretty huge code base.   I'm mostly dealing with C++ and a lot of the code they write uses double negation for their boolean logic.    if (!!variable && (!!api.lookup("some-string"))) {        do_some_stuff();  }                                      I know these guys are intelligent programmers, it's obvious they aren't doing this by accident.   I'm no seasoned C++ expert, my only guess at why they are doing this is that they want to make absolutely positive that the value being evaluated is the actual boolean representation. So they negate it, then negate that again to get it back to its actual boolean value.   Is this correct, or am I missing something?


I can use ssh command and provide password and connect to another server. But I need to pass password in the shell script. how?

I need to login to a user that I've created on a remote host running Ubuntu. I can't use an ssh key because the ssh login will happen from a bash script ran within a server that I won't have access to (think continuous integration server like Bamboo).   I understand this isn't an ideal practice, but I want to either set the remote host to not ask for the password or be able to login with something like ssh --passsword foobar user@host, kind of like MySQL allows you to do for logins.   I'm not finding this in man ssh and  I'm open to any alternatives to getting around this issue.


A bag of carrots and half a tomato "was/were" sitting on the kitchen counter.  A bag of carrots and half a tomato was sitting on the kitchen counter.  Is this correct?  I was informed that the main subject is "bag," so I should be using the singular verb. Also, is "of carrots and half a tomato" the prepositional phrase? or is it just "of carrots"?  Is this correct as well?  Please advise.

Simple question:     My apples and orange are wrong   or     My apples and orange is wrong   I am not a native English speaker, and I am having some trouble choosing between plural are or singular is for that kind of example.


I am trying to calculate the symmetry factor for a particular Feynman diagram (the one in the picture attached). Using a method that has worked for me every time, I get 1/4, but according to homework solutions it should be 1/12. My method is summarized in the picture. I connect up the points and for each line record the number of ways I could make the connection whilst getting topologically the same diagram. My numbers for joining up the external fields are 4 and 4 rather than 12 and 8 because I account for vertex choice at the end by multiplying by 3!. I multiply all this by (1/(4!)^3)*(1/3!) for the term from the Wick expansion. This gets me the number in the screenshot, which is equal to 1/4. If someone could point put the flaw in my reasoning it would be massively appreciated.

I am working with $\lambda\phi^4/4!$ theory and am struggling to compute the symmetry factor for the diagram  by using the method specified . I know that the answer is ${1}/{12}$, but I can't work out how to get this. Here is my reasoning:    the vertices are indistinguishable, so there is a factor of $3!$ 4 ways of choosing which leg of $u$ to connect to $x$ 4 ways of choosing which leg of $z$ to connect to $y$ 3 ways of choosing a leg of $u$ to connect to $z$, and 3 ways of choosing which leg of $z$ it should be connected to 4 choices for connecting the first leg of $u$ to a leg of $w$ 3 choices for connecting the second leg of $u$ to the remaining legs of $w$ 2 ways to connect one of the last two legs of $w$ to $z$ 1 way to connect the final leg of $w$ to the final leg of $z$  The overall factor is then (with a factor of ${1}/{4!^3 3!}$ from the Dyson expansion) $$  \frac{1}{S} = \frac{1}{3!\cdot (4!)^3} \cdot 3! \cdot 4\cdot 4 \cdot 3 \cdot 3 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = \frac{4^2 \cdot 3^2}{4!^2} = \frac{1}{4}. $$  I would be very grateful if anyone could point out where I have gone wrong. Alternatively, if anyone could explain another systematic way to compute symmetry factors for general Feynman diagrams then that would also be very helpful!


I am trying to add a SELECT ALL functionality to my grid with LINQ, but I get a compilation error.  List<Person_> PeopleUpdated = People.ToList().ForEach(a => a.SELECTED = true).ToList();   It says      Cannot implicitly convert type 'void' to   'System.Collections.Generic.List <   LogoSapHrIntegration.frmXmlUpload.Person_>'   what am I doing wrong?

Is there a way to do the following using LINQ?  foreach (var c in collection) {     c.PropertyToSet = value; }   To clarify, I want to iterate through each object in a collection and then update a property on each object.  My use case is I have a bunch of comments on a blog post, and I want to iterate through each comment on a blog post and set the datetime on the blog post to be +10 hours. I could do it in SQL, but I want to keep it in the business layer.


I like to start GUI programs from the terminal, e.g. emacs myfile.txt. But doing that leaves a terminal window open with that process, so now there are two windows for me to keep track of. And if I close the terminal window, the GUI program closes.   I know I can run exec cmd, where cmd is the command I'm trying to run, and that closes the terminal window after the program completes. But I want to close the terminal window after the command is launched. Is there a way to do that?

Sometimes I want to start a process and forget about it. If I start it from the command line, like this:  redshift   I can't close the terminal, or it will kill the process. Can I run a command in such a way that I can close the terminal without killing the process?


I accidentally gave all permissions of my system to another user who has neither a password nor a home directory.  I have complete physical access to the computer, and I'm currently logged in via SSH with key into the system as my user named "chronove"... the user chronove had access to sudo rights, however those are now gone as I ran the command:  $ sudo chown -R mc:mc /   To give you some more information:  $ sudo sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set   and  $ ll /usr/bin/sudo -rwxr-xr-x 1 mc mc 140944 Jan 14 00:41 /usr/bin/sudo*   I cannot access any other instance to the server via SSH or FTP to make any backups. My initial plan to solve this issue was to grab a backup of everything needed and reinstall the Ubuntu server. It seems I got read rights to all necessary files, however i'm unsure as to move several zip files across the only SSH connection I have (which would break on restart).

I accidently ran  sudo chmod 755 -R /   instead of  sudo chmod 755 -R ./   I stopped it after few seconds, but now there is some problems such as  sudo: must be setuid root   How can I revert permissions back?


When I come from main career 2.0 site. I clicked on PHP from there. Then it came to search listing page and it worked fine. Then I choose location and then on pressing enter or clicking search button, it duplicated PHP, so this time search field had "PHP PHP" mean two times written in it. I again clicked Search and a "PHP" in search field increased and then this was the URL:   And in search box there were "PHP PHP PHP PHP" while 3 times PHP in search term in URL as given above. So this need to be fixed because if it occur, it don't return any search result.

What is the bug about: Keyword gets duplicated even when the query is not modified.  Impact: As far as i can tell - cosmetic.  How to replicate: Go to:  and keep pressing Search button. With each search there will be a duplicate python keyword appended to search box.  Best guess for what is causing it: I think you have somewhere a piece of code that appends tag as a keyword without checking if it is already present. My reasoning comes from this url:  not having the same issue - the tag is not present in it.


I have a column in sql server like 201801. How can I transform this in DD-MM-YYYY? Thank you!

I am trying to convert a date with individual parts such as 12, 1, 2007 into a datetime in SQL Server 2005. I have tried the following:  CAST(DATEPART(year, DATE)+'-'+ DATEPART(month, DATE) +'-'+ DATEPART(day, DATE) AS DATETIME)   but this results in the wrong date. What is the correct way to turn the three date values into a proper datetime format.


I reviewed a post and I made a mistake I clicked the No action need button instead of the Skip button.  Is it possibke to revoke my review?

I (and probably many other people) have accidentally clicked the wrong button in reviews. For example, I just clicked the Leave Open button when I wanted to click Close. I think many people have done this. I think an ability to undo this would be appreciated.


Is there (in universe, wherever) anything random? Do we know any event (or whatever else) which has no reason? Of course there are some things that we cannot see, measure but it doesn't mean that they haven't a reason.

I'm not sure if this is the right place to ask this question. I realise that this maybe a borderline philosophical question at this point in time, therefore feel free to close this question if you think that this is a duplicate or inappropriate for this forum. Anyway, I'm an electrical engineer and I have some basic knowledge of quantum mechanics. I know that Schrödinger's equation is deterministic. However, quantum mechanics is much deeper than that and I would like to learn more. If this question is not clearly answerable at this point than can anyone point out some recognized sources that try to answer this question. I would appreciate it if the source is scientific and more specifically, is related to quantum theory.


For example I want to say:     I slept only 5 hours last night   or     I only slept 5 hours last night.   Which one is correct?

I've only been there once. ()   Does this mean ‘I’ve just been there not doing particular activities like studying or staying for particular something else, and I have once? (Because ‘only’ is put between verbs, it is different from ‘I’ve been there only once’.)      He has only seen her once. (The Cambridge Grammar of the English   Language)   Likewise, does this mean ‘he has just seen her not talking to each other et cetera, and he has once’?


I have a Shapefile but its coordinate system is Unknown, and there is no *.prj file.   How can I identify it now?


I installed Ubuntu 12.04, with texlive-full and texworks. When I double-click a .tex file in Nautilus, it pops up a  Do you want to run "xxxxxxxx.tex", or display it contents?  "xxxxxxxx.tex" is an executable text file.  Run in Terminal     Display       Cancel        Run   If I choose Display, it opens texworks. How can I make it open without seeing the above conversation window?  By the way, is .tex file indeed an executable file?    ADDED Just for the case, my ~/.local/share/applications/mimeapps.list file looks like the following:  [Default Applications] text/html=google-chrome.desktop x-scheme-handler/http=google-chrome.desktop x-scheme-handler/https=google-chrome.desktop x-scheme-handler/about=google-chrome.desktop x-scheme-handler/unknown=google-chrome.desktop text/x-tex=texworks.desktop x-scheme-handler/mailto=google-chrome.desktop  [Added Associations] text/x-tex=texworks.desktop; text/x-bibtex=jabref.desktop;gedit.desktop;   I observe texworks are both up and down. Should I remove one?    ADDED  This does not happen with all .tex files. In fact, I am currently using Ubuntu 12.04 under Virtual Box with Windows 7 host. I have my Dropbox account synced with the Windows 7 host, and I access files in Dropbox in Ubuntu through Virtual Box's shared folder functionality. (I didn't install Dropbox client in Ubuntu.)  Files in Dropbox are owned by root with group vboxsf. My personal account is in the group vboxsf.  It seems that I have to uncheck the option for "executable", but I have all my .tex files in the Dropbox shared folder. Would there be any workaround?

To execute a script, I have to:   Write the script Make it executable Double click it, which shows this window:   Click the "Run" button.    How can I execute the script directly, without showing the dialog?


I have an Ubuntu server that sits in a DMZ. The server has a private IP address (10.x.x.x) and the firewall has a public IP address. All network traffic from internet to the public IP is forwarded from the firewall to the DMZ server. This works fine.  My problem is that traffic from the server inside the DMZ to the public IP address isn't routed back by the firewall. The firewall is outside of my control so I would like to configure the server to never route outgoing traffic to the gateway in the first place but rather handle it locally.  I have been playing with iptables DNAT and MASQUERADE but so far without any luck. What rules would I have to add to accomplish this?  I have the same problem with both normal outgoing traffic and outgoing traffic from docker containers on the server that use a bridged network.

This is a  about Hairpin NAT (Loopback NAT).   The generic form of this question is:  We have a network with clients, a server, and a NAT Router. There is port forwarding on the router to the server so some of it's services are available externally. We have DNS pointing to the external IP. Local network clients fail to connect, but external work.   Why does this fail? How can I create a unified naming scheme (DNS names which work both locally and externally)?   This question has answeres merged from multiple other questions. They originally referenced FreeBSD, D-Link, Microtik, and other equipment. They're all trying to solve the same problem however.


Mathematical Induction:-Prove that $n! \geq 2^{(n-1)}$ for $n\geq 1$.  I tried mathematical induction but could not

I'm having difficulty solving an exercise in my course.  The question is:      Prove that $n!\geq 2^n$.   We have to do this by induction. I started like this:   The lowest natural number where the assumption is correct is $4$ as: $4! \geq 2^4 \iff 24 \ge 16$. The assumption is: $n! \ge 2^n$.   Now proof for $(n+1)$ which brings me to: $(n+1)! \ge 2^{(n+1)}$  I think I can rewrite it somehow like this:  $$ {(n+1)} \times {n!}  \stackrel{\text{(definition of factorial)}}{\ge} 2^n \times 2 $$  $$ (n+1) \times 2^n \ge 2^n \times 2 $$  Then I think I can eliminate the $2^n$ and have something like this: $n+1 \ge 2$, or $n \ge 1$.  But I think I'm wrong here some where and was hoping somebody has some advice on this. How can I prove the above assumption?  Any help would be appreciated, kind regards.


How to interpret OR (odds ratio) decimals? Are they percentages?  OR with probabilities $p_1,p_2$ for two events is  $$\frac{\frac{p_1}{1-p_1}}{\frac{p_2}{1-p_2}}$$  Like if one gets an OR of, say, $2.25$, then does this mean that the nominator event is 225% more likely than the denominator event? What does "odds" mean?

Suppose we have a baseline exposure group and 2 other exposure groups for a case control study. Suppose the odds ratio for the first exposure is $1.5$ and the odds ratio for the second exposure is $1.8$. Does this mean that cases are $1.5$ times as likely to have exposure 1 than the controls? Also does this mean that cases are $1.8$ times as likely to have exposure 2 than the controls?


Recently, I came across an interesting problem. I haven't yet managed to solve it, but I really want to find out the solution.     Does the series $\sum_{n=1}^\infty a_n$ converge?   $$ a_1=1,\ a_2=\sin(a_1),\dots, a_n =\sin(a_{n-1}) $$   I tried to use inequality $x\geqslant \sin(x)$ and prove by induction that $a_k\geqslant a_{k+1}$, but I didn't succeed. Anyway, I think that the sequence $\left\{a_k\right\}_{k=1}^\infty$ is monotonically decreasing, and it might be important. As for the ratio test and the root test, I couldn't apply them here.  Could someone help me?

$$\sum_{n=1}^\infty \sin^{[n]}(1)$$ Where by $\sin^{[n]}(1)$ we mean $ \sin\left(\sin\left(\dots\sin(1)\right)\right)$ composed $n$ times.   Have tried the divergence test, which fails.  Have tried Ratio test, also fails, as the limit is 1.  Integral test, or root test do not seem promising. Help is appreciated


I am writing a shell script where I am reading all the files in a directory, performing some criteria checks and splitting certain files on number of records (lines)  I want to split file abc.txt as abc(AA or 01).txt (I don't mind anything as long as it begins with abc and ends in .txt)  Is there a simple way to do this ?  I am using split command:  split -l $line_count $file $????      I am confused what should be in place of ????  I am open to other methods too but I would prefer to just change the ??? as the other parts of the script is ready.  Many Thanks

There is a standard command for file splitting - split.  For example, if I want to split a words file in several chunks of 10000 lines, I can use:  split -dl 10000 words wrd   and it would generate several files of the form wrd.01, wrd.02 and so on.  But I want to have a specific extension for those files - for example, I want to get wtd.01.txt, wrd.02.txt files.  Is there a way to do it?


I know there is a related question here  but it was asked 8 years ago so I'm asking if there is a newer/better version of that concept. Here is the code I have currently tried from that question:  var dataSelection = Data.Where(i => i.Date <= startingDate).Take(days);             highIndex = Data.FindIndex(dataSelection.Max(i => i.High);   (Doesn't work because FindIndex takes the class and not the item in the class      int maxIndex = -1; int index=0; double maxValue = 0;  int urgh = sequence.Select(value => {     if (maxIndex == -1 || value > maxValue)     {         maxIndex = index;         maxValue = value;     }     index++;     return maxIndex;  }).Last();   Update: I'm using a list of classes for the search and I'm trying to get the index of a class that has the highest value in a certain item in that class

I have an array of doubles and I want the index of the highest value. These are the solutions that I've come up with so far but I think that there must be a more elegant solution. Ideas?  double[] score = new double[] { 12.2, 13.3, 5, 17.2, 2.2, 4.5 }; int topScoreIndex = score.Select((item, indx) => new {Item = item, Index = indx}).OrderByDescending(x => x.Item).Select(x => x.Index).First();  topScoreIndex = score.Select((item, indx) => new {Item = item, Index = indx}).OrderBy(x => x.Item).Select(x => x.Index).Last();  double maxVal = score.Max(); topScoreIndex = score.Select((item, indx) => new {Item = item, Index = indx}).Where(x => x.Item == maxVal).Select(x => x.Index).Single();


I ran the following to upgrade and got the following error sudo do-release-upgrade -d Checking for a new Ubuntu release Upgrades to the development release are only available from the latest supported release.

I want to use do-release-upgrade to upgrade from 18.04 to 20.04, but I can't do that do-release-upgrade Checking for a new Ubuntu release There is no development version of an LTS available.  It seems that  is used, and it still points to 18.04. Do you know when (or how?) can I upgrade to 20.04?


Suppose $n$ points are uniformly and randomly selected in  a square bounded by lines $ x=0,y=0,x=1,y=1.$ Let $X$ be the distance of a point from the centre $(1/2,1/2)$.Can we analytically calculate  the density function of the range of $X$.i did a MATLAB simulation  for k=1:1000          for i=1:1000                   x1(i)=rand();                     x2(i)=rand();                   y1(i)=rand();                   y2(i)=rand();                    d(i)=sqrt((x1(i)-0.5)^2+(y1(i)-0.5)^2);                   range=max(d)-min(d);          end          r(k)=range   end   avg=sum(r)/1000   plot(r)    I got the average value of range as 0.67 .References  and books for similar problems involving random   distances  between points  are also requested P.S:-Some experts are suggesting that my problem might be a duplicate of problem which talks about the average distance of a random point in   a square .While the two problems might be apparently similar but my problem is different in that its aim to find the density function of the range $R$  of the distance  of a random  point from the centre of the square ,possibly as a function of $r$ itself just as talk of the pdf $f(y)$ of a random variable $Y$.Further ,while it is relatively straight forward  to calculate the pdf of minimum and maximum of a rv ,it is an entirely different problem to compute the pdf of the range

How can I calculate average distance from center of a square to points inside the square?


Can you figure out what is wrong with the statement below?   GCC error states:      'type name' declared as function returning array   #define MACRO(a) (a)[1]  class index { public:     typedef int index_type[2];     const index_type& operator[](int i) const; };  int k = 0; int i = MACRO(index()[k]);   btw: I know what is wrong, I thought it was amusing thing to share.   Many thanks to litb, his explanation of previous gotcha helped to solve this error pretty quickly.

Is there any good reason that an empty set of round brackets (parentheses) isn't valid for calling the default constructor in C++?  MyObject  object;  // ok - default ctor MyObject  object(blah); // ok  MyObject  object();  // error   I seem to type "()" automatically everytime. Is there a good reason this isn't allowed?


I have a 5v relay which is not working on my esp-32 dev board. I understand that there logic levels are different but i checked the seller and they say it works with 3.3 logic level. When powered by the 3.3 pin on the board, the relay light turns on however it does not work. Sometimes the green light turns on but there is no sound or vibration of the latch opening/closing. Up till now you could dismiss all of these  problems by saying that the board requires more power(5v). I thought so too. However what is bothering me is the fact that when the relays IN pin is connected too ground it turns on. Furthermore, i have also tried powering the board using a breadboard power supply(set to 5v) and triggering with esp-32 board but that too has failed? Could someone tell me If the problem is my code? relay? or mabye it is the right ammount of current/voltage?  ( ik this is an electronic forum and am only asking about relays electrical side.this code is just to show it isn't a problem on the software side:) )  For testing purposes i am using this code:  void setup() {   pinMode(23,OUTPUT); }  void loop() {   pinMode(23,HIGH);   delay(250);   pinMode(23,LOW);   delay(250);  }

I'm new to EE so my theory isn't that strong. I want to trigger a  5v relay with my Arduino using a PN2222 transistor and a flyback diode. I plan on using the schematic below:         – Schematic created using   Now my question is: If I'm powering the Arduino via USB, will the current draw be too much for the Arduino's Vcc pin, thus requiring external power? I believe I'm reading that the relay will draw ~90mA and the Vcc pin from the Arduino can handle up to 200mA total. However, the transistor drives how much current is actually drawn, correct? Which is a function of the digtal pin voltage, R1 and the Hfe rating of the transistor? So if you were to mess that up, the current flowing to the relay would be incorrect and would not trigger it?   Thanks!


I want to give a unique name to each image in a folder and move them into another folder, and then update table posts according the new value.  $list = glob("../cardimg/*.jpg"); $x = 1; foreach ($list as $item) {   $id = uniqid();   rename ($item, "../carda/" . $id . ".jpg");   $st = $db->query("update posts set img = " . $id . " where id = " . $x);   $x++; }   Error: Unknown column '5ac7d19eb11d8'...  But I know - there is no such a column in my table - I want to update img column.  id column is from 1 to 50.  Why I'm getting this error?

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I have already asked this question , but it was actually not answered before it got closed as someone thought it was a duplicate. I now know that I can find a soft_max and soft_min parameter of a NodeSocket, which helps somewhat, but it does not solve it. Why? Because the soft_max and soft_min do not at all correspond to the sliders' max and min. Basically all float value sockets have a soft_max and soft_min of 10000 and -10000, but some of the sliders range between [0,10] or [0, 2] or anything. This range is what I'm interested, and wondering if it is at all possible to find it programmatically. Thank you :D

I'm rather new to scripting in Blender and have stumbled upon a problem I can't find a solution to. I'm trying to find the max and min value of an input of a Node.  I manage to find the input object (they're subclasses of NodeSocket) but I can't find any way to extract its max or min value. I reckon that many of them doesn't have it set, but how come then that the slider to control them seem to have a min and max? Can I extract this?   To clarify, for a Nodes input X, a slider might be restricted to values between 0 and 10 by default. If i force it to, say -10 then the slider will adapt and range between -10 and 10. Can I extract this first range somehow? Is it manually set or somehow automatically calculated in Blender?  In the below image, Blender restricts the slider to 0.1 - 20.0.   UPDATE The node in question is a custom Group Node node and comes from this , maybe that has something to do with it?


Is anything known about this sum? $$ \sum_{\text{prime}\;p} \frac{1}{2^p} $$  I've calculated that it converges, but I can't determine whether the following related sum can be analytically continued outside the unit circle: $$\sum_{\text{prime}\;p} z^{p}$$

Define a number $q$ in binary notation whose $n$-th bit is $1$ for $n$ prime, and $0$ for $n$ composite. So its 2nd, 3rd, 5th, 7th, 11th, etc. bits are $1$, with all other bits $0$. Here is $q$ out to its $101$-st bit: $$.01101010001010001010001000001    010000010001010001000001000    001010000010001010000010001    000001000000010001$$ What is known about $q$? ($\approx 0.414683_{10}$). Has it been investigated? Does it have a name? It is irrational. But is it transcendental?


How can one setup local yum repository using the downloaded rpm packages?  This is a note to self. I am not sure if this good way, but I am trying nevertheless.

Wondering how to create our own CentOS 5 based yum repository? Basically, we want to make rpm packages and then be able to do things like:  yum install our-custom-package yum remove our-custom-package yum update our-custom-package   Thanks.


Meta sites (with the exception of meta.stackexchange.com) do not alter reputation.  Thus I do not get any sort of alert when my posts are upvoted or downvoted.  How do I track or receive notifications for voting activity on meta.[sitename].stackexchange posts?

Child metas don't have rep, so there's no point in tracking a rep stat or reporting changes.  But one of the things rep updates do on main sites is to alert me when there's activity on older posts.  On metas, unless I revisit a question I'll never notice that there's been a bunch of voting (which might be accompanied by new comments that didn't ping me).  I'd like to know about that activity, not because of any ego reasons but because meta is where site policies get discussed and set and it's useful to know about changes in the community will.  A couple days ago I visited a meta post where, a few weeks ago, my answer had been voted down, and this time it was at the top.  Could we have something like the reputation-changes tab on meta?  I suspect that the data already exists, because I once  (and I see I'm not the only one).  If something akin to reputation is already being tracked internally on per-site metas, can we get it exposed?


I've researched here on MSE, but I haven't found a definitive answer to whether bounties are refunded on deleted questions. According to , bounties are not refundable. Does this also apply to deleted questions, or does it only apply to non-deleted posts?

It's possible to offer and award bounties of reputation on questions.   What is a bounty? How can I find questions that have a bounty attached? How do I start a bounty? When can I start a bounty? Why is the system requiring me to choose a bounty amount that's higher than the minimum? Can I use Markdown formatting in the bounty remarks? Can I edit the remark? How long is the bounty period? How do I award a bounty? Can I award a bounty to my own answer? Can I award a bounty to an old answer? If I offer a bounty on someone else's question, can I award the bounty to their answer? After awarding the bounty, can I remove it or move it to another answer at a later time? What happens if there's no answer after the bounty period? What happens if I feel my question is still unanswered? What is automatic awarding? Are bounty awards exempt from the 200 points/day reputation limit? How does Community Wiki mode affect bounties? How does user deletion or post dissociation affect bounties? Can I award a bounty to an answer from a deleted user or one where the author was dissociated? Can I offer a second bounty after the first one has expired? Can I raise my bounty? What happens if a bounty question is closed or deleted? Why can't I vote to close or migrate a bounty question? What happens if I delete my account while I have an active bounty? Do I keep an awarded bounty when I delete my answer? What happens if a question where I awarded a bounty later gets deleted or migrated? Can I cancel my bounty? Can I affect / divide / share part of my bounty to two (or more) users? How many outstanding bounties can a single user have?      See also:  in the Help Center


I need stdout and stderr to a file, and my shell simultaneously.  command > file.txt, the usual goto, will not output stderr to the file, nor output stdout to the terminal.  command > file.txt && cat file.txt will also not work because it needs to be real time, and it needs to have colour codings.   What command or primitive do I need to utilise in order to be able to read both to the file and my shell, real time?

My aim is to log all output from a script into a directory that the script is going to create.  For example, I have:  ~/.abc.sh:  #! /bin/bash rails new myapp   When I run...  cd ~/code . ~/.abc.sh   ...that will create a new Rails app in directory ~/code/myapp.  When Rails is creating an app, it outputs a whole lot of text that I want to capture and store in a log file in the same directory the rails command newly created. I also want to display that text in the terminal as well.  How do I go about doing this?


I am trying to use preg_match to match a number that's between 5 and 10 characters long. However, I want the ENTIRE number. I have  preg_match("/\d{5, 10}/", $str, $match)   but the above code will match the first 5 digits of a number that is let's say 10 characters long. How can I make it return the entire length of the number?

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Let $2 \leq p \leq q$ and $2 \leq r \leq s$. Prove that $R(p,r) \leq R(q,s)$ and that equality holds if and only if $p=q$ and $r=s$.   The equality part is clear, cause we will have $R(p,r) = R(p,r)$, which clearly is the same thing. But why it is true only then? I know also that things are equal due to symmetry too, though I don't think it is relevant here. On the other hand, how can I prove the inequality?

Here I want to prove the following: $$R(s_{1},s_{2},\ldots ,s_{k}) < R(s_{1}+1,s_{2},\ldots ,s_{k})$$ For $s_{1},\ldots ,s_{k} \in \mathbb{N}$, $s_{i}\geq 2$. (Or can it hold with equality in some cases?)    Try contradiction: Suppose $\exists s_{1},\ldots ,s_{k} \in \mathbb{N}$, $s_{i}\geq 2$, for which $R(s_{1},s_{2},\ldots ,s_{k})\geq R(s_{1}+1,s_{2},\ldots ,s_{k})$. Then consider an $k$-colouring of the edges of $K_{R(s_{1}+1,s_{2},\ldots ,s_{k})}$ with colours $c_{1},\ldots c_{k}$. Then we either have a $c_{1}$ $K_{s_{1}+1}$, in which case we would also have a $c_{1}$ $K_{s_{1}}$, or a $c_{2}$ $K_{s_{2}}$, ... , or a $c_{k}$ $K_{s_{k}}$. So the assumption is satisfied with equality.    Now I suppose we could get a contradiction from the minimality of $R(s_{1},s_{2},\ldots ,s_{k})$, so consider removing an edge: Let $C$ be an $k$-colouring of the edges of $K_{R(s_{1}+1,\ldots ,s_{k})-1}$.    But now we can't say anything about the existence of any complete monochromatic subgraph of the appropriate sizes..    Try induction:    Let me start with $k=2$ for now and assume WLOG $s_{1} := s \leq t =: s_{2}$. [Base Case] $2=s \leq t$. Then $R(2,t) = t$. Now  $> t$ for $t \geq 2$.    [Induction step] Assume $3 \leq s \leq t$. It suffices to exhibit a red-blue colouring of edges of $K_{R(s,t)}$ with no red $K_{s+1}$ and no blue $K_{t}$. But by definition, any red-blue colouring of edges of $K_{R(s,t)}$ contains either a red $K_{s}$ or a blue $K_{t}$. So consider those colouring in which we have a red $K_{s}$ and no blue $K_{t}$. But this move is not possible in general because we can't assume that we have an exclusive or for all of the colourings so these colourings we choose may be empty.


This might be a little unusual, but please bear with me. I'm working on a theoretical exercise in chromatography (chemistry), a method that is used to separate different molecules. It is assumed that after performing the chromatography procedure, two different molecules separate from each other along a one-dimensional "tube" in zones that have Gaussian (normally distributed) shapes, with the y-axis representing the concentrations of the molecules along a one-dimensional space. The maxima of the peaks that represent the two molecules are separated from each other by a large number of standard deviations (10 in the following example):     I want to calculate the theoretical amount (cumulative probability) of molecule A in the space that corresponds to the maximum of molecule B's peak. Thus, I am trying to calculate the cumulative density of a standardized normal distribution to the right of an extremely high (>10) z-score. I have tried using R (and Matlab) to calculate this:  1-pnorm(x)   where x is the large z-score. I can increase x=8, which returns the cumulative density of 6.661338e-16. Anything above x=8 that returns 0. I know that it is probably related to memory limitations and rounding off. My question, is there a way (configuration of R or Matlab, specialized software, an existing table) that will allow me to calculate the cumulative density of a standardized normal distribution to the right of z-scores approaching 40, without rounding the answer to 0?

I know that an easy to handle formula for the CDF of a normal distribution is somewhat missing, due to the complicated error function in it.  However, I wonder if there is a a nice formula for $N(c_{-} \leq x < c_{+}| \mu, \sigma^2)$. Or what the "state of the art" approximation for this problem might be.


I just want to know what voltage actually is. I seem to have misunderstandings about this; is it energy of electrons? I just want to know what actually is voltage?  And secondly I'm confused about what kVA means of a transformer. A 100kva transformer means it can turn on 1000 bulb of 100watts?

Bit of a strange question, but what is it? My physics teacher said it was kind of like a "push" that pushes electrons around the circuit. Can I have a more complex explanation? Any help is much appreciated.


I am trying to install the proprietary Nvidia drivers on Ubuntu 14.04, which has a GeForce 880M graphics card (laptop). From the NVidia website, it tells me that I need the driver version 340. Here is what I have done so far:  sudo add-apt-repository ppa:xorg-edgers/ppa sudo apt-get update sudo apt-get install nvidia-340   After this, in Ubuntu Software Centre -> Software Sources -> Additional Drivers, I chose to select the 340 driver. Then I rebooted my machine.  After rebooting, the screen seems to freeze every couple of minutes or so. There is no response from the mouse or keyboard. The only way to regain responsiveness is by entering tty (Ctrl Alt F1) and then returning to the desktop (Ctrl Alt F7). However, a few minutes later, the screen freezes again.  I have now reinstalled a fresh copy of Ubuntu, updated the Nvidia drivers as the first thing after installation, and the same thing is happening. Any ideas on how I can address this?

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


Let $x$, $y$ and $z$ be natural numbers satisfying $x^2 + y^2 + 1 = xyz$. Prove that $z = 3$.   I have managed to show that $z$ is a multiple of $3$ by looking at it modulo $3$ but not sure how to show $z=3$. Any tips?

Let $x$ and $y$ be positive integers such that $xy \mid  x^2+y^2+1$. Show that $$ \frac{x^2+y^2+1}{xy}= 3 \;.$$ I have been solving this for a week and I do not know how to prove the statement. I saw this in a book and I am greatly challenged. Can anyone give me a hint on how to attack the problem? thanks


Suppose that $f(y)-f(x) \leq (y-x)^2 $ for all $x\in \mathbb{R}$ and $y\in \mathbb{R}$. Then how can i show $f$ is a constant function.   I encountered this problem reading Calculus book written by Michael Spivak. He said that this would imply that $|f(y)-f(x)| \leq (y-x)^2$ and I could derive this exchanging y and x. And his final hint was Divide the interval from $x$ to $y$ into $n$ equal pieces.

Problem: Let $f$ be defined for all real $x$, and suppose that   $$|f(x)-f(y)|\le (x-y)^2$$  for all real $x$ and $y$. Prove $f$ is constant.  Source: W. Rudin, Principles of Mathematical Analysis, Chapter 5, exercise 1.


I don't really understand why we add the word up or down even if it is not needed, example : open up! when requesting/ordering someone to open the door. Why not just say open the door!, or open!, what's the purpose of up in examples like these ?  The same thing with adding the word down, that I hear in many sentences, but I don't really have one in mind right now.  EDIT : What's the difference between open the door! & open up the door! ?

The creek has dried up.   In this example sentence, you should say "dried up." If you say just "dried," it sounds incomplete. Is this an example of an idiom or is there a grammatical rule governing this instance? If so, what is it?


I have a 2TB hard disk drive connected to my desktop, with a Windows and Ubuntu OS on two partitions of a 250GB SSD. While recently working in Ubuntu while trying write operations onto the 2TB hard disk drive, I am getting the error “No space left on device,” while there is still roughly 500GB left.   Output from df -h:  Filesystem      Size  Used Avail Use% Mounted on /dev/sdb5        69G   59G  6.5G  91% / none            4.0K     0  4.0K   0% /sys/fs/cgroup udev             24G  8.0K   24G   1% /dev tmpfs           4.8G  1.5M  4.8G   1% /run none            5.0M     0  5.0M   0% /run/lock none             24G   39M   24G   1% /run/shm none            100M   52K  100M   1% /run/user /dev/sdb2       153G  120G   33G  79% /media/suchet/c-drive /dev/sda1       1.9T  1.4T  492G  74% /media/suchet/d-drive   I am trying to write to /dev/sda1  Output from df -hi:  Filesystem     Inodes IUsed IFree IUse% Mounted on /dev/sdb5        4.4M  741K  3.7M   17% / none             5.9M     2  5.9M    1% /sys/fs/cgroup udev             5.9M   536  5.9M    1% /dev tmpfs            5.9M   614  5.9M    1% /run none             5.9M     3  5.9M    1% /run/lock none             5.9M    80  5.9M    1% /run/shm none             5.9M    30  5.9M    1% /run/user /dev/sdb2         34M  571K   34M    2% /media/suchet/c-drive /dev/sda1        493M  896K  492M    1% /media/suchet/d-drive   /dev/sda1 has 492 GB free and using 1% of the inodes.   Sample write operation:  >> echo $PWD  /media/suchet/d-drive >> touch hello.txt touch: cannot touch ‘hello.txt’: No space left on device   UPDATE: PANIC MODE!!!  I have lost my 1.5TB of data.  After failing to write to /dev/sda1, I rebooted into Windows to see whats going on. I was able to login safely and actually write a small file to that disk manually. I then rebooted again and tried going into Ubuntu, which complained about mounting error for /dev/sda while starting up. I skipped this message and logged into Ubuntu—and as expected was not able to manually mount /dev/sda—Got an error message about faulty drive.   I rebooted yet again and went to Windows. Upon startup (pre-login) Windows suggested I do a disk check, and I let it do that. The process took about 30-60 seconds and Windows booted up. And My 2TB hard disk drive was wiped out.   Currently attempting to use various data recovery tools on Windows to save my precious work. Most of them seem to recover basic image and document files - but hopefully I stumble upon something that can recover more.

I'm trying to copy a file to a USB flash drive. The drive does not have a write-protect switch.  df gives the following:  $ df -h . Filesystem      Size  Used Avail Use% Mounted on /dev/sde1       1.9G  622M  1.3G  33% /media/lindenb/803C-078D   df -i produces strange output to me (0 everywhere)  $ df -i . Filesystem     Inodes IUsed IFree IUse% Mounted on /dev/sde1           0     0     0     - /media/lindenb/803C-078D   Number of files on the drive:  $ find . |wc -l 170   But when I try to copy a file, I get this:  $ mv ~/file.txt ./ mv: cannot create regular file ‘./file.txt’: No space left on device   How can I fix this ?


One of the plot points of Iron Man 2 is that Tony Stark is being slowly poisoned to death by the palladium that powers his chest arc reactor; and he can't just do without the reactor, because that is the only thing that prevents the shrapnel in his chest from entering his heart. Within this movie, the problem is resolved by creating a new arc reactor powered by a nontoxic unnamed element.  But then, at the end of Iron Man 3, Stark decides to undergo surgery to remove the shrapnel from his chest, thus eliminating his need for a chest arc reactor. Why wasn't this option entertained in Iron Man 2? I appreciate that the surgery might be risky, but if the alternative is death by palladium poisoning, you might be willing to take the risk (and that's not even counting the fact that Stark, being the genius he is, could have devoted time to devise ways to lower the surgical risk).

The ARC reactor and electromagnet chest piece are originally there to prevent pieces of shrapnel from piercing his heart. That happens because he was fixed by a Chinese/Afghan doctor who doesn't have anything else to do it properly.  However, when he got back to the US during Iron Man and Iron Man 2, why didn't he have the shrapnel removed? Why not just immediately get rid of the electromagnet and live normally?  He later decides to have the electromagnet removed (at the end of Iron Man 3), so why didn't he do it before, especially when it was killing him in Iron Man 2? What changed during Iron Man 3 that suddenly made it possible? Or what prevented him from having it removed before?


I have a question. Some time ago I have changed my title and description of my site. The changes were visible in google after a short while - day or two (new titles visible). But now, after about two weeks my ranks dropped suddenly for most of my terms. And now I am wondering if it can be caused because of changes I made (titles/description) or it is rather something else?  My site has several years and it had stable ranks since 1 year+. It has good metrics and rather "good, quality" backlink profile. What is your opinion? Thank you in advance for any advices.

I am using the Yoast plugin to help with the SEO of my site. I just set everything up and am wondering how long it takes for google to update the information. As you can probably tell already the only knowledge I have is basic CSS.  What I am mainly concerned about is getting my homepage listed with the correct SEO title and meta description. Currently, my homepage is listed but not with the updated SEO title or meta description.  Thanks for the help.


I know this is so common question & there are so many answers for this, but my problem is different, I want to accept the URL with all below formats:  http://www.sample.com https://www.sample.com http://www.sample.com/xyz www.sample.com www.sample.com/xyz/#/xyz sample.com  // & much more ...   So here idea is, I am allowing the user to enter there website & another user can just click on the saved website & go to users website. So here it's not a good idea to restrict the user to input proper URL, they can enter any of the above formats. Here is the regex I am using right now, but that only checks if URL starts from proper protocol:  ^(ftp|http|https):\/\/[^ "]+$

I am using the function below to match URLs inside a given text and replace them for HTML links. The regular expression is working great, but currently I am only replacing the first match.  How I can replace all the URL? I guess I should be using the exec command, but I did not really figure how to do it.  function replaceURLWithHTMLLinks(text) {     var exp = /(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/i;     return text.replace(exp,"$1");  }


I think of $\frac{d}{dx}$ as a function or operation which we apply because it instructs us to take $\lim_{h\rightarrow0}\frac{(f(a+h)-f(a))}{h} = f'(a)$; however, in differential equations or integration we just simply play around with $dx$ by moving it to the numerator. I'm confused. What exactly does it mean and what do the individual terms $ dx$ or $dy$ stand for without any denominator?

In the book Thomas's Calculus (11th edition) it is mentioned (Section 3.8 pg 225) that the derivative $dy/dx$ is not a ratio. Couldn't it be interpreted as a ratio, because according to the formula $dy = f'(x)dx$ we are able to plug in values for $dx$ and calculate a $dy$ (differential). Then if we rearrange we get $dy/dx$ which could be seen as a ratio.   I wonder if the author says this because $dx$ is an independent variable, and $dy$ is a dependent variable, for $dy/dx$ to be a ratio both variables need to be independent.. maybe?


This might be a very straightforward question. I am looking for a word to describe an author who is going through a very creating phase and is churning out a lot of work. I am unable to recollect a very commonly used adjective for this. Usage might look like:      From 1905 to 1908 he published several short stories and novels. He was a very _______ writer during that time.

What word describes an author who publishes many works?  "Profuse" comes to mind, but this word has a broader meaning.


An app gets the following exception occasionally:  Stack trace:  java.lang.NullPointerException: Attempt to invoke virtual method 'void java.io.OutputStream.write(byte[], int, int)' on a null object reference     at java.io.BufferedOutputStream.flushInternal(BufferedOutputStream.java:185)     at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:85)   from:  bufferedOutputStream.flush()   I assume it is not because bufferedOutputStream is null, but something else.  If may understanding correct?  If so, what is it?  bufferedOutputStream.write(byteArrayData, iOffset, iDataLength); bufferedOutputStream.flush();

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I've got some questions about two ways to save settings in the web.config.  Appsettings: Look in web.config  <appSettings>  <add key="key1" value="value1"/>  <add key="key2" value="value2"/> </appSettings>   Usage in code-behind:  ConfigurationManager.AppSettings["key1"];   ApplicationSettings/ Properties (autogenerated by using the 'properties'-tab in the project) Look in web.config  <applicationSettings>     <Projectname.Properties.Settings>         <setting name="TestEnvironment" serializeAs="String">             <value>True</value>         </setting>     </Projectname.Properties.Settings> </applicationSettings>   Usage in code-behind:  Properties.Settings.Default.TestEnvironment   So, what's the difference between these two storage possibilities of settings in the web.config? As far as I can see, a downside of the appSettings is that you have modify the web.config yourself and the appSettings are not strong typed, where as the applicationSettings are.  Both are replaceable within a web deployment project.  As far as I am concerned, there is no use for appSettings. Am I missing something here? Which is the historically seen older one?

When developing a .NET Windows Forms Application we have the choice between those App.config tags to store our configuration values. Which one is better?  <configuration>    <!-- Choice 1 -->   <appSettings>     <add key="RequestTimeoutInMilliseconds" value="10000"/>   </appSettings>    <!-- Choice 2 -->   <configSections>     <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5612342342" >         <section name="Project1.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c5612342342" requirePermission="false" />     </sectionGroup>   </configSections>   <applicationSettings>     <Project1.Properties.Settings>       <setting name="TABLEA" serializeAs="String">         <value>TABLEA</value>       </setting>     </Project1.Properties.Settings>   </applicationSettings>  </configuration>


I've seen various accounts how the Schrödinger equation satisfies the De Broglie relation. However, they all show this only for the simply case of a free particle. A general solution to Schrödinger's equation in some potential would be an infinite linear combination of eigen-states for which we can't define a specific wavelength. While dwelling around the subject I thought maybe we can assign a De Broglie wavelength to the individual eigen-states which form the general solution, but that route is also problematic (for instance the eigen-states of the harmonic oscillator also don't have a well defined wavelength).  The root of the problem, I think, is that the De Broglie relation is a global relation (we can't talk about 'infinitesimal wavelength') while the Schrödinger equation is, by virtue of being a differential equation, a local relation. So, I'm struggling to see how a local relation can encode a global property like wavelength.

In a quantum mechanics script I'm reading, the Schrödinger equation is "derived" (more precisely, motivated) by the De Broglie hypothesis. It starts at  $$ \lambda = \frac{2\pi h}{p} $$ $$ \omega = \frac{E}{h} $$  then takes the partial derivatives of the wave $\Psi(x,t) = \Psi(0,0)e^{\frac{2\pi ix}{\lambda}-it\omega}$  $$ \tag{1} \frac{\partial}{\partial x}\Psi(x,t) = \frac{ip}{h}\Psi(x,t) $$ $$ \frac{\partial}{\partial t}\Psi(x,t) = -i\frac{E}{h}\Psi(x,t) $$  With the non-relativistic free particle $E=\frac{1}{2m}p^2$ one gets  $$ \tag{2} ih\frac{\partial}{\partial t}\Psi(x,t) = E\Psi(x,t) = \frac{p^2}{2m}\Psi(x,t) $$  From there, they miraculously get the time-dependent Schrödinger equation. I cannot understand this step. If I insert formula (1) for $p^2$ in (2), I get something with $(\frac{\partial}{\partial x}\Psi)^2$, which is not the second partial derivative of $\Psi$ with respect to $x$.  Any hints?


Solving $\phi(m)$ =2 , to find that the only possible types of m are 3,4, and 6  I have considered the product and found $p_i$ = 2 or 3 and $a_i$ = 2 or 1 and this I have found using cases 1|2 and 2|2.    How can I use my results combining the two cases that the only possible such m are if 3,4, or 6.  edit: I am considering the case of when m and n are coprime and I know the possible solutions are (3,4) and (4,3) . For self, I am wondering about how I find these m after obtaining my cases 1|2 and 2|2.

I know that there is a similar post, but I 'm trying a different proof. I will write $P$  for the set of all positive prime numbers. Question: If $\phi$ is Euler's Phi Function, we want to find all $n \in \mathbb{Z^+}$ such that $\phi(n)=4$. Answer: Let $n=p_1^{n_1}\dotsb p_k^{n_k}\in \mathbb{Z}^+$ be the factorisation of $n$ in to primes. Then $$\phi(n)=p_1^{n_1-1} \dotsb p_k^{n_k-1}(p_1-1) \dotsb (p_k-1)=4.$$ So, for any $i \in \{1,2,\cdots,k\}$ we have $p_i-1|4$. Hence, $$p_i-1\in\{1,2,4\} \iff p_i\in \{2,3,5\} \subset P.$$ Now, we can see the primes that $n$ contains: $n=2^{n_1}3^{n_2}5^{n_3}$, where  $n_1,n_2,n_3 \in \mathbb{Z}^+$. So, \begin{align*} \phi(2^{n_1}3^{n_2}5^{n_3})=4 \iff \phi(2^{n_1})\phi(3^{n_2})\phi(5^{n_3})=4  \tag{*} \end{align*} The possible cases for $n_i$ are:  $n_1=1,2,3\implies \phi(2)=1,\phi(2^2)=2, \phi(2^3)=4$ respectively $n_2=1 \implies \phi(3)=2$ $n_3=1 \implies \phi(5)=4$  All the posible combinations for the relation (*) are $\phi(5)$, $\phi(5)\phi(2)$, $\phi(3)\phi(2^2)$, $\phi(2^3)$. So, $$n \in \{5,10,12,8\}.$$ Is this completely right? Thank you.


When I execute apt-get install ruby-full ruby-dev I am getting ruby 2.3. I want ruby 1.9.3.  How do I get it to install ruby 1.9.3?  I'm using Ubuntu 16.0.4 Xenial.

I want to setup a new virtual machine with some specified packages (name and version), that are provided.  For example apache2 in version 2.2.20-1ubuntu1 with all dependencies. Even if there is a new version of this package on the servers this one should be installed.  The solution has to work/scale with multiple (n) "setups". Another virtual machine might need an older version of apache2.  I currently know of some possibilities that install the exact packages, but do not scale that good:   Copy all required *.deb to every virtual machine manually and enter: dpkg -i ... -> Could work, but it is very error prone. (Manual scripts etc.) Create and use a new Ubuntu repository for each setup. -> Does not work because I would need n repositories. Setup the machine once and copy the VM / create a snapshot. -> Does not work because I would need to store n VMs.   My problem could be labeled as patch management, but I do not want to update my packages to the current version. My goal is to install old packages.


I have a friend on what's app I cannot only see his last seen status, I was able to see it & since a week now I cant see his last seen status. Although I can see when he is online. Message is send me are delivered as I see the double check mark, so don't think he has blocked me, but not sure why I cant view his last status, I can see my other friends status, but not his????

Is there any reason - other than being blocked - that I wouldn't be able to see a WhatsApp contact's "last seen" time any more?


Currently learning about PHP and using include to include page elements such as   include('menubar.php'); include('content.php'); include('footer.php');   which are all called by from say private.php  I'm wondering what you think it's the most convenient way of securing these pages in the case of typing in example.com/content.php  I'm currently using something like  <?php // require("common.php");   // Check to see if the user is logged in if( empty($_SESSION['user']) || $_SERVER['PHP_SELF'] == "content.php")  {      // if either is true redirect to index.php     header("Location: index.php");      die("Redirecting to index.php"); // login page }    But wanted to know there is anything else I could/should do?  Note: $_SESSION['user'] is validated at the beginning of each session, or on login.

I have a php file which I will be using as exclusively as an include. Therefore I would like to throw an error instead of executing it when it's accessed directly by typing in the URL instead of being included.  Basically I need to do a check as follows in the php file:  if ( $REQUEST_URL == $URL_OF_CURRENT_PAGE ) die ("Direct access not premitted");   Is there an easy way to do this?


I’m working on a named sword that makes something happen when you hold it. The sword is enchanted, but it seems my code isn’t working. Is there a specific thing I need to add if the sword is enchanted and named? My current code is: execute as @a[nbt={SelectedItem:{id:"minecraft:iron_sword",tag:{display:{Name:'{"text":"Escargot"}'}}}}]

I've heard that testing for item names and lores in Minecraft JE is bad practice. For example, the following commands are not good: execute if entity @e[nbt={Inventory:[{tag:{display:{Name:'[{"text":"Test Thing"}]'}}}]}] clear @p minecraft:diamond{display:{Name:'{"text":"Shiny…"}'}} 0 clear @p minecraft:netherite_sword{display:{Lore:['{"text":"A Mysterious Sword"}']}} 0  Why are these commands considered bad practice? Are they prone to failure and may not work? And what can I do to fix them? Note that this only applies to reading item names, not setting them. The following are not considered bad practice and in fact are the only ways to accomplish these tasks: give @p minecraft:diamond{display:{Name:'{"text":"Shiny…"}'}} replaceitem @p weapon.mainhand minecraft:netherite_sword{display:{Lore:['{"text":"A Mysterious Sword"}']}}


It seems that the motion tracking workspace is designed to be used to guide a 3D scene, but is it possible to export the position of one (or more) markers over time?

I am trying to export markers from the Blender motion tracker and found the following script that will do exactly that:  for clip in D.movieclips:     for track in clip.tracking.tracks:         fn = 'data/tr_{0}_{1}.csv'.format(clip.name.split('.')[0], track.name)         with open(fn, 'w') as f:             frameno = 0             while True:                 markerAtFrame = track.markers.find_frame(frameno)                 if not markerAtFrame:                     break                 frameno += 1                 coords = markerAtFrame.co.xy                 f.write('{0} {1}\n'.format(coords[0], coords[1]))   It works but I have two questions:   How can I save the data on my Desktop rather than in folder in MacOS blender content where it saved right now. The following won't work:   fn = '/User/me/Desktop/data/tr_{0}_{1}.csv'.format(clip.name.split('.')[0], track.name) The resulting values I get do not represent the more user friendly marker values in den Blender GUI. Instead of x/y coordinates in screen coordinates, I get a value between 0/1. How can I convert them to those screen coordinates ?    Thanks for your help


From book Axioms and Set Theory - A first course in Set Theory by Robert Andr´ Axiom A9 (Axiom of regularity): Every non-empty set A contains an element x whose intersection with A is empty.  From Wikipedia In mathematics, the axiom of regularity (also known as the axiom of foundation) is an axiom of Zermelo–Fraenkel set theory that states that every non-empty set A contains an element that is disjoint from A. In first-order logic, the axiom reads:  {\displaystyle \forall x\,(x\neq \varnothing \rightarrow \exists y\in x\,(y\cap x=\varnothing )).}  Now I totally understand that a class A = {A} is not a set by axiom of regularity as A intersection {A} is not null.  But What about class A = {A,B}, now as there exists B belong to A such that B intersection A is null so as per axiom of regularity such a set A = {A, B} and A is an element of A can exist.  But then in Wikipedia it is mentioned that - The axiom of regularity together with the axiom of pairing implies that no set is an element of itself  So how to prove that class A = {A,B} is not a set  (simple understandable answer if possible is very much appreciated.)

I'm new to set theory, and the axiom of regularity has been giving me some trouble. It states that every non-empty set A has an element B such that A and B are disjoint sets. Apparently, this axiom implies that a set can't be an element of itself. I've heard (and agree with) arguments like this:  Let A be a set, and apply the axiom of regularity to {A}, which is a set by the axiom of pairing. We see that there must be an element of {A} which is disjoint from {A}. Since the only element of {A} is A, it must be that A is disjoint from {A}. So, since A ∈ {A}, we cannot have A ∈ A (by the definition of disjoint).  However, let's say there's a set A = {{1, 2}, A}. It seems like this set obeys the axiom of regularity, because {1, 2} is an element of A, and {1,2} and A are disjoint sets. However, the axiom of regularity shouldn't allow A to be an element of itself. I suppose there's a flaw in my logic somewhere, and I'm hoping someone knowledgeable can show me why this isn't allowed.


Is it possible to use the =today() function (or something else) to insert the current date but then not update each time the file is opened?  I want to create a numbers template for my invoices. I'd like it to auto fill invoice date and date due then, when I save the document, store the values, not the function.  I am creating templates on my mac then using the inumbers app on my iPad.


I installed Java in my red hat machine and when I run java -version, it is showing my installed java version.  However, when I run echo $JAVA_HOME, nothing is displayed.

I am trying to set JAVA_HOME so that I can install Apache Solr with the help of this . I am connected to my server using ssh with root user  To allow the running sh script to install Apache Solr:  mount | grep noexec   Re-mounting file system with exec option:  mount -o remount,exec /dev/md1   Then every time I try to install it using the following commands  bin/install_solr_service.sh /tmp/solr-5.3.1.tgz   I get the following message:  WARNING: /opt/solr-5.3.1 already exists! Skipping extract ...  Creating /etc/init.d/solr script ... The currently defined JAVA_HOME (/usr/local/jdk) refers to a location where Java could not be found.  Aborting. Either fix the JAVA_HOME variable or remove it from the environment so that the system PATH will be searched. The currently defined JAVA_HOME (/usr/local/jdk) refers to a location where Java could not be found.  Aborting. Either fix the JAVA_HOME variable or remove it from the environment so that the system PATH will be searched. Service solr installed.   This is what I tried so far:  nano /root/.bash_profile  nano /etc/profile   I added the following to the files above at the end and saved them  export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64 export PATH=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64/bin:$PATH   That didn't work.  I created the following file /etc/profile.d/java.sh and put in it:  export JRE_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64/jre/ export PATH=$PATH:$JRE_HOME/bin  export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64 export JAVA_PATH=$JAVA_HOME  export PATH=$PATH:$JAVA_HOME/bin   And ran the following command:  source java.sh   That also didn't work.  I tried to run the following command:  export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64   No luck at all.  But when a run the following commands that is what I get  echo $JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64 echo $PATH /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64/bin:/usr/local/jdk/bin:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64/jre//bin:/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.65-0.b17.el6_7.x86_64/bin:/usr/local/bin:/usr/X11R6/bin:/root/bin