If a user signs in with Facebook, their avatar comes from graph.facebook.com which may be blocked by privacy protection tools

It appears that some privacy protection tools (I use Privacy Badger in Chrome) block the domain on Stack Exchange sites. That means that the avatar doesn't load.  It seems like  describes what I'm seeing. The comment seems to indicate that it may be OK (from a privacy standpoint) to move the setting from blocking the domain to blocking cookies. This resolves the issue of loading the resource. However, the issue has been closed.  I think that more research is necessary, and this research should be done by SE (since they have made the design decision to defer elements to a third-party). If the graph.facebook.com domain is unsafe or tracks users, this should be considered unacceptable behavior and not used on the network. If graph.facebook.com is a safe domain and does not perform any kind of tracking of users, this should be clearly stated. Stack Exchange or an affected user should relay the findings to the makers of these third-party tools (in my case, Privacy Badger, but perhaps others) to find appropriate resolution.  In the mean time, if people are seeing these blocked images, they should be checking the settings on their protection tools. I know this setting made chat look really awful when certain users were in the room.  Related questions:    discusses the use of the Facebook CDN when a user links their SE account to their Facebook account  talks about the implications of having a user's Facebook ID associated with their SE profile.  is for the idea of not using the Facebook CDN to load avatar images, but from the perspective of being able to link an SE profile to a Facebook profile and not a tracking cookie perspective.    is an exact duplicate of the above question.   discusses similar privacy concerns around Gravatar. In my particular case, cookies from Gravatar are blocked, which hampers their tracking ability. Other privacy tools also appear to block Gravatar tracking cookies.


The argument number variable does not count the inputed parameters

I have the following script :  echo  'Please select type file , the name of the input file and the name of the output file:       a.plain ( please press a ) <input_file> <output_file>;      b.complex ( please press b ) <input_file> <output_file>;'  read one two three echo $#  if  [ $# -ne 3 ]; then    echo "Insufficient arguments !"    exit 1; else    echo "Number of passed parameters is ok" fi   $# always outputs 0 , the read command provides the correct variables when I am using $one , $two and $three later in the script    Thank you.


JDK 1.4.2 - where can I download the source?

I want to install Java JRE 1.4.2 or JDK 1.4.2 on a recent Amazon Linux server. The best option so far seems to install from source. However - where can I download this? I believe 1.4 is still from the Sun era, but I can't find it on the  site, and the sun site is gone.  has no 1.4 download afaik.   Where can I download Java 1.4.2 source code?   As the goal is to get the installation working, other options are welcome. I tried to install the bin file, but got an error: cannot execute binary file.


Is there a way to see the reviews of a particular question?

