everything in my code works fine till I get to the end and want to sort the list. the driver and the method both compile fine and the arraylist is present since it is used for all the other methods in the driver but when I go to sort the list I get an error.   this is the end section of the driver          intList.removeAt(position);                                 //Line 31     System.out.println("Line 32: After removing the "                       + "element at position "                       + position                       + ", intList:");                          //Line 32      intList.print();                                            //Line 33     System.out.println();                                       //Line 34      System.out.print("Line 35: Enter the search "                     +  "item: ");                               //Line 35     System.out.flush();                                         //Line 36      num.setNum(Integer.parseInt(keyboard.readLine()));               System.out.println();                                             if(intList.seqSearch(num) != -1)                                    System.out.println("Line 40: Item found in "                         + "the list");                               else                                                                System.out.println("Line 42: Item not found");                 System.out.print("List 43: The list temp: ");                    intList.sortList();                                  //line 91 (problem line)            System.out.println();   } }   here is the method:  public class OrderedArrayList extends UnorderedArrayList {  public OrderedArrayList(int size) {       super(size); }  public OrderedArrayList() {     super(); }      //Copy constructor public OrderedArrayList(OrderedArrayList otherList) {     super(otherList);  }   public void sortList()  {// start sort  list.print();   int min, i, j;    DataElement temp;    for (  i = 0; i < list.length; i++)     {// start for     // Assume first element is min     min = i;     for (  j = i + 1; j < list.length; j++)      {                                        // line 30 (other problem line)         if (list[j].compareTo (list[min])<0)          {             min = j;          }      }     if (min != i)      {         temp = list[i];         list[i] = list[min];         list[min] = temp;      }     System.out.println(list[i]);      }    }// end sort  }   and this is my output including the error:   ----jGRASP exec: java -ea Example3_1 Line 7: Processing the integer list Line 8: Enter 8 integers on the same line: 1 5 8 7 4 6 9 2  Line 16: The list you entered is: 1 5 8 7 4 6 9 2   Line 19: Enter the num to be deleted: 1  Line 24: After removing 1 the list is: 5 8 7 4 6 9 2   Line 27: Enter the position of the num to be deleted: 1  Line 32: After removing the element at position 1, intList: 5 7 4 6 9 2   Line 35: Enter the search item: 5  Line 40: Item found in the list List 43: The list temp: Exception in thread "main" java.lang.NullPointerException at OrderedArrayList.sortList(OrderedArrayList.java:30) at Example3_1.main(Example3_1.java:91)  ----jGRASP wedge2: exit code for process is 1. ----jGRASP: operation complete.

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 want to know how to disable the secure boot sequence to allow Ubuntu or Linux Mint to replace Windows 8 completely on my Acer 64 bit laptop.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


When I searched on Arqade how to get out of The Hole in Candy Box 2 with all of my stuff, I found two answers. I didn't know how to find or use the teleport, so I went with the second option and found the pogo stick. Now, I have the desert bird feather with allows me to jump higher with the pogo stick, but it's still not high enough to make it completely out of the hole. The only option left is the teleport. I don't know if the teleport feature is something everyone has right off the bat or if it's something I have to find, but I can't find it on my screen. So... uh, where is it please?

I need to get the chocolate bars in the hole, but I can't get out of there. Where can I find the pogo stick or teleport?


I've found some legacy code that goes wrong, setting file attributes. It looks something like this -   flag1 = 0x0001; flag2 = 0x0002;  DWORD flags = flag1 | flag2;  //great - flags is 3  DWORD prevValue  = 0x0010; //say  //add our new flags to prevValue DWORD newVal = prevValue | flags;  //newVal is 19  //but now I want to remove those flags from newVal  DWORD backToPrev = newVal & !flags;  //but according to my compiler (vs2012) //!flags is 0, it can't do the logical NOT on the DWORD  ASSERT (backToPrev); // it's 0, should be 16   Any suggestions for a fix?

How do you set, clear, and toggle a bit?


Would this proof work to show that $R$ ={(x, y) ∈ ℤ2: x + 2y ≡3 0} is an equivalence relation? Reflexive: Let x ∈  ℤ. x + 2x= 3x, and 3x ≡ 0 mod 3 since 3 divides 3x with remainder 0. Symmetric: Let x, y  ∈ ℤ. Suppose (x, y) ∈ $R$. Then x + 2y ≡ 0 mod 3 -> x ≡ -2y ≡ y ≡ 2x -> y + 2x ≡ 0 mod 3. Transitive: Edit: Oops definitely did not do the transitive part of the proof properly -- does this work instead? Let x, y, z ∈ ℤ and suppose (x, y), (y, z) ∈ $R$. Then x + 2y ≡ y+  2z ≡ 0 mod 3. x + 2y = 3m and y + 2z = 3n for some m, n in ℤ. Then x + 2(3n-2z) = 3m, so simplifying that shows x + 6n - 4c = 3n...? Not sure how to get the sign for c to be positive.

Let $m \in \mathbb{N}$. Show that $\,a \text{ R } b \Leftrightarrow a \equiv b \text{ }(\text{mod } m)\,$ is an equivalence realtion.   We need to show 3 things:  (i) reflexive: $\forall a \in \mathbb{Z}: a \equiv a \text{ mod } m$  (ii) symmetric: $\forall a,b \in \mathbb{Z}: a \equiv b \text{ mod } m \text{ } \Rightarrow b \equiv a \text{ mod } m$  (iii) transitive: $\forall a,b,c \in \mathbb{Z}: a \equiv b \text{ mod } m \text{ } \wedge b \equiv c \text{ mod } m \Rightarrow a \equiv c \text{ mod } m$  So I tried it like this:  (i) $m \text{ | } 0 \Rightarrow m \text{ | } a-a \Rightarrow a \equiv a \text{ mod } m$  (ii) $a \equiv b \text{ mod } m \Rightarrow a \text{ mod } m = b \text{ mod } m \Rightarrow b\text{ mod } m = a \text{ mod } m \Rightarrow b \equiv a \text{ mod } m$  (iii) $a \equiv b \text{ mod } m \text{ } \wedge \text{ }b \equiv c \text{ mod } m \Rightarrow m \text{ | } (a-b) \text{ } \wedge \text{ } m \text{ | } (b-c) \Rightarrow m \text{ | } (a-b) + (b-c) \Rightarrow m \text{ | } a-c \Rightarrow a \equiv c \text{ mod } m$  Because every condition is fulfilled, we are done (?)  Please help me and tell me if it would be correct like this? Maybe there is better way to prove it?


I have a laptop on which a Ubuntu 14.04 installation removed my complete Windows 8 installation.   How can I install Windows again? I do not have any CDs or DVDs for Windows.

I know this question is a repetition but I didn't find any solution of my problem from any of the previous questions. Recently I formatted my Laptop HDD and now I want to re install windows 8 I've a Windows 8 OEM license but the problem is I don't have a disc , I downloaded en_windows_8_x64_dvd_915440 from msdn , but when I boot the windows it shows the error that the current version is not suitable with my serial key, so where I can find an OEM Windows 8 and also I've a retail windows 8 disc so if I install that windows 8 in my pc and is there any way to activate it using my OEM key


Some months ago I was asking for ideas in order to do a displacement model of a lost person with GIS. This model would represent the displacement of a person by a terrain with some costs paramethers like slope, vegetation… So, I already have my model almost done. I have managed to do a final Raster where each pixel have a time value that represents the time in seconds that is needed to cross it.  Do you know if there is any tool in ArcGIS that accumulates these pixels from a starting point until a máximum of accumulated time? Let me explain:  In the model there would be a starting point, for example in .shp format. From this starting point, the tool could be able to accumulate the value of each pixel until it reaches 3600 seconds in order to simúlate the displacement of one person in one hour. The result should be a “circle” or isochrone, that represents the area until the accumulation of 3600 seconds.

I need to calculate possible point location based on its speed and some other factors. For example, there is a man in the middle of the forest and I need to calculate his possible location at some time periods. There are few facts about his movement:   His speed differs at certain periods of time - it can be raining, or it can be super hot - speed lowers / increases; Some objects in space - swamps, rocks - can lower his speed as well; At some time periods the man does not move at all.   So, here is the question - is there any algorithm that can calculate possible location of the man based on following parameters? The output should be a polygon for every given time_period.  {   time_periods: [{     from: 2012-12-12T20:00:00,     to: 2012-12-12T22:00:00,     speed: 5   }, {}],   objects: [{     geodata: POLYGON(...),     speed_modifier: 0.5   }, {}] }   Generated polygons will be visualized on the map afterwards.


I removed libc6 and now server is broken.  Now no commands work. ls, df nothing but I'm still connected to it on the ssh session. Any help?

I accidentally deleted the symbol link /lib64/libc.so.6 -> /lib64/libc-2.12.so with  $ sudo rm libc.so.6   Then I can not use anything including ls command. The error appears for any command I type  ls: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory   I've tried  $ export LD_PRELOAD=/lib64/libc-2.12.so   After this I can use ls and ln ..., but still can not use sudo ln ..., sudo -E ln ..., sudo su or even su. I always get this err  sudo: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory   or  su: error while loading shared libraries: libc.so.6: cannot open shared object file: No such file or directory   It seems LD_PRELOAD works only for the current shell session of my account, but not for a new account like root or a new session.  It's a remote server so I can not use a live CD. I now have a ssh bash session alive but can not establish new ones. I have sudo privilege, but don't have root password.  So currently my problem is I need to run sudo sln -s libc-2.12.so libc.so.6 to re-create the symlink libc.so.6, but I  can not run sudo without libc.so.6.  How can I fix it? Thanks~


Why is it that when I assign a variable to an object and make a change to that variable it also changed the objects? For example:  c = 26; a = b = c; a += 1;  a      // 27 b      // 26 c      // 26   but   z = {}; x = y = z; x.ab = 5;   x      // Object {ab: 5} y      // Object {ab: 5} z      // Object {ab: 5}   Why (in the example above) does y.ab and z.ab exist? I only modified x not y or z. Howcome in the first example (with the integers), when I changed the value of a,  b and c weren't affected?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


