I am fumbling my way through phpMyAdmin and mySQL.  I’m creating something where a customer can register multiple products.  The data coming in is:  Category > Type > Size > Color  So for example:  Cookware > Oven > 5 qt > Blue Bakeware > Casserole > 3qt > Blue Accessories > Textiles > N/A > Blue Etc.  I have set up one table with categories, and 4 tables to cover each product type.   Categories ID Category 1 Cookware 2 Bakeware 3 Accessories 4 Serveware  Cookware Table ID Type 1  Oven 2 Skillet 3 Roaster  Bakeware Table ID Type 1 Casserole 2 Pie Dish 3 Baker  Etc.  Then, in the registration table, I set up a foreign key to link the category to the category table.  So it would look something like this:  ID   CustID  Category  Type Size Color 1    20      2         1    11   34 1    20      1         1    9    34   (sorry the formatting is so terrible! not sure how to fix) But, I’m stuck on how to link the product type to the correct product type table since it is dependent on which category they picked.  Hopefully this makes sense. Maybe I don't even need to link them and can still request the data somehow through a query?


Is there a desktop version of Ubuntu that runs on a Raspberry Pi 2?  Not just the 'core' functionality like Windows 10.


say I have a class as such  class foo {   private:   std::string str;   int a;   poo* p;    public:   foo   {      p = new poo();   }    void someMethod() {....} }   Now I wanted to know if I go the following ways:  foo* f = new foo();   or  foo f;   where would the variables str,a and p be created in each case ?? Are member variables affected by how the class is created ?  For instance I would think that str and a would be created on the stack and p would created on the heap. I would appreciate it if someone could clear this up ..


TCP Concurrent Client/Server in C by using Fork()

asdfg askjhgkasdhj gfskjd;hdgfk ;jasgdjkf hasdjkghf asdjkf hasdjkfgh klasdhdf jkasdjkf hdjksahf jklhdjkf asjkdhdf jkdlf ajsdhf jklashdf jaksdf hkjlasdjklf hasdhdf kdf kjlasdhdf hkjadf ljkdf adf kjahdkf adf kjashdfhkjlsasdf   else {         printf("[-]Invalid command\n");       }     }      bzero(buffer, SIZE);   }  }


Code shows all the frames at once when supposed to show separately

There is a code. I want to create a text animation. It prints a line of text then after some delay erases it and prints another. Here is the function that creates a text frame:      def frame(data):     clear = '\u001b[0m'      for letter in data:         rslt = colours['fg'][letter['color']]         rslt += letter.get('bg', '')         rslt += letter['letter']         rslt += clear         stdout.write(rslt)   Here is the animator function:  from time import sleep  def animate(data):     clear = '\u001b[100D'     #for i in range(len(data)):     for i in range(5):         #stdout.write(clear) #1         ready = change(data, i)         frame(ready)         sleep(0.4)     print()   What am I supposed to get? As I explained above, it should print a line of text, then wait for 0.4 and then on the next iteration cycle erase the previos text, then repeat the stuff.  But what do I get? I get nothing for (I didn't measure exactly, but probably the sum of delays of 0.4) some time and then the text repeated 5 times as it was not cleared, because the line #1 is commented. And when it's not, after again the sum of delays I get the last frame of the text.  You may play with my code at


At first i installed Linux mint on my hard drive. This disk is splitted up into two partitions. After i installed linux i formatted the 2nd partition and deleted and created it new. It's the /dev/sda3. If i try to install windows from an usb stick on it, i cant because it presents me the following error message:  "windows cannot be installed to this disk. the selected disk has an mbr partition table".  My partitions look like:  /dev/sda1            2048   976562175   488280064   83  Linux /dev/sda2       976564222   982421503     2928641    5  Erweiterte Partition 2 beginnt nicht an einer physikalischen Sektorgrenze. /dev/sda3       982421504  2000408575   508993536    7  HPFS/NTFS/exFAT /dev/sda5       976564224   982421503     2928640   82  Linux Swap / Solaris   So i tried to convert my partition scheme to gpt i did this: sudo gdisk /dev/sda3  Then i get the following message:  Partition table scan:   MBR: MBR only   BSD: not present   APM: not present   GPT: not present   *************************************************************** Found invalid GPT and valid MBR; converting MBR to GPT format in memory. THIS OPERATION IS POTENTIALLY DESTRUCTIVE! Exit by typing 'q' if you don't want to convert your MBR partitions to GPT format! ***************************************************************  Exact type match not found for type code 7000; assigning type code for 'Linux filesystem' Exact type match not found for type code 4300; assigning type code for 'Linux filesystem' Exact type match not found for type code 7200; assigning type code for 'Linux filesystem'  Warning! Secondary partition table overlaps the last partition by 2753840503 blocks! You will need to delete this partition or resize it in another utility   Do i really need to resize my /dev/sda2? But to what should i resize it then? Just make it smaller or what?


How to find out where mystery SPAM scripts are coming from?

I am the datacenter manager at a small ISP and we have been having an issue with mystery scripts sending out SPAM on our server. These PHP scripts will appear mysteriously in /tmp as well as sometimes in website folders. We had the software "Gallery" installed, which required dangerously elevated permissions and allowed these scripts to be injected. I have since limited that site via .htaccess to our office only, and now spam has ceased showing up in the website folders, but still shows up in /tmp as well as other website folders. Our server runs exim with Directadmin on Debian 2.6.26-29.  To find the SPAM scripts I run:      server:/# grep cwd /var/log/exim/mainlog | grep -v /var/spool | awk -F"cwd=" '{print $2}' | awk '{print $1}' | sort | uniq -c | sort -n         1 /home/xxx/domains/XXX/public_html/cgi-bin/formmail       2 /       2 /home/xxx/domains/xxx.com/public_html/wp       2 /home/xxx/domains/xxx.com/public_html       2 /home/xxx/domains/xxx.com/public_html       4 /usr/local/directadmin      11 /home/admin     303 /home/admin/domains/xxx/public_html/components    2947 /tmp   Does anyone know how to find out where these scripts are coming from? Apache is the owner of the SPAM scripts. Thank you in advance.


I have the following table test   id       Name       1        AA         1        TT        1        V          2        C          3        B          3        N          4        N1           how can I get the following table as result : concat (Name,|) group by id .    id       Name           1        AA|TT|V                          2        C              3        B|N                    4        N1


I want to create a countdown timer in a Unity game I am creating. Up until now my game was running for a specific time but I was using InvokeRepeating to end the game after the set time.  But now I want to display the time left in a GUI text. One approach could be to use InvokeRepeating again but this time call it every second to decrement the timer. With this approach though it would mean do extra calculations for when a minute passes in order to display time appropriately and not just display the whole time in seconds.  Is there a different approach? Does Unity have any timers built in? Also which is the more efficient method?


JavaScript Regex: Match all hashtags, only capture text after hash character