I voted to close a question I thought was too localized, and four days later I see that my close vote has apparently been aged away.  The question only has <100 views right now, so based on , I'm assuming the question was reviewed and people opted to leave it open which then kicked off the close vote aging process.  Is there way for me to see which moronsfellow users thought that the question deserved to stay open without tediously clicking through the close vote queue history?    @Dukeling brings up the important question of motivation for this feature that I didn't address.   First and foremost, I just want to be able to check that the vote-aging system is working correctly (and/or that I understand correctly how it's working). I was surprised that my vote had aged out on a little-viewed question, I want to confirm that this is due to it having been reviewed. Secondly I want to make sure the reviewers are working correctly.  The review queues have had occasional issues with reviewer accuracy. If the particular reviewers seem like reliable folks with a history of correct reviews, I'll assume that I was mistaken about the question and revise my thinking about which questions to close.  If they're all robo-reviewers, I'll flag the question or bring it up on meta to see that it's handled correctly. Finally, philosophically I think that this information should be readily available. I could find the reviews by going through the entire review history, so it's not private information. Making public information less accessible can have its uses, but the outcome that's likely to ruffle feathers is already public; if reviewers opt to close a question, their names are prominently attached to it.  This feature would be more important when the review decision is "Leave Open" as in this case (apparently).  This might lead to more whining, but it seems like only a slight risk.


Get a random record from a huge database

I have to make a small app or webapp (java) can get a random record from a db which has 2 mil records. Can someone give me a suggestion how to do this ?  Each of my record look like : CA0002310032 or TD0002110099. Sorry my English is not good. Thank you.  Edit : here is some records


Confusion in passing an object to a function

while learning C language I have learned that when you pass a variable to a function. you are not passing the variable itself you are passing a copy of it so the actual varible's value will not change unless the function returns a value and you assign that value to the variable. but I just executed this program and this happened when I passed "Newobj" object to a "changer" function and then change the values of the variables and then print the new variables values it is working. It should not happen right? because I am sending the copy of "Newobj" to "copyobj". explain please I am confused.  Note: Explain in detail please. My brain is slow. I know the concepts of c and few concepts of c++;   here is my code:  public class PassObjects { int regno; String name; double per;  PassObjects(int a,String s,double p){     regno=a;     name=s;     per=p; } PassObjects changer (PassObjects copyobj){     copyobj.regno=797;     copyobj.name="Srimanth";     copyobj.per=70.9;     return copyobj;  }  public static void main(String[] args){      PassObjects Newobj= new PassObjects(86,"srimanth",85.4);     System.out.println("The original values of Instance variables are "+Newobj.regno+" "+Newobj.name+" "+Newobj.per);     Newobj.changer(Newobj);     System.out.println("The changeed values of Newobj are "+Newobj.regno+" "+Newobj.name+" "+Newobj.per); }  }   output is here:  The original values of Instance variables are 86 srimanth 85.4 The changeed values of Newobj are 797 Srimanth 70.9


var a = 10  function fun(){      var b = 20  } fun()   In this code var a has global scope but var b dont have global scope but functional scope. But as fun() itself is global function which will be global to everywhere why var b is not global


Example of a linear operator on some vector space with more than one right inverse.

In my preparations for an upcoming exam, I'm working through the past exams available from my department.  One of the questions asks for an example of a linear operator on some vector space with more than one right inverse.  In another part of the same problem, I proved that right-inverse uniqueness implies invertibility, but I feel like I'm missing how that result will help me find or construct an example (assuming that it's applicable.)  I've considered various square matrices (because I'm looking for an operator) over various fields, but nothing has worked yet and I don't feel like I'm going about it the right way.


My polynomial: $2x^3 +7x^2+12x+9$.  Now, I've tried both of the techniques given in , but neither of them worked for this problem. Synthetic division is something which I think would work, but it seems like a lot of work to first use the Rational Zeros Theorem to check all the possibilities using synthetic division and then come up with a quadratic equation.  The solution given is as follows: .  Obviously, one cannot use synthetic division to factor our $(2x +3)$ for the division works only for factors of the form $(x-c)$. So my question is, how do you factor a polynomial like this?


How to compile example from tcolorbox documentation with current TL (2019)?

The definition for marker below is from tcolorbox.doc.s_main.sty. With earlier versions of Texlive (and tcolorbox), this worked fine, but with updated Texlive, it does not.  \documentclass{article} \usepackage{xcolor,tikz,tcolorbox} \usetikzlibrary{shadows} \tcbuselibrary{skins,hooks} \makeatletter % from tcolorbox.doc.s_main.sty \newtcolorbox{marker}[1][]{enhanced,   before skip=2mm,after skip=3mm,   boxrule=0.4pt,left=5mm,right=2mm,top=1mm,bottom=1mm,   colback=yellow!50,   colframe=yellow!20!black,   sharp corners,rounded corners=southeast,arc is angular,arc=3mm,   underlay={%     \path[fill=tcbcol@back!80!black] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);     \path[draw=tcbcol@frame,shorten <=-0.05mm,shorten >=-0.05mm] ([yshift=3mm]interior.south east)--++(-0.4,-0.1)--++(0.1,-0.2);     \path[fill=yellow!50!black,draw=none] (interior.south west) rectangle node[white]{\Huge\bfseries !} ([xshift=4mm]interior.north west);     },   drop fuzzy shadow,#1} \makeatother   \begin{document} \begin{marker}   Hylo! \end{marker}  \end{document}   This gives the following error  ! Package xcolor Error: Undefined color `tcbcol@back'.  See the xcolor package documentation for explanation. Type  H <return>  for immediate help.  ...                                                l.34 \end{marker}  ?   Why are tcbcol@back and tcbcol@frame undefined if they work in the code for the package's documentation? Alternatively, what are the correct names for the colours which were tcbcol@back and tcbcol@frame?  My version of tcolorbox is 2019-09-19.


Sorry if this is perhaps a duplicate of an already answered question. I am very curious of the purpose of being blocked from deleting answers after the limit of 5 daily deletions have been reached?


Let $T^2=S^1 \times S^1$ be a torus, where $S^1 \subset \mathbb{R}^2$ is the unit circle. Is $T^2$ connected? If so, how does one show this?


how do I find which packages build-depend on a certain package

For instance when I run the command -   $ apt-rdepends --build-depends qbittorrent    it gives the output something like -     Build-Depends: debhelper (>= 10)   Build-Depends: dpkg-dev (>= 1.16.1)   Build-Depends: libboost-dev   Build-Depends: libqt5svg5-dev   Build-Depends: libtorrent-rasterbar-dev (>= 1.1.2)   Build-Depends: qtbase5-dev (>= 5.2.0)   Build-Depends: qttools5-dev-tools   Build-Depends: zlib1g-dev   But how do I find which packages for instance use libtorrent-rasterbar-dev which might be in other packages build-depends ? Not depends, recommends or suggests but is a requirement only in build-depends


I've started using dual boot with windows and ubuntu. Windows and Ubuntu 20 are stored in seperate partitions on the same SSD and there is a seperate sda2 (D drive) where I store the rest of my files. After a reboot - I cannot access shortcuts made from the sda2 with the error "Unable to find the requested file". If I go to "Other locations" and the access the sda2 form there it seems to synch and then the shortcuts work. Does anyone have any clue on how to resolve this permanently and what is the baseline issue here? Thanks.


Adding an image texture to a material using python

I am trying to convert a script made for a tool called Noesis to Blender, so far I have gotten it to work, although I cannot find an alternative to this line of code for blender: material.setTexture() I would imagine there is something similar to this, but I can't find anything. So is there an alternative to change the material to an image texture and then assign an image to it, preferably without the use of nodes? Edit: for the most part, I have fixed it, yeah, you have to use nodes. Thanks to everyone that helped out.


Android Sqlite always null even after calling getWritableDatabase()

Good morning stackoverflow lovers :) i wrote my Sqlite class , but there is an error  "Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.database.sqlite.SQLiteDatabase.execSQL(java.lang.String)' on a null object reference"  I know it is because (db) is null , but i already gave it a value of getWritableDatabase() and here is my code      public class sqlite extends SQLiteOpenHelper{     public SQLiteDatabase db;     public sqlite(Context context , String db_name , int db_version){     super(context, db_name, null, db_version, null);     this.db=db();     }      public SQLiteDatabase db(){        if(this.db==null){try{this.db=getWritableDatabase();}catch(Exception e){this.db=getReadableDatabase();}}        return this.db;    }     public void test(table){         db.execSQL("CREATE TABLE IF NOT EXISTS "+table); ***//ERROR db is null , why????***  } }


How to align picture top left in a table?

is there a way to create a table with 2 columns, in the left column should be some text, in the right column should be a picture.  The problem is - to align both to the left, top corner. The image seems to be inserted as an inline object, so it pushes the text down, from the top.                            _____________________                          |                     |                              |                     | Some text is pushed down |                     |   What i want is:  Some text is pushed down  _____________________                          |                     |                              |                     |                          |                     |   Here is the code:  \begin{tabular}{\textwidth}{ l l } Some text & \includegraphics{images/image.png} \\ \end{tabular}


Proving that $K\otimes_{\mathbb{Q}}\mathbb{C}\simeq \prod_{\tau}\mathbb{C}$

I'm taking a course in algebraic number theory and we are starting to discuss lattices and Minkowski theory. We were given this introductory exercise:     Let $K$ be a field of numbers of order $n$ and embbedings $\tau_1, ..., \tau_n:K\to\mathbb{C}$. Show that $\phi:K\otimes_{\mathbb{Q}}\mathbb{C}\to \prod_{\tau}\mathbb{C}$ defined by $\phi(a\otimes z)=(z\,\tau_1(a), ..., z\,\tau_n(a))$ is an isomorphism between $\mathbb{C}$-vector spaces.   I've already seen a solution, which uses linear independence of characters (which I'm familiar with) to prove injectivity and then uses a dimension argument to conclude bijectiviy.   I know I'm able to follow the outline of that proof, but actually my problem is more basic: I just don't know what the sets $K\otimes_{\mathbb{Q}}\mathbb{C}$ and $\prod_{\tau}\mathbb{C}$ actually  mean.   I'm familiar with the tensor product $U\otimes V$, when $U$ and $V$ are both $\mathbb{F}$-vector fields (i.e., both have the same base field), so when I see the notation $U\otimes_{\mathbb{Q}} V$, I assume implicitly that $U$ and $V$ are both $\mathbb{Q}$-vector spaces, but that is not the case with $K\otimes_{\mathbb{Q}}\mathbb{C}$. That is really confusing me: take for example $K=\mathbb{Q}(i)$. What is the canonical basis for $\mathbb{Q}(i)\otimes_{\mathbb{Q}} \mathbb{C}$? How am I supposed to write $1\otimes \sqrt{2}$ in the canonical basis? Like $\sqrt{2}(1\otimes 1)$? But am I allowed to "pull out" an irrational number from the second coordinate like that? Then what does $\mathbb{Q}$ in "$\otimes_{\mathbb{Q}}$" stand for? I can't make sense of it.  Second, I thought $\prod_{\tau}\mathbb{C}$ should be the set of $n$-uples $(\tau_1(a), ..., \tau_n(a))$ where $a\in K$. But then how do I know that $\phi(a\otimes z)=(z\,\tau_1(a), ..., z\,\tau_n(a))$ is of the form $(\tau_1(b), ..., \tau_n(b))$ for some $b\in K$? If there is no such $b$, $\phi$ would not be well defined...  Any help would be useful, thanks in advance!


Working in Sublime Text in a Latex Document, i wondered. Is there any way to compile my document look on the right side of my screen? Like Texstudio.


I'm looking to raise my blinds every morning  using an rpi/Arduino and a motor. The blinds are lifted by a cord that loops near the bottom. I've checked that the cord requires about 20N force to pull down, and the gear turning the cord loop at bottom will have a diameter of 6 cm.  Which motor should I buy?  Min torque needed ~ 20*3 = 60 Ncm. Min speed ~  20 rpm


How to configure idle period for auto locking screen

I just installed a fresh Ubuntu 12.04 (Precise Pangolin).   I noticed that, there is no screensaver settings, which is fine. I like to control the period of time after which the blank screen is shown,which automatically locks the screen.  I do not want to enable screensaver. I only wish to be able to change the idle time period required to lock the screen automatically. It seems to me, it is by default around 10-15 minutes.


What does this line in the Dope Sheet mean?

Every now and then I see this line in the dope sheet connecting key frames. What does this signify?


Sampling Distribution of Exponential Sample Variance (Formal, not Empirical)

Addressing this problem:  Let X1,...,Xn be independent identically distributed exponential variables with parameter θ, i.e. with pdf, f(x)=(1/θ)*exp(−x/θ). What is the distribution of the sample variance, Xbar - Xbar^2?  This is to be done by proof, not by simulation/sampling. Everything online says simulation/sampling, so is there no formal mathematics for determining this distribution?


Why is this if statement in my code ignored?

This code is supposed to reverse a String and then check with if statement if the original String input equals the reversed input. But the if statement never runs, indicating that original String and reversed one aren't the same... even when I input a palindrome.  import java.util.Scanner;  public class TestScannerPalindrome {     static String reverse(String par) {         String reversed = new String();         for(int i = par.length() - 1; i >= 0; i--) {             reversed += par.charAt(i);         }         return reversed;     }     public static void main(String[] args) {         @SuppressWarnings("resource")         Scanner sc = new Scanner(System.in);         String unos = sc.nextLine();         if(unos == reverse(unos)) {             System.out.println(unos + " is palindrome");         } else {             System.out.println(unos + " is not palindrome");         }      }  }


So what I want to prove is the following:  If $f:X \to Y$ is a continuous function and $X$ and $Y$ are metric spaces, then the graph of $f$ is closed.  All the proofs that I’ve encountered in the internet involve some topological concepts that I’m not aware of. I was looking for a proof which would involve only concepts from metric spaces. Any suggestions would be really helpful.


Looking for a one step solution to appending my SSH public key to a server's authorized_keys?

To get my public key onto a server I normal copy the contents of my public key, then SSH into the server, then I run vi .ssh/authorized_keys, then paste my key into the file and save.  There has got to be an easier, one step way using SCP or something like that. Of course I want to append my key to authorized_keys, not overwrite it and the permissions of authorized_keys needs to remain at 600


Are there any racial differences in Starbound?

Are there any differences between the different races in Starbound, besides starting items and how their equipment look?


Stackoverflow keep asking me for reCaptcha

On my mobile phone everytime I ask or answer a question it asks me to fill in a reCaptcha. How can I prevent this. I am using Opera Mini 10 on a Nokia C6.


Relation between slit width and intensity of light in Young's double slit experiment

In some places , it says slit width is directly proportional to intensity while in other places intensity is directly proportional to (slit width)² .


Google Sheets: How can I combine multiple ImportXML results for multiple URLs into a single column?

I want to grab some lists of data from various pages on the web and I'm using IMPORTXML to do it.  Assume I have a list of URLs in column D.  Depending on the URL, the length of the results can be different and I want to have them all in a single contiguous column.  In A1, I've found that the formula  ={IMPORTXML(D1, xpath);IMPORTXML(D2, xpath)}   works for the two URLS in D1 and D2, but I want to be able to pull this off if I have many more URLs listed in the D column.   Going to start with about 10 URLs and add more later, and I will do this with more than one xpath for multiple columns to build out a sheet to do lookups on.  I'd like to just be able to refer to D:D, and I tried that with ARRAYFORMULA(), for example:  =ARRAYFORMULA(IMPORTXML(D:D, xpath))   Did not work. I thought that would perform the IMPORTXML for each element in the column. It only included the URL in D1.  I'm hoping for a sensible option that won't require that I expand the first formula to keep repeating the IMPORTXML for every row in D, and then as I add URLs later, to have to keep extending the array.


'tabular' environment-Changing column separator character

I want to change column separator symbol '&' of tabular environment by creating a new environment that also works similar to tabular environment. Please Help.


Problem Imagine I have a base class, e.g. TreeNode with several subclasses deriving from it, possibly with more instance fields (like children for inner nodes). What are current best practices to check against the concrete class Type. I may have something like NumericNode and CharacterNode and a function that accepts both. Solutions One possibility would be of course to use isinstance() but I think this is rather unpythonic. Another solution (which I would like to avoid as much as possible) is to use something like a class constant per subclass and then check against it. This would be similar to the first solution. Or should I encapsulate the isinstance() solution into a dedicated function that hides the real typechecking?


Since the Miktex Update yesterday LuaTeX doesn't work any longer. Running from command line, I only get the following output:  >lualatex Main.tex This is LuaTeX, Version beta-0.79.1 (MiKTeX 2.9 64-bit) (rev 4971)   and nothing thereafter. Anyone got the same problem or an idea how to solve it? FNDB and Formats are updated.


How to find what packages do not come from a repository?

I have problem with one deb repository (specifically medibuntu.org) today - synaptic is not able to find repository indexes (and they are really not there - maybe due to yesterday's changes).  So I have the errors flying all over the place. I could just remove that repository - but I simply do not remember which packages came from it, so just removing it could screw my updates on some crucial package.  So, my question is - how do I find, which installed packages can not be found in any repository?


I'm trying to figure out whether or not to hyphenate a new medical-related phrase, "post birth control syndrome."  I know Post-traumatic Stress Disorder is hyphenated, but that seems to make sense because "post-traumatic" on it's own defines the state of the condition.  "Post-birth-control" doesn't feel right as "birth control" as a phrase isn't hyphenated.  So do I do "post-birth control syndrome" or "post birth control syndrome" and why?


I have this command in a bash script called run.sh   kill $(lsof -t -i:34445)   On a terminal when i run this script using bash run.sh it works. However, i am using crontab to schedule this command. This comes up with the error that   lsof: command not found   There was also another command that i tried fuser and that didnt work too. Can you tell me what is it that I am doing / not doing that makes this work in one case and not in another  this is my crontab setup   PATH="$PATH:/usr/local/bin:/usr/bin:/bin"  PYTHONPATH="$HOME/development"   58 * * * 1-5 bash /dir/run.sh > run.out 2>&1 &


Most elegant way to branch if a generator is empty in Python

I have a generator in Python, and I want to loop over it if it has items, and perform a different action if it is empty. Something like  if generator is empty:     perform some action else:     for item in generator:         perform some actions   I know there is no way to tell if a generator is empty without iterating through it, but it seems that there should still be some nice elegant way to perform this logic. The best I can think of is something along the lines of , which seems very inelegant, I guess because it has to treat the first element of the generator separately from the rest.


If the dot matches all ASCII characters except newline and \n matches newline, why doesn't `"a\r\nb".match(/a(.|\n)*b/)` match?

This gives a null on Chrome or NodeJS:    console.log("a\r\nb".match(/a(.|\n)*b/));     The (.|\n)* should mean "any ASCII character including newline, and any number of them: 0 or more).


Showing that $\lim_{x\to 0} x\log{x}= 0$ without using L'Hopital's rule

Is there a way of showing this limit without using L'Hopital's rule? Specifically using the substitution $u = -\log{x},$ with knowledge of the limit of $\lim_{x\to0+}\log{x}.$ Thank you.


How to make the object follow another object's vertex?


Encrypt custom eCryptfs folder on login/logout (with filename encryption) automatically

When my laptop gets stolen, it would be nice to have my documents safely inaccessible in my custom folder (not ~/Private, but e.g. ~/.docs), where I also plan to move keyring and some configs. I don't want a whole encrypted home.  How can it be done?     I have ecrypts-utils installed I ran sudo chmod 700 ~/.docs I mounted a folder sudo mount -t ecrypts ~/.docs ~/.docs Moved files in there Unmount folder sudo umount ~/.docs Content is encrypted   Than I have to run step 3 again (with all settings) to decrypt files again. How can I make it work on logout/login?


What is the difference between HDRP materials and normal materials

I want to understand these materials I am always confused of using HDRP materials that which one is used for low texture which one is for high texture, for glass, for particles and many other.


I've just installed Ubuntu on my Lenovo g460  with Windows 7. I am not able to play any movie or mp3 file. When I click on a file I'm asked to install a plugin. When I click on the install button nothing happens.


Why are there two different duplicate post notices?

Why are there two different post notices applied to duplicate questions? One has an edit link, and one doesn't. Which one is applied to which questions?  This notice:     marked as duplicate by OneUser, TwoUsers, ThreeUsers, FourUsers, FiveUsers      This question has been asked before and already has an answer. If these answers do not address your question, please .   vs. this one:     marked as duplicate by OneUser, TwoUsers, ThreeUsers, FourUsers, FiveUsers      This question has been asked before and already has an answer. If these answers do not address your question, please  to explain how it is different or .


Can the zoom/scale on JS Grid conrol in gantt mode be changed?

I have created a webpart with a JS Grid control with gantt enabled. I want the gantt view to display months instead of weekdays. Anyone have an idea how to do this?  Update: The following link is what I used to create the gantt webpart.  What I need is to zoom out gantt.  I have found SetZoomLevelInternal and SetZoomLevel in JsGrid.Gantt.js but cant see how to get it working.


console.log(0.03 %  0.01);  When i run this calculation i get the following result:  0.009999999999999998  In my understanding the result should be 0, what is going on here?


Proving $f_n(x)=x^2/n$ does NOT converge uniformly to 0 for $n\rightarrow\infty$ and $x\in\mathbb{R}$

As the title states I'd like to show that $f_n(x)=x^2/n$ does NOT converge uniformly to 0 for $n\rightarrow\infty$ and $x\in\mathbb{R}$. Now taking the negation of uniform convergence I have that there must exist an $\epsilon>0$ such that for any natural number $N$ there exists an x such that if $n\geq N$ then we must have: $\vert x^2/n\vert\geq\epsilon$. I'm a little unsure if I've done the negation correctly, but it looks correct to me. However I'm having issues proving the inequality I find after the negation, any advice here would be greatly appreciated.


Why did Obi-Wan disappear instead of being cut in two pieces?

In A New Hope, at the climax of the duel, we are led to believe Obi-Wan turns instantly into a force ghost. Why did he not get cut in two, similar to how Anakin was diced in episode 3, taking away Vader's long-awaited retribution?


cant understand the function of apt-cache remove

I needed to reinstall wine from scratch so I first decided to uninstall the current version but, running the command  sudo apt-cache pkgnames wine   before and after running any of:   sudo apt-cache --purge remove wine1.4 sudo apt-cache --purge remove wine1.6 sudo apt-cache --purge remove wine1.7   results in the same lists of packages, so how do i know that executing apt-cache remove actually has uninstalled the package I commanded?  also should'nt the --purge option imply complete removal of wine (including wine1.7-dbg, wine1.7dev and several other files)?


What site would be on-topic for advice on database schema?

I feel it would be off topic for stackoverflow as it would be opinion based, where would advice on database schema be on-topic?


Two OSs on two drives, how to do it without problems

I would like to have two OSs without dual boot. Two drives, two OSs (Ubuntu + Windows 10), full separation of concerns.  The choice what to boot will be handled by Boot menu from the motherboard.  How to install them without any interference between them?  Helper questions:   Do I need to manipulate the boot flags or booting priority in UEFI/BIOS? Do I need to remove a drive to be safe in this process? To remove second m.2 drive I need to take out the motherboard. Should I do it in some order? Like 1. Windows 2. Ubuntu   I know a few ways of installing Ubuntu but I want to know which is easiest and safest. For now I did it the hard way by removing the drives.


Let $A\in M_{n \times n}$ such that rank of $A$ is $1$. Prove that $\operatorname{trace}(A) = 0$ if and only if $A^2 = 0$.


Company Description in Various Local Business Directories - Duplicate Content?

If we put our company on various local business directories -- should we create a different company description for each listing to avoid being penalized by search engines for duplicate content?


Why Anthony, Michael etc are called Tony, Mike etc?

It is a common practice, people calling and writing Tony for Anthony, Mike for  Michael, Max for Maxwell etc. It is correct to write or call ? I mean Anthony and tony can be two different names. Why confusing then?


Checking startup files on opening Terminal

I have ubuntu 16.04 LTS in my Dell Laptop.   I see my .profile file for current user. It has something like this written,   # ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples.   However, when I try to open this file,   luvpreet@DHARI-Inspiron-3542:~$ cd  /usr/share/doc/bash/examples/ bash: cd: /usr/share/doc/bash/examples/startup-files: No such file or directory   I guess the startup-files might have moved on to some different path. Please explain  Where I can see that which files are executed on starting the terminal ?


So, I just deleted the XP partition on my hard-drive, and now have 30 Gb of extra space. But that space isnt being used by my Ubuntu file-system, and I'm getting warnings that there is only about 200 Mb of space left, even though I have the empty 300 gb partition  So, my question is how do I connect the two partitions and allow Ubuntu to use the 30gb?


I just installed Minecraft Demo on my Windows 10.  So, after all that download:     Whenever I click the button that says "play demo" the window closes and reopens with the same error message. What's going on?  Merci d'avance!


Averaging large number of raster layers using ArcGIS for Desktop?

I have a large number of rasters (300+) I would like to average using Raster Calculator as is explained at  I know I can manually select each raster by double-clicking, hitting the '+' key, and then dividing by the total number of files.   Is there a less tedious way to get the average raster, without having to double-click and hit "+" hundreds of times? (or typing each raster's filename into the box, or something similarly tedious)


I'm running into an issue when initializing a minesweeper board in Python 2.7.  Here is my code so far:  class Minesweeper():  def __init__(self, size, num_bombs):      # Initialize board of zeros     self.board = [[0]*size]*size     self.game_over = False     self.size = size      self.add_bombs(num_bombs)   def add_bombs(self, num_bombs):      # Add bombs     for i in range(num_bombs):         row = randint(0, self.size-1)         column = randint(0, self.size-1)         self.board[row][column] = 'B'      print self.board   For some reason, my add_bombs code is manipulating each sub-array of my board identically, and I have no idea why.  ie. x = Minesweeper(5,2) is resulting in:  [[0, 0, 0, 'B', 'B'], [0, 0, 0, 'B', 'B'], [0, 0, 0, 'B', 'B'], [0, 0, 0, 'B', 'B'], [0, 0, 0, 'B', 'B']]  Instead of adding 2 total bombs.  Does anyone see what I am doing wrong?


Why do you have to put ~/ before .bashrc when opening the .bashrc file?

I'm wondering why it is required to put ~/ before .bashrc when opening the bashrc file.  To illustrate:   I normally open files on my system as follows:   vim filename.extension    But while in the /home directory if I do the following:   vim .bashrc    vim will open a new file called .bashrc  In order to open my bashrc file I must do as follows:  vim ~/.bashrc   Why?  My current system is Linux Mint 18.3


In the absence of a signal handler, does SIGTERM behave identically to SIGKILL?

Most descriptions of SIGTERM and SIGKILL point out that SIGKILL,     In contrast to SIGTERM and SIGINT, [...] cannot be caught or ignored [...] ()   Is this the only difference between SIGTERM and SIGKILL? In particular, if a process does not install a SIGTERM handler, is there any difference at all between sending SIGTERM or SIGKILL to the process?


Given V   t-> W   s-> U:  if S and T are both one-to-one, show that ST is one-to-one.  I know that (S.T)(x)=(S.T)(y) for some x,y∈Rn. But I don't know how to apply it here. I'm lost


Subgroup of $S_n$ with elements having cycles of any possible length

Let $G$ be a subgroup of the symmetric group $S_n$.   Suppose that $G$ has the following property:  given any positive integer $k\leq n$, there exists an element of $G$ having a cycle of length exactly $k$.  Is it any true that under this assumption $G=S_n$? If not, could one make a counterexample with $n$ prime?  Please notice that I am not saying that $G$ has elements which ARE cycles of order $k$.  Could you please remove the duplicate, as if you read it carefully you see that it is a different question? (please see also the answer that I accepted)


Is there is any way to prove the Faraday's law of induction?

I want to know if there is any way to prove the Faraday's law or is it just an experimental observed phenomena?  More specifically, is there any reason why the proportionality constant is 1? How did Faraday discover it? I also heard that we can prove Faraday's law using the principle of least action, but is that true?


I recently upgraded to windows 10 on my daily driver laptop and I have liked it so far except for one thing. Randomly the windows menu decides to stop working when I press the windows key or I press the button in the corner. Has anybody else experienced this problem? Solutions?  Thanks!


Robust Standard Errors(SE) estimators vs SE estimators assuming Conditionally Homoskedasticity

If both the asymptotic Variance-Covariance matrix estimators (robust and non-robust) are consistent to the same matrix, i.e., both will have the same efficiency (True?), then what is the advantage of using SE estimators assuming Conditionally Homoskedasticity, when we have Conditionally Homoskedasticity?  Hayashi's Econometrics book states that «the finite-sample properties of an estimator are generally better, the fewer the number of population parameters estimated to form the estimator.», i.e., under conditional homoskedasticity we should use non-robust estimators. I understand that with the robust estimator we estimate more population parameters. But what are these properties that Hayashi speaks of? and how can we prove that they are better?  Any help would be appreciated.


Every infinite Hausdorff space has an infinite discrete subspace

I want to show that any infinite Hausdorff space contains an infinite discrete subspace.  I am motivated by the role of $\mathbb N$ in $\mathbb R$. We know that if a Hausdorff space is finite, then it is a discrete space, but an infinite subspace of a Hausdorff space is obviously not necessarily discrete.


What does "copy of itinerary" mean when applying for a Schengen visa?

The Italian consulate website says under requirements for a Schengen visa:        Applicants for short term visas (up to 90 days) must also present an itinerary of their trip.      What does this mean? This is separate from the proof of return ticket:        Return-trip booking or proof of available means of personal transport:   ticket reservations for round-trip flights originating in our jurisdiction to Europe (and ultimately to Italy) and back, including internal entry and exit points of travel i.e. EURORAIL tickets, car rental, internal flights. The names of reservations should reflect the name on passport. The applicant may be required to show the actual ticket when picking up the visa;      When they ask for an itinerary, what documents need to be shown? Is it enough to have a plan of which places I am going to visit and where I will be staying?


I use Texshop and Texstudio, and biber. All of a sudden my citations are not compiling properly. MWE: \documentclass[a4,british,12pt]{article} \usepackage[notes,backend=biber,hyperref=false,giveninits=true]{biblatex-chicago} \addbibresource{/Users/fabrec/Dropbox/LATEX/texmf/bibtex/library.bib}  Here is the blg message: [0] Config.pm:304> INFO - This is Biber 2.14 [0] Config.pm:307> INFO - Logfile is 'War Dutie to Protect and Military Abolitionism.blg' [94] biber-darwin:322> INFO - === Sun Mar 21, 2021, 21:58:33 [114] Biber.pm:415> INFO - Reading 'War Dutie to Protect and Military Abolitionism.bcf' [274] Biber.pm:943> INFO - Found 17 citekeys in bib section 0 [290] Biber.pm:4256> INFO - Processing section 0 [291] Utils.pm:75> INFO - Globbing data source '/Users/fabrec/Dropbox/LATEX/texmf/bibtex/library.bib' [291] Utils.pm:91> INFO - Globbed data source '/Users/fabrec/Dropbox/LATEX/texmf/bibtex/library.bib' to /Users/fabrec/Dropbox/LATEX/texmf/bibtex/library.bib [303] Biber.pm:4455> INFO - Looking for bibtex format file '/Users/fabrec/Dropbox/LATEX/texmf/bibtex/library.bib' for section 0 [516] bibtex.pm:1653> INFO - LaTeX decoding ... [10256] bibtex.pm:1471> INFO - Found BibTeX data source '/Users/fabrec/Dropbox/LATEX/texmf/bibtex/library.bib'  I have reinstalled both MacTex and Texstudio, deleted aux and bbl and tried again, etc. It worked fine two days ago.


Ubuntu can't mount my NTFS external hard drive with Windows installed on it

I have an external hard drive with Windows 8 installed on it. Ubuntu cannot mount this drive.  Failed to mount '/dev/sdb5': Operation not permittedThe NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   I'm not using this Windows installation right now, so I don't mind deleting it. What can I do to fix this? Do I have to delete some partitions in the drive? If so which ones? Or is there an easier way?  Thanks.  Edit: I forgot to mention that the Windows installation is broken so I have no way of booting into it and shutting it down properly. Also, the main partition of the HDD (not the windows partition) has important data.    Final Update (Solution):


Citations not working properly while using biblatex-chicago

Biblatex-chicago package doesn't work properly. I have main file main.tex:  \documentclass{article} \usepackage[% authordate,% maxcitenames=2,% backend=biber,% ]{biblatex-chicago} \addbibresource{refs.bib} \begin{document}   \section{Section}   Citation \parencite{colwell06}.   Citation \parencite[p.~12]{colwell06}.    Citation \textcite{colwell06}.   Citation \textcite[p.~12]{colwell06}. \end{document}   and references in refs.bib file:  @Book{colwell06,   author =   {Robert P Colwell},   ALTeditor =    {},   title =    {Pentium Chronicles - The people, passion, and politics behind Intel's landmark chips},   publisher =    {Wiley Interscience},   year =     {2006} }   For some reason the second citation of parencite doesn't show author of the article at all. Just the page number is visible and I get following output:    Using normal biblatex package and style=authoryear option instead of authordate I don't get this error. Is there something wrong with chicago package or am I missing something?


What would be an English equivalent for the Mexican Spanish word tocayo?

In Mexican Spanish (not sure if other Spanish speaking countries use the word too) we call "tocayo" to those people that share the same name as us (but not necessarily the same last name i.e., Juan Gonzalez and Juan Carlos Castillo are tocayos).  I was wondering if an equivalent for this word exists at all in English or maybe even an expression?


Special terms related to escape velocity

Is it possible that an object will orbit the earth if thrown with enough velocity straight up from ground?if so,how it happens??


How to remove the Fonts app from Ubuntu 20.04? And also how to view package name of system apps?


Let $a,b,c,d$ be natural numbers with $ab=cd$. Prove that $a+b+c+d$ is composite. I have my own solution for this (As posted) and i want to see if there is any other good proofs.


Ubuntu GUI crash when LightDM enters, unable to login

This issue happened spounteniously, i don´t know what could have cause it as i wasn´t using the PC when it happened. I ruled out any messing around with the setting as the user doesn´t know how to enter the BIOS, doesn´t have the sudo password and was only using firefox and libreoffice when it happened.  After the plymouth sequence i get this error.   And this option:    I follow each option and nothing happens after that. The issue persist after rebooting. I choose the other options to see if anything happens, i either get back to option 1 or doesn´t show anything anormal. (I have pictures i someone wants to know)  What i found weird is that event though the error is possitioned in the chip, however ubuntu 10.04 and 12.04 run fine in a live CD  I saw that some people are having issues when LightDM has a non default wallpaper, but i use a default one.  Thanks in advance.


Why does Stark not use the same material for his suit as Captain America's shield is made of?

Caps Shield can withstand most projectiles and absorb quite a bit of force (Hulks fist, Thors Hammer to name two of the tougher ones). Wouldn't it make sense for Stark to use the same material for his suit?  If this was already answered somewhere, I am sorry, but I didn't find it...


how to convert "12A,13B,14C" to [12A,13B,14C] in javascript

I have a value   sections = "12A,13B,14C"   But I need [12A, 13B, 14C] for future use. How to create array from above string?


Why is my GRUB menu background in ubuntu 18.04 black?

I installed some additional desktop environments in ubuntu 18.04, and I don't know if this has something to do with it, but around the time installing these desktop environments, I discovered that my boot screen was not the standard ubuntu one, rather the ubuntu budgie boot theme. I tried to fix it, but I messed up some plymouth related stuff, so I ended up reinstalling the default plymouth theme for ubuntu 18.04.  Now I discovered that my grub menu background is black, not the standard "ubuntu-purple", and I don't know if it has something to do with the plymouth related stuff, but anyways, the question is: "how can I fix the grub menu back to the defaults?".   My GRUB menu version is 2.02 (output of grub-install --version is grub-install (GRUB) 2.02-2ubuntu8.13), and I don't know if this is the standard version of GRUB in ubuntu 18.04, so that is another question I'm wondering about.  Thanks for all answers!


Self studying algebra book- Dummit foote or any other?

I am self studying Abstract Algebra. At the beginning I picked Herstein's algebra book as my first introductory text but I wasn't able to solve half of the problems in the exercises so I decided to first go through an "easier" text and so I decided to study from J. Gallian's Contemporary Abstract Algebra .      Now I have finished reading this book and have solved 80-90% of the exercises from it. I believe I understand all the basic concepts now and can solve most of the standard exercises. I am now looking for a more advanced text (to strengthen my concepts) that covers the same material and the one I can go through on my own with a good collection of problems.       I have already checked out Herstein- and after understanding the theory well enough from Gallian and solving loads of problems from it, its problems do not scare me anymore.       I am thinking of Dummit foote. What do you guys think about it? Is this book alone sufficient to suit my needs?       Any other suggestions would be welcome.      Also please don't suggest more than two books- not only it make me confused over which one to read first, it is not possible for me to go through 3-4 or more books as I have to revise and study other subjects too but maybe later I can check them out.  Edit: It would be great if someone could tell me what do they think about Hungerford's algebra and P.Cohn's Basic Algebra? Would they satisfy all the conditions I stated above like having a nice collection of problems and good for self study and not too elementary. How do these two compare to Dummit foote?


I seem to have have a perma-pregnant dweller in Fallout Shelter. How do I fix this?

I have a pregnant dweller that still hasn't given birth after 3 days. Is this a glitch? Or is there something that I can do to speed along her delivery? I have made sure that I have enough living space for new dwellers, and other women have gotten pregnant and given birth since she was initially impregnated.


How to create a column that depends on another created column in pgfplotstable?

In the following MWE, I'm trying to create one on use column based on the definition of another on use column. PGF generates an error in this case:  PGFPlots: reading {test1.dat} PGFPlots: reading {test2.dat}  ! Package PGF Math Error: Unknown function `value__column_not_found' (in 'value __column_not_found.*0.75').   Although the example (taken from ) is trivial, I would like to keep my original data files separated, but show some of the results together, along with some simple calculations. Is there any way to create a column based on another created column in pgfplotstable?  \documentclass{article} \usepackage{pgfplotstable} \pgfplotstableset{     create on use/lb/.style={         create col/expr={\thisrow{value}*0.75}     }, } \begin{filecontents*}{test1.dat} parameter 1 2 3 4 \end{filecontents*} \begin{filecontents*}{test2.dat} value 0.00034 0.0053 0.07 0.0027 \end{filecontents*} \begin{document} \pgfplotstableread{test1.dat}\parameter \pgfplotstableread{test2.dat}\value \pgfplotstabletypeset[     columns={parameter, value, lb},     columns/parameter/.style={         column name={Parameter},     },     columns/value/.style={         column name={Default Value},     },     create on use/value/.style={create col/copy column from table={\value}{value}},     columns/lb/.style={column name={Lower Bound}}. ]\parameter \end{document}


I just reinstalled ubuntu 12.04 from a DVD that came in the Ubuntu User magazine. I previously had 13.04 but had decided to revert back to the LTS. Now with 12.04 I have no sound when I try to play my music, I tried using Musique and also Rhythm Box they both show playing with the slider but no sound is heard except if the volume is all the way up you can hear a faint hiss or static. Any advice on how to fix this?  Thanks  Harlie


insert data from two lists to dict with for loop

I tried this:  numbers_dict = dict() num_list = [1,2,3,4] name_list = ["one","two","three","four"] numbers_dict[name for name in name_list] = num for num in num_list   And as a result I got this exception:  File "<stdin>", line 1 numbers_dict[name for name in name_list] = num for num in num_list


How can I read URLs on separate lines in a .txt file and ping each one

I have a .txt file with 5 urls in it. I want to read it line by line, and perform 4 ping requests for each site, and extract the time. The code I wrote is below, but it isn't working.   Can anyone give me a hint?   #!/bin/bash  cat /home/akis/Desktop/sites.txt declare -i var=1 while read -r line do     while $var <= 5      do         var2=$((var2+1))          name="$line" | ping -c 4 $name > $var.txt | awk '{ print $8 }' < $var.txt | awk '/time/' > $var2.txt | tr '=' '\t' < $var2.txt | awk '{ print $2 }' > $var2.txt     done      var=$((var+1))   done


Suppose I have a message $M$ for which I generate an RSA-2048 digital signature as follows:  $H = H(M)$, $H(M)$ being the SHA-256 of the message $M$ $S = H^d \bmod N$  Assume $N = pq$ is properly generated and $d$ is the RSA private key. And I verify the signature as follows:  $S^e \bmod N = H'$  where $H'$ is the SHA-256 of the message to be authenticated. Assume $e$ is the RSA public key.  Since I've not used any padding then are there any flaws with the above approach? What if $e = 3$? What if $e = 2^{16}+1=65537$?  Your guidance is much appreciated.


Combine two command defined as String in variable and run as one

Can I join two commands defined as String and run as one. E.g.  var="ls -alt" var2="| grep usersfile" var3="| grep usersfolder"   Following example for joining commands does not work.   a. '{$var & $var2;}'  b. '{$var & $var3;}'  What I what is:   a. run "$var $var2" and get "ls -alt | grep usersfile"  or  b. run "$var $var3" and get "ls -alt | grep usersfolder"


Let $G$ be a filter finer than the filter $F$. Is it necessary that the net based on the filter $G$ is a subnet of the net based on $F$?


I am working on a paper, and have a problem regarding ellipsoid and Trivariate Normal Distribution. Suprisingly I can't find much in literature but I found your in one of your answers:     Because this construction has nothing to do with "confidence" per se,   the objective is to establish some convention for describing the shape   and relative size of the points. Using 1.96 sort of works (for three   variables): it contains about 72% of the probability of the trivariate   normal distribution. But as the number of variables increases this   method produces ellipses that are far too small. For instance, with 10   variables it will contain only 4.6% of the probability; using 4.28   instead of 1.96 in this case will contain 95% of the probability.   How did you get this number 72%? Or do you have some literature to recommend to me in which I can find this. I would appreciate it very much!


Can I cross the Canada-US border with an expired passport and a non-expired Nexus card?

My passport will expire soon, but I have a Nexus Card good for a few more years.  Is it possible when my passport expires that I can use my Nexus card instead to go into the USA?  If so, will there be issues getting back into Canada?


How do I update a record in sqlite3 in python

Here, in the update part a new duplicate is getting created instead of updating the existing record. Please help! def addBooks(title, quantity):     c.execute('SELECT * FROM books')     for i, j in c.fetchall():         if i == title:             c.execute('UPDATE books SET quantity = ? WHERE title = ?', (j+quantity, title))             conn.commit()         else:             c.execute('INSERT INTO books VALUES (?, ?)', (title, quantity))             conn.commit()


How to get layer extent in OpenLayers or zoom to WMS layer extent?

I have added WMS layers using follow:  basemap = new OpenLayers.Layer.WMS( "Layer Name1", "http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername'} );   utility = new OpenLayers.Layer.WMS( "Layer Name2", "http://localhost:8080/geoserver/wms/workspacename", {layers: 'workspacename:layername', transparent:"true"}, {isBaseLayer:false} );   Now I want to get zoom to my utility layer, How can I?  I have tried as following:  map.zoomToExtent(utility.getDataExtent());


First order statistics (min) of n non-identical but independent normal variates

While I have seen papers and posts about mean and variance of n i.i.d normal random variables, I am looking for the first order statistics of $n$ (specifically $11$) normal, non-identical (different mean and variances) but independent random variables. Specifically :   What distribution would that follow? Can it be approximated to known distributions? What would be the mean and variance?   I am currently using Monte-carlo simulation for finding this, but would like a more direct value to save computational time.


How do relative file paths work in Eclipse?

So my 2009 new years resolution is to learn Java.  I recently acquired "Java for Dummies" and have been following along with the demo code in the book by re-writing it using Eclipse.  Anyway, every example in the book that uses a relative path does not seem to read the .txt file it's supposed to read from.  Here is the sample code:  import java.util.Scanner; import java.io.File; import java.io.IOException; import javax.swing.JFrame; import javax.swing.JLabel; import java.awt.GridLayout;  class TeamFrame extends JFrame {      public TeamFrame() throws IOException {         PlayerPlus player;         Scanner myScanner = new Scanner(new File("Hankees.txt"));          for (int num = 1; num <= 9; num++) {             player = new PlayerPlus(myScanner.nextLine(), myScanner.nextDouble());             myScanner.nextLine();             addPlayerInfo(player);         }                add(new JLabel());         add(new JLabel("   ------"));         add(new JLabel("Team Batting Aberage:"));         add(new JLabel(PlayerPlus.findTeamAverageString()));         setTitle("The Hankees");         setLayout(new GridLayout(11,2));         setDefaultCloseOperation(EXIT_ON_CLOSE);         pack();         setVisible(true);     }      void addPlayerInfo(PlayerPlus player) {         add(new JLabel(player.getName()));         add(new JLabel(player.getAverageString()));     } }   And you can see in the below screen shot I have included this file.  image no longer available  Also, I have verified that when I build the application that a copy of Hankees.txt is placed in the bin folder with the compiled .class files.  Lastly, if I change line 12 to the following and place Hankees.txt in the root of my C:\ drive the program compiles and runs fine.  Scanner myScanner = new Scanner(new File("C:\\Hankees.txt"));   So basically, my question is what am I doing wrong?  Or is Eclipse responsible for this in some way?  Thanks for any and all help!


How does this "simple" electric train work?

In , a dry cell battery, a wound copper wire and a few magnets (see image below) are being used to create what can be described as "train". It looks fascinating but how does this experiment work?  Update 8th August 2016: This problem has been completely worked out in a paper that was published in the January 2016 issue of American Journal of Physics.     Link: Am. J. Phys. 84, 21 (2016);


How to call method with arbitrary template arguments?

I obtained a .hpp file online which contained both the class declaration and definition together as such:  //Foo.hpp class Foo{     Foo();      <template T>     Foo& func1(const &T t); };  inline Foo::Foo(){     //constructor }  <template T> Foo& Foo::func1(const T& t){     //function  }   I have to include this header file (basically a library) in multiple source files. Since it contains the definitions of the methods, I get redeclaration (or redefinition, I forgot) errors when I include it more than once in the project. So I decided to split the definitions into a .cpp file and I'm using the library in main.cpp as shown.  //Foo.hpp class Foo{     Foo();     <template T>     Foo& func1(const T& t); };   and  //Foo.cpp #include "Foo.h" Foo::Foo(){     //constructor }   <template T> Foo& Foo::func1(const T& t){    //function  }   For the function call  //main.cpp #include "Foo.h"  int main (void){     Foo bar;     bar.func1(5);  //shows error as "undefined reference to"     bar.func1<int>(5); //doesn't work either }   From what I've found, I think that the acceptable types for the template should be declared by instantiating the template. However I don't know the syntax and the location to do so. Thanks in advance for any assistance.  FYI: just as a temporary workaround, I have explicitly stated the argument types as "int" for func1() in both the prototype in Foo.hpp and definition in Foo.cpp and getting rid of the template all together. No errors returned.  This is just temporary as there are many other similar templated functions as func1() and it does not seem like a pretty way to solve the issue. I strongly believe that "int" should be declared as one of the data types for template T, i just don't know how.


How to prove that $\hat\sigma^2$ has $\chi^2_{n-p}$ distribution (linear regression)

Consider the linear regression model:   $$Y_i=r(x_i)+\varepsilon_i\equiv\sum_{j = 1}^p x_{ij} \beta _j + \varepsilon _i,\quad i=1,\ldots,n.$$  where $x_1,\ldots,x_n\in \mathbb{R}^p$ are fixed, $E(\varepsilon_i)=0$,  $\operatorname{Var}(\varepsilon_i)=\sigma^2$. Denote $Y=(Y_1,\ldots,Y_n)^T$, $\beta=(\beta_1,\ldots,\beta_p)^T$, $X=(x_{ij})_{n\times p}$. As is known, $\hat \beta  = \arg\min\limits_{\beta  \in \mathbb{R}^p} (Y - X\beta)^T (Y - X\beta)=(X^TX)^{-1}X^TY$ if the matrix $X^TX$ is invertible, and so an estimator of $r(x)$ at $x=(x_1,\ldots,x_p)\in\mathbb{R}^p$ is given by $\hat r_n(x)=x^T\hat\beta$.  Let $$\hat{\sigma}^2 = \frac{1}{\sigma^2}\sum_{i = 1}^n (Y_i - {\hat r}_n (x_i))^2.$$ I am stucking the problem: $\hat\sigma^2$ has $\chi^2_{n-p}$ distribution. How to prove the statement?


I know that the sequence $\{\frac{e^n}{n!}\}$ diverges and that for prove it i have to limit it, but i don't know how do it. In fact, i know that $\{\frac{x^n}{n!}\}$ diverges, but i don't know prove it.


I have a bike with a ratio of 3.11 to 1, how many links do i need in a chain?

I legit just broke my bike chain riding it. One of the links just snapped and i wanted to replace it with a brand new chain that will hold up better. How many links do i need in that new chain so that it will fit on my bike?


Tunnel traffic through another machine over ssh

I want to be able to route a portion of my traffic through another machine over SSH. For example, is it possible to browse the web through the ssh tunnel and also browse the web through your LAN connection without much effort? (i.e. I want a seamless transition from using tunnel to using LAN)   Thus it is not a simple how do I tunnel ALL web traffic through ssh tunnel, but moreso how can I setup a tunnel that I can use at my discretion but not impeded my normal traffic flow. (Kind of on an as-needed basis)    I would like the filtered traffic to be encrypted when leaving the LAN and it could be ftp, ssh, web, mail whatever traffic.    Some questions I think I need to answer/address:   Does this require multiple nics?  Does this require setting up a proxy?  Can I even do this the way I want it to function?    Are there other options aside from a tunnel to achieve the result of having some traffic (user decides) encrypted through another machine (outside the LAN) and have other traffic use the normal flow through the LAN and out into the internet world?   Edit: If some of the answers depend on specific traffic types I can be more specific and say that web traffic is a primary focus of this. However, other traffic such as IM/Email traffic would be desirable.


Is it bad style to start a sentence with being or grammatically wrong. It´s a participle right? Still I feel it is just not it?!  Something like:     Being an English teacher means to not only teach a language but also to teach children about different cultures.


I want to do an jQuery fade in and fade out in a loop such as   But I want to maintain different css positioning for each of the .trip elements, ie, the elements fading in and out.  For example with the element
Item3
 , I want to add positioning so that it displays left 200px when it fades in, such as in this css:  #3{position:absolute; left:200px;}   AND for another element  #2{position:absolute; left:100px;top:100px;}   With the current code in the jsfiddle, the elements are loaded in the same spot on the page.  I tried adding css to the different elements as I did above, but it still loads in the same place as in the jsfiddle.  How do I fix this?


How to create an UEFI bootable USB stick from an ISO

I have an ISO image of my backup solution's recovery cd. When I burn the image to a CD-ROM, I can boot from it in UEFI or normal mode without problems.   Unfortunately, this is no solution for my laptop, as it does not have an optical drive. Thus,  I tried to create a bootable USB stick that can also boot in UEFI mode, but so far I have not been successful (note that the laptop has UEFI and boots Windows 7 in UEFI mode).  So my question is, if anyone knows how I can get said ISO on my USB stick so that it boots as if I would use a CD-ROM?


Some parts of my project aren't saved in the .blend file

I created a model and added some Actions in the DopeSheet editor (more or less 5).  I exported the model to my game engine, saved the .blend file (Ctrl-S) and closed it.  Then I opened it again, and all the actions were gone, it just had the one I was using last.  The same happens with some preferences (for example, I disabled mip-maps on User Preferences -> System, and I have to re-enable it every time I open the .blend file again.  Does somebody knows how to restore the Actions and save everything? Thanks.


MLE of $\theta$ when $X_1,\ldots,X_n $ are i.i.d with $P_\theta(x; \theta)=2x/\theta^2$ for $0\le x \le\theta$

Assume the standard situation, that is, let $X_1, \ldots , X_n$ be independent and identically distributed with $X_k ∼ P_\theta(x; \theta)$ , where $P_\theta(x; \theta) = 2x/\theta^2$  if $0\le x \le\theta$ and $0$ otherwise. It is required to estimate $\theta$. Show that the maximum likelihood estimator for $\theta$ is $\hat{\theta} = \max{[X_1, \ldots , X_n]}$ and then show that the cumulative distribution function of $\hat{\theta}$ is $F_\theta(z) = z^{2n}/\theta^{2n}$. Here's what i did so far: Maximum Likehood estimator: $L_x(θ) = \prod_{i = 1}^{n} P_θ(x_k)$ Here we have $P_θ(x_1,...,x_n;θ) = P_θ(x_1,θ).P_θ(x_2,θ)...P_θ(x_n,θ)$ Likehood = $L_{x,θ}(θ) =P_θ(x_1,θ).P_θ(x_2,θ)...P_θ(x_n,θ)= 2x_1/θ^2. 2x_2/θ^2.. 2x_n/θ^2 = [2^n.\prod_{i = 1}^{n}x_i]/θ^{2n}$ Log-likehood: $\sum_{i = 1}^{n}log(P_θ(x_1,...x_n;θ))= \sum_{i = 1}^{n}log(2x_i/θ^2)$ Is this correct so far? Im still not sure how to get to $\hat{θ} = max{[X_1, . . . , X_n]}$ As for the the cumulative distribution part to show $F_θ(z) = z^{2n}/θ^{2n}$: $F(z) = P(max({x_k})<z) = P(x_1<z).P(x_2<z)..P(x_n<z) = 2x_1/θ^2.2x_2/θ^2...2x_n/θ^n = 2^n.\prod_{i = 1}^{n}x_i/θ^2n$ Not sure if this is correct. Would really appreciate some help. Edit: From the answers below, we can deduce the the estimator is biased. What estimator would be unbiased? How can i find it?


How to fetch all the td values from a table?

I have a table from which I want to fetch all the td and pass their values using an AJAX call. Here is what I attempted, but details are coming through blank.  $('#createData > tbody > tr').each(function(i) {   var rowobj = new Object();   var $tds = $(this).find('td'),     Number = $tds.eq(0).val(),     Quantity = $tds.eq(1).val(),     date = $tds.eq(2).val(),     Value = $tds.eq(3).val(),     Containers = $tds.eq(4).val(),     typeOfContainer = $tds.eq(5).val();    rowobj.Number = Number;   rowobj.Quantity = parseFloat(Quantity);   rowobj.Date = eta;   rowobj.alue = parseFloat(Value);   rowobj.noofContainers = parseInt(Containers);   rowobj.containerType = typeOfContainer;   Details.push(rowobj); });


I installed Ubuntu using the Windows Installer (Wubi).  When I start my computer and select Ubuntu, my screen goes black and I see a blinking cursor at the top left of the screen. I have waited an hour, but nothing happens.  I have tried restarting the computer multiple times, but the same thing always happens.  Windows works fine though.  I am trying to use Ubuntu 12.04 LTS.  I also tried to install Ubuntu using a USB drive, but it would hang during the initial start-up.  It would print "voltage table 0x50 unknown" and freeze.  Can anyone tell me what I am doing wrong?  I need Ubuntu for work.


I was expecting that Kubuntu 17.10 would use Wayland by default (just like Ubuntu 17.10) or that it would at least be possible to select it from the login screen. This does not seem to be the case, unfortunately.  $ echo $XDG_SESSION_TYPE x11   Can anyone point me to the steps to set up Wayland on Kubuntu 17.10?


When a lattice is a lattice of open sets of some topological space?

When a lattice $(L,\leqslant)$ is a lattice of open (or closed) sets of some topological space $(X,\tau)$? Which conditions have to be satisfied? We may assume that $X$ is $T_1$.


If the Kaiju are clones why do they look different?

In the briefing scene when Newt is trying to convince Pentecost to support his plan he announces (in almost the same breath) these two statements:     Kaiju Why do we divide the category system? Because each is very   different from to the next, right? Do you know what I mean? For   example, a single shark, others like fish...   and     Here are some samples that I collected. This one was taken in Sydney.   This one was taken in Manila. They are exactly the same DNA. They are   clones.   If Kaiju (or at least various groupings of the kaiju) are clones of each other and have "exactly the same DNA" why "each is very different from to the next"?  Surely they would recognise if there were only 10 different "models" of Kaiju which were repeated over and over?


How can I turn off "Swipe between pages"?

I went into system preferences and completely unchecked the swipe between pages button for my magic mouse, but it still does it.  Why won't this feature turn off?  If you're going to tell me my question is a duplicate, please tell me where I can find the answer to this duplicated question because I still have no answer!!!  thank you


Tensor product of reduced $k$-algebras must be reduced?

Let $A$, $B$ be two reduced $k$-algebras. Then if an element of the form $$\sum a_{i}\otimes b_{j}$$ is nilpotent, we can compose it with any $k$-homomorphism $f$ from $A$ to $k$ to get a homomorphism from $A\otimes B$ to $B$. This map's image is $$\sum f(a_{i})\otimes b_{j}$$must be nilpotent as well. So if we assume $b_{j}$ is linearly independent in the first place, we may reason that $f(a_{i})=0$. This showed that $a_{i}$ are in the Jacobson radical of $A$. However, we only know $\mathrm{Nil}(A)=0$, and it is not clear to me how to pass from the Jacobson radical to the nilradical without using some commutative algebra machinery.   Here is what I think that might work. If $A$ is of finite type, then by Nullstellensatz we can assert the above is true. But if $A$ is not of finite type, then I can write $A=k[x_{1},...,x_{n}][X]$, where $n$ is the transcendence degree of $k(A)$ and $k[X]$ is finite over $k$. Then I should be able to pass from $k[X]$ to $A$ by inductive argument on the transcendental degree of $k(A)$, since prime ideals are maximal in a UFD (I am working with $k[x]$ by introducing $[x]$).   The proof I have for the case of finite type is not satisfying. Given $I\subset k[X]$, using Nullstellensatz one can show that $$I_{X}V_{X}[I]=\sqrt{I}$$ where $V_{X}[I]$ is the set of all points in $X$ on which $I$ vanishes, and $I_{X}(V_{X}[I])$ be the ideal in $k[X]$ which vanishes on $V_{X}[I]$. Granting this, let $I=(a_{i})$, then we want to show $I=0$, which is $V_{X}[I]=X$. This follows since if $U\subset W$, then $V_{X}[U]\supset V_{X}[W]$. Since $V_{X}[I]\supset V_{X}[m_{x}]$ for all maximal ideal corresponding to points, it must be $X$. This proof is unnecessarily winding by using the ideal-variety correspondence. Ideally I should be able to construct a pure algebraic proof.   The thing not clear to me is whether the above strategy really works. Namely I am not sure if I can really induct on the transcendental degree of $k(A)$. To make matters simple assume we showed the statement holds for $A$ with transdental degree $<n$. For $A$ with transdental degree $n$ we can thus write it as $k[A'][x]$. Then any maximal ideal $m'$ of $k[A'][x]$ must correspond to a maximal ideal $m=m'\cap k[A']$ in $k[A']$. But it seems not possible to show that any prime ideal is maximal. Indeed considering the simple example of $k[x,y]$, where $(x)$ is a prime ideal but not maximal since $k[x,y]/(x)=k[y]$ is not a field. The problem is in the inducting process the base ring is not neccessarily a field, and so this strategy cannot work.   I am thinking maybe I can show $m'=m[f(x)]$ with $f(x)$ some irreducible polynomial in $k[A'][x]$. Because we know $k[A'][x]$ is noetherian by Hilbert's basis theorem, so in particular $m'$ must have a finite generating set. And we can reduce the number of irreducible polynomial to 1 since $m'$ is a maximal ideal. But I still do not know how to use this to finish the proof.


Where is the proper location to measure the tube size?

I need to replace a tube in my bike. I know there are many tire sizes. I bought 26', assuming that my bike was that size, and realized when I got home that I didn't even know where to measure from. What is the correct location to measure in order to get the correct size of tubes?


The image attached, when I try to select part of the stadium, the whole stadium is selected, how can I separate this into different parts so I can edit different parts.   Thanks


I'm sure that throughout the history of mathematics the problem to find solutions of the equation $$a^b = b^a$$ has been raised. The only solution I have found off the top of my head is $$ a = 2, b = 4$$ My question is whether this problem has a name and it it has some relevance in mathematics


I'm new to D&D and am making my first character for a home game.  What should I discuss with my DM prior to my first game? And what do I need their permission for? Classes, races and sub-races I intend to choose? There is a lot of info in multiple sources; any word on what I have to to discuss with the DM?


Why is Python 2.7 still the default Python version in Ubuntu?

According to official documentation of Python, Python2.7 support will end near in future.     DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at    Why is Ubuntu not using Python3 as default in their upcoming version?  $ cat /etc/os-release  NAME="Ubuntu" VERSION="19.04 (Disco Dingo)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 19.04" VERSION_ID="19.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy" VERSION_CODENAME=disco UBUNTU_CODENAME=disco     $ python Python 2.7.16 (default, Apr  6 2019, 01:42:57)  [GCC 8.3.0] on linux2 Type "help", "copyright", "credits" or "license" for more information.


Is there a difference between Map and Hashmap?

I've seen people use Map instead of HashMap to declare a HashMap.  e.g. Map mapName = new HashMap(); Whereas I'd normally use HashMap mapName = new HashMap();;  The same for a a HashSet, I've seen Set setName = new HashSet();  used, whereas I'd normally use a HashSet setName = new HashSet()  Same for ArrayList (List) and so on.  My question is, is there any benefit to doing this, or is it just a matter a perspective?


templated function not found during compilation

I have a matrix class that supports operations with scalar values that I implemented using operator overloading. Since each overloaded operator function has the same body except for the operator being used, I decided to create a generic function that would accept a function along with the matrix and a scalar value to consolidate my code.  Here is the generic function and it being called from the overloaded addition operator function:      // Generic function to take care of matrix operations     template<typename T, typename F>     Matrix<T> scalar_operation(const Matrix<T> &a, const T b, F f) {         std::vector<std::vector<T> > new_els = a.elements;         typename std::vector<std::vector<T> >::iterator it = new_els.begin();         typename std::vector<T>::iterator it_in;          for (; it != new_els.end(); ++it) {             it_in = it->begin();             for (; it_in != it->end(); ++it_in) {                 *it_in = f(*it_in, b);             }         }         return Matrix<T>(new_els);     }      // Add scalar to all values in Matrix     template<typename T>     Matrix<T> operator+(const Matrix<T> &a, const T b) {         return scalar_operation(a, b, std::plus<T>());      }   And here are the functions declared in the matrix class:      template<class T>     class Matrix {         template<typename F>         friend Matrix<T> scalar_operation(const Matrix<T> &a, const T b, F f);          friend Matrix<T> operator+<>(const Matrix<T> &a, const T b);         friend Matrix<T> operator-<>(const Matrix<T> &a, const T b);         friend Matrix<T> operator*<>(const Matrix<T> &a, const T b);         friend Matrix<T> operator/<>(const Matrix<T> &a, const T b);   When I implemented the overloaded operator functions separately, they worked, but with this implementation, I get the following compiler error:      Undefined symbols for architecture x86_64:     "Matrix<float> scalar_operation<std::__1::plus<float> >(Matrix<float> const&, float, std::__1::plus<float>)", referenced from:         Matrix<float> operator+<float>(Matrix<float> const&, float) in matrix_test-3188cd.o     ld: symbol(s) not found for architecture x86_64   I imagine my error is related to the Matrix<float> scalar_operation<std::__1::plus<float> >( line because it looks like the linker is searching for a function with this header, which is slightly different from how it's declared in my file, but I've tried modifying my declaration and it throws additional errors.   Why am I getting this error and how can I fix it? Thanks!  EDIT: To clear up some confusion, all the code has been implemented in the header file since it is a templated class. There is no corresponding .cpp file.


I'm reading a book that claims that $\binom{n}{0}+\binom{n}{1}+\dots+\binom{n}{n}=2^{n}$  Is there a easy proof for this?


How to shutdown automatically when AC power is not available

My old laptop has a faulty battery, which shows 100% when on AC power but when unplugged it dramatically drops to random percentages within seconds and makes the machine turn off brutally. I am afraid of damaging my SSD (and my HDD) on which Ubuntu is loaded.   I wanted to turn the PC off as soon as the AC power is not available. I searched here and found . But I don't understand the answer for that question or atleast it is relevant to my situation.   Please explain me a way to shut down my laptop automatically as soon as the AC power is unplugged or when there is a power failure.


How do you activate different redstone currents each time?

For a map I'm making, there's a "Palm Reader", represented by a villager. When you throw a diamond into a nearby hopper, it gives you a fortune. Is there a way to activate different /say command blocks each time, so its not just the same fortune over and over again?  I've done some research, and there doesn't seem to be anything on the topic.


How to get access to Nintendo Switch development environment?

I would like to make game for Nintendo Switch.  I have been searching for an SDK of the same, but I couldn't find any. The only thing I found was that I can use Unreal Engine or Unity to make games for Nintendo Switch.  However I don't want to use any of these game engines and instead want to code from scratch, making my own game engine in the process.  Isn't there a C/C++ (or any language) sdk which will allow me to make games for Nintendo Switch without using Unreal/Unity or any other game engine ?


How can the pixel values of a raster image be extracted under a polygon fishnet?

I have a single band raster image of 30m by 30m resolution. I have already created a polygon fishnet (grid) of 300m by 300m with point labels over that. How can I extract the mean pixel value of the raster image overlaying each feature in the fishnet grid? Is it possible with Arcgis?  Please inform me.


Why does the "contact" page link to Google, Facebook, and Yahoo?

The  on each Stack Exchange site links to Facebook, Yahoo, and Google:    I am puzzled.  If I have an issue for which I need to contact Stack Exchange, why would I find links to Facebook, Yahoo, and Google helpful?


Logarithmic y-axis and restrict y to domain fails

I'm trying to plot data with a logarithmic y-axis and restricting the y-data to a specified domain, but compilation fails for a reason I don't understand. This is the code:  \documentclass{standalone} \usepackage{pgfplots} \begin{document}% \begin{tikzpicture} \begin{axis}[ymode=log, restrict y to domain=1:6] \addplot coordinates {(0, 1.1e1) (1, 1.7e3) (2, 0.0e0) (2, 3.4e7) (4, 8.1e5)}; \end{axis} \end{tikzpicture} \end{document}   Running it results in an error message:  ! Missing number, treated as zero. <to be read again>                     i l.6 ..., 1.7e3) (2, 0.0e0) (2, 3.4e7) (4, 8.1e5)};   According to the pgfplots manual for version 1.5.1 (29 December 2011), page 272 (about restrict x/y/z to domain), For logarithmic axes, min and max are logs of the respective values. If I disable either the logarithmic y-axis or the domain-restriction, the code runs successfully and output is as expected (but not as desired).  Software versions:   pdfTeX, Version 3.1415926-2.3-1.40.12 (TeX Live 2011) (format=pdflatex 2012.5.30) pgfplots 2011/12/29 v1.5.1 (git show 1.5.1-4-g53e640f )  tikz 2010/10/13 v2.10 (rcs-revision 1.76).   What's going on? What am I doing wrong? Or is this a bug?


The limit of the nth root of a to the n plus b to the n is the maximum of (a,b)

I've been asked to prove the following from Spivak's Calculus $$\lim_{n\to\infty}\sqrt[n]{a^n+b^n}=\max(a,b); a,b > 0$$  I understand that this is a proof by cases, and that our cases are $a=b$, $a>b$, and $b>a$. I have done the $a=b$ case, but I am stuck on the $a>b$ and $b>a$ cases.  Some hints would be appreciated-  Thanks!


Search questions from my favourited list?

I have favourited lots of question and every time I want to view some question I need to search for that question, which is really annoying. It's difficult to remember the keywords and the exact question I am looking for.  I want to suggest adding a feature which allows you to search any question from your list of favourited questions from a textbox (much like google autocomplete) or have some folder like structure to manage it.  I work on Javascript, jQuery, MySQL, PHP and lately Python and it is difficult to manage these questions.  Update: I still feel that this feature could still improve,rather than having a different page for it,it would be very convinient for evry single user to just click the favourites menu tab and have an autocomplete feature to the search bar.much like google.


My MySQL database was wiped and I think it was a SQL injection, where am I wrong?

So I have a test DB that is live, I was away for the holidays and come back and my MYSQL DB is wiped of data (only about 8 lines).  It was all test data so I am not worried about it, my thoughts is that I was SQL injected through my PHP signup form but I don't see any vulnerabilities here.  I am using variables for my SQL queries which is what I thought prevented this type of attack.  I am at a loss as to where the vulnerabilities are.  I only have 5 files, here is the one that I think is the problem, it is receiving data from a previous form.    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"> <title>Challenge Me</title>    <?php  if($_GET["dispname"] && $_GET["regemail"] && $_GET["regpass"] && $_GET["regpass2"] ) { if($_GET["regpass"]==$_GET["regpass2"]) { $regemail = $_GET["regemail"] ; $servername="localhost"; $username="***"; $password="***"; $database="***"; $conn= mysql_connect($servername,$username,$password)or die(mysql_error()); mysql_select_db("$database",$conn);   $query = 'SELECT email FROM users WHERE email = "' . $regemail . '"'; $result = mysql_query($query) or die(mysql_error());  if (mysql_num_rows($result) ) {         die("Duplicate email found!  Please press the back button to use another email or " . "CLICK HERE to have your password emailed");     }     else {}   $sql="insert into users (fullname, displayname,email,password)values('$_GET[fullname]','$_GET[dispname]','$_GET[regemail]','$_GET[regpass]')"; $result=mysql_query($sql,$conn) or $string = mysql_error();        $to = $_GET['regemail']; $subject = "Thank you for Registering!"; $message = "Hello " . $_GET['dispname']; $from = "noreply@challengeme.com"; $headers = "From:" . $from; mail($to,$subject,$message,$headers) or die('You have successfully registered however mail servers are currently down, you may or may not receive an email');    print "
You have registered successfully
";  print "You will receive an email shortly with your confirmation.  You may now log in"; } else print "passwords do not match"; } else print"Please fill out all required fields"; ?>


Windows application for Pathfinder combat

Is there any good application for Windows, where can I have combat map, something like figures and maybe some tracker (HP, initiative, etc.) where can I try out some combat situations in Pathfinder rules? It doesn't need to be with automated calculations.


I want to add an image/icon to tree view item on WPF. How can I do that? I'm coding a tree view with all my computer files and dir's and I want to make it a little more aesthetic.  I tried:  TreeViewItem item = new TreeViewItem();  item.Header = file icon image path; item.Header += "file";   but it didnt work.


Is "physical damage" proportional to momentum or kinetic energy?

If a rock is thrown at someone's head, or a car drives against a wall, or a meteor hits a planet, is the physical damage done to the object proportional to the projectile's momentum, or to its kinetic energy? (assume that the target object is at rest in the reference frame).  I'm sure that it depends on all kinds of factors, but roughly, does it depend linearly on the projectile's speed (as momentum does), or quadratically (as kinetic energy does).


I have a question that I was asked at an interview recently for an IT support job. I wanted to ask the same question somewhere on Stack Overflow but the answers will be completely opinionated and there will be no right or wrong answer.     I'm simply curious to see what other professionals would have suggested in the same situation. Is there a place on Stack Overflow for this?


Why am I getting a java.lang.NullPointerException?

Working on a homework assignment and I can't figure out why when I put anything in the actionPerformed method it causes errors, specifically null pointer errors. What I'm trying to do is have the button trigger the combination of two other text fields into another.  If I take the code out and just leave the logger, clicking the button triggers the logger. But for some reason if anything is actually inside of the actionPerformed method, it just throws errors at me.  import org.apache.logging.log4j.*;  import javax.swing.*; import java.awt.event.*;  public class MyPanel extends JPanel                      implements ActionListener {    private static Logger logger = LogManager.getLogger(MyPanel.class);     private JLabel lblFirstName;    private JLabel lblLastName;    private JLabel lblFullName;    private JButton btnSubmit;    private JTextField txtFirstName;    private JTextField txtLastName;    private JTextField txtFullName;      public MyPanel()    {       logger.debug("INSIDE PANEL CONSTRUCTOR !!!");       JLabel lblFirstName = new JLabel("First name: ");       add(lblFirstName);       JTextField txtFirstName = new JTextField("", 10);       add(txtFirstName);       JLabel lblLastName = new JLabel("Last name: ");       add(lblLastName);       JTextField txtLastName = new JTextField("", 10);       add(txtLastName);       JButton btnSubmit = new JButton("Submit");       add(btnSubmit);       JLabel lblFullName = new JLabel("Full name: ");       add(lblFullName);       JTextField txtFullName = new JTextField("", 20);       txtFullName.setEditable(false);       add(txtFullName);       btnSubmit.addActionListener(this);    }     @Override    public void actionPerformed(ActionEvent e)    {       logger.debug("Inside the Action Listener!");        txtFullName.setText(txtFirstName.getText() + " " + txtLastName.getText());    } }   I've tried set, setText, get text, and even just putting the getTexts into a string and putting the setTest(string) and none of that has worked. I think I'm missing something very important but I can't figure out what it is. All the tutorials online are about append to textArea, but this is trying to put two textFields into one and it doesn't have an .append function.


Golden Ball vs Golden Boot in FIFA World Cup

What is the difference between the Golden Ball and the Golden Boot awarded in the FIFA World Cup?


Replace a Tag Name while keeping the rest as it is

I want to preface by saying I am a novice at regex, and I've spent a considerable amount of time trying to solve this myself using tutorials, online docs, etc.  I have also gone through the suggested answers here.  Now here is my problem:  I have 267 lines like this, and each county is different.  <SimpleData name="NAME">Angelina</SimpleData>   What I need to do is to replace NAME with COUNTY and keep the rest the same including the proper county name:  <SimpleData name="COUNTY">Angelina</SimpleData>   I used the following Find to find all the lines that I wanted to change, and was successful.  <SimpleData name="NAME">[\S\s\n]*?</SimpleData>   It's probably not the best way to do this, but it worked.  I hope I've explained this so it can be understood.  Thanks, Paul


The number of posts to review stopped making any sense since I hit 10k rep

Though correlation doesn't imply causation I think there's a link between me hitting 10k rep and seeing this review count in the top bar:    It makes no sense at all and is always more than 200. This even happens when I reviewed 20 of almost each queue and certainly had nothing to review. The count doesn't add up even if I subtract 200 from the number.  What does the number exactly mean? If it's broken I'm gonna ad-block it because it harms my attention for no reason.


Quaternion with only two imaginary numbers

Why do quaternions not only use two imaginary numbers. Can we not simplify quaternions $$q = a + b\mathbf{i} + c\mathbf{j} + d\mathbf{k} \tag{1}$$ to the form $$ \begin{align} q & = a + b\mathbf{i} + (c + d\mathbf{i})\mathbf{j} \tag{2}\\   & = e + f\mathbf{j} \end{align} $$ Where $e,f \in \mathbb{C}$. Thus we only introduce one new imaginary number. Where we note that $\bf{ij} = k$, which holds true. This would make quaternions seem more like complex numbers and we only need to define the interactions between $\bf i$ and $\bf j$. The same would also hold true for octonions being represented as $s = g + h\mathbf{k'}$ where $g, h \in \mathbb{H}$. Where we see that we now have only 3 imaginary numbers instead of 7. This 'factorized' representation seems to simplify things and make these numbers look more familiar.


Shield spell - removing the special effects of a hit

Background A  spell is cast as a reaction to an attack that hits.  It applies its AC bonus even against the attack to which it is a reaction, meaning that it can make the attack that hit, retroactively miss and thereby not do damage. Shield 'interrupts'/potentially cancels its trigger, as stated in the DMG in the . Since the hit has retroactively become a miss, what happens to effects that were triggered by the hit in the first place?  Are they undone as well, or do they persist?  has two answers of nearly equal popularity, with one arguing that other effects triggered by the hit still persist, and the other arguing that they do not.  On the side of the argument that they do not occur is a (now-unofficial) tweet from Jeremy Crawford stating  If the attack has a special effect that relies on it hitting, that effect doesn't occur if the attack is turned into a miss.  However, the discussion on both sides therein focusses on a narrow interpretation of 'effects' as discrete, measurable things that happen to specified targets - the hit on the caster of the Armor, and the resulting damage to the creature making the attack. Are the 'special effects' of an attack referred to limited to things like damage or conditions that affect just the target of the attack, or do they include intangibles like knowledge for all intelligent observers? Scenario A party is traversing wilderness with abundant natural cover as well as opponents who are seeking to ambush them. A hidden opponent fires a missile weapon at a party spellcaster and hits.  In response, the spellcaster uses the shield spell and turns the attack into a miss.  However, the ambusher has now revealed their location to the spellcaster and everyone else in the party, since according to the rules of   If you are hidden--both unseen and unheard--when you make an attack, you give away your location when the attack hits or misses.  The party members begin to defend themselves and target the ambusher. The next round, a second hidden ambusher also fires at the spellcaster, hits, and also reveals their presence to the caster and the rest of the party.  The spellcaster again uses shield, and again converts the hit into a miss. This second ambusher, however, possesses the Skulker Feat (PHB 170)  When you are hidden from a creature and miss it with a ranged weapon attack, making the attack doesn't reveal your position.  Since the attack was now actually a miss, does the knowledge of ambusher's location persist as revealed, or is this knowledge undone? Does... ...the shield spell travel back in time, converting the hit to a miss before the party had knowledge of the second ambusher's location? ...knowledge of the ambusher's location count as a 'special effect' of the attack hitting, that now does not occur since the attack resolved as a miss? ...the 'special effect' of the knowledge of the ambusher's location get removed from only the caster, while their companions still know where the ambusher is? ...the knowledge of the ambusher's location not count as a 'special effect' of the attack, but rather as mundane effect, that is not changed by the shield spell? A good answer may use the Crawford quote or not.  If it does, it should convincingly interpret what is a 'special effect' and to whom it applies.  If the answer does not use the Crawford tweet, it should explain from where it draws its reasoning.


Render view is different from Camera Viewport and the passepartout is missing

I'm fairly new to Blender, and I might be making an obvious mistake. I'm having problems with the camera viewport and rendering. My camera view (Numb Pad 0) and the rendering (F12) are different. The rendering is much bigger. I also miss the passepartout, although the check mark is set. The most blender stuff is in english maybe I just don't search with the right words :). In every tutorial they say the camera viewport ( Numb pad 0) is the same as the render. So I am a little bit confused and sure I have activated or deactivated something. In another question there was a similar Problem but i couldn't comment. But there was the idea of checking clip start and End from the viewport and the camera viewport. There was a mistake but sadly it did not changed the different size of the rendering. It would be great if you could give me some advice :)


"Missing" files on external USB drive in linux mint 17.3

I have a 500 GB USB drive mounted as HPFS/NTFS and while copying files to the drive the copying process suddenly failed. After a unmount, unplug and reboot copying works fine again but files in one folder can't be accessed anymore:   ls: reading directory .: Input/output error   other folders work fine. badblocks found no errors on the external hard disk:  sudo badblocks -v /dev/sdd1 > bad-sectors.txt Checking blocks 0 to 487653042 Checking for bad blocks (read-only test): done                                                  Pass completed, 0 bad blocks found. (0/0/0 errors   mount reads thats fuseblk is used to  mount the the drive, i.e. ntfs-3g is used.  the last output of dmesg reads:  [63018.326130] usb 2-1: new SuperSpeed USB device number 3 using xhci_hcd [63018.384505] usb 2-1: New USB device found, idVendor=059b, idProduct=0070 [63018.384508] usb 2-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [63018.384510] usb 2-1: Product: eGo USB [63018.384511] usb 2-1: Manufacturer: Iomega [63018.384513] usb 2-1: SerialNumber: 0300000000006D48 [63018.413770] usb 2-1: Set SEL for device-initiated U1 failed. [63018.416875] usb 2-1: Set SEL for device-initiated U2 failed. [63018.425905] usb 2-1: Set SEL for device-initiated U1 failed. [63018.428713] usb 2-1: Set SEL for device-initiated U2 failed. [63018.469541] scsi host8: uas [63018.472788] usb 2-1: Set SEL for device-initiated U1 failed. [63018.477256] usb 2-1: Set SEL for device-initiated U2 failed. [63018.482405] scsi 8:0:0:0: Direct-Access     OEM      Ext Hard Disk    0000 PQ: 0 ANSI: 5 [63018.664361] scsi 8:0:0:1: CD-ROM            Virtual  CDROM                 PQ: 0 ANSI: 0 [63018.664664] sd 8:0:0:0: Attached scsi generic sg2 type 0 [63018.697536] sd 8:0:0:0: [sdc] 975319088 512-byte logical blocks: (499 GB/465 GiB) [63018.705474] sr 8:0:0:1: [sr0] scsi-1 drive [63018.705675] sr 8:0:0:1: Attached scsi CD-ROM sr0 [63018.705797] sr 8:0:0:1: Attached scsi generic sg3 type 5 [63018.758482] sd 8:0:0:0: [sdc] Write Protect is off [63018.758487] sd 8:0:0:0: [sdc] Mode Sense: 10 00 00 00 [63018.774133] sd 8:0:0:0: [sdc] Cache data unavailable [63018.774138] sd 8:0:0:0: [sdc] Assuming drive cache: write through [63019.025475]  sdc: sdc1 [63019.583520] sd 8:0:0:0: [sdc] Attached SCSI disk


Cross referencing between chapters of a thesis

Hi I am new to the forum and fairly new to Tex, if I miss anything out please let me know and I will be glad to post it. I am writing up my PhD thesis using Texmaker on a windows system. I have my document organised with a main file and a sub-directory containing chapter 1 to 5. I want to be able to use the labels I created in chapter two for example in the appendix and vice versa. Is there an easy way to do this?   I have tried following the advice of various posts of including the commands \usepackage{xr} and \externaldocument{Chapters/Chapter_2} in the individual chapters but this leads to an error when compiling.   My Preamble is as follows:  \documentclass[12pt,hidelinks,twoside]{report} \usepackage[utf8]{inputenc} \usepackage[T1]{fontenc} \usepackage[greek,spanish,english]{babel} \usepackage{textgreek} \usepackage[version=3]{mhchem} \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} \usepackage{amsmath, amsfonts, pifont, float, color, url} \usepackage[pdftex]{graphicx} \usepackage[style=numeric,backend=biber,sorting=none]{biblatex} \addbibresource{references.bib} \usepackage[pdftex, plainpages=false, pdfpagelabels, bookmarks=true]{hyperref} \usepackage{fancyhdr} \usepackage[center,font={it,small}]{caption}   I then have a section such as this in the main document:  \begin{document} %%... Title page ... \chapter{Theory and Methods} \label{chap:Theory and Methods} \include{Chapters/chapter_2} %%... Other chapters .... \end{document}   In Chapter 2 I have for example a label for a diagram which I may want to reference in other chapters:  \begin{figure}[H] \centering \includegraphics[height=10cm,width=\textwidth]{RF_colour_hi_res.pdf} \caption{Random Forest} \label{fig:2.1 Random Forest} \end{figure}   How can I have this label show up in other chapters after I type \ref ?  Many thanks in advance.  If any other information is required please let me know.   This has been answered in the comments although the references do not appear in the auto complete if they are copied and pasted in they still work.


direction of friction between block and table

I don't really understand the free body diagram of the table, as in, why is the force of block B acting on the table directed in the direction of the pulling force.  Can you help me out with that?


I would like to know what is the exact difference between These & Those.