Recently, on Ubuntu 16.04 the default window position of Nautilus windows is in the top left corner of the screen. The window sits behind the top menu bar and the left side Unity launcher as shown in the screenshot.    With a bit of precise mouse pointer positioning I am able to drag the window somewhere to the screen.  Is there a way to either reset the default window position or let Nautilus remember the last window position to fix the default behavior?

I'm on Ubuntu 16.04.1 at the moment, and system windows like the Files window, Terminal or System Software open behind the Unity launcher, which means they are partially hidden behind it. I can move them with Alt+F7, but I'd like a more permanent solution to this problem.


can I use following (PHP) Syntax to create an array in JavaScript?  $arr = ("foo" => "bar", "foobar" => "test");   I dont want to use following syntax (in JS):  var arr = []; arr["foo"] = "bar"; arr["foobar"] = "test";   Thank you very much!

There are two different ways to create an empty object in JavaScript:  var objectA = {} var objectB = new Object()   Is there any difference in how the script engine handles them? Is there any reason to use one over the other?  Similarly it is also possible to create an empty array using different syntax:  var arrayA = [] var arrayB = new Array()


This isn't my homework. This came up during a friendly debate last night with my mom.  What would be the correct use of the apostrophe and/or plural in the sentence One of my friend(s) house(s) is on sale. in each of the following cases? My guesses are in bold, but do correct me if of them are any are incorrect.  (a) I have exactly one friend, and he has exactly one house which is on sale.       One of my friends' house is on sale.   (b) I have many friends and one of them is selling his only house.       One of my friends' house is on sale.   (c) I have exactly one friend and he is selling one of his many houses.       One of my friends' houses is on sale.   (d) I have many friends and one of them is selling one his many houses.       One of my friends' houses is on sale.   I think the form One of my friend's... will be incorrect in all cases, unless the noun cannot be realized in plural form, such as in One of my mother's friends is a dentist. Is this right?

Possible Duplicate:          Which of the following is more correct? Or is there another form I'm missing?     We drove to the movies in one of my buddy's car.   We drove to the theater in one of my buddies' cars.   We drove to the theater in one of my buddies' car.   I suppose the fundamental question is: does this phrasing suggest "one of [the collection of cars owned by my buddies]" or "the car owned by [one of my buddies]"?


I am trying to exit my main function with a certain exit number, but it always exits with 0. For example, the code:  printf("command exited with error: %i\n", commandExitError); if(commandExitError > 0)   exit(commandExitError);  if(openError > 0)   exit(openError); printf("I shouldn't see this if there was an error"); return 0;   has the strange behavior that if commandExitError is 0, but openError is 1, then it exits with error 1. However, if commandExitError is greater than zero, it still exits with 0! For example, this is some output with commandExitError > 0:     command exited with error: 512   Note that we never reached the print statement "I shouldn't see this...." Then, getting the exit status of my program, echo $?     0   We see that my program still exits with 0 although it should clearly exit with 512.