I am trying to match text after a hashtag.  Here is my current progress:  String: "Here sometext #BestRappaAlive #CategoryK #test #sadsadsadsa some more text"  Regex: /(?:#)(\w+)\b/g  Desired output: ["BestRappaAlive","CategoryK","test","sadsadsadsa"]  Current output: ["#BestRappaAlive","#CategoryK","#test","#sadsadsadsa"]  This seems trivial (I can just loop and slice) but I am curious as to where I am going wrong.


The parametric formula for an epicycloid is: $$x=(R+r)·\cos(θ)-r·\cos\Biggl(θ\biggl(1+\frac{R}{r}\biggr)\Biggr)\\ y=(R+r)·\sin(θ)-r·\sin\Biggl(θ\biggl(1+\frac{R}{r}\biggr)\Biggr)$$  The angle θ is the angle between the positive x-axis and a line running from the origin through the center of the generating circle (with radius r).  If instead of the angle $\theta$, you are given the angle between the positive x-axis and the end of the curve (we will call this angle $\beta$), how do I find $\theta$?  $$β = \arctan\frac{(R+r)·\sin(θ)-r·\sin\Biggl(θ\biggl(1+\frac{R}{r}\biggr)\Biggr)}{(R+r)·\cos(θ)-r·\cos\Biggl(θ\biggl(1+\frac{R}{r}\biggr)\Biggr)}$$


Proving that $\int_{-b}^{-a}f(-x)dx$ is integrable if $\int_{a}^{b}f(x)dx$ is.

g(x)=f(-x), where $g:[-b,-a] \rightarrow R$ and it is given that $f$ is integrable on $[a,b]$  Need to prove that $\int_{-b}^{-a}f(-x)dx$ is integrable if $\int_{a}^{b}f(x)dx$ is.  Is there a way to do this using the properties of integrals?


What’s a “ ‘friend’ friend”, and is that meant to be ironic?

Here is a quote from the "Lois & Clark" series:     A: Who are you?   B [a guy]: I'm a friend of her ["her" is another female character whom B is looking for].   A: A boyfriend, a "friend" friend or just a friend?   Do you have any idea what "a 'friend' friend" is supposed to mean? Is that ironical or something?


I have this code to connect a server with a client, i need send json objects to a android studio client but the method escribir in the line of the printwriter have a error, and i dont konw what is the problem, please see the code and help me  public class Servidor { ServerSocket servidor=null; Socket socket=null; BufferedReader lector=null; PrintWriter escritor=null; Gson gson = new Gson(); public Servidor(){  } public static void main(String[] args) {     Servidor Server=new Servidor();     Server.iniciarHilo(); } public void iniciarHilo(){  Thread principal=new Thread(new Runnable(){     public void run(){         try{         servidor=new ServerSocket(8080);         while(true){             socket=servidor.accept();             leer();         }         }catch(Exception ex){             ex.printStackTrace();         }     } }); principal.start(); System.out.println("Servidor iniciado......"); } public void leer(){     Thread leer_hilo=new Thread(new Runnable(){     public void run(){         RegUser registrar=new RegUser();         try{             lector=new BufferedReader(new InputStreamReader(socket.getInputStream()));             while(true){                 JsonParser parser = new JsonParser();                 String mensaje= lector.readLine();                 JsonElement elemento = parser.parse(mensaje);                 String mensaje_in=elemento.getAsJsonObject().get("tipo").getAsString();                 if (lector==null){                     System.out.println("Conexion Interrumpida....");                 }                 if (mensaje_in.equals("registrar")){                     System.out.println("Solicitud de Registro");                     registrar.newUser(elemento);                 }                 else if (mensaje_in.equals("ingresar")){                     System.out.println("Solicitud de Ingreso");                 }               }         }catch(Exception ex){             ex.printStackTrace();         }     }  });     leer_hilo.start(); } public void escribir(final String dato){     Thread escribir_hilo=new Thread(new Runnable(){         public void run(){             try{                 escritor= new PrintWriter(socket.getOutputStream());                 escritor.println(dato);             }catch(Exception ex){                 ex.printStackTrace();             }         }     }); escribir_hilo.start(); }   And this  public class RegUser { Gson gson = new Gson(); ListaEnlazada listaUsuarios; Comparar comparar=new Comparar(); public RegUser(){  } public void newUser(JsonElement elemento) throws IOException{     Servidor respuesta=new Servidor();     //respuesta=new Servidor();     String user=elemento.getAsJsonObject().get("nombre").getAsString();     //boolean result=comparar.UserComp(user);     if(true){         listaUsuarios=new ListaEnlazada();         listaUsuarios.add(elemento);         System.out.println(listaUsuarios.get(0));          JsonObject o = new JsonObject();         o.addProperty("tipo", String.valueOf("registro"));         o.addProperty("estado", String.valueOf("completo"));         String enviar_mensaje = gson.toJson(o);         respuesta.escribir(enviar_mensaje);          }   And the error is    java.lang.NullPointerException    at Servidor$3.run(Servidor.java:81)   at java.lang.Thread.run(Thread.java:745)   I has an error when writing a data through the socket to the client, the error is in the getOutputStream


Difference between Geographic and Projected coordinate systems?

What is the difference between a geographic coordinate system and a projected coordinate system?


How to apply symbol in group to map attributes in qgis 2 using osm roads as an example

Update: While this question does point to available style guides my question is more how to go about similar operation by yourself and associating your own symbols with osm maps  I downloaded OSM based maps from  and my question is how to associate the symbols shown in the screen shot with the fclass attribute automatically so vectors of ftype type "Motorway","Primary" etc all use the appropriate symbol I tried changing the symbol type to Categorized by ftype but that still meant I had to manually edit each one and pick the correct symbol.  p.s. are the symbols included in the osm file or are they common to qgis?


Notation: Precedence in multiple levels of exponentiation

When people write $a^{b^c}$, does it refer to $(a^b)^c=a^{bc}$  or $a^{(b^c)}$? What about the notation a^b^c (without superscripts)?  Is there an agreed-upon convention?


Proof: Show there is set of $n+1$ points in $\mathbb{R}^n$ such that distance between any two distinct points is $1$?

Argh, I hate to ask a question again so soon, especially one I feel like I should know.  Linear algebra is taking its toll, and I am not quite used to the theory side of mathematics.  Anyways, I want/need (more of a want) to show that there is a set of $n+1$ points in $\mathbb{R}^n$ such that the distance between any two distinct points is $1$.   I am also interested in proving that a set of $n+2$ points does not exist, but I imagine that should not be difficult to do after.  Thank you in advance.  PS. I really do apologize if this is a duplicate, I spent a lot of time trying to figure this out to no avail.


I'm wondering what is difference between these both?     She has been banned   and     She is banned


Sorry for asking but I strugle really hard to uninstall this thing, I watched this topic  and other one but this isn't working for me let me explain you.  I Remove all kali linux repositories  I run : sudo apt-get update sudo apt-get install -f sudo apt-get autoremove  sudo rm /usr/bin/katoolin  gksu gedit /etc/*release   but in here I have the lsb_release that I have changed to Ubuntu but I have an os-release file with Kali Linux info on it. I changed it too Then I tried like in the tutorial to put sudo apt-get install --reinstall software-center but I have an error Package software-center has no instalation candidate. I tried to fix it with the gnome-terminal thins but didnt workout guys please me please, thanx you PS:I just found that  look at the bottom of the page, the cheitan guy, I have an os-release file with Kali Linux on it, should I need to reinstall my Ubuntu OS ?


Multiple Transaction Log files and performance impact

So I've gotten into an argument with several people regarding the number of transaction log files a give databases should have.  I've seen several post saying you should only have 1 transaction log file for each database, nothing in any Microsoft whitepapers though. However in many cases I've seen that increasing the number of transaction log files for a given database will actually improve the write performance to the database.  I should note that all these databases are in Full recovery model and are using a large SAN frame for the I/O sub system.  If as many of the posts say that the transaction writes all happen serially to the one file until the end of the file is reached then the writes move on to the subsequent log file, why would increasing the number of log files end up have a very noticeable improvement on the Write speed to the Disk?  In the most recent case we saw IO jump from 700 Kb/s to more than 60 Mb/s by increasing the number of log files from 1 to 8.  Any input would be appreciated.


How can I recursively delete all files of a specific extension in the current directory?

How do I safely delete all files with a specific extension (e.g. .bak) from current directory and all subfolders using one command-line? Simply, I'm afraid to use rm since I used it wrong once and now I need advice.


This morning, I read Wikipedia's informal definition of a limit:     Informally, a function f assigns an output $f(x)$ to every input $x$. The   function has a limit $L$ at an input $p$ if $f(x)$ is "close" to $L$ whenever   $x$ is "close" to $p$. In other words, $f(x)$ becomes closer and closer to $L$   as $x$ moves closer and closer to $p$.   To me that sounds like something that might be better described as a 'target'.  If I take a simple function, say one that only multiplies the input by $2$; and if my limit is $10$ at an input $5$: then I've described something that seems to match the elements contained in Wikipedia's definition. I don't believe that that's right. To me it looks like an elementary-algebra problem ($2p = 10$). To make it more calculusy, I could graph the function's output when I use inputs other than $p$, but that really wouldn't give me anything but an illustration of the fact that one's answer moves farther from the right answer as it becomes more wrong (go figure).   So limits are important; what I've just described is trivial. I do not understand them. I know calculus is often used for solving real-world challenges, and that limits are an important element of calculus, so I assume there must be some simple real-world examples of what it is that limits describe.   What is a simple example of a limit in the real world?  Thank you  -Hal.


a bounded analytic function on both real and imaginary axis

Does there exist an analytic function $f:\mathbb{C}\rightarrow\mathbb{C}$ such that $f$ is bounded on both real and imaginary axes?   According to Liouville's theorem the function must be constant but I am confused that any bounded function $f$ on $\mathbb{C}$ must be like $f(z)=c$  where c is a constant. I am convinced that it must be bounded with respect to one axis but how about other axis. For example, $f(z)=1$ then it is bounded w.r.t real axis but how about imaginary axis? Question may be easy for other but I am unable to visualize it .


Force a rebuild of the start menu program index/database in Windows 10

With Windows 10 Microsoft migrated to a database-ish solution for indexing programs in search and the start menu, rather than just using a /startmenu/ directory. AFAIK the exact implementation is still pretty unclear, but there is something along those lines.  Updating from 8.1 to 10 causes it to migrate everything from /startmenu/ to the new system, which ignoring issues such as a (seemingly arbitrary) cap of 500 applications, works fine.  However this failed for me, and from googling seems to be an issue from upgrading with an older dev build, which then carried on to RTM.  So does anyone know a way to force a rebuild/re-index of the program library? Rebuilding the system wide index through control panel (also in <=8.1) has no effect.


How to duplicate a group to a new document having this document the exact same size as the group?

I am using Photoshop CS3 and I have been given a quite big PSD with a lot of elements in it. I want to select one of these groups in the layer pane and copy it to a new document, and this document needs to be the exact size of the group.  I have tried duplicating the group into a new document, but this results in a document with the same size as the original one.  I tried following this link  But I just can't control-c the layers I have selected?  My group is composed of text layer and one square layer with some effects in it (its a button).  Many thanks, felipe


Where has the trailing newline char gone from my command substitution?

The following code best describes the situation.  Why is the last line not outputting the trailing newline char?  Each line's output is shown in the comment.  I'm using GNU bash, version 4.1.5          echo -n $'a\nb\n'                  | xxd -p  # 610a620a              x=$'a\nb\n'   ; echo -n "$x" | xxd -p  # 610a620a      echo -ne "a\nb\n"                  | xxd -p  # 610a620a x="$(echo -ne "a\nb\n")" ; echo -n "$x" | xxd -p  # 610a62


Could I define a circle as a polygon where the amount of sides approaches infinity? How would I define this mathematically?


This command does not work:   $ sudo echo 3 > /proc/sys/vm/drop_caches  bash: /proc/sys/vm/drop_caches: Brak dostępu   But when I gain root priviliges separately everything works.  root@pc:~# echo 3 > /proc/sys/vm/drop_caches  root@pc:~#    Does this have something to do with > operator redirecting sudo, not echo?


Render Border constraining model in all viewport shading modes except Rendered

Quite new to Blender. I'm using 2.75 and was working on this lamp (part of a Udemy course). I was using the Render Border tool (Ctrl+B) to constrain rendering to part of the model and somewhere in amongst cancelling/redrawing that and moving the camera around my file now only displays a minimal part of my model in both Object and Edit modes when using anything except Rendered Shading (see images).  I got to that point where I'd pressed a bunch of keys and couldn't remember quite what I'd done, couldn't undo it etc. It looks like a bug to me tbh, but if anyone knows which shortcut I may have pressed to limit the viewport like this I'd appreciate it!  If there is anyway to host the .blend file somewhere if anyone wanted to take a look, then please let me know.


After installing Ubuntu 16.04, the Gnome Software Center was working.  I then started to have issues with it freezing.  I decided to uninstall it through the terminal, and then reinstall it through the terminal.  If I try to open the software through Unity, the icon opens, but after a time disappears.  If I type in gnome-software in the terminal, the command just hangs until I kill it.  I've tried uninstalling and reinstalling using various commands I've found on this forum and others, but nothing will successfully reinstall the software.  All other software seems to be working fine.  Can anyone help?  Thank you.


Given any positive real numbers $a,b,c$, we have $(a^{2}+2)(b^{2}+2)(c^{2}+2)\geq 9(ab+bc+ca)$

I have a  beautiful  inequality, but I can only prove part of cases. Given any positive real numbers $a,b,c$, we have   $$(a^{2}+2)(b^{2}+2)(c^{2}+2)\geq 9(ab+bc+ca)$$  How can we prove this statement?


how to set staitc ip using bash script centos

i want to set static IP for my eth0 adapter it is set to DHCP right now and i want to set it to static using bash script the IP should be same which its currently have or it picks from dhcp.


Which Ubuntu I should install on this laptop?

İm using windows 8 my system is : İntel core2duo t6400 2.0 ghz 2mb cache 6 gb ddr3 1033 mhz ram Nvidia 9600mGS Gpu and i have 500 gb hdd  i love to play games so i prefer windows 8 for games but i would lıke to use ubuntu for my daily use i am thinking to use it alongside with windows 8 it is possible right? should i install 12.04 or 13.04 also i use 64 bit windows so i should use 64bit ubuntu right? thank you for your answers


Anyone who has played a wide variety of games knows that some games are almost purely skill (i.e. Chess, Go), while others are 100 % luck (ie. Candyland, card game of War). However, most games are in between. I would find it helpful as a game buyer if there were an objective measure indicating how much luck is involved in a game, to include as one of several criteria when deciding which kinds of games I'd like to buy and spend time learning. I personally prefer games where luck/probability plays a role, yet deliberate practice increases skill over time (i.e. card game of Bridge). But obviously other people will have different preferences.  I've observed many debates about the amount of luck and skill in certain games and I sometimes use information gleaned form these informal debates to help me decide whether to purchase a game. Very few of these debates cite objective measures to indicate how much luck or skill is involved.  Note that in a , one person did cite .  So what measures exist and how useful are they? Or is there some persuasive mathematics to suggest that useful measures (of how much luck is in a game) are not possible?


Pulseaudio not detecting bluetooth headset automatically

The Pavucontrol on my Xubuntu 13.10 detects my bluetooth headset, but only after I type the commands :  pulseaudio -k sudo alsa force-reload   After a few seconds the headset appears in the configuration tab.  I have also tried inserting the line   load-module module-switch-on-connect   in the /etc/pulse/default.pa but it doesn't help. I have tried purging and autoremoving and reinstalling everything right from alsa to pulseaudio and pulseaudio-module-bluetooth. Nothing works.   Is there a workaround to load the headset without using the command force-reload ? To make the pulseaudio daemon recognize the device automatically ?  I tried adding :      pcm.bluetooth {     type bluetooth     device "XX:XX:XX:XX:XX:XX"     profile "auto"    }   to a file .asoundrc in my home directory but it doesn't make a difference  After killing the pulseaudio daemon, my even volume hotkeys stop working. I have to assign   amixer set Master 4%- -q unmute amixer set Master 4%+ -q unmute   to some other key combination to manage the volume from keyboard. Assigning the commands to the hotkeys doesn't work. How are the volume keys bound to the daemon ? Is there any other way of binding the keys to the new daemon (after restarting) ?   UPDATE  Found the problem. Using the command   pactl list | grep -i module-bluetooth-discover   I found out that the bluetooth discover module was not loaded.  But my default.pa file in /etc/pulse contains the lines   .ifexists module-bluetooth-discover.so load-module module-bluetooth-discover .endif   So why does the module not load on pulseaudio startup ?  After issuing the command   sudo pactl load-module module-bluetooth-discover   The bluetooth headset works properly and is detected automatically, without killing and restarting alsa.


Leaped or leapt, past and perfect tenses

Here is my passage, more or less:  Dick and Jane leapt from the boat into the icy waters of the North Pacific. Had they not leaped, they would not have been eaten by sharks as the rescue helicopter was just minutes away.  Leaped or leapt? Had leaped or had leapt? Has leaped sounds better to me than has leapt, right?


Given an SBox, how can I generate its component equations (in )? For example, let's say I have this SBox:  6, 4, 7, 8, 0, 5, 2, 10, 14, 3, 13, 1, 12, 15, 9, 11  Then, the equations are:  $y_0 = x_1 \oplus x_0x_1 \oplus x_0x_2 \oplus x_1x_2 \oplus x_0x_3 \oplus x_0x_2x_3 \oplus x_1x_2x_3$ $y_1 = 1 \oplus x_0 \oplus x_2 \oplus x_0x_2 \oplus x_1x_2 \oplus x_0x_3 \oplus x_1x_3$ $y_2 = 1 \oplus x_0x_1 \oplus x_2 \oplus x_0x_2 \oplus x_0x_3 \oplus x_0x_1x_3 \oplus x_2x_3 \oplus x_1x_2x_3$ $y_3 = x_0x_1 \oplus x_3 \oplus x_0x_3 \oplus x_0x_1x_3 \oplus x_0x_2x_3$  The same question is asked in


What happens when ability scores reach 0?

D&D 5E does not seem to have rules for ability score damage (that I could find), although it does mention that if CON is decreased, your maximum HP is reduced. In addition, the Shadow monster in the Monster Manual has a Strength Drain attack that deals 2 Strength damage. The attack says that if a character's Strength reaches 0, the character dies. Are there any general rules for ability damage in 5th Edition?


Finding centroid of cluster of points using R

While searching the web, solutions for finding centroids of polygons come up rather often. What I'm interested in is finding a centroid of a cluster of points. A weighted mean of sorts.  Can you provide some pointers, pseudo code (or even better, an R package that has already solved this) or links of how this issue can be tackled?    @iant has suggested a method to average coordinates and use that for the centroid. This is exactly what crossed my mind when I saw the right picture on .  Here is some simple R code to draw the following figure that demonstrates this (× is the centroid):  xcor <- rchisq(10, 3, 2) ycor <- runif(10, min = 1, max = 100) mx <- mean(xcor) my <- mean(ycor)  plot(xcor, ycor, pch = 1) points(mx, my, pch = 3)       cluster::pam()$medoids returns a medoid of a set of cluster. This is an example from @Joris Meys:  library(cluster) df <- data.frame(X = rnorm(100, 0), Y = rpois(100, 2)) plot(df$X, df$Y) points(pam(df, 1)$medoids, pch = 16, col = "red")


How to Prove $a^3 \cos (B-C) + b^3 \cos (C-A)+ c^3 \cos (A-B)=3abc$?  If $A,$ $B,$ and $C$ are the vertices of the Triangle ABC, and $a,$ $b$ and $c$ is the side opposite to the sides of the triangle.  You may use -  Projection Formula:  $$a=b \cos C + c \cos B$$  and Sine and Cosine Relation too.    My try  $$a^3 \cos (B - C)+ b^3 \cos (C-A) + c^3 \cos (A-B)=3abc$$ LHS = $$ 3(b \cos C + c \cos B)(a \cos C + c \cos A)(a \cos B + b \cos A)$$ $$ 3[ ab \cos B \cos ^2 C + abc \cos A \cos B \cos C +a^2c \cos ^2 B \cos C +ac^2 \cos A \cos ^2B ]+[b^2 \cos A \cos^2 C + b^2c \cos^2 A \cos A+abc \cos A \cos B \cos C + ac^2 \cos A \cos^2 B] $$  Now I can't solve it further because there seems no way to reduce that further.  Thanks :)


Is it valid to include additional predictors into principal component regression?

I performed a PCA on some data related to habitat (different types of vegetation cover, soil water etc.), but there were some variables that I did not include in the PCA because they were not strongly correlated with any of the other variables. I selected the first three principal components from the PCA whose eigenvalues were above 1.  Now I want to run a multiple regression to analyse what variables will predict bird density. Is it valid to include my three principal components as well as the variables that I did not include in the PCA into this regression?


How can I change the color of a word without using html tags?

I want to put the first word(title:) in bold in a text only with css, no html tags title: description


Movie about a magic school with boy who can shapeshift into eagle or falcon

It is a live-action movie. I saw it long ago on TV. It was released before 2010 for sure, and probably earlier. The channel was probably TV2 or RTL klub, which are commercial channels in Hungary in Central Europe. Please note that I saw it long ago, so the details are a bit hazy; however, I remember a few very specific moments:  It was about a magic school with wizards. The main character was a boy who can shapeshift into an eagle or falcon. Once he used his shapeshifting skill to annoy his friend. When this happened a teacher reminded him of a story where a man turned into a bear and couldn't turn back and because of this, his own family had to kill him. (This is probably just an insignificant moment in the movie.)  I also remember that in the end there was a key they had to make, which was a puzzle with three pieces. It probably opened some door, and the last piece of the puzzle was a girls' pendant that was in front of them all along.


Reclassifying only part of raster keeping rest unchanged?

I'm trying to reclassify only a certain part of a raster...not the entire raster.  Here's the problem.  I have a LULC raster of the entire US.  There are some issues with the raster that I want to fix, namely some cells that should be water are classified as wetlands.  These are mainly off the coast, not inland.  However, some cells that are classified as wetlands should really be wetlands (mainly inland) and I don't want these to change.  I plan on using a ZIP Code boundary file to determine which cells are considered "off the coast" and which ones are not.  I have access to ArcGIS 10.1 and R with the appropriate raster packages I need so a solution in either software would be fine.  Can anyone help me figure this out?


How to handle a Tiny Player Character in 5e?

Are there any official rules for tiny characters in 5e?  I have a player who is wanting to play a Sprite character.  I have found what seems to be a balanced race build , but I can't find any official rules for how to handle a tiny character, which is not surprising, since this race is homebrew.   For added context: my player is not the type to try to exploit the rules for combat advantage, he wants to play a Sprite because he read the entry in the Monster Manual and thought it would be fun to role-play one. For a class he is trying to decide between a Ranger or an Oath of the Ancients Paladin.   I found some homebrew ideas,  and , but I am not totally sold on their suggestions.  I was wondering if there is something in the actual rules of 5th edition Dungeons and Dragons that I have missed.  The main problem I have with the suggestions above is from a standpoint of verisimilitude.  I just can't picture a tiny creature (probably about a foot to a foot and a half tall) being able to wield a longsword that nearly twice as tall as they are, even if they had to use two hands.  Even using normal daggers would be cumbersome, since the grip would have such a large girth compared to their tiny hands.  Is adapting from 3.5e to 5e a good option?  Have you tried applying the old size adjustment rules from 3.5e (swapping a Str penalty for a Dex boost, increasing AC and to-hit, bonus to stealth, etc.) in a 5e context?  I may just like those rules because they were what I used the last time I had to deal with this situation.  Are there any pitfalls or potential unbalance that I may not be seeing if I go with this approach?    Is there a more 5e way to do things?  Is there a better way to do this that fits more seamlessly in 5e game mechanics? Would there be any special considerations for getting Advantage or Disadvantage if you are a Tiny character, for example?


How to convert date time from UTC to local time zone in xamarin

I want to convert UTC time zone to local time zone. I use this code to convert from long object to UTC date time.  public class LongToDateTimeConverter : IValueConverter {     DateTime _time = new DateTime(1970, 1, 1, 0, 0, 0, 0);      public object Convert(object value, Type targetType, object parameter, CultureInfo culture)     {         long dateTime = (long)value;          return $"{_time.AddSeconds(dateTime).ToString("HH:mm:ss tt")} UTC";     }      public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)     {         throw new NotImplementedException();     }  After I display the utc time zone with this code:  <Label Text="{Binding WeatherDataCurrent.Sys.Sunrise, Converter={StaticResource longToDateTimeConverter}}"                                 HorizontalTextAlignment="Center"                                Grid.Row="1"                                Grid.Column="0"                                TextColor="White"                                FontAttributes="Bold"/>  How to convert this UTC time to local  time ?


How do I move the dialog in the login screen?

I have a quite wide monitor and it's quite annoying to see the login dialog in the login screen on the far left side of my screen. I literally have to turn my head around to look at it!  Is there a way to center the login dialog?


I get an error when i try to update YouTube-dl in 18.04

When I type youtube-dl -U, I get this error:  youtube-dl: error: youtube-dl's self-update mechanism is disabled on Debian. Please update youtube-dl using apt(8). See https://packages.debian.org/sid/youtube-dl for the latest packaged version.


Can I travel to Canada with a Valid Visa on a Valid Passport along with Renewed Passport?

I just got my Canada Visa with my current passport which expires on 12/25/2018. I'm planning to travel to Canada on 05/19/2018 and I'm thinking of renewing my passport now, is it okay to renew now and travel with Valid Visa on a Valid Passport along with Renewed Passport? or do I have to renew my Passport after my Canada Visit?


How to get a random number from compiler

I'm creating a simple card game where cards are created using random number. I want to use the random number as a score int. Is there a way to add the random number used to generate specif card? For example random number for level:5. Totalscore = totalscore + RandomNumber.  Card Class  public class clsCard {     //Main variables of my program     private int value;     private int level, object;     private final int MaxFaceValue= 10;     private static String[] objects =  {"Joker","hearts","spades","diamond","clubs"};     private static String[] levels = {"Joker","Ace","2","3","4","5","6","7","8","9","10","Jack","Queen","King"};      public clsCard()  {         this.level= (int)(Math.random()*levels.length);         this.object= (int)(Math.random()*objects.length);     }      public @Override String toString() {          if(levels[level].equals("Joker") || objects[object].equals("Joker"))             return "Joker";         else             return levels[level] + " of " + objects[object];     }      public int getLevel() {         return level;     }      public int getObject() {         return object;     } }   Main program  clsCard cardFace = new clsCard();            System.out.println(cardFace);


Restore Default Permissions in Windows 8

I recently changed the owner of Windows 8.1 "Windows" folder (C:\Windows) to me (I am the administrator so I changed the owner to  ComputerName\Administrators and removed privileges of the regular users.   I was trying to limit one of the user's access then this led to a  total disaster -- almost all of the installed applications won't work and system default applications won't work.  Is there is any way to undo this and restore defaults ?


Understanding domain registration and dns lookup

I want to understand the process of how your domain gets queried from dns servers after purchasing a domain. I have not yet tried hosting and have no plans atm but I am eager to learn.   Here is what I have deduced so far (some are still speculations as I could not find the exact details of how it works). First, after purchasing a domain from the registrar, you will configure the DNS servers that will be authoritative for your domain in the registrar's DB. I speculate that aside from the names of the dns servers you will also configure the IP addresses of your name servers so a dns lookup on the registrar's DNS servers can give the IP of your authoritative name servers. Also, a whois look up for your domain would return the name servers you have configured.    Now that people have a way to learn your nameservers ip address, they can query your own authoritative name servers for the ip address of your domains and sub domains.  I know it is much complicated than that, but what I want to clarify is how domain registration works and how TLD name servers KNOW who your name servers are so they can redirect requests for your domain to your name servers. At the moment I think that configuring your name servers in your registrar's db also configures the TLD name servers and the whois database. Is this correct? Or is there a separate process? I am confused whether or not the domain registrar also handles the TLD name servers.


I'm using below query :      select i.name as 'index name',c.name as 'column' from sys.indexes i      join  sys.columns c  on i.object_id = c.object_id;   the query is returning me data like :      clst    bitpos     clst    cid     clst    colguid     clust   cmprlevel     clust   fgidfs     clust   fillfact   However, I want to see my data like:    clst  bitpos, cid,    colguid   clust cmprlevel,  fgidfs  fillfact   I tried with distinct and group by like this. But it's not working:      select distinct(i.name) as 'index name',c.name as 'column' from s     ys.indexes i join  sys.columns c  on i.object_id = c.object_id group by i.name;   Could any one please help with this. I'm using mssql


Rotational mechanics collision problem of a rod and body

Smooth ball of mass  m moving with a uniform velocity  0 v strikes a  smooth uniform rod AB of equal mass m , lying on a frictionless  horizontal table. The ball strikes the rod at the end A, perpendicular to  the rod, as shown in the figure. The collision is perfectly elastic   ()


I was wondering why electrons orbited protons rather than protons orbiting electrons.  My first thought was that it was due to the small amount of gravitational attraction between them that would cause the orbit to be very close to the proton (or nucleus). The only other idea that I would have is that the strong interaction between protons and neutrons have something to due with this.  I have heard that the actual answer is due to something in QM, but haven't seen the actual explanation. The only relation to QM that I can think of is that due to a proton's spin and the fact that they are fermions, the atomic orbitals should be somewhat similar. Do protons have the same types of orbitals, that are just confined by the potential of the strong force?  A related question that came up while thinking of this being due to a gravitational interaction: do orbits between protons and electrons have a noticeable rotation between each other (as the sun orbits the earth just as the earth orbits the sun), or is any contribution this has essentially nullified by the uncertainty of the location of the electron (and possibly proton as well)?


How do I keep terminal line from overwriting itself?

In a terminal window any smaller than fullscreen, if I type in a long command it starts overwriting the current line I'm on. If I type an additional line's worth, it finally moves to the next line. Does anyone know how to fix this?   This is what happens visually:     Edit: These are my prompt settings:  PS1='\[\e]0;\u@\h: \w\a\]${debian_chroot:+($debian_chroot)}\u@\h:\w\033[1m`__git_ps1`\033[0m\$ ' TERM=xterm   .bashrc:    if [ "$color_prompt" = yes ]; then     PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ' else     PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\033[1m`__git_ps1`\033[0m\$ ' fi  # If this is an xterm set the title to user@host:dir case "$TERM" in xterm*|rxvt*)     PS1="\[\e]0;${debian_chroot:+($debian_chroot)}\u@\h: \w\a\]$PS1"     ;; *)     ;; esac


Extend username + password Wi-Fi networks

How can I know if a Wireless Range Extender device is compatible with that WI-Fi networks that ask for not just a password for connection but also for a username?  Do that kind of devices exists?  Do these networks have a specific name?


Markdown tables do not work in spoilers (they do in blockquotes) with the standard syntax. In my mind this should be supported, so I think it's a [bug] rather than a [feature request] :). I tried to circumvent that via writing the table in HTML syntax, which actually works in the preview when editing: >!

Header 1	Header 2

Foo	Bar

   But when you actually post it, it looks like this: (Spoiler with HTML syntax)   Header 1Header 2FooBar  In blockquotes, they work with standard markdown:      Header 1 Header 2     Foo Bar


When I zoom in into my pdf documents I see that the letters are not smooth anymore and show pixels that grow and grow when zooming in more and more. I do now know what package or package combination causes this or which package I have to load to get rid of this IF this is default - but I don't think so. Therefore I just add my preamble as it is with some text:  \documentclass[a4paper,oneside,abstracton]{scrartcl}   \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc}                     %Schriftsatz Dokument   %%Language settings \usepackage[english]{babel}                  %ngerman for German \usepackage{csquotes}                        %[babel,quotes=english] \usepackage{caption} \addto\captionsenglish{\renewcommand{\contentsname}{Table of Contents}}  %%Math, astro, chemical packages and options \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{amsfonts} \usepackage{amsbsy} \usepackage{latexsym} \usepackage{wasysym}                        %astronomical symbols \usepackage[version=3]{mhchem}             %Chemie-Package \providecommand{\e}[1]{\ensuremath{\times 10^{#1}}}  %%Paper adjustments \usepackage{graphicx} \usepackage{epstopdf}                        %if problems with importing .eps graphics \usepackage[a4paper,bottom=3.1cm]{geometry}  %also with command \geometry{options} \usepackage{changepage} \usepackage{titling} \usepackage{booktabs} \usepackage{lscape} \usepackage{multirow} \usepackage{multicol} \usepackage{threeparttable} \usepackage{subcaption}                      %cannot be used with subfigure \usepackage{afterpage} \usepackage{textcomp}                  %textcomp before gensymb gets rid of the warnings "not defining \micro and \perthousand \usepackage{gensymb} \usepackage{soul}                            %for customised working with the text  \usepackage{array} \setcounter{secnumdepth}{4}                  %sets the section number depth \setcounter{tocdepth}{4}                     %sets the ToC depth \usepackage{xcolor}                          %colour e.g. parts of equations \usepackage{tabularx}                    %more customisable tables (used also for eq legend)  \newenvironment{conditions*}                 %equation legend customization {\par     \vspace{\abovedisplayskip}     \noindent     \tabularx{\columnwidth}{         >{$}l<{$} @{\ :\hspace{0.5cm}}         >{\raggedright\arraybackslash}X     } } {\endtabularx\par\vspace{\belowdisplayskip}}  %% Aesthetic spacing redefined \setlength{\parindent}{0pt}                  %kein Einrücken von neuen Abschnitten \usepackage{afterpage}                       %to avoid space before landscape-environment  %%Citations and Referencing \usepackage[]{natbib}                        %replaced by biblatex (more flexible) \bibpunct[, ]{(}{)}{;}{a}{,}{,} \bibliographystyle{authordate1}              %interferes with {natbib}-style-options; other nice ones: astron,authordate1,3 \usepackage[nottoc,numbib]{tocbibind}        %numbering the reference section \settocbibname{References}                   %References->Bibliography: changed back \usepackage{hyperref}                        %load after bib(la)tex \usepackage{doi}  \begin{document}  ABCDEFGHIJKLMNOPQRSTUVWXYZ\\1234567890\\abcdefghijklmnopqrstuvwxyz  \end{document}   Again, my pdf writting looks pixelated when zooming in. What is the solution?


$$x^2=x + x + \cdots + x$$ Where x is repeated on the right hand side x times.  Take the derivative of both sides: $$2x=1 + 1 + \cdots + 1$$ $$2x = x$$ $$2 = 1$$  Where did I go wrong?


Does a GFCI receptacle provide overcurrent protection?

Does a GFCI receptacle provide over-current protection? (note that I'm not referring to GFCI circuit breakers as may be found in a service panel, nor to specialty devices such as an inline plug-in GFCI that may offer over-current protection)  I've checked some GFCI  (note, this link opens a PDF) but haven't found any that mention overcurrent protection, or provide trip curves as would be expected in a circuit breaker datasheet.  So, does a GFCI receptacle provide any inherent over-current protection or must it always be used with a circuit breaker for over-current protection?  This question was prompted by  where the answer suggests using a GFCI outlet as a circuit breaker. This seems like very big misconception of the protection offered by a GFCI, and is potentially dangerous if it leads someone to think that GFCI outlets are the same as circuit breakers.


I'm currently working with some CSV datasets and was wondering whether there are any good (even better if standard) CLI ways of manipulating CSV data. To be more precise, I mainly want to be able to:  vertically concatenate CSVs SQL-style join CSVs on one or more columns


Let $f(x)$ be continuous from $[0, +\infty)$ to $ [0, +\infty)$, and $\int_{0}^{+\infty}f(x)dx$ diverges.

Prove there exists some $a>0$ such that the series $\sum_nf(an)$ diverges.  I think it can be useful to partition $[0, +\infty)$ on $[n, n+1)$ and choose some $a_n$ for every $n$. But I can't understand how to build $a$ from $a_n$. Also I think integral Koshie trapping is useful.


8GB model iPhone 4S is only showing 5.4GB capacity (4.2GB available)

It used to say 8GB capacity in the General > About Settings menu. Now it only says 5.4. I've done a "restore as new" but it's still showing the same.  Help?


How to write contents of a file to new file removing repeated lines

For example, a file file1.txt contains    Hi how are you   hello   today is monday   hello   I am fine   Hi how are you    After the processing of file1.txt it should write to file2.txt and contents should be like this without repeating the same lines.    Hi how are you   hello   today is monday   I am fine     What command can I use to do that in linux terminal?


I need to generate a random integer between 1 and n (where n is a positive whole number) to use for a unit test. I don't need something overly complicated to ensure true randomness - just an old-fashioned random number.  How would I do that?


my objects glitch through plane when i try to make them particals

how do i fix this so the pear objects are actually on the plane instead of inside


Help to clarify the meaning of a power supply's Voltage and Current rating

I've started building some homemade computer kits recently (like the Maximite and the Micromite Companion boards), and they have barrel jacks that accept a DC power supply that are easy to find, but come in a lots of varieties in terms of output voltage and output current.  One computer I built recently recommended a 7.5 V power supply (though anything from 5V to 9V was deemed acceptable) and an output current of 1 Amp (or at the very least 500 mA).  I have a ton of old DC power supplies that can plug into these systems, but none of them match exactly the designer's recommendations, and I'm not sure what's "safe" to use and what could potential damage the system or make it unreliable.  My main questions that I'm hoping to get help with here:  1. If a DC power supply is rated 7.5 V, what difference does it make how much current it can deliver? I understand each component in the system draws some current from the power supply, and that's why the current is clearly labelled on the plug, but then what difference does it make if 1 amps comes from a 5 volt supply or a 12 V supply?   Is there any danger in plugging in a 12 V power supply that is rated at 2.5 amps into a system that is expecting a 7.5 V supply with 1 amps?   Clearly I'm a newb on this subject, so if my questions don't make sense let me know and I'll try to clarify.  Please note: I'm not asking for a recommended power supply for a specific project. What I'm really after is just some basic understanding in how voltage and current relate in a DC circuit. I've looked extensively online and of course there's a ton of information on this, but I'm still left confused on the topic and was just looking for some help here on this site.


How do I determine the number of rows and columns in a gnome-terminal window while resizing?

I'm running Fedora 21 which comes with gnome 3.14. In older versions, when I resized a terminal, a little box would appear that showed the dimensions of the terminal (in columns and rows, not pixels; defaulting to 24x80). Now when I resize the terminal, this box doesn't appear. How do I re-enable this feature, or otherwise determine the number of rows and columns in my terminal?


Any finite set of points in in the projective plane can be defined by two polynomials

According to an exercise in Shafarevich's Basic Algebraic Geometry I     [Prove that] any finite set of points $S\subset\mathbb{P}^2$ can be defined by two equations.   I need to prove this, but I'm struggling to even work out some examples, e.g.   $\{[1:0:0]\}=\mathbb{V}(y,z)$ $\{[1:0:0],[0:1:0]\}=\mathbb{V}(xy,z)$ $\{[1:0:0],[0:1:0],[0:0:1]\}=\mathbb{V}(?,?)$   Any hints for proving the statement, or ideas for coming up with an algorithm for finding the two polynomials? (I would assume that a constructive proof is relatively easy to find, but this question is in the section about dimension in the book, so I'm guessing there might also be some sort of dimensional argument that is not necessarily constructive.)


Is drinking water during or after a meal better?

Is it better to drink water during or after a meal?  Clearly, there are different opinions about this topic.   In this , it is mentioned that drinking water immediately after or during a meal should not make much difference, and in fact doing so actually aids digestion in general.  On the other side, this  says exactly the opposite:     Remember not to drink too soon before or after a meal as the water will dilute the digestive juices.  Drink water an hour after the meal to allow the body to absorb the nutrients.   Which approach is better for health?


Show that $\mathrm{min}(\frac{a}{b},\frac{a'}{b'}) \leq \frac{a+a'}{b+b'} \leq \mathrm{max}(\frac{a}{b},\frac{a'}{b'})$

The general inequality is : \begin{equation}\mathrm{min}(\frac{a_1}{b_1},\dots,\frac{a_n}{b_n}) \leq \frac{a_1+\dots+a_n}{b_1+\dots+b_n} \leq \mathrm{max}(\frac{a_1}{b_1},\dots,\frac{a_n}{b_n})\end{equation}where $a_1,\dots,a_n,b_1,\dots,b_n$ are real non-zero positive numbers. I thought of starting by the easier case $n=2$ but I still have no idea how to compare $\frac{a}{b}$ and $\frac{a'}{b'}$.


Table with numbers in parentheses in siunitx

I would like to format the following table with siunitx package:  \documentclass{article} \usepackage{booktabs} \usepackage{siunitx}  \begin{document}  \begin{table} \centering \begin{tabular}{S[table-format=3.0]ccc} \\ \toprule $n$ & A & $\alpha_0$ & $\beta_0$ \\ \midrule 100 & ML & 3.1525(0.3580) & 0.4773(0.1209) \\ 200 & YW & 3.1866(0.3272) & 0.4593(0.1075) \\ 300 & ML & 3.1540(0.2660) & 0.4834(0.0858) \\ \bottomrule \end{tabular} \end{table}  \end{document}   The critical are 3rd and 4th column which are in the format X.XXXX(Y.YYYY). Any suggestion how to properly format the columns?


Copy and paste between 2.79/2.80 and 2.81a+

I keep multiple Blender versions due compatibility reasons. In the past when I needed to transfer an something from an already open 2.79 file to a 2.80 file I could simply copy the object, Alt+Tab to the 2.80 window, paste it. No need to go the extra steps of diving in the Append file explorer and navigating all the way to the right folder and object when I already got it selected in another Blender instance.  The same can't be done in 2.82. It's like 2.82 uses a clipboard apart from past Blender versions. Whatever is sitting there can't be overwritten by objects coming from 2.80 and older instances. I dug up a 2.81a version I downloaded some months ago but never touched and it seems to suffer from the same issue, sharing this separate clipboard with 2.82.  End result: I can only copy object between 2.81a and 2.82 instances.  Is that a bug with my installations? Am I doing something wrong? Or is this lack of backward compatibility of the clipboard by design?


Why did Harry have to think so hard about how to breathe underwater?

In "Harry Potter and Goblet of Fire" Harry, Ron and Hermione go through countless books in the library to find out how Harry could breathe underwater. How come that the Bubble-Head Charm wasn't mentioned anywhere?


Prove that the directrix-focus and focus-focus definitions are equivalent

(NOTE: This is my attempt at answering  and  , but I rewrote it in order to make it easier for me to solve. Also, I've made . Note that .)  We have two definitions of an ellipse and a hyperbola.   An ellipse is the locus of points that has a constant ratio of distance between a focus (point) and a directrix (line), where that constant ratio is between 0 and 1.     Here, the eccentricity is $\frac C A$, which, by this definition, must be a constant less than 1 for every point on the ellipse.   A hyperbola is the locus of points that has a constant ratio of distance between a focus (point) and a directrix (line), where that constant ratio is greater than 1.     Here, the eccentricity is $\frac{C_1}{A_1}=\frac{C_2}{A_2}$, which, by this definition, must be a constant greater than 1 for each point on the hyperbola.   An ellipse is the locus of points which has a constant sum of distances between two foci.     Here, the eccentricity is $\frac{F}{D_1+D_2}$. According to this definition, $D_1+D_2$ is a constant for every point on the ellipse, so we’ll just call it $D$. Obviously, $F$ is constant since it is just the distance between the foci, which doesn’t change.   The hyperbola is the locus of points which has a constant difference of distances between two foci.     Here, the eccentricity is $\frac{F}{D_2-D_1}$. According to this definition, $D_2-D_1$ is a constant for every point on the hyperbola, so again, we’ll just call it $D$. Obviously, $F$ is constant since it is just the distance between the foci, which doesn’t change.  My question is:  $$\text{How do I prove these definitions are equivalent?}$$


Why does my switch case work here, but if does not?

I am learning how to use Lists, and in my following example the switch case works but (what I deem as) the equivalent if statement does not. Can you tell me why?  public class Kapitel14 {  public static void main(String[] args) {      ArrayList<String> testList = new ArrayList<String>();     testList.add("Cousin");     testList.add("Doof");     testList.add("Dorf");     testList.add("Dortmund");     testList.add("Franz");     System.out.println(listCount(testList)); }  public static int listCount(ArrayList<String> newList) {      int capDCounter = 0;     for (String element : newList) {         String firstLetter = Character.toString(element.charAt(0));         switch (firstLetter) {             case ("D"):                 capDCounter++;                 break;              default:                 continue;         }          //if I use this instead it returns wrong results:         //if (firstLetter == "D")          //  capDCounter++;     }     return capDCounter; }


Error: java.lang.NullPointerException error for map reduce program

i map.java class i try to send the filename by this   context.write(new Text(stringWord), new Text(fileName))  recude.java   import java.io.IOException;   import org.apache.hadoop.io.*;  import org.apache.hadoop.mapreduce.*;   public class Reduce extends Reducer<Text, Text, Text, Text> {  @Override public void reduce(Text key, Iterable<Text> values, Context context) throws IOException, InterruptedException {     int sum = 0;     MapWritable occurenceInFile = new MapWritable();     for (Text val : values) {         if(occurenceInFile.containsKey(val)) {             occurenceInFile.put(val, new IntWritable(1));         } else {             IntWritable occurence = (IntWritable) occurenceInFile.get(val);             occurenceInFile.put(val, new IntWritable(occurence.get() + 1));         }         sum += 1;     }     String result = key.toString() + " (";     boolean flag = false;     for (Writable filenameWritable : occurenceInFile.keySet()) {         if (flag) {             result += ", ";         }         String filename = ((Text) filenameWritable).toString();         result += filename + "=" + ((IntWritable) occurenceInFile.get(filenameWritable)).toString();         flag = true;     }     result += ")\nTotal occurence of \"" + key + "\": " + Integer.toString(sum);      context.write(key, new Text(result)); } }   error code this error code is show in stderr  Error: java.lang.NullPointerException at Reduce.reduce(Reduce.java:18) at Reduce.reduce(Reduce.java:6) at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:180) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:656) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:394) at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:172) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:415) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1657) at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:166)   i begin to write a wordcount program, but i still do not know how to fix this error.


pgfplots is not quite comfortable plotting sqrt(x) near x=0. The graphic can be improved by setting samples=2000 (not less), but this seems overkill to me.  Is there a way to plot x as a function of y, while keeping the x axis horizontal and the y axis vertical? This would solve the issue of plotting sqrt(x) by simply replacing it with x=y^2.  \documentclass{article}  \usepackage{pgfplots}  \begin{document}  \begin{tikzpicture}  \begin{axis}   \addplot[] {sqrt(x)};   \addplot[] {-sqrt(x)};  \end{axis} \end{tikzpicture}  \end{document}


Can I use a variable which has a non-linear relationship to the dependent variable in logistic regression?

Let's say I am building a logistic regression model where the dependent variable is binary and can take the values $0$ or $1$. Let the independent variables be $x_1, x_2, ..., x_m$ - there are $m$ independent variables. Let's say for the $k$th independent variable, the bivariate analysis shows a U-shaped trend - i.e., if I group $x_k$ into $20$ bins each containing roughly equal number of observations and calculate the 'bad rate' for each bin - # observations where y = 0 / total observations in each bin - then I get a U shaped curve.  My questions are:   Can I directly use $x_k$ as input while estimating the beta parameters? Are any statistical assumptions violated which might cause significant error in estimating the parameters? Is it necessary to 'linearize' this variable through a transformation (log, square, product with itself, etc.)?


Does dividend capture strategy work? What are the tricks to make it work?

Title says it all. I buy around say, for e.g. $10,000 of a stock paying dividends just before the Ex-div date, and buy puts to hedge the move down after dividends are released and then sell off the stock. Rinse and repeat with high yielding dividend stocks like ATnT. Anybody has tried trading this before?


How to center the column headers in a Table?

In a hurry..  \begin{tabular}{p{.5in}|p{1in}|p{1in}|p{1in}} \hline \multicolumn{1}{|c|}{S. No.} & {|c|Book Name} & Author &   \multicolumn{1}{|l|}{Publisher}\\ \hline a & b & c & d\\ \end{tabular}


Hello.  I'm running a server and have added a minigame.  whenever the game is about to start.. it calls onStart() first. Now I get ConcurrentModificationException on this line:  for(Player p : waiting) {   And here is the method:      public void onStart() {     trawler.players.clear();     for(Player p : waiting) {         if(!boat.playerInArea(p)) {             waiting.remove(p);         }     }      for(Player p : waiting) {         trawler.players.add(p);     }      trawler.start();     waiting.clear(); }   if you need the classes, here they are:  TrawlerWaitingRoom.java:  package server.model.minigames.trawler;  import server.model.players.Location; import server.model.players.Player;  public class TrawlerWaitingRoom extends WaitingRoom { private Trawler trawler; //private Location boat = new Location(2668,2674,3165,3185); private Location boat = new Location(2808, 2811,3415,3425);   public TrawlerWaitingRoom(Trawler trawler) {     super(1, 2);     this.trawler = trawler; }  @Override public boolean startGame() {     if(trawler.inProgress()) {         return false;     }     return true; }  @Override public void onStart() {     trawler.players.clear();     for(Player p : waiting) {         if(!boat.playerInArea(p)) {             waiting.remove(p);         }     }      for(Player p : waiting) {         trawler.players.add(p);     }      trawler.start();     waiting.clear(); }  @Override public void onLeave(Player p) {     p.asClient().getPA().movePlayer(2804, 3421, 0);     //p.asClient().getPA().movePlayer(2676, 3170, 0); }  @Override public void onJoin(Player p) {     p.asClient().getPA().movePlayer(2808, 3421, 1);     //p.asClient().getPA().movePlayer(2672, 3170, 1);     if(!isActive()) {         p.asClient().sendMessage(trawler.getGameTime() == 0 ? "The trawler will be returning in less than a minute!" : "The trawler will return in "+trawler.getGameTime() + (trawler.getGameTime() == 1 ? " minute" : " minutes")+"!");     } else {         p.asClient().sendMessage(getTimeRemaining() == 0 ? "The trawler will be leaving in less than a minute!" : "The trawler will leave in "+ getTimeRemaining() + (getTimeRemaining() == 1 ? " minute" : " minutes")+"!");     } }  @Override public Location getLocation() {     return boat; }  @Override public void onTimeChange() {     for(Player p : waiting) {         if(!isActive()) {             p.asClient().sendMessage(trawler.getGameTime() == 0 ? "The trawler will be returning in less than a minute!" : "The trawler will return in "+trawler.getGameTime() + (trawler.getGameTime() == 1 ? " minute" : " minutes")+"!");         } else {             p.asClient().sendMessage(getTimeRemaining() == 0 ? "The trawler will be leaving in less than a minute!" : "The trawler will leave in "+ getTimeRemaining() + (getTimeRemaining() == 1 ? " minute" : " minutes")+"!");         }     } }  @Override public boolean canStart() {     if(trawler.inProgress()) {         return false;     }     if(waiting.size() < minimumPlayers) {         return false;     }     return true; }   }  GroupMinigame.java:  package server.model.minigames.trawler;  import server.model.minigames.trawler.WaitingRoom;  public abstract class GroupMinigame {  public abstract WaitingRoom getWaitingRoom();  public abstract String getWaitingRoomMessage(); }   WaitingRoom.java:   Trawler.java:   Thanks in advance!


Can't block access to photos for iOS application - strange situation

I have an application to which I gave access to photos several years ago. Now I want to prevent the application from accessing photos, but the application is missing in Settings -> Privacy -> Photo. If I reinstall it, it immediately has access to the photos and does not ask for permission. Updating to newest iOS 14.6 and resetting Settings -> General -> Reset -> Reset Location and Privacy doesn't help.


How it should look:   The above picture is a startup file that is working perfectly!  But the file which I am working on is looking strange! And it is actually:  When it was a new file, it had all the options, but now they disappeared!  How do I fix this?     Also when I am in Edit Mode it does not show assign button to assign   material on selected faces


Why can't cameras perform HDR automatically, like smartphones?

I hope this isn't a stupid question. Smartphones have a HDR option, where you can take 1 shot and the smartphone then applies HDR. With a camera, you can't do (to the best of my knowledge) HDR with a single shot. You take successive shots with different EVs obtained by changing the aperture, but other than that, the shots are the same. So time, ISO and frame are untouched: a tripod is used to guarantee that all shots are aligned. The process is fairly mechanical: I only decide if I want to use 1 or 2 stop intervals, which corresponds to 3 or 5 shots.  Why can't this be done automatically by the camera itself? It requires 2 ingredients:   to be able to take multiple shots in rapid succession: most cameras can do that (Burst mode) to be able to modify the aperture automatically. All cameras can do this: exposure time, ISO and aperture are all set by the camera if one uses Auto mode.   In practice, I would set time and ISO, choose the number of shots (or equivalently the interval in stops between successive shots) and the camera would take the shots in rapid succession. It seems both convienient and easy to do. What am I missing?


Does sizeof act different in certain scenarios

I have this piece of code, can it ever evaluate to true? struct type {     char a;     int b;     char c;     float d; } t;  char e; int f; char g; float h;  int out = sizeof(t) == sizeof(e) + sizeof(t) + sizeof(g) + sizeof(h); print("%d", out);


how to print random number 10 times in one line

I want to print 10 random number and I try this: import random number = 10 while number <= 10:    print(random.randint(0,9))    number += 1  but this print next number in the new line. I try below code to fix that but: import random number = 10 my_list = [] while number <= 10:    my_list.append(random.randint(0,9))    number += 1 print my_list  it display number with , and []


I know this might be an answered question, but  doesnt really answer my question. I am wondering if i were to get a chemistry set, could i boil the menthol right out of the leaves in the form of vapor, and then condensate it for further use? This might be a question for the chemistry SE, but it kind of fits here as well.


Media9 is not working when embedding video into beamer

I have a problem when I try to insert videos into a beamer presentation. I am currently using the package media9 to load the video and my .tex file looks like the following:  \documentclass[utf8, 10pt, usenames,dvipsnames]{beamer}  \usepackage[english]{babel} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amssymb} \usepackage{amsthm} \usepackage{anysize} \usepackage{dsfont} \usepackage{graphicx} \usepackage{enumerate} \usepackage{xcolor} \usepackage{booktabs} \usepackage{hyperref} \usepackage[bigfiles]{media9}  \mode<presentation>{\usetheme{Madrid}}  \title{Test} \author{John Doe}  \begin{document} \frame{\titlepage}   \begin{frame}  \centering \includemedia[width=0.4\linewidth, height=0.3\linewidth]{}{mmc7.mp4}   \end{frame}  \end{document}   I am using Overleaf () and I'm opening the document using Preview in OSX. I have also tried using TeXMaker + MikTek in Windows and opening the file using Adobe Reader and I still got the same problem.  Something that looks like a video box shows in the corresponding slide but it can't be played. I have also tried using the package multimedia instead of media9 and I still get the same problem.  What is wrong with my code? How could I fix it?


I am new to Java and android development. I am interested to build an app that can sync a folder from my android phone (Nexus5) to Amazon Web service (AWS). I am trying to build based on an open source project. But, I get the following error for this snippet and unable to locate my mistake. Your feedback will be highly useful at this point.  private void loadFileList(File path) {     this.currentPath = path;     List<String> r = new ArrayList<String>();     if (path.exists()) {         if (path.getParentFile() != null) r.add(PARENT_DIR);         FilenameFilter filter = new FilenameFilter() {             public boolean accept(File dir, String filename) {                 File sel = new File(dir, filename);                 if (!sel.canRead()) return false;                 if (selectDirectoryOption) return sel.isDirectory();                 else {                     boolean endsWith = fileEndsWith != null ? filename.toLowerCase().endsWith(fileEndsWith) : true;                     return endsWith || sel.isDirectory();                 }              }              {                 FileDialog a = FileDialog.this;                 //a.super();             }         };         String[] fileList1 = path.list(filter);         for (String file : fileList1) {     <-- Error in this line             r.add(file);         }     }     fileList = (String[]) r.toArray(new String[0]); }   Error:   11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime: FATAL EXCEPTION: main  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime: Process: pavan.syncfile, PID: 24102  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime: java.lang.NullPointerException: Attempt to get length of null array  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at pavan.syncfile.FileDialog.loadFileList(FileDialog.java:149)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at pavan.syncfile.FileDialog.<init>(FileDialog.java:45)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at pavan.syncfile.SendFile$1.onClick(SendFile.java:56)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at android.view.View.performClick(View.java:5198)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at android.view.View$PerformClick.run(View.java:21147)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at android.os.Handler.handleCallback(Handler.java:739)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at android.os.Handler.dispatchMessage(Handler.java:95)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at android.os.Looper.loop(Looper.java:148)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at android.app.ActivityThread.main(ActivityThread.java:5417)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at java.lang.reflect.Method.invoke(Native Method)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)  11-30 01:03:23.880 24102-24102/pavan.syncfile E/AndroidRuntime:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)


How can we consider only unbiased estimator of zero 'based on sufficient statistic'?

According to this answer :     I understand the logic, except following sentense:  [ note: because of sufficiency, we have reduced the problem of showing uncorrelatedness with every estimator of 0 to only have to show it for estimators that depend only on T ]  What about the other statistics that is unbiased estimator of zero but not depend on T?  Is there something that i missed about "because of sufficiency" ?


Let $R$ be a commutative, unital ring and let $I$ be an ideal of $R$. Prove that if $I$ is prime then $R/I$ is an integral domain.   This makes sense, but I'm not sure how to prove it using only the axioms. I know an ideal of $R$ is prime iff $\forall a,b\in R,$ if $ab\in I,$ then $a\in I$ or $b\in I.$ Also, integral domains are commutative, unital, and have no zero divisors. As well, $R/ I$ is the set $\{[a] : a\in R\},$ where $\forall a,b, a\sim b$ iff $a-b \in I.$      How do I show that commutativity preserved by the quotient ring? Also, how do I show that $R/ I$ is still unital?      Is commutativity preserved because $\forall a, b\in R/I, [a][b]=[ab]=[ba]=[b][a]$?      How do I show that if $a,b\in R$ such that $ab=0,$ then $a=0$ or $b=0$?


The the following to add my user to the group:  sudo usermod -aG vboxusers karl   Got the error message:  usermod: group 'vboxusers' does not exist   My groups are as following:  karl adm cdrom sudo dip plugdev lpadmin sambashare vboxsf   I'm using VirtualBox 5.0.14, Ubuntu 14.04, Guest Additions 5.0.14 and Extension Pack 5.0.14. I can see my USB device in my host OS.


Replace the Ctrl+C function with another key in Windows

Is there a way to press a key on the keyboard (for example C) for copying text? I don't want to remap Cto Ctrl+C, basically if C is pressed a copy should happen.


how convert single row transposed into multiple columns

dynamically how to convert single row transposed into multiple columns.


Do I have to use “do” in any “wh-” question?

What did you say?  What you said?   What did you wear? What you wore?    Where did you go? Where you go?    I know that sometimes in English, people do not use “do” in “wh-” questions. I have heard somewhere that people do not use “do” when the answer is a proper noun or a unique thing. Am I right?


What's the best way to get the last N elements of a Perl array?  If the array has less than N, I don't want a bunch of undefs in the return value.


How should lists of questions be punctuated?

If one wishes to pose a series of questions in the form of a list, how would one go about punctuating that list?  For example:  I write to a colleague asking for an update on a project he is working on. I phrase my request like so:     Dear xxx,      How are you doing with regard to:     - Sourcing the moose hair    - Reticulating the splines    - Extolling the virtues of silk underwear    - Estimating the project completion time   In this case, should question marks be placed after each bulleted item? Or should one only be placed after the last item? If this is the case, should semi colons be placed after each item?  E.g.        Extolling the virtues of silk underwear?     Estimating the project completion time?      or        Extolling the virtues of silk underwear;     Estimating the project completion time?


Hotkey to instantly switch to a window of a specific application

One can switch between running applications with Super+Tab or Alt + Tab. This requires visual feedback - you have to look at the screen and press Tab or Shift + Tab a certain number of times to cyclically select the needed application. This could be annoying if a lot of applications are running and you need to switch between them frequently.   So my question - is it ever possible (maybe some utilities exist) to 'bind' a specific keyboard shortcut to a specific application to instantly switch on its window without visual feedback?   For example in modern web browsers you can press Alt + 1 to instantly switch on the first tab, Alt + 2 to instantly switch on the second, etc. It would be wonderful to have similar functionality for application windows. Press Alt + Tab + 1 and go to browser, Alt + Tab + 2 and go to source code editor, Alt + Tab + 3 to mail client, Alt + Tab + 4 to messenger, etc  EDIT: The solution is Super + N, where N is 1, 2, 3, ...9. It may be required to set this config in dconf utility: org.gnome.shell.extensions.dash-to-dock click-action 'minimize'


"It's time something was / were done about the problem."

It's time something was done about the problem.   It is a sentence from Murphy's "Grammar". Using was confused me, for me it should be were. It looks like this clause is in subjunctive mood—something that is unreal / imaginary, and in that case you always use were for any object.  Unless, of course, it is not the subjunctive mood, what would knock me down.


How would I find a minimum weight spanning tree for W?

If I were to let $W$ be the weighted graph formed by taking a complete graph $K_5$ on five vertices 1, 2, 3, 4, 5 with the weight of each edge $\{x,y\}$ given by $(\{x,y\}) = x + y$, how would I find a minimum weight spanning tree for $W$?


How to force HTTP for some pages in HTTPS forced website with htaccess?

A part of my htaccess that redirects HTTP traffic to HTTPS looks like this:  RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule ^.*$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]   I need allow some pages (lets say /page1, /page2) be HTTP only. Thanks!


If $A$ is compact and $B$ is closed, show $d(A,B)$ is achieved

Let $A, B$ be subsets of a metric space $X$. If $A$ is compact and $B$ is closed, show that the distance between $A$ and $B$ is achieved.   Attempt at a proof:    Let $A$ be compact and $B$ be closed. Let $m=d(A,B)=\inf_{b\in B} d(A,B)$. Then, there are two possibilities: (a) $\exists b\in B$, $d(a,b)=m$. If this is the case, we're done. (b) $\forall b\in B$, $d(a,b)>m$. In this case,     there exists a sequence $\{b_n\}\subseteq B:$ $d(a,b_n)\rightarrow m$ as $n\rightarrow\infty$ by definition of infinum. Then there exists a subsequence $\{b_{n_k}\}$: $d(b_{n_1},a)>d(b_{n_2},a)>...$ which is monotonic decreasing. Then note that $d(b_{n_k},a)<d(b_{n_1},a)<\infty$. So it's a bounded sequence. Now I want to show that it has a convergent subsequence that converges to $b\in B$ and then I want to do the same for $A$. And then finally to show that $d(a,b)=m$ in fact. Any clues to how to get there?


Put brackets around value and uncertainty with exponent in tables with siunitx

I have a number with an exponent and an uncertainty that I want to display in an S-column in a table. When I just put it in, the spacing is terrible, and if I tell the column how much space to reserve for the number, the brackets around the value and the uncertainty disappear, making the expression faulty.  It looks something like this:  \documentclass{article}  \usepackage[separate-uncertainty]{siunitx}  \begin{document}  \begin{tabular}{| S | S[table-format=1.2(2)e-1] |}     {not reserved}  &   {reserved}  \\     1,72(53)e-3 &   1,72(53)e-3 \\ \end{tabular}  \end{document}     How can I aovoid this but still have a nicely spaced table?


Transplant Windows 7 HDD between dell machines

I have a Dell Optiplex 380 machine and the motherboard's video chipset died and I needed the data on the HDD, and I would like to keep the Windows 7 installation intact.  So I took another fully working Dell Optiplex 780 and I installed the same WD Caviar Blue HDD in it. Windows wouldn't start, so I then proceeded to do a boot repair and ran the standard bootrec/bcd repair commands and I managed to get it to the "Error Recovery" / "Boot Selection" screen (where I can tell it to start windows normally or in Safe mode).  However, when booting Windows, with automatic restart disabled on error, I see a blue screen of death stop error code 7b.  I'm pretty sure it's related to the HDD drivers.  So I updated the bios and fiddled with the raid/ahci options, but it's just doing an infinite loop type reboot with the BSOD.  Anybody know how I can install the drivers on the OS via command line?  If presented with this case, does anybody know any recommended solutions to get Windows 7 to boot?  Thanks


Why the following error appears when using rm -rf * in my current location?

I have tried to remove all folders from my current directory using Linux command rm -rf *. But the following error occurs and the respected folder is also not deleted.  rm: cannot remove ‘Xenon_R3_S/Datapath_r/ver/.nfs000000000409508f0003f7b0’: Device or resource busy


I ran this command on my ubuntu 12.04 by mistake:  chown someuser / -R   On RHEL it would be fixed by this command:  rpm --setugids -a   Is there anyway to fix it in ubuntu server?


While creating a new folder I didn't realise that in BASH ' is a special character, which means I ended up with a folder named  One Flew Over the Cuckoos\ Nest\ \(1975\)?quit?quit()?ls??????????   or to be precise  drwxrwxrwx    1 root     root             0 Mar  8 23:21 One Flew Over the Cuckoos\ Nest\ \(1975\)?quit?quit()?ls??????????   which is making my terminal freak out: Tab completion doesn't find it at all. If I try to open it via its inode I get an error:  LibreELEC:/var/media/MYNAME/Films # rm -r "$(find -inum 187)" rm: can't remove './One Flew Over the Cuckoos\ Nest\ \(1975\) quit quit() ls': No such file or directory   How badly did I mess up?


I have this loop   String str = "123";  byte[] bytes = str.getBytes();   for (byte b : bytes) { System.out.println(b);  }  //output: 49 50 11 (ASCII for 1 2 3)   My question is, how does b increment?


This is a question from .  The question is   Prove that it is not possible to partition $\mathbb N$ into finitely many infinite AP's with distinct common differences.(other than the trivial $a=d=1$)  Infinite AP:=$\{a,a+d,a+2d,......\}$.I have no idea as to how to approach it. Any hints are welcome. Thanks.


Selecting the "What" field in a Task using an SOQL request

I'm looking for a way to do a SOQL request to get a Task record, but I keep ending up with this error:     Error: Compile Error: No such column 'What' on entity 'Task'. If you   are attempting to use a custom field, be sure to append the '__c'   after the custom field name. Please reference your WSDL or the   describe call for the appropriate names. at line 59 column 25   The 'What' field is labeled as 'Related To' (it's a standard field of the Activity object).  Here's my request generating this error:  Task task = [SELECT Type FROM Task WHERE What = :this.person.Id];   Thanks for your solutions.


What is the advantage of using sudo apt-get autoremove over a cleaner app?

I'm not sure what sudo apt-get autoremove does, but have read that you should use this command to remove any unnecessary packages.  One of the processes I saw was to use sudo apt-get autoremove and then use something like  to remove temp files etc.  Can you explain what sudo apt-get autoremove actually does and is there any advantages of using this command over something like BleachBit or  by themselves?


Unable to change ownership from root to my user

I am trying to change files so my user owns them, instead of root.  I've searched this forum.  I am getting the same error several hundred times for each command.    This syntax  sudo chown -v -R rpiggott:rpiggott /media/rpiggott/782f830c-c965-4960-8ed2-f8433bfaf8ce/Laptop/PhpstormProjects   is giving me this error message:  chown: changing ownership of '/media/rpiggott/782f830c-c965-4960-8ed2-f8433bfaf8ce/Laptop/PhpstormProjects': Read-only file system   This syntax  sudo find /media/rpiggott/782f830c-c965-4960-8ed2-f8433bfaf8ce/Laptop/PhpstormProjects -type d -exec chmod 755 {} \;   is giving me this error message:  chmod: changing permissions of '/media/rpiggott/782f830c-c965-4960-8ed2-f8433bfaf8ce/Laptop/PhpstormProjects/mypainmanagementtracker.net/public/layout': Read-only file system   I've also tried the approach of remount  sudo mount -o remount,uid=1000,gid=1000,rw /dev/sdb1   Which produces the error message  mount: /media/rpiggott/782f830c-c965-4960-8ed2-f8433bfaf8ce not mounted or bad option   The command  sudo parted -l   Gives the result  Model: WD My Passport 0741 (scsi) Disk /dev/sdc: 1000GB Sector size (logical/physical): 512B/512B Partition Table: msdos Disk Flags:   Number  Start   End     Size    Type     File system  Flags  1      1049kB  1000GB  1000GB  primary  reiserfs


Give access to a specific group and all the user who belong to this group and root? [Terminal]

I wanted to give permission to sample.txt such as it can only be written by root and executable by the group created by me ( samplegroup) . If any user is added into this group will be allow to execute the file .


Monotonically decreasing sequence/series proof

I have a proof that I'm working on and it goes like this:  Assume $a_k > 0$ and $a_k$ is monotonically decreasing. Show that: $$\sum_{k=1}^\infty a_k < \infty \iff \sum_{k=0}^\infty b_k < \infty$$  where $b_k = 2^k a_{2^k}$  My problem is that I don't know where I can start versus what I have to show beforehand. Do I start by showing that since $a_k > 0$ and it is monotonically decreasing, then we also assume that $\sum_{k=1}^\infty a_k < \infty$ and use that assumption to get to the RHS of the relationship?  I'm still fairly new to proofs, so I'm not sure, but think that this is how it works.  However, I don't have much of a good idea on how to show that the left-hand side is true only if the right hand side is true.  Any and all help and encouragement is appreciated.


Label ID detection upon click with for tag

I have labels with for="#input_id" tag as illustrated below. However, multiple labels trigger the same input field (with id) to attach a user selected file. I want to now which label triggered the input field.  Document1 Document2 Document3 Document4  <input type="file" id="input1" accept="application/pdf" />  $("#input1").change(function() { //some js for checking file type and file size etc //looking for some code to findout which label clicked to trigger file input   });   When i click labels it triggers input field however i need to know which label clicked to save file path to suitable div by using data-fpath="some path".  I use jquery however any javascript solution is OK for me.


How would you remove everything between all instances of brackets like in  var item = '
1. Get this   more text
'  I've tried using the solution from  with the global tag, formatted like : item = item.replace(/\/<.*>/, ''), but that just outputs nothing.  Really lost here


I saw somewhere that the above integral is equal to $\pi/4$ for all real number $m$.  This seems to be surprising. Does anyone have a nice proof?


I am getting this type of array when i try to push object into an array in jquery

while inspecting in browser, I am getting this type of array and I am unable to access 0th index of array.  function xyz() { var obj={ name: "abc", age: "20"   var VArr=[]; VArr.push(obj); }    [] 0:Array(1) 0:{name:"abc",age:"20"}


Will I Need a transit Visa if I plan to fly through Heathrow UK?

I booked a flight to London and another separate ticket to Boston. I have an F4 immigrant visa to the US that expires on June 18. Will I need a transit visa? If y'all can't answer me, who should I call to ask? I need to get my baggage as well.


How do I update the global integer variable locally?

everyone.  First of all, I am not sure if the question was praised properly but I tried as best as I could. Also, do note that I just started learning Python because I wanted to create a simple computer program I wanted to use. I wanted to ask question here because I encountered a problem that might seem easy to pros but I can't seem to figure out the solution.  Here is the code I wrote...  from tkinter import * from tkinter import ttk from PIL import Image, ImageTk  class Application(Frame):     def __init__(self, master):         ttk.Frame.__init__(self, master)          self.grid()         self.create_widgets()         self.FIDSIA_Amount()      def create_widgets(self):         self.label1 = Label(self, text='Type').grid(row=1, column=12, sticky=E)          self.Type = ttk.Combobox(self, width=7, textvariable=varSymbol, state="readonly")         self.Type['values'] = ('--------', 'A','B','C')         self.Type.grid(row=1, column=13)         self.Type.bind("<<ComboboxSelected>>", self.adjustmentFIDSIA_Planet1)      def adjustmentFIDSIA_Planet1(self, event):         content = self.Type.get()          if content == 'A':             varP1f = 0             varP1ind = 12             varP1d = 1             varP1s = 0             varP1inf = 0             varP1app = -15         elif content == 'B':             varP1f = 0             varP1ind = 12             varP1d = 1             varP1s = 0             varP1inf = 0             varP1app = -10         elif content == 'C':             varP1f = 0             varP1ind = 12             varP1d = 1             varP1s = 0             varP1inf = 0             varP1app = -5         elif content == '--------':             varP1f = 0             varP1ind = 0             varP1d = 0             varP1s = 0             varP1inf = 0             varP1app = 0      def FIDSIA_Amount(self):         amountf = Label(self, textvariable=varP1F)         amountf.grid(row=1, column=1)         amountind = Label(self, textvariable=varP1Ind)         amountind.grid(row=1, column=3)         amountd = Label(self, textvariable=varP1D)         amountd.grid(row=1, column=5)         amounts = Label(self, textvariable=varP1S)         amounts.grid(row=1, column=7)         amountinf = Label(self, textvariable=varP1Inf)         amountinf.grid(row=1, column=9)         amountapp = Label(self, textvariable=varP1App)         amountapp.grid(row=1, column=11)  root = Tk()  varP1f = IntVar(root) varP1ind = IntVar(root) varP1d = IntVar(root) varP1s = IntVar(root) varP1inf = IntVar(root) varP1app = IntVar(root)  varSymbol = StringVar(root, value='--------') varP1F = StringVar(root) varP1F.set(str(0+varP1f.get())) varP1Ind = StringVar(root) varP1Ind.set(str(0+varP1ind.get())) varP1D = StringVar(root) varP1D.set(str(0+varP1d.get())) varP1S = StringVar(root) varP1S.set(str(0+varP1s.get())) varP1Inf = StringVar(root) varP1Inf.set(str(0+varP1inf.get())) varP1App = StringVar(root) varP1App.set(str(0+varP1app.get()))  app = Application(root)  root.mainloop()   So, basically, I created a window with 6 numbers in it and next to it, there is a combobox dropdown menu listing 4 items (--------, A, B, C). What I want to do is when -------- is selected in combobox, I want 6 digits to be 0. However, if I select A in combobox, I want the 6 digits to be updated in the window by adding each of the 6 variables on 0. So, when I choose A, it will look like "0 12 1 0 0 -15" instead of "0 0 0 0 0 0". With current code, I can't seem to do it. PyCharm shows 6 variables: varP1f, etc... have error -> local variable value is not used.  How can I fix this problem?


How does one solve this equation?     $$\cos {x}+\sin {x}-1=0$$   I have no idea how to start it.  Can anyone give me some hints? Is there an identity for $\cos{x}+\sin{x}$?  Thanks in advance!


Does higher AIC correlate with higher adjusted R squared?

I have fitted two models.  Model 1 has 264.514 less AIC than model 2, a drop from circa 7800 to circa 7500.  However, model 2 has adjusted R^2 equal to 40 percent, while model 1 has it at 36.8 percent.   What gives? I thought such a significant $\Delta AIC$ would most likely also increase the adjusted R squared?   If it helps: model 2 and model 1 are identical, except model 1 has an exponential correlation structure with a nugget.


Would commanding a Ranger's companion pony to dash be an action?

Recently I started leveling up in Ranger class, and I looked into the Beast master Ranger archetype and something bothered me. If a character decides to have a Pony as a Companion, would commanding him to Dash (Dodge or Disengage)  take an action.     Ranger's Companion      At 3rd level, you gain a beast companion that accompanies you on your   adventures and is trained to fight alongside you.       Choose a beast that is no larger than Medium and that has a challenge   rating of 1/4 or lower. Add your proficiency bonus to the beast’s AC,   attack rolls, and damage rolls, as well as to any saving throws and   skills it is proficient in.      The beast obeys your commands as best as it can. It takes its turn on   your initiative, though it doesn't take an action unless you command   it to. On your turn, you can verbally command the beast where to move   (no action required by you).   Commanding it to move would not take an action but commanding something else would. And it can be a Ranger's companion since it is medium, has a 1/8 challenge and it can even be a mount since my character is a Halfling.


Creating a new file with touch command actually creates eight unlisted files?

Have a look at this screenshot:    $ mkdir someDir $ cd someDir $ ls -l total 0 $ touch someFile $ ls -l total 8 -rw-rw-r-- 1 user user 0 Nov 5 01:29 someFile   Pardon for my language used when I installed Ubuntu. Anyways, it is beyond my imagination how come creating an empty file actually creates eight files, alas, the extra seven won't be listed more than have their saying in the statistics. The total column clearly says eight. I'm using Ubuntu 12.10 x86. Also, in my Nautilus file explorer, I have checked the option to view hidden and system files. Maneuvering to the new someDir directory won't show more than just one file, the someFile file. So is the total count lying in my face or are there even more hidden files than the "ordinary" hidden files? I'm keen to know exactly what files gets created here, why so, and how come I can't list them.  As a side note, adding the sudo prefix to the ls -l command won't make any difference for me.  Thank you so much in advance.


Why does a delta/wye transformer make 30 degrees phase shift ?

I'v heard that a delta/delta or Wye/Wye transformers do not make any phase shift. In delta/wye or wye/delta transformers, There is a 30 degrees phase shift between the primary and secondary coils. So, Why is  there a phase shift ? and Why is it 30 degrees ?.. Why not 60 or 120 ?  I googled and I found calculations with phasor diagrams that proves the 30 degrees phase but I'm confused because of too many calculations and diagrams, I didn't get it.  Would you give me a simple answer, please ? and I prefer the physical meanings and concepts rather than equations and mathematics.  Thank you very much,


I know that one can time travel to the past through wormholes. But what if I use special relativity for that. I mean, If one has to go to the future, he has to increse his velocity, but what about going to the past. I propose that if we increase the velocity of the surroundings of a system while keeping its velocity constant, should'nt we be able to travel to the past?


Visa availability is longer than the availability of the passport

What happens if the visa availability is longer than the availability of the passport?  In my case, a Romanian with a Romanian passport (5 years availability) who wants to get a tourist visa for United States which usually is for 10 years. A fact that might be important, Romania is not in the   Will the visa be considered expired when my passport will expire or it could be used later too (with a new passport, of course).


I'm trying to write a condition that would fit all the lines starting with a space/tab and the word Path  /sPath.* - simple regexp?   I found that in Bash 4.* it should look like:  if [[ $LINE =~ "[[:space:]]Path" ]]   But this condition for some reason does not work.  if [[ $LINE =~ [[:space:]] ]]   work fine,  and displays all lines with spaces/tabs.


I had a some blocks on the dashboard page.  Then I created a new role with fewer permissions and wanted to show only a couple of them on the dashboard.  I edited all blocks and restricted the access by role.  Now all the blocks with restricted content are still visible in the dashboard but they all have the "(empty)" text on it.  How can I get rid of these blocks completely ?


Is it safe to use Ubuntu for personal use?

i've seen some videos where Ubuntu has a lot off advantages over windows 10 and I've switched too Ubuntu now. But since I was so used too have an antivirus protection on windows 10. So I ask, before I Start putting personal files on Ubuntu is it safe to do so?


Can we have class name with alphanumeric character?

Can we name class using alphanumeric values ?like class Tier1, Tier2 and so on.Is this come under good practice. What is the recommendation around naming class. I know this is very generic question and simple one however there were instance during code review I often came across class names which seems to be usual.


Regularity of Checking for plugin updates?

How often does the word press core check wordpress.org for plug in updates? Is it once a day or more? Is checking for updates triggered by some action or filter?