If yes, on which operating system, shell or whatever?  Consider the following java program (I'm using java just as an example, any language would be good for this question, which is more about operation systems):  public class ExitCode {     public static void main(String args[]) {         System.exit(Integer.parseInt(args[0]));     } }   Running it on Linux and bash, it returns always values less equal 255, e.g. (echo $? prints the exit code of the previous executed command)  > java ExitCode 2; echo $? 2  > java ExitCode 128; echo $? 128  > java ExitCode 255; echo $? 255  > java ExitCode 256; echo $? 0  > java ExitCode 65536; echo $? 0     EDITED: the (only, so far) answer below fully  explain what happens on UNIXes. I'm still wondering about other OSes.


What are the limits of the Force?   In geometrical terms how far can the force act?  As i have only watched the movies,  there is ambiguities in it..  For eg.  Leia can feel the force then why she didn't when Luke was dying in the cold in the initial part of The Empire Strikes Back?   And in other terms like can it only be used for communication,  and moving things or it has more to it?

In all the action scenes I'm familiar with, the Force is used only on people or objects nearby within visual sight of the Force user.  However there are situations where force users can sense something outside their own physical perception limitations, such as when Vader knows that Luke is on a particular space craft, or when a million voices cried out and were silenced.  Given that Vader force chokes someone who failed him, is it possible for him to force choke someone who failed him, but isn't in the same room, or on the same planet?  Does Luke's ability to sense when his friends are in danger also suggest that he is able to help them at a distance, or communicate with leia at a distance?


My horizontal chapter spacings are different on odd and even pages and I don't want this, the titles should be in the same place on all the pages. I believe this is because I use a twosided report as document class, but I want to keep it twosided. How can I fix the chapter spacing? I also use a different titleformat, but even without this the problem occurs. \documentclass[twoside]{report}  %optional changing the titleformat \usepackage{titlesec} \newcommand{\hsp}{\hspace{20pt}} \titleformat{\chapter}[hang]{\Huge\bfseries}{\thechapter\hsp{$|$}\hsp}{0pt}{\Huge\bfseries}  \begin{document} \chapter{chapter 1} \chapter{chapter 2} \end{document}

That seems quite elementary, but I didn't find the answer. How can I have the \cleardoublepage command work in a oneside environment? That seems kind of odd to ask for that, but I have to send an application file with a bunch of documents added to a .tex file via pdfpages. And I don't know whether it will be seen only on screen, printed on a one-sided printer or printed on a two-sided printer.   So I want the layout to be one-sided for the file not to look too odd on a computer screen or if printed onesidedly. But I also want new parts of the document to start on an odd page, so that my id card is not printed on the back of my research statement in case of two-sided printing.  Here is an example :  \documentclass[oneside,openright]{scrreprt} \begin{document} Foo1. \newpage Foo2. \cleardoublepage Foo3. \cleardoublepage Foo4 \end{document}   I would like "Foo4" to be on page 5, as it is in twoside mode.


I am new in ubuntu. Earlier I was using window 7 and I changed it to Ubuntu so while installing it asked to format so I format it and all the data from hard disk has been lost. It is about 300 GB so how can I recover it. Please help me, there are much important and personal file and images are there. Any help is appreciated.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.


Let $f$ be a continuous function on [0,1].  Evaluate  $$\lim_{n\to \infty}  \int_0^1 x^nf(x)dx$$  My approach :  Consider $\int x^nf(x)dx = \frac{f(x)x^{n+1}}{n+1} - \frac{1}{n+1}\int x^{n+1}f(x)dx$ by using integration by parts.  then applying limit with $n\to \infty$ we get  $\int x^nf(x)dx = 0$, regardless of the limits of integral.  Is this approach correct?

$\text{Let }f:[0,1]\to \Bbb R\text{ be a continuous function}$ Evaluate the function $$\lim_{n\to \infty}\int_{0}^{1}x^nf(x)\,dx$$  Here is my work:  Given $\epsilon \gt 0$,since $f(x) \in C^0[0,1]$, by Weierstrass Approximation Theorem, there is a polynomial $p(x)$ s.t. $$|f(x)-p(x)|\lt \varepsilon$$ So we have  $$ \begin{align} \int_{0}^{1}x^n|f(x)-p(x)|\,dx & \lt \int_{0}^{1}x^n\varepsilon\, dx\\ & = \left[\varepsilon\,\frac{x^{n+1}}{n+1} \right]_{0}^{1}\\ & = \frac{\varepsilon}{n+1} \end{align} $$  Since $p(x)$ is a polynomial, suppose it has degree $m$, and has the form $$p(x)=a_0+a_1x+a_2x^2+\cdots+a_mx^m$$ $a_i\in \Bbb R\text{ for each }i$. Integrate it we get $$\int_{0}^{1}x^n\,p(x)\,dx=\frac{a_0}{n+1}+\frac{a_1}{n+2}+\frac{a_2}{n+3}+\cdots+\frac{a_m}{n+m+1}$$ By triangle inequality, $0\le |f(x)|\le |f(x)-p(x)|+|p(x)|$, so $$ \begin{align} 0\le \int_{0}^{1}x^n\,|f(x)|\,dx & \le \int_{0}^{1}x^n|f(x)-p(x)|\,dx+\int_{0}^{1}x^n|p(x)|\,dx\\ & \le \int_{0}^{1}x^n|f(x)-p(x)|\,dx+\int_{0}^{1}x^n\sum_{i=0}^{m}\lvert a_ix^i\rvert\,dx \end{align} $$ But we know that both $\int_{0}^{1}x^n|f(x)-p(x)|\,dx\text{ and }\int_{0}^{1}x^n\sum_{i=0}^{m}\lvert a_ix^i\rvert\,dx$ goes to $0 \text{ as }n\to \infty$ Then by pinching, $$\int_{0}^{1}x^n\,|f(x)|\,dx\to 0\text{ as }n\to \infty$$ then $$\int_{0}^{1}x^n\,f(x)\,dx\to 0\text{ as }n\to \infty$$  I don't I'm do the right thing? because I just come up with this idea, and seems strange.


I have two computers: Computer 1 (Ubuntu Desktop) has a WiFi connection and an Ethernet port, and Computer 2 (Ubuntu Server) only has an Ethernet port. I would like to have Computer 1 share its internet connection with Computer 2 over an Ethernet connection between the two computers. What I have done so far:  I have connected the two computers together using an Ethernet cable. I have created LAN for the two computers  Each computer has a static IP (configured in /etc/netplan/*): Computer 1 is configured as 192.168.2.1/24, and Computer 2 is configured as 192.168.2.140/24 with its default gateway 192.168.2.1. Both computers are able to ping eachother.   I have tried to set up iptable forwarding on Computer 1 between the WiFi, and Ethernet interfaces, wlp5s0, and enp4s0 respectively (found from the output of ifconfig), but I haven't had any luck. My knowledge falls short with configuring iptables, so every guide I have found has, more or less, been a shot in the dark. IP forwarding has been enabled with sudo echo 1 > /proc/sys/net/ipv4/ip_forward  I have heard of "network bridging", but I am unsure if this is something that can be used in this scenario.  ASIDE: I know about using the "shared to other computers" option in the network manager. I have used it, and it works successfully. What I don't like about it is that I don't have the ability to set a static IP address. Plus I would like to know how to do all this from the command line anyways.

I have a wlan1 connection that I want to share to other computers on my LAN (via Ethernet - eth0). As this is somehow a temporary solution, I want this to be done by a script, so that I do not touch the network configuration files of my host (i.e I'll run this script after each reboot if I want to).  The problem is that I am unable to bridge wlan1 and eth0.   sudo brctl addif br0 eth0 wlan1   I saw that one needs to :   iw dev wlan1 set 4addr on   Indeed, I can then add wlan1 to the bridge, but ... I lose the wifi connection! I saw this is also a  :(  In , the solution says to do this  iw dev wlan0 interface add wds.wlan0 type managed 4addr on ip link set dev wds.wlan0 addr $ADDR ip link set dev wds.wlan0 up   where $ADDR is "WDS device address configured in the router". I don't understand what that is? The MAC address of my network card for wlan1? And how should I then create my bridge? The following is not working:  sudo brctl addbr br0 sudo brctl addif br0 eth0 wds.wlan0   Or , they suggest to install ebtables. But the page does not explain how I should create the bridge, and they modify /etc/network/interfaces which I do not want to do...  So, can somebody please help me create that bridge correctly?  So far, my wifi script is:   #!/bin/bash  # this is for wlan1 - wifi connection  pkill dhclient  pkill wpa_supplicant  ip link set dev wlan1 down  ip addr flush dev wlan1  iwconfig wlan1 essid "mywifi"  iwconfig wlan1 frag 2432  iwconfig wlan1 rts 2432  ip link set dev wlan1 up     iwconfig wlan1 rate 1M  dhclient -v wlan1   # this is my IP address on my LAN  ifconfig eth0 192.168.0.8 netmask 255.255.255.0   # I need code here to create the bridge  # PLEASE HELP HERE   Thanks NB. I am running a Linux Mint 17.1 host. I have installed bridge-utils.


MWE:  \documentclass{amsart}  \begin{document} split, also from amsmath, similar alignment to align, but the whole construct fits within equation (or other display math) and is numbered as a unit. \[   \begin{split}     a& =b+c-d\\     & \quad +e-f\\     & =g+h\\     & =i\\   \end{split} \] \end{document}   Run tex4ebook with error  [ERROR]   htlatex: ./test.tex   13   Package amsmath Error: \begin{split} won't work here.   If we replace \[ and \] by equation* environment, then there is no error. Note that we already have  \Configure{[]}{\begin{equation*}}{\end{equation*}}{}   in the configure file. I need to understand the reason (and hopefully a perfection) of this.

The following MWE:  \documentclass{article}  \usepackage{amsmath}  \begin{document}  \[ \begin{split} a &= b \\ c &= d \end{split} \]  \end{document}   compiles fine with pdflatex, but when I run make4ht on it, I get the following error:  ! Package amsmath Error: \begin{split} won't work here.  See the amsmath package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.7 \[ \begin{split} a &= b \\ c &= d \end{split}                                                   \]   Is this an incompatibility of tex4ht? Is there an easy way to deal with this? I could just use align* in this instance, but there is a reason that I want to use split instead.


A friend of mine is using a Dell computer, running Window 7 Home Premium. His account is the Administrator account. ( There is one other functional user account on that computer that we do not have access to, if that matters )  He recently tried to create a new user account, and apparently succeeded....until he tried to log in to that new account. When he tried, he got an error message something like the following:     User profile failed the login process   User could not be logged in   I created and changed a password on that account, and received the same error message when logging in. I then deleted that account, and created a new one, and got the same error message again.  What's wrong, and what can I do to fix it?

I'm on a fairly new install of Win 7 x64 with default UAC settings. I recently had to delete a user profile due to the win 7 2012 virus issue, but when trying to create a new profile (any profile name), while it creates it in the UI, when I try to log onto it, I get the error above.   I see lots of tips about fixing a corrupt profile in the registry (the S-1-5-XXX keys), but this is for a NEW profile.   The only way I seem to be able to get around this is to create the user account in safe mode. After that, I'm able to log in. After multiple reboots, I cannot seem to do this without being in safe mode. Thanks.


Could you please help me to find a survival function for Poisson distribution? I'm very new to this topic. Poisson distribution probability mass function: $$f(k) = P(X = k) = \frac{\lambda^k e^{-\lambda}}{k!}.$$ So, I found a general definition of survival function: $$S(t) = P(T > t) = \int_t^\infty f(u)\,du = 1 - F(t).$$ But as I understand, this one suits only continuous distributions and Poisson is a discrete one. Then I found this definition, which seems to suit a discrete case: $$S(t_j) = S_j = P(T \geq t_j) = \sum_{k=j}^\infty f(k).$$ But as I wasn't counting it earlier, I'm not sure how to apply it. I need it for my university project. Also, found that this is a survivor function for Poisson:  But don't know how to find it.

Assuming $X\sim\mathcal{P}(\lambda)$ and $Y\sim\Gamma(w,1)$ prove that $P(X\ge w)=P(Y\le \lambda)$. How this fact is lead from the connection between the poisson and exponential distributions?   I don't know from where to start. poisson is defined only for discrete situations but the exponential is only for continious situation. How can I prove the fact ? EDIT: for gamma distribution I wrote that $f_Y(y)=\frac{y^{w-1}e^{-y}}{\Gamma(w)}$, but I have problem with integrating it. About Poisson: its function is $\displaystyle \sum _{w_i=0}^w P(X=w_i)$ which I don't know how to sum into a final expression. How can I continue?


I have  that is 2 months old. In the first few weeks, it was getting indexed nicely and my GoogleWebmaster reports were showing that it was getting crawled and began ranking for some terms.  Then as I kept writing, the GoogleWebmaster report thinned out and showed less and less terms that this blog ranks for. Now there are only 4 terms with one of them being my name.  Is there something I need to do to keep the old posts to remain indexed and crawled?  Thanks, Alex

It's been sometime and Google has yet to index my site. How can I get Google to index my website?


Dr. Lizardo writes down a sequence of $n$ letters, where each letter is A, B, or C, and the letter A appears an even number of times. How many different sequences could Dr. Lizardo have written down?   What I have tried so far The last letter is predefined in terms of "A or not" based on the first $n-1$ letters. If there are an odd number of As so far, the last one has to be A, otherwise, B or C. Therefore, there are $3^{n-1}$ ways to write the first $n-1$ letters. However, the last letter can either have 1 choice or 2 choices. I am thinking maybe we need to do $S_n = 3^{n-1} + S_{n-1}$. However, I need a closed form, not a recurrance. How can I do this? Thank you!  Note: $S_n = 3^{n-1} + S_{n-1}$ seems to be working for the first few values of $n$ (I tested through $n=4$), so finding a closed form of that recurrance would work as well.

What is the number of strings at size $n$ that is constructed from ${a,b,c,d}$ and there is an even num of $a$?  I have tried to answer it as recursion formula in the following logic:  In order to build $ A(n) $, I will split into several cases:   if the string starts with $a$, then I will need another $a$ to make an even number of $a's$. so we get $aa[A(n-2)]$ meaning 2 $a's$ at the start + a valid string at the size of $n-2$. if it starts with $b,c,d$ we get $b[A(n-1)]$ + $c[A(n-1)]$ +$d[A(n-1)]$, meaning a one of the letters + a valid string at the size of $n-1$.   So we will get a recursion formula that looks like that:  $A(n) = A(n-2) + 3A(n-1)$  I'm not 100% on my answer, am I right to approach it in that direction?


I have had hardwood flooring installed in my home, with further renovation (kitchen) upcoming. The kitchen floor is tile which I'm not worried about, but to get to and from the kitchen means travelling over the hardwood (urethane finish). The installers used cardboard from the shipping boxes to protect the floor as they were working over it. To keep the cardboard from sliding around, it was taped down with painter's tape. It only took them a few days to complete the work, after which I had no trouble removing the tape. The kitchen work is another matter; there will be activity spread over a few weeks.   I'm thinking of using the same technique as the flooring installers - lay down cardboard and secure with painter's tape, but I've read that you can only rely on 7-14 day release. Is this true? Will I have problems removing the tape from the flooring if left in place for 3-4 weeks? Will it damage, discolor or cloud the finish if left that long?

We are building a new house and I'm installing the laminate wood flooring.  The builder suggested I cover the flooring after I'm done to protect it during the last few weeks of construction and with moving in.  What would you suggest I use?  Rosin paper, Kraft paper, or something more?


I'm trying to sort the output value that's returned by greatest to least.  Here's an example of the array:  array(     'ACTION' => 'getsupportdepartments',     'RESULT' => 'success',     'TOTALRESULTS' => 2,     'DEPARTMENTS' => array(       'DEPARTMENT' => array(         'ID' => 2,         'NAME' => 'Sales',         'AWAITINGREPLY' => 5,         'OPENTICKETS' => 5       ),       'DEPARTMENT1' => array(         'ID' => 1,         'NAME' => 'Support',         'AWAITINGREPLY' => 15,         'OPENTICKETS' => 15   The code I'm using is:  if(!empty($_GET['sort'])) {   $tmpArray = array();   foreach($arr['WHMCSAPI']['DEPARTMENTS'] as $key => $value) {     $tmpArray[$value['AWAITINGREPLY']] = $value;   }   $arr['WHMCSAPI']['DEPARTMENTS'] = $tmpArray;    ($_GET['sort'] == 'desc') ? krsort($arr['WHMCSAPI']['DEPARTMENTS']) : ksort($arr['WHMCSAPI']['DEPARTMENTS']); }       ($_GET['sort'] == 'desc') ? krsort($arr['WHMCSAPI']['DEPARTMENTS']) : ksort($arr['WHMCSAPI']['DEPARTMENTS']);    foreach($arr['WHMCSAPI']['DEPARTMENTS'] as $department) {     echo $department['NAME'].' - '.$department['AWAITINGREPLY'].'<br />';  }   echo $exc;   However the order of the output from AWAITINGREPLY is not sorting.

I have CSV data loaded into a multidimensional array. In this way each "row" is a record and each "column" contains the same type of data.  I am using the function below to load my CSV file.  function f_parse_csv($file, $longest, $delimiter) {   $mdarray = array();   $file    = fopen($file, "r");   while ($line = fgetcsv($file, $longest, $delimiter))   {     array_push($mdarray, $line);   }   fclose($file);   return $mdarray; }   I need to be able to specify a column to sort so that it rearranges the rows.  One of the columns contains date information in the format of Y-m-d H:i:s and I would like to be able to sort with the most recent date being the first row.


I entered Sweden July 17 from the US. My 90 days were up on Oct. 14 however I applied for a tourist extension to extend 30 more days. I never got a response and the consulate told me I was okay to stay in the country until I got a response (even though I was there longer than 30 extra days). I ended up leaving Nov. 20.  The 180 days from July 17 would be Jan.12 2019. I stayed 120+ days of the 180 legally. Does a new  clock rest on Jan.12? I would like to re-enter Schengen country on Jan.13

I have searched the web a lot and could not find an answer that fits my situation. Here are two links that are quite contradictory:       My situation:  I've visited Portugal in December 2012 for 29 days on a Schengen visa valid from December 1st, 2012 to February 1st, 2013 for research purposes (I am a Ph.D. student). I want to visit Sweden from February 10th, 2013 to May 10th, 2013 (89 days). I have applied for a Schengen visa again (for research). How will the 90/180 rule work in my situation?


I've recently encountered the claim that a confidence interval is 1-$\alpha$, (where I assume $\alpha$ is a p-value).  e.g. that a p-value of 0.05 is equivalent to a 95% confidence interval.  I believe this claim to be false, as I've recently read that p-values are not predictive, but I wonder if a statistician (which I am not) could shed some light on this?  Thanks

While formally deriving the confidence interval of an estimate, I ended up with a formula that resembles very closely the way $p$-value is computed.  Thus the question: are they formally equivalent? I.e. is rejecting an hypotheses $H_0 = 0$ with a critical value $\alpha$ equivalent to $0$ not belonging to the confidence interval with critical value $\alpha$?


In the LOTR movies, Gandalf remarks that Bilbo's adventures ended 60 years before his eleventyfirst birthday.  Aragorn tells Eowyn that he is 87, so would that place him at 27 during the events of The Hobbit?

On the last Hobbit movie, after the Battle of the Five Armies, Legolas tells Thranduil that he won't be coming home. The latter tells him to go to find the infamous son of Arathorn, that goes by the name of Strider.  But, the Battle of the Five Armies was fought on T.A. 2941 and Aragorn was only born on T.A. 2931.  Aragorn did not leave Rivendell until 20 years old.   How could Aragorn be such an infamous rogue in the age of only ten and still in Rivendell??  Sources: ,  and .


I read this scifi novel/short story around the 2000s in a public library, and I recall the following plot points which could be helpful in its identification:   The space traders (not sure if traders, but certainly a group of people with spacefaring abilities) somehow ended up on a medieval human planet, where the main civilization was a decaying empire much like the medieval Byzantines.   The decaying empire often fought skirmishes with the barbarians, who would handily defeat the heavily armed and armoured empire knights by drawing out their battle lines, retreating, and picking them off when they were tired and overextended.   The space traders managed to revitalise the empire by training a spearman army from the remaining peasants. This army then defeated the barbarians by holding the line against repeated assaults during a siege on the capital.   The story ends with the space traders being "exiled" to the medieval planet for violating a Prime Directive equivalent.   I believe this was a relatively old book when I had read it in the library around that time. The author was IIRC pretty famous in the science fiction genre as well, but I cannot remember any details on that. I'm rather certain about the plot points above, though.

The book is written in the 1980s. The storyline is about an early 20th century level technology planet getting visited by a spaceship which causes quite a stir. The visitors start helping to consolidate all of the countries on the planet. Everyone thinks this is good but some people accidentally find out they're actually being conquered by using the planets own people to do the fighting.   They also find out that when all the planet's countries are defeated and under the control of a single government, the planet will be colonized by a space federation that is reclaiming long lost planets.  Through trickery they learn that if they can somehow get space travel they wouldn't be colonized and would have rights and a higher place in the federation. They start sneaking around trying to make a spaceship with their early 20th century tech.


EDIT2: This is not simply a cross-thread issue. I can update controls based on the above link, but it's just not working for Cursor or toolStrip. Not working means not working. I receive the usual error message, that the control is created in another thread so it can't be modified. Invoke is not an option for toolStrip.  On a button click I initiate some actions in a separate thread. It's necessary as it may take a while and my form usually gets frozen. My issue is that I have to modify a couple of controls, and set them back at the end, which I can't do from the worker thread. How to solve this?  private void button1_Click(object sender, EventArgs e) {     Cursor.Current = Cursors.WaitCursor;     toolStripStatusLabel1.Text = "Working...";     Thread thread = new Thread(query);     thread.Start(); } private void query() {     //actions     //here I need to set the cursor back to default     Cursor.Current = Cursors.Default; //but this is obviously not working     //and I have to set the label text to be "done"     //which is not working as well as invoke is not an option for toolStrips }   So I need some solution to do the above. Maybe some backgroundworker to "keep an eye" on the query() thread and action once it's done?  EDIT3: I can modify any attribute of any control with the below piece of code, except for toolStrip:  delegate void SetControlValueCallback(Control oControl, string propName, object propValue);     private void SetControlPropertyValue(Control oControl, string propName, object propValue)     {         if (oControl.InvokeRequired)         {             SetControlValueCallback d = new SetControlValueCallback(SetControlPropertyValue);             oControl.Invoke(d, new object[] { oControl, propName, propValue });         }         else         {             Type t = oControl.GetType();             PropertyInfo[] props = t.GetProperties();             foreach (PropertyInfo p in props)             {                 if (p.Name.ToUpper() == propName.ToUpper())                 {                     p.SetValue(oControl, propValue, null);                 }             }         }     }   SOLUTION: thank you Marc Gravell for the idea  private void query() {     //actions     Invoke((Action)(() =>     {         Cursor.Current = Cursors.Default;         toolStripStatusLabel1.Text = "done";     })); }

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


I have installed apache2  mysql php5 in my Computer. Files which are in var/www/html directory run properly. I want to run my Files from my home directory.

I am need for apache to have access on all (well... most anyway) user folders on the same machine, so that I can access some data, do some magic and then display them on a webpage for remote viewing.  What I thought would be the simplest solution is to create a dir alias that points to /home folder and allowing it to be accessed only locally, since all the "magic" will be happening server side and only the results will be shown. Problem is I cannot make the Alias to work.  I added the following in my /etc/apache2/mods-enabled/alias.conf to check if it is working:  Alias /home/ "/home" <Directory "/home">      Options Indexes MultiViews FollowSymLinks      AllowOverride None      Require all granted </Directory>   but I'm getting a 403 Forbidden. I also tried adding it as a virtual host on sites-enabled/000-default.conf and apache2.conf neither of which worked.  I also added www-data to a user group that has access to /home, just to be sure.  What am I missing here?


I have WinForm application and i want to enter fullscreen mode and remove all bars and the task bar. i done it with this:  this.WindowState = FormWindowState.Maximized; this.FormBorderStyle = FormBorderStyle.None; this.TopMost = true;   The top bar is really hidden but the Windows TaskBar is still visible. Any idea what can be the trouble?

I have a WinForms app that I am trying to make full screen (somewhat like what VS does in full screen mode).  Currently I am setting FormBorderStyle to None and WindowState to Maximized which gives me a little more space, but it doesn't cover over the taskbar if it is visible.  What do I need to do to use that space as well?  For bonus points, is there something I can do to make my MenuStrip autohide to give up that space as well?


How can I find out if a given program is 64 or 32 bit version? I can't to do it by simply looking at where it's installed, since some programs need no installer and may be put anywhere.  Here, no process explorer will help me, since the application refuses to start.  Reason why I need it: My new eclipse installation fails to load "jvm.dll" . I'd bet I'm using 64-bit versions of both eclipse and JVM, but I'm slowly getting unsure.

Is there an easy way to check if a binary is 32 or 64 bit on Windows? I need to check before I move the program to a 32bit machine and experience a spectacular failure.


When deleting files from the Windows 10 command prompt is there a way to have them go to the Recycle Bin so they can be undeleted if necessary? I know MS-DOS had this ability long ago, but it does not appear that exists in Windows now.

Is there a command line program that can send files to the recycle bin? This is on XP and Vista.


In Ubuntu 20.04, if I type ctrl+shift+e, then start typing in any app (terminal, browser, whatever), underlined text appears. It could even be in gedit. There are no spaces in what appears, and if I hit escape, the text vanishes.  Here's a GIF:    In the first example, I hit enter when I'm done typing the sentence. In the second line, I hit escape and it all vanishes.  I assume I'm accessing some kind of accessibility feature, but I have no idea what.  In summary: What is ctrl+shift+e doing in Ubuntu?

I already knew that Ctrl+Shift+u would allow to type a character by giving its Unicode hexadecimal representation: an underlined u appears, you type the code and hit Enter.   For example, Ctrl+Shift+u; e; 9; Enter gives the character é.  Now I've just noticed that Ctrl+Shift+e lets an underline e appear, in a very similar manner, but I can't figure out what it does.  Does someone know? Thank you in advance.


I am new to javascript, why this code return undefined?      const foo = {         bar: function() { return this.baz; },       baz: 1,     };      console.log((function() {       return typeof arguments[0]();     })(foo.bar));

I just came across an interesting situation in JavaScript.  I have a class with a method that defines several objects using object-literal notation.  Inside those objects, the this pointer is being used.  From the behavior of the program, I have deduced that the this pointer is referring to the class on which the method was invoked, and not the object being created by the literal.    This seems arbitrary, though it is the way I would expect it to work.  Is this defined behavior?  Is it cross-browser safe?  Is there any reasoning underlying why it is the way it is beyond "the spec says so" (for instance, is it a consequence of some broader design decision/philosophy)?  Pared-down code example:  // inside class definition, itself an object literal, we have this function: onRender: function() {      this.menuItems = this.menuItems.concat([         {             text: 'Group by Module',             rptletdiv: this         },         {             text: 'Group by Status',             rptletdiv: this         }]);     // etc }


Say I have the following key-value file I want to highlight using the listings package:  some.key=Some value   I want the key to be red, the equal sign to be black and the value to be blue. How do I define a language in listings that does that? I am aware of the moredelim, morekeywords but I can't figure out how to use their options to do what I want.

All is in the title. I would like to add a color to the text before a character with listing package.  For example, I would like to add a color to text between the beginning of a line and : or =, in a makefile.  I tried to use moredelimiters but I did not succeed.    \documentclass{article}  \usepackage{listings} \usepackage{xcolor} \definecolor{keycolor}{RGB}{172, 42, 42} \definecolor{mbleu}{RGB}{64,96,127} \definecolor{vimvert}{RGB}{46, 139, 87}  \lstdefinestyle{global}{   basicstyle=\ttfamily\scriptsize\color{black!90},%   stringstyle=\itshape\color{magenta},%   showstringspaces=false,%   keywordstyle={\bfseries\color{keycolor}},%   commentstyle=\color{blue}\slshape,%   framexleftmargin=1mm,%   backgroundcolor=\color{black!2},% }  \lstdefinestyle{makefile}{   style=global,%   morecomment=[l][commentstyle]{\#},%   emphstyle={\color{vimvert}},%   moredelim=[s][emphstyle]{\$(}{)}% }  \begin{document}  \begin{lstlisting}[style=makefile] .SUFFIXES: .inc .f .f90 .F  # all CPP processed fortran files have the extension .f90 SUFFIX=.f90  #----------------------------------------------------------------------- # this release should be fpp clean # we now recommend fpp as preprocessor # if this fails go back to cpp CPP_=fpp -f_com=no -free -w0 $*.F $*$(SUFFIX)  vasp: $(SOURCE) $(FFT3D) $(INC) main.o      rm -f vasp     $(FCL) -o vasp main.o  $(SOURCE)   $(FFT3D) $(LIB) $(LINK) makeparam: $(SOURCE) $(FFT3D) makeparam.o main.F $(INC)     $(FCL) -o makeparam  $(LINK) makeparam.o $(SOURCE) $(FFT3D) $(LIB) zgemmtest: zgemmtest.o base.o random.o $(INC)     $(FCL) -o zgemmtest $(LINK) zgemmtest.o random.o base.o $(LIB) dgemmtest: dgemmtest.o base.o random.o $(INC)     $(FCL) -o dgemmtest $(LINK) dgemmtest.o random.o base.o $(LIB)  ffttest: base.o smart_allocate.o mpi.o mgrid.o random.o ffttest.o $(FFT3D) $(INC)     $(FCL) -o ffttest $(LINK) ffttest.o mpi.o mgrid.o random.o smart_allocate.o base.o $(FFT3D) $(LIB) kpoints: $(SOURCE) $(FFT3D) makekpoints.o main.F $(INC)     $(FCL) -o kpoints $(LINK) makekpoints.o $(SOURCE) $(FFT3D) $(LIB)  clean:       -rm -f *.g *.f *.o *.L *.mod ; touch *.F \end{lstlisting}  \end{document}


I'am running Ubuntu right now ( 32 bit) , I burned the Windows 8.1 ISO (64 bit) on my  USB now when I launch my USB on boot , I have language select , then accept terms ... and when I have to choose Parititions of where to install Windows 8.1 , I get the following error : "Nous n'avons pas pu créer de partition, ni localiser une partition" It's in french , sry . (In English: We did not create a partition or locate a partition)  I tried to delete the Parition and make new ones same error (Do I have to delete the System Partition ? and remake ?) since I can't install over it because it's not NTFS   & NO , I'am not planning to dual boot , I just wanna remove Ubuntu & put WIndows  gparted :

I have absolutely no experience with Linux, and I desperately need to get my computer back up and running again with Windows.  How do I remove Ubuntu and reinstall Windows?    Editor's note: many of the answers are about removing Ubuntu from dual-boot but keeping Windows (which is a bit complicated), while other answers are about removing Ubuntu from single-boot (which is easy: basically just format the disk while installing Windows). The question as written is ambiguous between dual-boot or single-boot.


The situation I am thinking about is that, for example, lets say that there is a block that weighs 10N outside of water, when it is put into water its apparent weight is 2N. From this it can be inferred that the buoyant force is 8N. So if the buoyant force is less than the weight, I would think that the object is completely submerged, resting on the floor of the container. Is this correct? and if it is how can there be a buoyant force, when there is no water below the block to be pushing it up if it is resting on the bottom of the container

Suppose I have a wooden block that floats in water and I put it in an empty  glass beaker. Then I poured water in the beaker so carefully that no water goes under the block. In that case, would the block float or it will remain under the water?  As there is no water under the block there is no upward thrust on the base. Therefore it seems that the block would not float.  On contrary, there is tangential upward thrust on the sides of the block. Because of this thrust the block will float.   Which is the correct answer?  EDIT  I think the right answer is : the block would not float. Thanks to sammygerbil, anna v, Kieran Moynihan.  This reminds me another question.  A wooden block is floating on water in a air tight container. Is it going to float more or float less in the following cases?   All the air has been pulled out from the container. We compress the air above the water.   My Thought  Case 1:  When all the air has been pulled out from the container there is no buoyant force due to air, so total downward force acting on the block would increase and the block would float less.  OR,  As there is no air below the block no buyout force due to air. When all the air has been pulled out from the container there is no air pressure, so the block would float more.   Case 2:  When we compress the air, the density of air would increase. So the weight of the displaced air as well as the buoyant force due to air would also increase and the block would float more.  OR,  As there is no air below the block no buyout force due to air. When we compress the air, so the block would float less as air puts more downward pressure on the block.   Now which is correct or incorrect and why?


I have some problems with the following exercise: Suppose $\eta: \mathbb{R}_{\geq 0}\to \mathbb{R}$ is a continuous (with respect to the usual metric $\mathbb{R}$)function such that for all $x,y\in\mathbb{R}_{\geq 0}$ the following three conditions are satisfied: $\eta(x)=0\Leftrightarrow x=0$ If $ y\geq x$ then $\eta(y)\geq \eta(x)$ $\eta(x+y)\leq \eta(x)+\eta(y)$ Suppose that (X,d) is a metric space, and define $d': X\times X\to \mathbb{R}$ by $d'(x,y)=\eta(d(x,y))$. I have already shown that d' is a metric, now I have to show that the topologies on X defined by d and d', respectively are the same. I am a bit confused about how to do that. I am thinking that I have to show that U is open with respect to the metric d if and only if it is open with respect to the metric d'. And I am thinking of showing $"\Rightarrow"$ by showing that for every $x\in U\subset X$ there exists $\delta>0$ such that $B_{d'}(x,\delta)\subset U$, but I am not sure how to do so.

This question came up while showing the composition of a metric with a certain other  function gives another metric. Suppose I have some metric space $(X,d)$ and a  continuous, non-decreasing function $f$ on the nonnegative reals. Moreover, suppose  that $f(x)=0$ iff $x=0$, and $f$ also satisfies the triangle inequality in that $f (x+y)\leq f(x)+f(y)$.   Using these properties, it is not difficult to show that $f\circ d$ is yet another  metric on $X$, so $(X,f\circ d)$ is also a metric space.   I notice the (open) balls given by the metrics are of form  $$ B_d(x,r)=\{y\in X\mid d(x,y)\lt r\} $$ and  $$ B_{f\circ d}(x,r)=\{y\in X\mid (f\circ d)(x,y)\lt r\}, $$  so it seems that the topologies generated by the base of open balls in each case  would probably be the same. I would like to see how one would go about showing the topologies given by these two metrics are indeed the same. Thanks for any insight.


I've searched a lot but couldn't find a direct solution. Can anyone tell me how to logoff idle users from a remote desktop connection to a Windows Server 2012 server after a period of time?  These are Windows 7 clients.

In Windows 2003 and 2008 we had Terminal Services Manager (see screenshot below). However in Windows server 2012 it's .   Does anyone know how to access the list of currently remotely logged on users in Windows 2012 through a similar tool or some other way?    (I tried connecting to Windows 2012 from Windows 2008, that's why you see "win2012" in the TSM groups list. But that didn't quite work, and that's not a solution to my problem either. I was just trying to somehow manage remote users on the Win 2012 server.)


If I have a connecting flight through a country I am unable to enter. Can I retrieve my bags to recheck for my connect?


I manage a private GNU/Linux server, that only I (should) have access. Over the last few months, it got invaded a few times, always by the same person (he/she runs the same application every time). This person manages to create a root account. I've changed passwords to very strong ones and deleted the created accounts, but they keep getting back in. The problem is I don't know where from.  My question is: what are the first steps that I should do to find where my vulnerability is?  Some general comments about my setup:   Debian 8.6 Main applications running in the server: apache, dovecot, exim, mysql and owncloud. I have fail2ban running. I have a script in my .bashrc (for my user and for root account) that warns me by email when someones opens a terminal with these accounts. It never gets triggered by the invader. The output of the last command shows they were using a tty1 session (whereas when I'm logged it shows pts/0). Also in the last command, in the column that should say where the access is coming from, their entry is empty.

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


I have not much experience with ndiswrapper but some vague memory of using it with some broadcom module long back. Now, here is the problem. Realtek RTL8723DE wireless module is used in my new HP 15-BS576TX laptop. I haven't installed Linux yet. But, would like to check if Ndiswrapper can help use the Windows driver to work in Linux. Here is the Windows 10/8/7 driver for this RTL8723DE wlan module:   I extracted the exe and can see a folder /RTWLANE_Driver/Wind7X86/ which has rtwlane.sys and few other files which I presume is related to the wireless driver. Is there any chances of luck with ndiswrapper considering the driver executable actually contains win8/win7 drivers.  Thank you.

How do I install Wi-Fi drivers for Realtek RTL8723DE device in Ubuntu 16.04?  lspci -v | grep -i network 02:00.0 Network controller: Realtek Semiconductor Co., Ltd. Device d723


I submitted a paper to a journal early last year that was given major corrections. The reviewers were generally positive about the contribution but felt the technical framework needed simplified.  I spent 6 months or so on the corrections and sent it back a couple of weeks ago. The journal secretary has since confirmed it's back with the reviewers.  I've since noticed there's something missing from the paper and although it's relatively trivial - insofar as it doesn't affect the results - I'm concerned that it will ruin my chances of acceptance.  Basically, in the revised paper I simplified the framework by binning multiple confusing definitions in favour of four new definitions of four similar concepts (let's call then apple, orange, banana and pear, with the definitions being "X is a(n) {apple,orange,banana,pear} if such-and-such a property holds"). These definitions are all in the paper as resubmitted.  Each of these concepts then has an associated definition (also new in the revised paper) of an operator whose output is a collection of each individual concept.  e.g. +(A,B) = {apple1,apple2,...,appleN}; -(A,B) = {orange1,orange2,...,orangeN} etc.  These definitions are near-identical: "the apple operation +(A,B) yields a set where every element is an apple", "the orange operation -(A,B) yields a set where every element is an orange" etc.  (I've trivialised the definitions but you hopefully get the idea).  My problem is that I've only provided definitions of the operators for apples and oranges and completely forgot the ones for bananas and pears. I subsequently say something along the lines of "consider the following banana operation *(A,B)..." and also later in the paper use the undefined operators in a theorem.  The definitions of banana and pear operator are near-identical to those for apple and orange, something I think is easy to deduce in context.  A silly mistake I know, but not only did I not spot it, amazingly two others I asked to review it (one internal one external) didn't spot it either.  I'm just wondering if it's worth worrying about? I suppose it's likely that the reviewers won't spot it either, but if they do, does this seem like a minor correction (rest of the paper notwithstanding)? And if so, are minor corrections normally allowed after major corrections?   Edited to add: I realise that the question in the title didn't fully encapsulate what I was asking. I've updated the title to more fully reflect the question I was asking.

I submitted a paper to a prominent journal in my field. The reviewers all indicated that the paper would make a positive contrition to the field in the first round of review and asked me to make a major revision. I revised the manuscript according to their review and all reviewers indicated that they like my revision. However, one of the reviewers kept raising new issues and asked me to undertake another round of "major revision." Personally, I really feel that the new issues are not too difficult to address. However, I am wondering whether it is fair to keep raising new  (major) issues in each round of review. And, what is my chance of getting the paper accepted in the scenario described above (two rounds of major revision)? Thanks very much for your insight.


I need to make a row name be dynamic based on my choice. How can I make the following code work for me using bind_param?  UPDATE: main problem that my dynamic row name doesn't work. It gives me an error -   PHP Fatal error:  Call to a member function execute() on a non-object   Code  $myitem = 'something2'; $result = getResult($myitem);  function getResult($myitem) {     global $DBconnection;     $rowName = $myitem;     $stmt = $mysqli->prepare("SELECT         id,         something1,         something2,         something3         FROM table         WHERE ? = ? // ERROR         ");         $stmt->bind_param("ss", $rowName, $myitem); // ERROR         $stmt->execute();         $stmt->bind_result($id, $something1, $something2, $something3);         while ($stmt->fetch()){                              $row[] = array('id' => $id, 'something1' => $something1, 'something2' => $something2, 'something3' => $something3);         }         $stmt->close();         if (isset($row)) {              return ($row);         } }   Thank you.

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?


As far as movies he's directed, I count at least ten (in no particular order):   Reservoir Dogs Pulp Fiction Jackie Brown Kill Bill vol. 1 Kill Bill vol. 2 Four Rooms Grindhouse Django Unchained Inglorious Bastards My Best Friend's Birthday   In addition, he's written screenplays for From Dusk Till Dawn, True Romance and Natural Born Killers. I count at least 12 (with Kill Bill 1 & 2 being counted as the same movies. I won't even get into acting credits...  Why the bad math?

The Hateful Eight is an upcoming film by Quentin Tarantino.  I remember reading somewhere that the title is a reference to not only the characters in the film, but also to this being his eighth movie. Is this true and if so, what are the eight movies?


I wanted to know if there's any technique, website or anything where if we put in some sentence, it gives us a word for that. For ex - The sentence string be like " I don't know " and I want a word for it?

To prevent myself from asking an obvious, silly question multiple times: What are the English language tools you found most useful?  I found  extremely useful for looking up .   Please, one tool per answer.


I have a task to get user input in this form:  "SEND name1 name2"   The goal is to find the shortest path between the names, but that currently not the problem. I don't know how to read multiple strings form a single input.  The first string would be SEND, but that's the easiest one. How do I read the other two? After getting the names, I'd pass them on to a function to find out the distance between them.

I'm trying to iterate over the words of a string.  The string can be assumed to be composed of words separated by whitespace.  Note that I'm not interested in C string functions or that kind of character manipulation/access. Also, please give precedence to elegance over efficiency in your answer.  The best solution I have right now is:  #include <iostream> #include <sstream> #include <string>  using namespace std;  int main() {     string s = "Somewhere down the road";     istringstream iss(s);      do     {         string subs;         iss >> subs;         cout << "Substring: " << subs << endl;     } while (iss); }   Is there a more elegant way to do this?


Prove the following: $$\frac{1}{1+k}=\frac{\frac{1}{k}}{1+\frac{1}{k}}\leq \ln(1+\frac{1}{k})\leq\frac{1}{k}$$  I know I can prove it with induction if the values were naturals. However, the "problem" for me is that they're real.

One of fundamental inequalities on logarithm is: $$ 1 - \frac1x \leq \log x \leq x-1 \quad\text{for all $x > 0$},$$ which you may prefer write in the form of $$ \frac{x}{1+x} \leq \log{(1+x)} \leq x \quad\text{for all $x > -1$}.$$  The upper bound is very intuitive -- it's easy to derive from  as follows: $$ \log(1+x) = \sum_{i=1}^\infty (-1)^{n+1}\frac{x^n}{n} \leq (-1)^{1+1}\frac{x^1}{1} = x.$$  My question is: "what is the intuition behind the lower bound?" I know how to prove the lower bound of $\log (1+x)$ (maybe by checking the derivative of the function $f(x) = \frac{x}{1+x}-\log(1+x)$ and showing it's decreasing) but I'm curious how one can obtain this kind of lower bound. My ultimate goal is to come up with a new lower bound on some logarithm-related function, and I'd like to apply the intuition behind the standard logarithm lower-bound to my setting.


How to rotate an object like a notebook lid? Using R does not rotate around the bottom of the object.  You can see the exact example .

How do I create a hinged door that opens and closes in Blender? If I knew how to do this, then it would help me also create moving control surfaces on model aircraft, such as the rudder and horizontal stabilizers.


I have been trying to find this book for years to share with my kids, it would have been from the 90s. It was young adult sci-fi. The cover had a boy falling and a silver orb floating next to him.  The story is about a kid who gets pulled out of his reality right as a car accident happens, and I believe that they replaced him or his body with a clone, Millennium style. The world he is pulled into is covered by a dome, and run by silver orbs. The weather is controlled and it only rains on certain days, at the same time, with no thunder or lightning because it scares to kids and old folks.  The people are forbidden from leaving the dome, so of course the boy and a friend he makes do just that and adventure ensues. I can't remember the end of the book.

When I was younger (lets go with probably about 20 years ago), I read a f/sf book that I've been looking for ever since, but I can't for the life of me rediscover it.  It centers around a boy who is rescued from (I believe) a flood, by aliens, who take him to a sort of a domed colony, populated by other humans saved from disaster.  The setting in this domed colony is more or less suburban, but there are robots that are considered caretakers, that keep it running, etc. (and actually, it turns out that the robots are the only ones left, and that their creators are not extant).  Over the course of the book, the boy travels to similar domed colonies that house other alien species.  In one, he comes across (this is a little fuzzy in my memory here) a fruit that enables transmogrification, which is used in an alien ritual of some sort.  The only other detail I can recall is that at the climax of the book, this fruit is used to become one of the robots' creators, in order to break into some sort of control center.  This has been bugging me for the better part of a decade - hopefully somebody here is familiar with this book.


$(i)$ $x$ is irrational  $(ii)$ $3x + 2$ is irrational  $(iii)$ $\frac{x}{2}$ is irrational  My working :  $(i) \to (ii) \land (ii \to iii) \land (iii \to i)$  $(i) \to (ii)$:   Proof By contraposition:  x = p/q y = c/d 3x + 2 = y  3(p/q) + 2 = c/d  3p+2q/q = c / d  c = 3p + 2q  d = q  c/d = c/d   $(ii) \to (iii)$:   Proof by Contraposition:   x/2 = c/d -> 3x+2 = a/b  Now from the previous example we know that 3x+2 = a/b is true.   $(iii) \to (i) $  Proof by contraposition:   x = a/b -> x / 2 = c/d  (a/b) / 2 = c/d  a/2b = c/d  c = a   d = 2b  c / d = c / d

If $x$ is irrational then $3x+2$ is irrational.  My Working:   Proof by contraposition:   $3x + 2$ is rational and $x$ is rational  $x = a/b$  $y = c/d$  $3x + 2 = c/d$  $3x = (c/d) - 2$  $x = c-2d/3d$  $a/b = c-2d / 3d$  I am having a hard time understanding as to why do we end up solving for $x$ in this equation to determine weather $3x+2$ is rational or not if $x$ is rational.


I've seen a question on here before that mentioned drinking a potion opens up a character to an opportunity attack, but the question was referring to Pathfinder. Is this the case for DnD 5e?

What provokes an opportunity attack?  In 3.X moving out of a threatened square, standing up from prone, casting a spell (unless cast defensively), or making a ranged attack provoked, while in 4e moving out of a threatened square or making a ranged/area attack provoked.


Apparently there's an old question  already but that's in 2014.  As we know AlphaGo/Master/Zero permanently changed the Go world, and many AI are competing the “2nd strongest” after AlphaZero retired. Is there a site to play Go online against one or (nowadays) more computers?

There are many go servers but all of them seem to be for player-player games. I want to play online against a computer. I found some but it is not an actual go. I was not able to find a real go brain online. Are there any at all?   PS: In the end, I registered to KGS and later at WBaduk (but liked KGS much more) and I ended up playing against human players only. I found it much more fun than playing against a computer and since I tried it for the first time (online) I never went back to playing against the computer.


I'm using an activity to create an insert statment in my SQLite database, and I got a problem:  The table creating statement:  private static final String CREATE_TABLE_QUESTION =         "CREATE TABLE  " + TABLE_QUESTION + "("                 + KEY_ID_QUESTION + " INTEGER PRIMARY KEY autoincrement NOT NULL, "                 + KEY_QUESTION + " TEXT, "                 + KEY_PROFIL_CIBLE + " TEXT, "                 + KEY_PROFIL_WAITEDANSWER + " TEXT, "                 + KEY_REGLE + " TEXT, "                 + KEY_PLANACT + " TEXT, "                 + KEY_THEME + " TEXT"                 + ")";   In my activity, I've made a function to insert the data:  public void createquestion( String question, String profile, String regle, String plan, String theme) {                  long id;                  ContentValues values = new ContentValues();                  String questM = theme.concat(" - "+question);                 values.put(ModelHelper.KEY_QUESTION, questM);                 values.put(ModelHelper.KEY_PROFIL_CIBLE, profile);                 values.put(ModelHelper.KEY_REGLE, regle);                 values.put(ModelHelper.KEY_PLANACT, plan);                 values.put(ModelHelper.KEY_THEME, theme);                  long sql =  db.insert(ModelHelper.TABLE_QUESTION,null,values);                 //db.execSQL( sql);             }   I've tried using another method by typing an sql statment like that:   final String sql= ("INSERT INTO " +ModelHelper.TABLE_QUESTION+ "( '+ModelHelper.KEY_QUESTION+ ', ' +ModelHelper.KEY_PROFIL_CIBLE+ ', ' +ModelHelper.KEY_REGLE+ ',' +ModelHelper.KEY_PLANACT+ ', ' +ModelHelper.KEY_THEME+') VALUES  (' +questM+ ', ' +profile+ ', ' +regle+ ' ,' +plan+ ',' +theme ')");   db.execSQL( sql);  but it doesn't work neither, I have this error while clicking the button: java.lang.NullPointerException: Attempt to invoke virtual method 'long android.database.sqlite.SQLiteDatabase.insert(java.lang.String, java.lang.String, android.content.ContentValues)' on a null object reference  Can anyone help please?

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?


In Order of the Phoenix, Sirius confesses he is related to the Weasleys, and that all Pureblood families are related to one another. I was thinking about this, and realized that James Potter was from a Pureblood family.  Who is Harry related to, and does he end up married to his 4th cousin twice removed?

Below is a picture of the Black Family Tree, based on a .     Please note the unions of:   Dorea Black and Charlus Potter  Lucretia Black and Ignatius Prewett (Molly's maiden name) Cedrella Black and Septimus Weasley (#4 removed from the tree)    To add, here is a quote from Sirius Black:      The pure-blood families are all interrelated. If you're only going to let your sons and daughters marry pure-bloods your choice is very limited; there are hardly any of us left. Molly and I are cousins by marriage and Arthur's something like my second cousin once removed. But there's no point looking for them on here - if ever a family was a bunch of blood traitors it's the Weasleys.   Not only would this mean Molly and Arthur are distantly related by marriage, it would also mean Harry and Ginny are distantly related if Charlus Potter is indeed of the same Potter ancestry as Harry. And the  on the Potter family tree isn't helpful. Is there any proof that he is/ isn't?


I find myself often wanting to ask a question on StackOverflow (mainly) and then stopping myself for fear of overzealous policing.  People seem to feel some sort of pride in down voting, and running off into the proverbial night, with nary a comment to explain their down vote.  Does anyone else feel this fear?  Also, does anyone else feel it's a bit unfair that questions asked in like, 2008, like "How do I add an underline in CSS" have like, 250 upvotes?  I feel like the highest reputation users are entrenched in their "class" because all the "easy" questions have been asked, answered and upvoted.

Disclaimer: I understand that down-voting (social discord) is an important part of community building. Communal negative messages help to deter behavior destructive to the group. Down voting places warning sign in the road for new travelers (don't tread here) and to temper overexcitement.  Rant: We techies are a hazing culture. We invest countless hours mastering languages, algorithms and nuances. We accomplish great things. We rub it in people's faces to feel superior. We feel good becoming an "expert". We feel good when we master lambdas or create a great search algorithm.  Admit it, even the humblest among us feels warm and fuzzy when someone marvels at our work. It's validation. And it's not a bad thing.  But the joy of accomplishment has a darker sibling: PRIDE  It's part of what drives us so hard. It's part of every negative decision we make. And it's often at someone's expense!  Looking through posts on Stack Overflow, I see many answers with negative ranking. Many questions get negative rankings too. Many of these questions are repeats of ones asked in the past. The user could have done a more thorough job googling and probably deserves a mild slap.  But some questions are interesting and well thought out. New users usually aren't familiar with the thorough and serious natures of experts who frequent the forums. Some useful and interesting thoughts could be refined with a little help. Instead they're insulted and leave.  This spree of "reckless down-voting" may be hurting our "community"  In searching for my own name, I went through 10 pages of users with similar names and found most had rankings of 1. This means they never did so much as except an answer (automatic +2). Many of them just wanted their answers and no interest in community.  But I wonder about the many users who got "Geek-hazed". I wonder how many "Noob"s were scared away by unnecessary down-voting?  As of this writing I have a "rep" of 75. Barely noticeable compared to the super-users with rep above 32,000. But so much higher than most users ever get. My low score reflects some serious attempts to ask and answer worthwhile questions. But it's only a month of "real participation".  According to this article (from 2009)  what I witnessed in non-participation is nothing new.  Good reasons for downvoting  1) Person didn't even try to figure out answer by coding or serious googling.  Example: How do I validate user input on the client level?  2) Vague question; No code, No error msg  Example: Every time I run my application I get an error  Constructive alternatives to downvoting  1) A clearly new user didn't give code samples but described his error and error messages  Action: Suggest the user elaborate and include relevant code samples.  2) An answer is correct but vague. No examples, not enough detail. Maybe even sloppy English.  Action: Suggest the user elaborate and include relevant code samples.  Question: Do you think gratuitous down-voting hurts participation in our "community"?


The phenomenon is shown for example in  where a thin water jet is formed by letting water fall from a small hole punched under a plastic cup, and the jet is bent when a charged rod is moved close to it. Why does this happen? What I found: The people in the video claim it is due to the polar nature of water: the little dipoles align with the electric field, and if this is non-uniform it will cause a net force on the jet. This explanation is supported by , who also claim that it might also occur in non-polar liquids due to the induced dipole moment. In fact  report that the phenomenon also occurs in non-polar liquids under appropriate conditions. On the other hand  report (among other interesting things) that the effect still occurs in a uniform electric field, which seems to contradict the dipole explanation. They propose that it has to do with charged ions. However it's unclear (at least to me) that their setup actually produces a uniform field (or to what extent). For what it's worth, one can find a lot of things on Youtube, for instance  or .

I saw  by  and I was not 100% sure about the third phenomena, a statically charged object attracting a stream of water, especially because he explicitly mentioned that it is not due to the  of the water. A week later he uploaded an  all five phenomena and he says it is because of repelled equally charged ions, back up the water flow, such that the water actually falling along the charged object would be oppositely charged and therefore attracted. Here is a still image from the video illustrating this:    However this explanation seems strange to me, since this would mean that this way you could build up a charge in the water which has exited the tap (as well as in the water inside the tap as well). Therefore it should get harder to push those ions back over time, and therefore there also would be a decrease in the attraction of the water (assuming there is no other way to discharge it). I have tried a simple similar experiment, where I catched the water leaving the tap in an insulated bowl, but I did not notice a decrease in attraction.  There a couple of reasons why my experiment does not rule out his theory:   I was holding the charged (plastic) object by hand, which caused that its distance to the water stream varied, making it difficult to observe a decrease in attraction. I only conducted my experiment for roughly 30 seconds, which might be enough time for a opposite charge to build up.   The reason that he mentioned why permittivity can't cause this phenomena is because the electric field would be homogeneous and therefore the attractive and repulsive force of both dipoles of a water molecule would cancel out. However the electric field would only be homogeneous if the charged object would be an infinitely large plate, which it isn't. Thus water molecules would be attracted to the charged object. In order to make the permittivity theory more plausible I thought of maybe doing a order of magnitude calculation to see if it could generate a large enough force would be able the water stream by the observed amount. However I do not know what a good guess would be for variables such as the amount charge on the charged object and how the electric field would fall off over distance.   So, my question is whether his theory is really correct, or if the permittivity of the water can cause it.


In Schawrtz, Page 116, formula 8.23, he seems to suggest that the square of the Maxwell tensor can be expanded out as follows:  $$-\frac{1}{4}F_{\mu \nu}^{2}=\frac{1}{2}A_{\mu}\square A_{\mu}-\frac{1}{2}A_{\mu}\partial_{\mu}\partial_{\nu}A_{\nu}$$  where:  $$F_{\mu\nu}=\partial_{\mu} A_{\nu} - \partial_{\nu}A_{\mu}$$  For the life of me, I can't seem to derive this.  I get close, but always with an extra unwanted term, or two.  Anyone have a hint on the best way to proceed?

The electromagnetic field tensor is given by $F_{\mu \nu} = \partial_{\mu}A_{\nu} - \partial_{\nu}A_{\mu}$, and it appears in the Lagrangian as  $$L = -\frac{1}{4}F_{\mu\nu}^2 - A_{\mu}J_{\mu}.$$ Schwartz's QFT textbook says that (chapter 8, page 116) $$F_{\mu\nu}^2 = 2(\partial_{\mu}A_{\nu})^2 - 2(\partial_{\mu}A_{\mu})^2,$$ but I do not see how that is correct.   The first step of the expansion gives $F_{\mu\nu}^2 = (\partial_{\mu}A_{\nu})^2 - \partial_{\mu}A_{\nu}\partial_{\nu}A_{\mu} - \partial_{\nu}A_{\mu}\partial_{\mu}A_{\nu} + (\partial_{\nu}A_{\mu})^2$, and I see that the first and last term add up to produce $2(\partial_{\mu}A_{\nu})^2$. However, the second term $\partial_{\mu}A_{\nu}\partial_{\nu}A_{\mu}$ when expanded has a term like $\partial_{0}A_{1}\partial_{1}A_{0}$, and I don't see how this is present in $(\partial_{\mu}A_{\mu})^2 = (\partial_{0}A_{0} + \partial_{1}A_{1} + \partial_{2}A_{2} + \partial_{3}A_{3})^2$.


Find all positive integers $a, b, c$ such that $a^2+1$ and $b^2+1$ are both primes and $$(a^2+1)(b^2+1)=c^2+1$$  What I have done:  It is obvious that $a^2+1$ and $b^2+1$ cannot be both 2, so assume, WLOG, that $a^2+1=2$. Then, $a=1$ $$2(b^2+1)=c^2+1 \Rightarrow 2b^2+1=c^2 \Rightarrow b=2, c=3$$ Hence, we have 2 sets of solutions $(a, b, c)=(2, 1, 3); (1, 2, 3)$ If both $a^2+1$ and $b^2+1$ are odd primes, then $a, b, c$ are all even numbers.  I tried using Fermat's Infinite Descent by letting $a=2a_1, b=2b_1, c=2c_1$ but I seem to reach a dead end. Can anyone help me?  Thank you!

Find all positive integers x, y, z which satisfy the equation $(x^2 + 1)(y^2 + 1) = z^2 + 1$ given that $(x^2 + 1)$ and $(y^2 + 1)$ are both primes.  It seems trivial that the only set of integers x, y and z that work are $(1^2 + 1)(2^2 + 1) = 3^2 + 1$, which is equivalent to $2 * 5 = 10$, but how would I go about proving this, or are there any other sets for which the following equation works out?  Thanks in advance.


Does anyone know how to show that: $\Sigma_{k=0}^n k \binom{n}{k} = n2^{n-1}$?  I think we are suppose to use the binomial formula for that..  Thank you!

I am trying to prove this binomial identity $\sum_{r=0}^n {r {n \choose r}} = n2^{n-1}$ but am not able to think something except induction,which is of-course not necessary (I think) here, so I am inquisitive to prove this in a more general way.  The left side of an identity occurs while solving another problem (concerning binomial theorem) so I am more interested in deriving the right side from the left side, else I have to remember it now onward.  EDIT: I am more interested in an algebraic proof rather than combinatorial argument or something involving calculus (however I liked  and  solution), hence I am removing the combinatorics tag.


This seems to be a gotcha for me, I couldnt figure this out  >>> from collections import Counter >>> tree = [Counter()]*3 >>> tree [Counter(), Counter(), Counter()] >>> tree[0][1]+=1 >>> tree [Counter({1: 1}), Counter({1: 1}), Counter({1: 1})]   Why does updating one Counter updates everything?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


Ubuntu Software used to provide Pinta, KolourPaint, Audacity, and others, but they are no longer available there. I have to use apt to install them.   Why has Ubuntu Software 3.20.5 stopped providing applications that it used to?  Ubuntu 16.04 Ubuntu Software Center 3.20.5  Thanks in advance for your help!


I have an I-carrier that I want to have in a certain dimension. I thought about scaling the thing in object mode and then applying the scale. However when I do that, the size of the object in the x-direction seems to be off as it doesn't match what I'm typing in the transform window. My best bet is that this is because the local space of the object doesn't match the object size, at least in the x-direction. So how can I adjust my local space so that the adjustments I make in the transform window correctly translate to the objects dimension?  Note: Even after applying the scale, the objects dimensions are way off. However, the dimensions in the edit mode are right.

I just found out about the Mesh Display : Length feature in the "N" panel (thanks to ) that allows one to measure the length of a face or vertice.  But my first encounter with this tool gives me complex feelings of love and hate, see how, as I was trying to measure the aspect ratio of this TV screen, I am getting WIDTH = 20.33 and HEIGHT = 37.57.  These values seem awfully wrong, since my betrusted eyes tell me the height should be shorter than the width.    I have tried measuring the single vertices as well, to identical results.


Unit test fails yet biComplexNumber1.equals(biComplexNumber2) holds true.  Unit test:   public void simpleTest(){     BicomplexNumber b1 = new BicomplexNumber(1,2,3,4);     BicomplexNumber b2 = new BicomplexNumber(1,2,3,4);     assertEquals("Simple Test", b1, b2); }   Equality check  public boolean equals(BicomplexNumber bicomplexObj)  {     if(bicomplexObj == this) return true;     if(bicomplexObj.getA() != this.getA()) return false;     if(bicomplexObj.getB() != this.getB()) return false;     if(bicomplexObj.getC() != this.getC()) return false;     if(bicomplexObj.getD() != this.getD()) return false;     return true; }   The equality check seems to be correct when I would like it too. But I have included it anyway.

I ran into an interesting (and very frustrating) issue with the equals() method today which caused what I thought to be a well tested class to crash and cause a bug that took me a very long time to track down.   Just for completeness, I wasn't using an IDE or debugger - just good old fashioned text editor and System.out's. Time was very limited and it was a school project.  Anyhow -   I was developing a basic shopping cart which could contain an ArrayList of Book objects. In order to implement the addBook(), removeBook(), and hasBook() methods of the Cart, I wanted to check if the Book already existed in the Cart. So off I go -  public boolean equals(Book b) {     ... // More code here - null checks     if (b.getID() == this.getID()) return true;     else return false; }   All works fine in testing. I create 6 objects and fill them with data. Do many adds, removes, has() operations on the Cart and everything works fine. I read that you can either have equals(TYPE var) or equals(Object o) { (CAST) var } but assumed that since it was working, it didn't matter too much.  Then I ran into a problem - I needed to create a Book object with only the ID in it from within the Book class. No other data would be entered into it. Basically the following:  public boolean hasBook(int i) {     Book b = new Book(i);     return hasBook(b); }  public boolean hasBook(Book b) {     // .. more code here     return this.books.contains(b); }   All of a sudden, the equals(Book b) method no longer works. This took a VERY long time to track down without a good debugger and assuming the Cart class was properly tested and correct. After swaapping the equals() method to the following:  public boolean equals(Object o) {     Book b = (Book) o;     ... // The rest goes here    }   Everything began to work again. Is there a reason the method decided not to take the Book parameter even though it clearly  was  a Book object? The only difference seemed to be it was instantiated from within the same class, and only filled with one data member. I'm very very confused. Please, shed some light?


Evaluate this integral $$\int_0^1(x^2-x^3)^{-\frac 1 3}dx$$ by using a barbell-shaped contour with shrinking end surrounding 0 and 1, together with a large circle containing the barbell.    The branch cut connects 0 and 1. Let the value of $f(z)=z^{-\frac 2 3}(1-z)^{-\frac1 3}$ over the branch cut be positive. When a point over the branch cut moves along the red curve to the corresponding point under the branch cut, $\Delta \arg(z^{-\frac 2 3})=e^{-i{\frac {3\pi}{4}}}$ and $\Delta \arg\big((1-z)^{-\frac1 3}\big)=0$. So $e^{-i\frac {4\pi} 3}$ should be multiplied under the branch cut.   The integral over the outer circle equals:$$-2\pi iRes(f(z),\infty)=2\pi iRes(f(\frac 1 t)  \cdot \frac 1 {t^2},0)=2\pi iRes(\frac 1 t (t-1)^{-\frac 1 3})=2\pi i(-1)^{-\frac 1 3}.$$ Because of the branch we chose, $(-1)^{-\frac 1 3}=e^{-i{\frac \pi 3}}.$ We get $$(1-e^{-i{\frac {4\pi} 3}})\int_0^1(x^2-x^3)^{-\frac 1 3}dx + 2\pi ie^{-i{\frac \pi 3}}=0.$$ So,$$\int_0^1(x^2-x^3)^{-\frac 1 3}dx=\frac {2\pi} {\sqrt 3}.$$

How do I go about evaluating the following by contour integration?  $$ \int^1_0 \frac{dx}{(x^{2} - x^{3})^{1/3}} $$  The question does not fit in the standard form of : $\int^{2\pi}_0$ or $\int^\infty_{-\infty}$  etc.  I tried substituting $ x = cos(\theta) $ but got stuck.


I'm reading through the Critique of Pure Reason and I'm stuck on the section Resolution of the cosmological idea of the totality of the derivation of occurrences in the world from their causes and likely some succeeding ones.  Here, Kant deals with the issue of the coexistence of free will and empirical causality, however I can't parse what he's trying to say for the life of me. It seems like he's running in a never ending circle of contradiction, whereby all events as appearances are fully determined through empirical causality, and that no series of events can be said to have an absolute beginning, and yet free will is exactly what begins a series of events.  He seems to try to resolve this by differentiating between an intelligible causality and a merely empirical one--but that's exactly what's bothering me. I can't understand what he means by "intelligible causality as opposed to the empirical one", and his writing on this matter is probably the most confused it's ever been in the Critique.  I've read that the central distinction here is time. Empirical causality exists within a time-series. Intelligible causality does not. What does that mean? Clearly there must be points of interaction where intelligible causality enters into the empirical one, can't it be said that a series of appearance-events had thus begun?  Note that I am specifically interested in this metaphysical side of the problem, I do know where he's getting at regarding the practical and regulative use reason has for the idea of freedom.

This is what is supposedly his claim:     My noumenal self is an uncaused cause outside of time, which therefore   is not subject to the deterministic laws of nature in accordance with   which our understanding constructs experience.   How can he say that if a noumenal self has to exist in nature and be bound to body that exists in nature? Also, if his noumenal self is free then so does 7 billion other people's, which is not the case because they all live in a societal structure where everyone has freedom that comes with a bunch conditions as to what is forbidden.


Is it possible to incorporate a network into the MMQGIS hub distance analysis? Essentially I have a point shapefile with zip code centroids and I'd like to determine the closest shipping hub (also point shapefile) for each assuming the path must follow a road (a line shapefile).  Unlike creating a  I would like to have a single hub identified for each zip code centroid. A further distinction is that neither the zip code centroids nor the hubs actually lie directly on the roads so I'd like to have the source (zip centroids) and destination (hubs) be the closest point on the road/line.

I'm looking for the steps required to produce an origin-destination (OD) cost matrix.  What I'm looking for is a matrix of road distances. The distance matrix tool only produces euclidian distances. The QGIS Roadgraph plugin produces the shortest road distance from one origin to N destinations. What I need is a file containing distances from all origins to the N closest destinations. I have a lot of origins so repeating the analyses with Roadgraph is not an option. Thanks again.  I'm looking for a step-by-step description, starting from scratch (ie, with my 3 shapefiles: origins, destinations, road network).