Given Firefox 18, when I use "File" -> "Close Window" (or hit Ctrl+Shift+W) with another browser window open and multiple tabs in the current window, I am asked "You are about to close [some number of] tabs". However, when I do the same thing in the last open Firefox window, it asks me if I want to quit and whether to save the tabs for the next invocation, without specifying how many tabs I have open in that window.  Often, I want to get a quick count of the number of tabs open, and aborting closing the window is a quick way to get that number. But as it is, if I have only one browser window open, I need to open another browser window simply to get the question I want.  Can Firefox be configured to display the count of the number of tabs also when closing the last browser window of the running instance? How?

I like to use the Ctrl or Alt + Number shorcut to jump quickly to a specific tab. Problem is: When you have a lot of tabs open it is hard to look at them and quickly know which one is tab number 7.  Is there a way (extension possibly) to show a tab's number in its title? This way each tab would have a number added to its title right beside the . This way you could immediately tell which number you need to press to jump to a specific tab.  I use both  and Firefox, so I'm accepting answers for either one (though I'd prefer both =) ).


Can I put a folder in the top of the main drive (is that the root?) so that the two users of the machine can use it freely. For example, I'd like to put music in it so that both users can import to Rhythmbox. We also need to keep other various files and docs there and we need to edit files created by eachother.  I'm not magnificently knowledgeable of term commands, so if someone could give me reasonably detailed instructions, I'd be very grateful.  If there's a better way to do what I want; I'm listening...  Many thanks.  Using Ubuntu 18 (if you want to help with my Ubuntu<>MacOS filesharing problem, please look for my other post).

I have a folder in my home directory that I want to be truly shared between all users on the same computer.  So, I set the permission to be 777. Now, all users can access it and can create, ,edit, delete files in it.  However, I do not have write access to files created by other users.  How do I ensure that all files (existing as well as newly created/ copied) have rwx access to all users?


Why Google analytics not tracking my organic google keywords and can track other search engines like bing, yahoo, etc? screenshot:

I am using Google Analytics, now here when I go to "Traffic Source Overview" under that it shows Keyword as "(Not provided)" which is almost 40% of my traffic source. Now more than 90% of search engine traffic is from Google and still out of that for more than 40% of keywords are "(Not provided)".  Can anyone explain me what is going wrong here or how can I get that data? Because that comes as 1st option and is biggest keyword in the list. Will that be some crawler or secure google search?


Got my B1/B2 visa refused 20 days ago under 214-B. He just asked normal questions like why, with whom, for how many days, how much experience I have and how much I earn... and refused it.  I have 1.8 yrs experience and have a package of 240000 INR per year. I needed to re-apply asap.  What should be the best route I take to get it approved? When can be the best time? Will the bond of 3 yrs work? or what type of strong evidences I can show?

I went for B1 U.S. Visa at the U.S. Embassy in Delhi.   Interviewer: *Good Morning*. Me: *Good Morning* Interviewer: *What is your designation?* Me: *I am a Software Engineer.* Interviewer: *What is the name of your company?* Me: *It is XXX (I replied).* Interviewer: *What is the name of your client?* Me: *It is YYY (I replied).* Interviewer: *Have you ever been to U.S. before?* Me: *NO* Interviewer: *Have you ever been abroad before?* Me: *NO*   At this point he rejected my Visa with letter mentioning 214 (b) as the reason. I don't know why he actually rejected it.  But, I have decent 2+ years of experience with my company. And, I was going on a business meeting with the client. I would have come back after 2 weeks.  I don't know if re applying will help.


So I have a list of the top 100 boys names in Ireland:  Here's my PHP:  <?php $top100irishNames = <<<END Jack James Daniel Sean Conor Adam Harry Ryan Dylan Michael Luke Charlie Liam Oisin Cian Jamie Thomas Alex Noah Darragh Patrick Aaron Cillian Matthew John Nathan David Fionn Evan Ethan Jake Kyle Rian Ben Max Eoin Tadhg Finn Callum Samuel Joshua Rory Jayden Joseph Tyler Sam Shane Mark Robert Aidan William Ronan Eoghan Alexander Leon Cathal Mason Tom Oliver Andrew Oscar Ciaran Bobby Jacob Senan Rhys Scott Benjamin Cormac Kevin Lucas Alan Donnacha Jakub Christopher Filip Killian Josh Alfie Tommy Ruairi Odhran Oran Leo Isaac Dara Jason Zach Martin Peter Brian Danny Niall Tomas Edward Stephen Logan Kacper Anthony Billy END;  $top100irishNames_arr=preg_split("/\n/",$top100irishNames); for($i=0;$i<25;$i++){     echo getRandomWeightedElement($top100irishNames_arr)."\n"; }   function getRandomWeightedElement($arr) {     $rand = mt_rand(1, (int) sizeof($arr));      for ($i=0;$i<sizeof($arr);$i++) {         $rand -= $i;         if ($rand <= 0) {             return $arr[$i];         }     } }  ?>   Jack, James, Daniel, Sean, etc. should output a lot...  But here's some random output:  Ryan Cian Luke Charlie Harry Luke Harry Charlie Oisin Ryan Luke Luke Michael Liam Liam Adam Ryan Oisin Conor Oisin Liam Oisin Daniel Adam Oisin   I don't see any Jack/James/etc.?  I'm trying to have the sampler output the names at the beginning of the array most often, and the names at the end of the array least often.

I know how to generate a random number in PHP but lets say I want a random number between 1-10 but I want more 3,4,5's then 8,9,10's. How is this possible? I would post what I have tried but honestly, I don't even know where to start.


Is the list of badges standard across all Stack Exchange sites? Or can one site have a different set of badges?  This question asked on behalf of

Do we have different set of badges in different SE sites. eg. I don't see any 'Pundit' badge in badges popup in Hinduism SE.  Also, if the above is true, then can we include the left badges in a SE site at a later stage.


I'd like to create a list of words that need to be replaced across multiple HTML files. How can I do that?  eg. replace:   cat with dog parrot with monkey fish with tiger   across all HTML files in the selected catalog.

I want to know how I can find and replace a specific text in multiple files like in Notepad++ in the linked tutorial.  e.g.:


My friend says that Floating islands are in pre-hardmode, but I can't find them. Do floating islands exist in pre-hardmode?

I've been playing Terraria for a while, and I'd like to get up onto those Floating Islands for their loot (mainly interested in the Shiny Red Balloon).  What is the most reliable and/or easiest method to locate these Floating Islands?


Here is some data and a logarithmic model: df <- data.frame(   x = 1:8,   y = c(7.5,6,5.2,4.3,3.9,3.4,3.1,2.9) )  model <- lm(y ~ log(x), data = df)  I am able to use this model to predict y for any given x e.g. predict(model, newdata = data.frame(x = 10)) # 2.3  My question is, if I want to find y when x is known, can I do that? 'Reverse prediction' or what's the correct term? e.g. If I want to know the value of x when the function output is 8, how would I do that?

I have a set of experimental data points. I performed the measurements in triplicate, for each of the point of the data set. Therefore, I can draw each data point with the standard deviation of each triplicate. See the picture attached.  In experimental sciences, it is common to report a value with its standard deviation. Ex: a mean, +/- the std.  I can calculate a linear regression for the data set. If I have the equation of the linear regression, I can calculate x for any y. Let's take y=50 -> x=11.69  Now, is there a way to evaluate the "dispersion" of this extrapolated point ? Something like 11.69 +/- something.  I know it should be the other way around, like 50 +/- something for x=11.69, but then I could use the equation to transform it to x.  Basically what I'm asking: is there a global "standard deviation" for a complete linear regression ?  EDIT: When I say "any y", I mean that y will not be an experimental value. I choose it to be 50.


Do i need to do another test after KW to account for covariates or is there a way to account for covariates when doing the initial KW test in SPSS?

Hi I am trying to find the non-parametric equivalent of a two-way ANOVA (3x4 design) which is capable of including interactions. From my reading in Zar 1984 "Biostatistical analysis" this is possible using a method put forth in Scheirer, Ray, and Hare (1976), however, according to other posts online it was inferred that this method is no longer appropriate (if it ever was).  Does anyone know what method would be appropriate for doing so, and if so the corresponding functions in R or Stata?


Is there something wrong with my query?  function needExport($table, $key, $id, $stamp) {     try {         $dbW = dbConCC();         $stmt = $dbW->prepare("SELECT * FROM :table LIMIT 10");         $params = array(':table' => "tmlaender");         $stmt->execute($params);         while ($row = $stmt->fetch()) {             echo $row;         }     }     catch(PDOException $e) {         echo json_encode($e->getMessage());     } }   I get the follwoing Syntax Error:  "SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''tmlaender' LIMIT 1' at line 1"   Can't find any mistakes in this "simple" query.

Why can't I pass the table name to a prepared PDO statement?  $stmt = $dbh->prepare('SELECT * FROM :table WHERE 1'); if ($stmt->execute(array(':table' => 'users'))) {     var_dump($stmt->fetchAll()); }   Is there another safe way to insert a table name into a SQL query? With safe, I mean that I don't want to do  $sql = "SELECT * FROM $table WHERE 1"


I'm currently 16 and I've been wondering if my English is considered as "native" English and the reason why I'm currently questioning this is because I'm currently creating a Curriculum.  I'm a Brit brought up in Spain that has been brought speaking both English and Spanish.  I studied in a Spanish school and have Spanish friends, but I also have British friends, and apart from when I'm speaking with the Spaniards, I think and speak in English.

Who is considered a native speaker of English? I am a little confused by the various answers found online.


I have a problem with some kind of malware?(or another kind of virus), I cant get rid of it, heres some info i figured out, I hope that someone could actually help me : This virus is in my computer corrupting my browsers, i did some bad download in google chrome, but the virus actually infected all the browsers I have and also for some reason downloaded mozzila firefox and added to my quickbar. - I am using win 10   Virus does : - Changing browser search engine, homepage - Adds a lot of ads - Sometime shutting down browser for fun - Maybe editing/creating windows registers? ( not confirmed ) - cannot change my default apps  - adding search engine into browser called : Search123 ( or something like that )   I think that it is something more than just some basic adware, because i have experience with it and it is easily removable, because it has some name and you just delete it, but this kind of virus is something bigger, it adds ads from many "pages" , so i think that this is some SUPERmalware, because it possibly consists of many adware viruses. I tried few apps to delete it,but didnt work out, I tried some basic anti adware/malware apps, Avast antivirus, windows firewall thing, Avira antivirus and few more, nothing did work.  Could please someone help me? this thing makes me mad alot, and i dont know how to fight it.

What should I do if my Windows computer seems to be infected with a virus or malware?  What are the symptoms of an infection? What should I do after noticing an infection? What can I do to get rid of it? how to prevent from infection by malware?   This question comes up frequently, and the suggested solutions are usually the same. This community wiki is an attempt to serve as the definitive, most comprehensive answer possible. Feel free to add your contributions via edits.


According to , (1) a ** b is numerically computed via (2) exp(b * log(a)), let's say at least for float, real and positive a & b. Or does it? I don't suppose complex and negatives are also handled this way. My ultimate question is whether (2) confers any numeric precision or stability advantage over (1), which is 'no' if they're same, and the answer lies in CPython but I don't know where exactly. How does Python compute a ** b?

I'm wondering where I find the source to show how the operator ** is implemented in Python.  Can someone point me in the right direction?


I had windows 8.1 on my laptop, and I tried to upgrade to windows 10, which broke it. I put Ubuntu 14.04 on it (wiping out everything else) and I would like to go back to windows 8.1. Is there a way I can do this?

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


I found a bug in the latest version of Safari, how can I report it to Apple?  They no longer have the menu option to submit bug reports. I've tried searching Google but all the results are outdated.

Inspired by  I became curious about what is the current preferred mechanism for submitting bug reports and feature requests to Apple. I'm aware that they have the internal RDAR bug tracking system, and that there is an  project to crowdsource the tracking of issues, but I'm at a loss as to the preferred channel to submit something.    Is there a public-facing portal for submitting issues?


public int getPos(int index) {     if(this.hasAllTerms == false){         throw new IllegalArgumentException("Not all terms are present");     }     else if(index < 0 || index > terms.size()){         throw new ArrayIndexOutOfBoundsException("Index out of bounds!");     }      return minSnip.get(minSnipIndex)[index+1];   }  }   at the else if line my Junit test fails and says null pointer exception. Where is a null pointer?

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


Why does the fact that $\int_0^1\int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2} \,dy \,dx = \frac{\pi}{4}$ and $ \int_0^1\int_0^1 \frac{x^2-y^2}{(x^2+y^2)^2} \,dx \,dy = -\frac{\pi}{4}$ doesn't contradict Fubini's Theorem? Does the tangent function have something to do with that matter?

I have a function defined as follows: $f(x,y)= \dfrac{x^2-y^2}{\left(x^2+y^2\right)^2}$, if $(x,y)\neq (0, 0)$ and $f(x,y)=0$ if $(x,y)=(0,0)$.  Now, $$\int_0^1\int_0^1 f(x,y)\,\text{d}x~\text{d}y=-\frac{\pi}{4}$$ and $$\int_0^1\int_0^1 f(x,y)\,\text{d}y~\text{d}x=\frac{\pi}{4}.$$   The question I have is this: why does this not contradict Fubini's theorem?    thanks.


Let's say I have two classes: const request = require("./request");  class Message {     constructor(client, id) {         this.client = client;         this.id = id;     }      async function fetch() {         // make a request         // the code inside this function is always identical         return await request(`/${this.id}`);     } }  class Client {     constructor() {         this.messages = {};         for (let i = 0; i < 5; i++)             this.messages[i.toString()] = new Message(this, i);     } }  So my first question is when setting the value of Message#client, does this create a reference to the Client class? i.e. does this create a copy of the class in memory, or does it simply provide a reference to it? Additionally, if I were to have this Message#fetch() function attached to every Message class as shown (each function is completely identical), would this be extremely inefficient (with an individual copy of this function being made for each class constructed) or would Node.JS optimise it, so that it actually only stores it once and all others are references?

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


Let's assume we are talking about a character with both the Polearm Master and Sentinel feats wielding a reach weapon. If an enemy enters my reach, and I hit him using the Polearm master's second perk, would the Sentinel Feat's first perk make him stop 10' from me or would he stop at 5' from me?  I think it would, but it also does seem a little too good to be true: the ability to force an opponent to wait for a full turn before making an attack, unless he happens to have a reach weapon?  To highlight how overpowered it could be:  Fighter (Battlemaster) with the two feats in question and the Precision Attack maneuver wielding a halberd. Any single Opponent who uses melee attacks and doesn't have a long reach.  Opponent's turn:  Tries to come in range to hit me. OA from Polearm Master locks him down. If I miss, use Precision Attack to make it a hit. He can't use any attacks.  Other turns:  I (and any other melee teammates) all get to use all of our attacks, and then all step back to just 15 feet from him. The first person in initiative gets swung at by the enemy's OA, but everyone else is clear.  In single enemy encounters this allows an easy pass for quite a few of them, with little regard for their stats. In duel situations, it golden.  Feats for reference. Irrelevant parts not included.       Polearm Master         ...   While you are wielding a glaive, halberd, pike, or quarterstaff, other creatures provoke an opportunity attack from you when they enter your reach.           Sentinel Feat         When you hit a creature with an opportunity attack, the creature's speed become 0 for the rest of the turn.   ...   ...

One of the benefits of the Polearm Master feat (PHB, p. 168) is:     While you are wielding a glaive, halberd, pike, or quarterstaff, other creatures provoke an opportunity attack from you when they enter your reach.   One of the benefits of the Sentinel feat (PHB, p. 169-170) is:     When you hit a creature with an opportunity attack, the creature’s speed becomes 0 for the rest of the turn.   So if an enemy aproaches, you hit it with the opportunity attack from Polearm Master, and because of Sentinel it is now stopped 10 feet away from you. They can not hit you, you hit them on your turn and move back 5 feet. Repeat at will.  Is this unbeatable in a duel? Am I not seeing something?


I want to like a picture of someone else on Facebook, but I do not want friends to see that on the news feed.  Is is possible to change the settings in "who can see your future posts"? Does that also include the photo likes?

(I am not asking how to block my posts on my timeline.)  I am asking how I can block my activity, such as posting in open groups, making comments on people's posts, adding a friend, liking a photo, liking a post, etc., from people seeing it in their news feeds?  I don't want people seeing my interactions with other people.


I have a question worries me a lot, I have read on "" that members' posts are subject to the "Creative Commons" license.  The question is:When I benefit from the answer of any members, Do I have to mention the name of the answer holder within my program?  For example:If I found one of the answers on this site was how to use the "loop" in Java, Then I used that code in my program, Do I have to referring to the answer holder within my program? and is the length of my life whenever I use the loop of repetition in my programs must i mention the name of the answer holder?  The other question is, If I change a little bit in the code I got from the answers, should I mention the owner of the answer as well? Also the question includes books and authors, should I mention the owner of the Book as well? My questions may be strange, but it really does concern me.

I already found  handling the case if you got some information from Stack Exchange for my thesis. Unfortunately I did not find anything about the case that I get a solution (not necessarily from stackexchange) for a specific problem.  For example, if I have a problem with a specific part in my code, or if I have to design a circuit, and I run into a problem: What is the threshold of information, i.e. when should I cite the answer in my thesis? Should I always cite Stack Overflow (or the other web page), even if its just for two lines? Where is the threshold?    And how should I do this in my code? Should I rather make a comment block around the specific part of the code, redirecting to SO, or should I simply cite it in my thesis?


I need to know, if anyone knows a way to calculate an unbiased linear estimator alternative to the Ordian Least Squares estimator. Any reference or comment, is very appreciated.

For a linear model the OLS solution provides the best linear unbiased estimator for the parameters.   Of course we can trade in a bias for lower variance, e.g. ridge regression. But my question is regarding having no bias. Are there any other estimators that are somewhat commonly used, which are unbiased but with a higher variance than the OLS estimated parameters?  If I would have a huge data set I could of course sub-sample it and estimate the parameters with less data, and increase the variance. I assume this could be hypothetically useful.  This is more of a rhetorical question, because when I have read about BLUE estimators, a worse alternative is not provided. I guess that providing worse alternatives could also help people understand the power of BLUE estimators better.


I want to create threads that will add something to an array, but, if they don't do that in less than 2 seconds, I want to terminate them. This is a prof of concept, so the code is simple. Every second I want a thread to add that item in the list, so a thread runs after 0, 1, 2, 3 and 4 seconds. The idea is to not let the thread 3 and 4 run. import threading, time  myList = []  def foo(value):     global myList     time.sleep(value)     print("Value: {}".format(value))     myList.append(value)  threads = []  for i in range(5):     th = threading.Thread(target=foo, args=(i,))     threads.append(th)  for th in threads:     th.start()  What do I do now? I tried using some other logic like using th.join(timeout)  But that doesn't seem to work.

Is it possible to terminate a running thread without setting/checking any flags/semaphores/etc.?


I have a textfile as follows:  Value1 = windows Value2 = Processor Value3 = pwower plug   Right now i am retrieving complete file as follows:  std::ifstream myfile; myfile.open( "D:\\values_user.txt", std::ios::in );  if( !(myfile.is_open()) ) {   std::cout << "Error Opening File"; std::exit(0);   }  std::string firstline;   while( myfile.good() ) {     std::getline( myfile, firstline);     std::cout<< "\n" << firstline <<"\n"; }   I want to  retrieve window, processor and pwower plug i.e. just want to have values after '='. So, suggest me how can i achieve this.

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


How can I find the sum of this column from a file named cars?  73 60 45 102 15 50 115 30 10 180 85 25   How can I add these numbers up (using the command line)? I showed this list typing  awk '{ print $4 }' cars

I am looking for a command that will accept (as input) multiple lines of text, each line containing a single integer, and output the sum of these integers.  As a bit of background, I have a log file which includes timing measurements. Through grepping for the relevant lines and a bit of sed reformatting I can list all of the timings in that file.  I would like to work out the total. I can pipe this intermediate output to any command in order to do the final sum.  I have always used expr in the past, but unless it runs in RPN mode I do not think it is going to cope with this (and even then it would be tricky).  How can I get the summation of integers?


I created a Wordpress website with a particular user name that I no longer use (I fully deleted the Wordpress user and created a new one). Yet when I run a Google search for the initial user name, my Wordpress site still comes up in the search results even though there are no longer any instances of the name in my site. Any ideas how I can get Google to stop indexing that particular piece of info?

I was searching about removing the a domain/site being listed in Web Search Results (like, Google Search) and i found solution, .  I believe it will be the solution but what i still need to know is:   How long will it take to bring down my Website being listed from Search Engine Results?


I have a question what would be the best combos for a dweller to go to the waste land?   Like maybe endurance and luck or endurance luck and strength or should every thing should be high when a dweller is exploring the wasteland?

Trying to get the best out of wasteland exploration here! I get it that you'd obviously need a big gun for survival out there, but apart from that, I'm wondering which stats / gear can get the best out of exploration.    How would you choose who to send out exploring from your dwellers. Which stat is the most important to choose explorers? Strength or endurance maybe? Does it make much of a difference equipping combat outfits? If so, whats the most important stat to boost through outfits?


I'm currently learning about thread in Java and I saw these examples on the net.  Thread t1 = new Thread(new Runnable() {     @Override     public void run() {         //code....     } });   and  Thread t2 = new Thread() {     @Override     public void run() {         //code....     } };   What's the differences between creating thread with and without creating anonymous runnable? Which one is correct way to use a thread?

From what time I've spent with threads in Java, I've found these two ways to write threads:  With implements Runnable:  public class MyRunnable implements Runnable {     public void run() {         //Code     } } //Started with a "new Thread(new MyRunnable()).start()" call   Or, with extends Thread:  public class MyThread extends Thread {     public MyThread() {         super("MyThread");     }     public void run() {         //Code     } } //Started with a "new MyThread().start()" call   Is there any significant difference in these two blocks of code ?


I downloaded a file called SOURCE_SVR_Linux_38037.tar.gz, how do I install it?  It's the package for splashtop.   I'm pretty new to Linux, so please explain with detail.

I have downloaded tar.gz files. But I don't know how to install it. How do I install this kind of file?


Suppose a bullet were to be fired with a velocity $v$ from the surface at equator. Considering the spin of Earth will it land at the same spot?  I tried to solve this assuming constant acceleration due to gravity.  Since the horizontal velocity of the bullet remains constant at height $h$ the angular velocity will be in (angular velocity at ground is $\omega$ and radius of Earth is $R$) $$ \omega' =  \frac{\omega \times R}{(R+h)} $$ Now $\omega'$ can be written as $d\theta/dt$ and $h$ as  $v\times t-0.5\times g\times t^2$  so after rearranging we get $$ d\theta = \frac{\omega\times R}{(R+vt-0.5\times g\times t^2)}dt $$ Integrating this wrt to $t$ from $0$ to $2\times v/g$ gives me the angular displacement of the bullet. Angular displacement of ground is $2\times v\times \omega/g $and if we subtract the two and further multiply by $R$ we should get the distance traveled further by the ground.  However after calculating everything I'm getting very high distance. For example, a bullet fired at $1700m/s$ will land $2,340m$ away which seems absurdly wrong. Can anyone point out where my mistake is?

If I'm standing at the equator, jump, and land 1 second later, the  Earth does NOT move 1000mph (or .28 miles per second) relative to me,  since my velocity while jumping is also 1000mph.   However, the Earth is moving in a circle (albeit a very large one),  while I, while jumping, am moving in a straight line.   How much do I move relative to my starting point because of this? I  realize it will be a miniscule amount, and not noticeable in practise,  but I'd be interested in the theoretical answer.


After I upgraded my Ubuntu from 14.04 to 16.04, I am getting a weird line on my screen each time I power on my laptop:    /dev/sda5: clean, 956436/30277632 files, 37421826/123093120 blocks   What does this line mean?  I worry about the meaning of the numbers, because the first number says that some files were cleaned, and the second one says that some files were blocks...   Nothing special or complicated, just for general understanding.

On every bootup it's the same:  /dev/sda1: clean, 908443/38690816 files, 44176803/154733312 blocks   Is it some kind of option Ubuntu uses to ensure filesystem consistency or is there something wrong with my HDD? fsck takes up to 30s while booting and so about triples the time needed otherwise.  Full output (partly in German):  Begin: Loading essential drivers ... done. Begin: Running /scripts/init-premount ... done. Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done. Begin: Running /scripts/local-premount ... done. Begin: Running /scripts/local-bottom ... done. done. Begin: Running /scripts/init-bottom ... done. fsck von util-linux 2.20.1 /dev/sda1: sauber, 908443/38690816 Dateien, 44176803/154733312 Blöcke udevd[623]: unknown key 'SYSFS{idVendor}' in /lib/udev/rules.d/45-libticables.rules:6  udevd[623]: invalid rule '/lib/udev/rules.d/45-libticables.rules:6'   * Starting mDNS/DNS-SD daemon                                                 [ OK ]  * Starting Reload cups, upon starting avahi-daemon to make sure remote queues are populated                                                                   [ OK ]  * Starting configure network device security                                  [ OK ]  * Starting bluetooth daemon                                                   [ OK ]  ####* Starting all other stuff


I have a county-level map that is displaying nicely ... except for around 300 counties, all in 5-6 states, which are blank. All of the FIPs, county names, lats/longs are consistent in the data file, so I'm puzzled. Any clues?  Map:   Data file:

I have a data  with columns of county and state names as well as FIPS codes for 1990 U.S. counties.   I cannot easily merge shape data into the data (e.g. the Census ), but CartoDB does not recognize the "administrative regions" being these counties at all when I ask to georeference this data.   Is there a way around this?


I'm working on a program where I need to run the following.  SELECT questionID FROM TableX WHERE validAudit = 1;   I'm able to connect to the database in question, and have even managed to successfully insert data to it. The problem is that the SELECT statement from above should return 118 results to my results set. Instead, I get one result at best, and the program crashes with a null pointer exception.  public static List<Integer> getQuestionID() throws SQLException{         Connection conn = null;         Statement stmt = null;         List<Integer> questionIDs = null;         String query = "SELECT questionID FROM Questions WHERE GAIG_AMIG = 1;";          try{             conn = getDBConnection();             stmt = conn.createStatement();             ResultSet IDs = stmt.executeQuery(query);              while(IDs.next())             {                 int id = IDs.getInt("questionID");                 JOptionPane.showMessageDialog(new JFrame(), "Current questionID is " + id, "Question ID", JOptionPane.INFORMATION_MESSAGE);                 questionIDs.add(id);             }             IDs.close();             return questionIDs;         }catch(SQLException e){             JOptionPane.showMessageDialog(new JFrame(), e.getMessage());         }finally{             if(stmt != null)                 stmt.close();             if(conn != null)                 conn.close();         }         return questionIDs;     }   Here's the method where it fails. The program specifically fails at:  questionIDs.add(id);   I've looked through Oracle's documentation on this, as well as here on SO. I haven't found an instance exactly like mine, and I can't get it to properly pull the information that I know is there.  SHOW ME WHERE IT'S DUPLICATED. I've looked through all the SO questions about JDBC MySQL that I could find, and NONE of them matched this exact scenario.

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


As I have studied Mechanics and Thermodynamics, it appears that many of the concepts and ideas behind Physics depend on the Law of Conservation of Energy. The textbooks, however, don't explain where does this Law come from and why it is treated like absolute truth. Conservation of Energy is always defined in terms of itself, in other words, many textbooks justify C.E. by using C.E. or simply implying it is true. However, I am sure that there is a justification that I have yet to see. Noether's theorem appears to be a solution (However, I do not have any knowledge about it.) but Conservation of Energy was already a thing before her theorem. How did physicists come up with this idea and why did they accept it as general truth at some point?

My physics instructor told the class, when lecturing about energy, that it can't be created or destroyed.  Why is that?  Is there a theory or scientific evidence that proves his statement true or false?  I apologize for the elementary question, but I sometimes tend to over-think things, and this is one of those times. :)


When spacetime stretches, does both space and time stretch proportionally. That is, if you stretch Planck-length doesn't Planck-time also stretch proportionally? I find this to be a conundrum.

Einstein's big revelation was that time and space are inseparable components of the same fabric. Physical observation tells us that distant galaxies are moving away from us at an accelerated rate, and because of the difficulty (impossibility?) of defining a coordinate system where things have well defined coordinates while also moving away from each other without changing the metric on the space, we interpret this to mean that space itself is expanding.   Because space and time are so directly intertwined is it possible that time too is expanding? Or perhaps it could be contracting?


Let's say we are categorizing people in a photograph. Which of these is correct?   Artists with hats Artists with a hat   No artist has multiple hats.  The first option sounds better to my ear, but I'm not sure. Is either one definitely wrong? Why? Is there a name for this rule?  To make my example, a full sentence, I might say: "Please identify the artists with hats."

The usage of singular and plural has always been confusing for me.   I often see sentences like these         People are using cell phones.   People are using a cell phone.      Does the first sentence mean everyone has a phone and they are all using their own?  Does the second sentence mean they are sharing one cell phone?   If I see a group of people holding a cell phone in their hand(s), <- even this is confusing for me, should I use the first sentence then?   Another example: you see two men, and both of them are carrying a bag. Which sentence should I say/use?        They are carrying backpacks          They are carrying a backpack      Could you please make it clear for me?


Is there a tool for drawing Feynman diagrams that can be used to post these diagrams on physics stack exchange?

Undoubtedly, people use a variety of programs to draw diagrams for physics, but I am not familiar with many of them.  I usually hand-draw things in  which is powerful in some regards, but it is time consuming to do things like draw circles or arrows because I make them from more primitive tools.  It is also difficult to be precise.    I know some people use LaTeX, but I am not quite sure how versatile or easy it is.  The only other tools I know are Microsoft Paint and the tools built into Microsoft Office.  So, which tools are commonly used by physicists?  What are their good and bad points (features, ease of use, portability, etc.)?  I am looking for a tool with high flexibility and minimal learning curve/development time.  While I would like to hand-draw and drag-and-drop pre-made shapes, I also want to specify the exact locations of curves and shapes with equations when I need better precision. Moreover, minimal programming functionality would be nice additional feature (i.e. the ability to run through a loop that draws a series of lines with a varying parameter).  Please recommend few pieces of softwares if they are good for different situations.


(1) The density of water increases as one approaches the bottom of the sea.  (2) The density of neutron stars also increases from crust to core.  Black holes with greater mass have a larger radius and I have read the density of a SMBH might be similar to air at the Event Horizon. Would there be any dependable ratio between mass and density in Black Holes?  AND is the density of the interior isotropic?  IF NOT...  Is there any evidence to suggest that a Black Hole would increase in density in a similar way to cases (1) and (2) mentioned above?

How do scientists calculate that density? What data do they have to calculate that?


Installing java 8 version in Ubuntu 14.04 and require jdk8. After extracting files from jdk 1.8.0 tar package from oracle java page and moving it to usr/lib/jvm, I am unable to find the oracle_jdk8 directory.

I want to install Oracle's JRE and to update to the latest version with the Software Updater when they released. Is there a Ubuntu package that is provided by Canonical or Oracle?  Before release Java 7, I followed  to install Java 6.  But it doesn't work for Java 7. There is no package sun-java7-xxx. How can you install Java 7?


It keeps showing me this warning when i try to update   W:Failed to fetch http://ppa.launchpad.net/sergio91pt/synaptics+clickpads/ubuntu/dists/quantal/main/source/Sources  404  Not Found , W:Failed to fetch http://ppa.launchpad.net/sergio91pt/synaptics+clickpads/ubuntu/dists/quantal/main/binary-i386/Packages  404  Not Found , E:Some index files failed to download. They have been ignored, or old ones used instead.

PPA seems to be constantly offline. Whenever I use sudo apt-get update, this error is shown:  W: Failed to fetch http://ppa.launchpad.net/ 404  Not Found   How do I fix these errors?


I want to compare strings in Bash using if statements, but it doesn't work:  #!/bin/bash os=`lsb_release -r | sed 's/.*://'` echo $os if [ $os="16.04" ] then echo "g" elif [ $os="14.04" ] then echo "b" else echo "c" fi

The following  code is supposed to compare two strings or variables. But, I cannot do it. Here, output doesn't depend upon the changing of inputs. Can anyone correct this code?    #!/bin/sh   echo "Enter your username1:"   read username1   echo "Enter your username2:"   read useraname2   if [ "$username1"=="$username2" ]   then   echo 'Same'   else   echo 'Different'   fi


I have a model: $$ \ln({\rm earnings}) = a+b_1{\rm female}+b_2{\rm white}+b_3{\rm female}\times{\rm white} $$ ${\rm female}$ and ${\rm white}$ are dummy variables.  I have interpreted $b_1$ and $b_2$:    $b_1$ = change in female earnings comparing to male given you are non white $b_2$ = change in white earnings comparing to non white given you are male   But I am unable to interpret the coefficient of the interaction term ($b_3$). Please help me with this.  Let me make it more clear what I need out of this regression $$ \ln({\rm earnings}) = 2.618656-.0899657{\rm female}+.382019{\rm white}-.2754126 {\rm female}\times{\rm white} $$ Now i know there is gender pay difference with b1, I also know there is race pay difference with b2. Now with b3 i need to know is their a gender pay gap for whites only. How can I figure that out with regression above and without test.

I have a model: $$ \ln({\rm earnings}) = a+b_1{\rm female}+b_2{\rm white}+b_3{\rm female}\times{\rm white} $$ ${\rm female}$ and ${\rm white}$ are dummy variables.  I have interpreted $b_1$ and $b_2$:    $b_1$ = change in female earnings comparing to male given you are non white $b_2$ = change in white earnings comparing to non white given you are male   But I am unable to interpret the coefficient of the interaction term ($b_3$). Please help me with this.  Let me make it more clear what I need out of this regression $$ \ln({\rm earnings}) = 2.618656-.0899657{\rm female}+.382019{\rm white}-.2754126 {\rm female}\times{\rm white} $$ Now i know there is gender pay difference with b1, i also know there is race pay difference with b2. Now with b3 i need to know is their a gender pay gap for whites only. How can i figure that out with regression above and without test.


I want to show that if a function $f:(a,b) \rightarrow \mathbb{R}$ has a continuous extension to [a,b], then f is uniformly continuous. Also, assume that $(X, d_x)$ and $(Y, d_y)$ are nonempty metric spaces and all subsets of $\mathbb{R}^k$ are given the Euclidean metric.   I know the proof is trivial, but I'm worried about my notation as I don't think I quite understand continuous extension correctly. I understand that for $E \subset F \subset X$, the function $g: F \rightarrow Y$ is an extension to f if $g(x)=f(x) \forall x \in E$.   So, we have $(a,b) \subset [a,b] \subset \mathbb{R}$ and $f: (a,b) \rightarrow \mathbb{R}$. So if f has a continuous extension to a,b, then (f(x)) = f(y)) $\forall x \in (a,b), y \in [a,b]$. And so this then implies that d(f(x), f(y)) = 0, and so $\forall \epsilon > 0, \exists \delta > 0$ s.t. $d(x, y) < \delta$ implies $d(f(x), f(y)) < \epsilon$.   Help and hints would be much appreciated!

Let $E \subset F \subset X$ and $f:E\rightarrow Y$. We say that the function $g:F\rightarrow Y$ is an extension of $f$ if $g(x) = f(x)$ for all $x \in E$.   Let $f: (a, b) \rightarrow \mathbb{R}$. Show that $f$ has a continuous extension to $[a, b]$ if and only if $f$ is uniformly continuous on $(a, b)$.   $(X,d)$ is a metric space.  Hint: To prove $\Leftarrow$ start by showing that $f$ maps Cauchy sequences to Cauchy sequences. Then how should you define $g(a)$ and $g(b)$?  The $\Rightarrow$ part of the proof was quite simple, but even with the hint, the other way seems a bit difficult. Doesn't the first part of the "hint" follow from the way we defined $f$? If so, how do I prove this? Help/Hints appreciated!


After the new announced games and several remakes and mixes out there I'm interested in the chronology order of the Kingdom Hearts story. Can anyone tell me the whole(so far) Kingdom Hearts chronology sorted by story events?

I recently started playing the Kingdom Hearts series (for the first time - I realise this is a little delayed) and am kind of confused at the sheer number of games there are and the amount of platforms they are available on.  Could someone provide me with a SPOILER FREE timeline in which the games take place (im sure this information is out there some where - I'm just cautious to look it up because i've already ruined a few bits of the story for myself trying to do so).  Also am I right in saying that on Kingdom Hearts, Kingdom Hearts 2 and the upcoming Kingdom Hearts 3 (Dream Drop Distance) are the only games that are part of the 'CORE' story?


After installing Gnome on my 14.04 system running unity, my desktop folder (~/Desktop) doesn't appear on my desktop any-more. I only see the splash background that says 14.04 LTS in lower right hand corner.  I have tried  and ubuntu-desktop but did not help.  After the Gnome installation my startup screen when the machine boots also says Ubuntu Gnome, which is not wat I was expecting. (I only installed gnome for x2go to work.)  This installation was upgraded from 12.04 also running Unity

I am student from Indonesia.  I've installed GNOME 3 from latest PPA and used instructions written by user Jon :    And after that, I removed GNOME 3 and used instructions from above question too. But in GNOME 3, right-click can't do in Desktop (File Manager does not handle desktop) and it's also exists to my old Unity desktop :(  How I can fix it? Thanks so much.    Hmm, still not working :( Thanks for the answer :D  By default in GNOME 3, File Manager does not handle the Desktop, but I using Gnome-Tweak-Tool for fix it... But before I removed GNOME 3, I return the initial setting 'File Manager does not Handle Desktop' And the setting was also influential in Unity :(  Any others??


Please explain why static friction is greater than kinetic friction logically. Speak about it microscopically and tell what does happen on surfaces of objects by considering electromagnetic force between atoms on surface.

When dragging an object, there is a greater start-up force than the force it takes to keep it moving. Why is this? Why are there two different values for friction?


For example a person might be really into soccer so they do a bunch of soccer until hey get bored, but then they move to carpentry and get pretty good at that and know everything then they move on I, need a good word or phrase to describe this ferocious nomadic interest acquiring.

Is there a word or a term used for someone who hops from idea to idea?  More specifically, for someone who jumps from idea to idea without ever really completing any of them.


So Tom Riddle was described as sort of "handsome" and stuff in the second book.  Then he went someplace and completely changed his appearance, and became snakelike and stuff. I believe he is in the middle of the transformation in the middle when he asks Dumbledore for the job.  How does he do it?

The nose of Tom Riddle (as a student) was fine, as I have seen in the movies. But, Voldemort's nose doesn't look like a normal human nose. What really happened?


My enumeration should contain four key words:   Aggregate Power Proximate Power Offensive Power Offensive Intentions   I want to enumerate them and take these four key words as the enumeration label. At the same time I would like to set them as \textbf{}.  My attempts were working around the below example:  \begin{enumerate}[Label=\textbf{\item[]}]     \item[Aggregate Power]     \item[Proximate Power]     ... \end{enumerate}   I would like to avoid writing \textbf{} in every label.  How can I set an item format for the customized but changing labels?

How can a list be created, whose items are both    enumerated (a,b,c,d,...)  and allow for setting a description via \item[texthere] ?   Im am using MikTex on Windows.


Harry Potter and the Deathly Hollows:     "He lost his hood during the chase. Sectumsempra was always a   specialty of Snape's. I wish I could say I'd paid him back in kind,   but it was all I could do to keep George on the broom after he was   injured, he was losing so much blood."   I always thought that Snape discovered/created this spell. The spell was handwritten in the Half Blood Prince's textbook. I also thought I remembered reading it somewhere.   Also in the movie Snape criticizes Harry when he tries to use it against Snape and tells Harry, "You dare try to use my own spell against me?" This implies it's Snape's spell.  But the passage above implies that it was a prefered spell of Snape's as opposed to something he created.  Was this a generally known spell that Snape used, or was it something that he created?

In the Harry Potter series, are wizards capable of creating their own spells, or are they limited to the spells that they're taught/learn?  I seem to remember something about Snape creating sectumsempra, but I'm not sure if that really is the case.


I have a local Network with a Window 10 computer and a Windows 7 computer. Both have the same Network Settings (visible to other computers, etc.).  On the Windows 10 computer, I can see both the Windows 10 computer and the Windows 7 computer in the Windows Explorer Network Group, but on the Windows 7 computer, I don't see the Windows 10 computer.  The Windows 10 computer runs Windows 10 Pro, Version 1803, Build: 17134.285  The Windows 7 computer runs Windows 7 Home Premium, Version 6.1, Build 7600  What might be the reason for that?  Here is a screenshot:

This is apparently a   but I have not found a solution.  With the deprecation of HomeGroup after the release of Windows 10 version 1803, I cannot get two computers to maintain network sharing after reboot.   Based upon , I did the following:     Setup a WorkGroup and then right- clicked on folder to be shared. Select "Give Access To" ==> Specific People Specify the group to share with and privileges for same. I get the link and hit "Share."   The first time I open the other computer, the sharing works. Once I restart, the "guest" computer cannot access files on "host" computer.   I have checked firewall settings and have tried turning off and on network sharing (which seemed to work once but not a second time). I did notice that the "Give Access To" settings on the host computer seem to change upon reboot.   Is there a script I should be running as a *.bat file that executes upon startup? Any help appreciated.


I currently have my Time Capsule to forward all inbound requests on port 80 to my Mac Mini which runs a web server with its local ip address of 192.168.1.8. I also have DNS set up so that if I go to example.com then it will send the request to my static public IP which will in turn cause the Time Capsule to forward the request on port 80 to my Mac Mini.  However I now have a Raspberry Pi on the local network also, with the ip address of 192.168.1.5. I want to be able to access the web server on the Raspberry Pi by going to pi.example.com, but I'm not sure how I can get the Time Capsule to port forward based on the domain. What I'd like to be able to have is something that works like this:  example.com:80       -->   public IP   -->    192.168.1.8:80 pi.example.com:80    -->   public IP   -->    192.168.1.5:80     Update  I've managed to do the above with Virtual Hosts and Forward Proxies in Apache. However that is just for HTTP on Port 80, how could I do this with other services such as SSH and FTP? Like:  example.com:21       -->   public IP   -->    192.168.1.8:21 pi.example.com:21    -->   public IP   -->    192.168.1.5:21

When using the ssh or ftp commands from the Bash shell, does the server that I am connecting to learn of the domain name used? I understand that the domain name is locally translated into an IP address via DNS. In HTTP, after that happens, the server is told the original domain name as well in order to serve the correct page, or to present the correct TLS cert (SNI).  host serverfault.com GET /   Does a similar phenomenon happen when connecting to ssh or ftp?  I ask because I am  trying to ssh into a server (GoDaddy webhosting) which expects a domain name, but is not letting me in when I try to connect via user@IPaddress as the DNS is not yet moved to the GoDaddy IP address.


I'm looking to see if there is a way of taking a generic async function, such as AJAX, or web worker on message, and forcing it to behave synchronously.  First off - I really do need this behaviour, I am aware of all the arguments regarding async callbacks vs returns - but in this case, I truly need to wait for a callback.   If there is no generic solution available I'd settle for one that works purely on the Worker.prototype.onmessage as that is the primary use case here.   I'm fairly sure the answer will be "thats not possible" but I wanted to check before surrendering.  I've already looked into promises and generators, I'd prefer not to use a third party library (I'm aware of fiber/futures for Node).  A potential use case:  function main(){     worker = new Worker("someWorker.js")     var result = worker.onmessage(function(event){         return event.data;     })     //wait for worker.onmessage     return result; }

I have a JavaScript widget which provides standard extension points. One of them is the beforecreate function. It should return false to prevent an item from being created.   I've added an Ajax call into this function using jQuery:  beforecreate: function (node, targetNode, type, to) {   jQuery.get('http://example.com/catalog/create/' + targetNode.id + '?name=' + encode(to.inp[0].value),    function (result) {     if (result.isOk == false)          alert(result.message);   }); }   But I want to prevent my widget from creating the item, so I should return false in the mother-function, not in the callback. Is there a way to perform a synchronous AJAX request using jQuery or any other in-browser API?


I have a list that contains a list of dates along with a bunch of other info in the same element. This is what the list looks like: 0     2020-06-25 09:04:16.295000+00:00 1     2020-06-25 08:59:11.871999+00:00 2     2020-06-25 08:57:51.039999+00:00 3     2020-06-25 08:38:45.894000+00:00 4     2020-06-25 08:37:05.439000+00:00 5     2020-06-25 08:35:33.243999+00:00 6     2020-06-22 22:51:38.947000+00:00 7     2020-06-22 22:46:00.807000+00:00 8     2020-06-22 22:44:46.937000+00:00 9     2020-06-22 22:35:14.785999+00:00 10    2020-06-22 22:27:05.739000+00:00  As you can see, there is more info than just the date. I would like to use regex and remove just the date from each element and store it into another list: I am pretty sure that the following  regex is the right keyword for pinpointing the date: ^\d{4}$\-\d{1,2}\-\d{1,2}  I am just not sure how I can properly implement this. If you can show me how to do this through pandas, it would be much appreciated.


I am wondering does emacs have a command that opens the file where the cursor points to. eg: I have a ASCII file with the following text:  source ../scripts/setup.tcl   I would like to have a command that opens the file ../scripts/setup.tcl when my current cursor position is on one of the characters of the file.

Is there a substitute in emacs for the vi "gf" command? meaning try to open the file which is under the cursor right now if a real file name is in fact there.  Thanks


I have an app service that has been running for a while with steady usage. We noticed that late last night / early this morning there was a large spike in data out. Our website has an authenticated user area and we are concerned that there may have been a breach or something unauthorized happening on the site.  The site has consistently always had below 5MB/15 mins out. But the sudden spike was over 180MB then instantly back down again.    Is there a way using Azure (Metrics or Security Center) to determine what caused the massive spike in Data Out? What data was sent, who it was sent to etc? Is there anything we can enable to be able to view this data if it was to happen again? (e.g. Azure Sentinel)  Looking at other metrics, there was no obvious spike in 4XX or 5XX errors or number of requests, so we don not suspect a brute force or DoS attack.   Update: It happened again last night. This time the spike was 600MB and in a 15 minute window the Average CPU time spiked to over one hour. Response time, number of requests and 4xx/5xx errors all remained steady.

We suspect we have had a data breach, but we are not sure how to investigate it to determine the source of the breach or what data was sent.  We have an app service that has been running for a while with steady usage. We noticed that over the last couple of nights there have been large spikes in data out. Our website has an authenticated user area and we are concerned that there may have been a breach or something unauthorized happening on the site.  The site has consistently always had below 10MB/15mins Data Out. But the sudden spike was over 180MB then instantly back down again. The second night the spike was 600MB. In the same 15 minute metric window the Average CPU time spiked to over one hour. Response time, number of requests and 4xx/5xx errors all remained steady.     Is there a way using Azure (Metrics or Security Center) to determine what caused the massive spike in Data Out? What data was sent, who it was sent to etc? Is there anything we can enable within Azure to allow us to view this data if it was to happens again tonight? (e.g. Azure Sentinel)  Looking at other metrics, there was no obvious spike in 4XX or 5XX errors or number of requests, so we do not suspect a brute force or DoS attack.


really struggling connecting my Android app to an API that has the JSON I need. My log shows the JSON comes in (i.e. I can see the full JSON array in Android Studio's log) but I'm getting a nullpointer error in my for loop line. I know I'm supposed to initialize it first but my JSONArray is really a placeholder until the getApartmentList method is called in another class. And directly trying to reach the API to give the JSONArray a real value here obviously results in a networkonmainthread error. I'm probably overcomplicating this but what am I missing?   public List<Apartment> getApartmentList(JSONArray jsonArray) { //added the parameter, placeholder for "apartments" array which contains all apts in our database          List<Apartment> apartmentList = new ArrayList<>();           for(int i=0; i<jsonArray.length();i++){ //nullpointer exception here              JSONObject json = null;               try {                  json = jsonArray.getJSONObject(i);                    Apartment apartment = new Apartment(UUID.fromString(json.getString("id") ) ); //UUID from String already converts our JSON string result into a UUID                 apartment.setApartmentText(json.getInt("price") + " " + json.getInt("bedrooms") + " " + json.getInt("bathrooms") );                 apartment.setApartmentLatitude(json.getJSONObject("building").getDouble("latitude"));                 apartment.setApartmentLongitude(json.getJSONObject("building").getDouble("longitude"));                   apartmentList.add(apartment);              } catch (JSONException e) {                 e.printStackTrace();             }            }//end of for loop            return apartmentList;               }//end of getApartmentList method    This is where this method is called in a separate class and gets a real value:  public class GetAllCustomerTask extends AsyncTask<ApiConnector,Long,JSONArray>         {         @Override         protected JSONArray doInBackground(ApiConnector... params) {                  return params[0].GetAllCustomers();          }           //the ApiConnector class is where I connect to the URL of the API, i.e. where i connect to the JSON       @Override             protected void onPostExecute(JSONArray jsonArray) {      ApartmentInventory apartmentInventory = new ApartmentInventory(getActivity() ); apartmentInventory.getApartmentList(jsonArray);                     }          } // end of GetAllCustomerTask method   EDIT - pasting log  11-19 22:00:22.787  24528-24528/AndroidRuntime﹕ FATAL EXCEPTION: main     Process: com.example, PID: 24528     java.lang.NullPointerException             at ApartmentInventory.getApartmentList(ApartmentInventory.java:118)             at ListingsFragment$GetAllCustomerTask.onPostExecute(ListingsFragment.java:79)             at ListingsFragment$GetAllCustomerTask.onPostExecute(ListingsFragment.java:54)             at android.os.AsyncTask.finish(AsyncTask.java:632)             at android.os.AsyncTask.access$600(AsyncTask.java:177)             at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:645)             at android.os.Handler.dispatchMessage(Handler.java:102)             at android.os.Looper.loop(Looper.java:146)             at android.app.ActivityThread.main(ActivityThread.java:5487)             at java.lang.reflect.Method.invokeNative(Native Method)             at java.lang.reflect.Method.invoke(Method.java:515)             at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1283)             at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1099)             at dalvik.system.NativeStart.main(Native Method)

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


is the  mysqlhotcopy — A Database Backup Program best way to backup the large data in mySQL??

How can I backup a large database in mysql? And what is the best way to replicate the database?    what i'm looking for is backing up large database with large amount of data in a small time limit then restoring it within a small time of limit??


Suppose F is a field, $X \in M_n(F)$, $XX^t = I$, $det(X) = 1$, $X = \begin{bmatrix} A & B \\ C & D \end{bmatrix}$, where A and D are square matrices.   Is it always true that det(A) = det(D)?  This statement seems to be true for all the examples I have tried, but I do not know how to prove it in general.  Any help will be appreciated.

Let $A$ be a matrix in the special orthogonal group, $A \in \mathrm{SO}_n$.  This means that $A$ is real, $n \times n$, $A^t A = I$ and $\det(A)=1$, that is, the column vectors of $A$ make a positively-oriented orthonormal basis for $\mathbb R^n$. Decompose $A$ as a block matrix $$A = \begin{pmatrix} B & C \\ D & E\end{pmatrix}$$ where $B$ is $k \times k$ and $E$ is $(n-k)\times (n-k)$. I'm looking for a basic linear-algebra argument that $\det(B) = \det(E)$, ideally something that could be presented in a 2nd or 3rd year undergraduate course.  So I do not want people to invoke anything like tensor products or differential forms.


I recently started in unity and for making models, i went for blender. I was watching tutorial, but the guy was having a totally different interface from mine. I wasnt even able to find some stuff. I am using 2.82. The video is from October 2018. Here is the video:    Here is my photo:   I don't know if i have to arrange my panels in a certain way, or it is from the version.

Ive been watching some tutorials on how to do fancy shaders and stuff and ive been finding them very hard to follow as their UI is very different to mine. This is what i want my UI to look like, however i cannot find anything on the internet that suggests there are different UI settings in blender.     This second image is what my UI looks like at the moment I am also using blender 2.79


How can I color the output of this MWE like the screenshot?  \documentclass{book} \usepackage{tikz}  \begin{document} \begin{center} \begin{tikzpicture} \draw [thick] (3.25,-2) circle (1.5cm)      node[right=.7cm, above=.4cm] {$A$}; \draw [thick] (2.5,-3.5) circle (1.5cm)     node[left=.7cm,] {$B$}; \draw [thick] (4,-3.5) circle (1.5cm)       node[right=.7cm] {$C$}; \draw [thick](0,0) rectangle (6.5,-5.5)     node[left=6cm, above=.3cm] {$M$}; \end{tikzpicture} \end{center} \end{document}

How do I color intersection of two ellipses in different color. For instances, the ellipses should themselves be colored as yellow and their intersection as red. My code for drawing ellipses is given below  \draw (-4,0) ellipse (8 and 3); \draw (8,0) ellipse (8 and 3);   UPDATE: In the comments to individual answers, I have requested to show it for three ellipses.


In an exercise program I'm working on right now, it calls for a handful of imports, like so:  import java.awt.*; import java.awt.event.*; import javax.swing.*; import javax.swing.event.HyperlinkEvent; import javax.swing.event.HyperlinkListener; import java.net.URL;   ELI5: My question (I'm slightly past the newbie beginner tutorials, and getting into intermediate? now.) is just as the title suggests. Am I actually required to import java.awt.event.* if I've already covered it with java.awt.*?  If not, why is this the seeming convention?

Would it suppose any difference regarding overhead to write an import loading all the types within one package (import java.*); than just a specific type (i.e. import java.lang.ClassLoader)? Would the second one be a more advisable way to use than the other one?


I'm having trouble installing ubuntu 13.04 on my windows 8 machine. The slot one disk is a 360gb SSD with W8, but the disk I want to install Ubuntu on is a 120gb SSD. I keep trying to install the OS, but it tells me there's no root system on the 120gb SSD that I want to use. I was wondering if anyone could help because I cannot find what I think is a relevant article.

I need my pre-installed version of Windows 7 (or any other version of Windows), how could I install Ubuntu without erasing it?


I had two screens connected, but now I disconnected one and took it away (it is not available any more). The problem is that I have DVB Viewer installed (DVBViewerTE from Technisat) and the last position of that window was in the other screen. Now I cannot move the window to the first screen - I cannot watch TV, I have only sound.  I tried everything, but the DVBViewerTE is some sort of freaked pre-XP custom made toolkit. No shortcuts work. No Alt-Space, no Win+keys, no Ctrl+Win+Keys, no Shift+Crtl+Win+Keys. Registry don't contain any "last window location" settings, nor the Program files folder has any config file with these.   The only solution is to reinstall, but I would like to know if it is indeed everything I could try.

I am having a weird issue with a machine where sometimes when a window is initialized, it will shoot off screen and out of sight. I am unable to click on it to drag it back to sight.   Are there any programs or fixes for this in Windows XP?  I know Windows and other programs like to save window locations after they close so when you reopen them they are in the spot where they were closed and I cannot see any of these windows that were closed off screen.


I am new to Linux and I have just installed a dual boot with Ubuntu 20.04 and Windows. Unfortunately Ubuntu was installed on the hard disk and not on my SSD. Can I just boot with the Live-USB and remove the Ubuntu partitions with Gparted? Next, I would simply install Ubuntu on the SSD. Do I still need to repair the Windows boot loader (which you would have to do if Ubuntu were removed)? Are there other things I should consider?

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


I'm trying to look into what kind of encryption I can do with SQL server standard edition from 2008 and later.    So far, I know that I can't use Transparent Data Encryption (TDE) as that's part of Extensible Key Management (EKM).   When I look up this topic I'm getting the result that column encryption is possible, but then I also find that cell level encryption is sometimes referred to as the same thing and that it is also part of EKM.  These are the sources from which I'm getting the contradictory information:      Any clarity on this subject would be very helpful.

I'm helping a friend with setting up encryption of data on SQL Server 2008 R2 Standard edition. Upon original research I thought I could use   but did not realize that it was only available for Enterprise or DataCenter versions of SQL Servers. Upon further research into SQL Server 2008 R2  I saw that it does allow for "Data encryption and key management" but I'm not sure what it means or how to implement it.  What is the most efficient and low cost method for data encryption? Should I do something through SQL Server or just use third party tools to encrypt the whole volume where DB and backups are? Also if someone can point to a way to use "Data encryption" that comes as feature in standard edition I would really appreciate. Every time I search for encryption on sql server I keep ending up on how to use TDE and in current scenario it is not feasible for the size of business to purchase Enterprise Edition.   Reason for encryption - HIPAA Compliance. If access is gain to file system for database or backups, data is encrypted and can not be of any use. This could include physical access to the machine or access through local admin.


In the image, you see I have a mech, a emission plane and floor and walls to reflect the light. Now I am ready to render, but I do not want the emission plane or floor/walls in the render.  How do I remove them from the render?

In my scene it is required to position the lights close to the main object like this:    How I can make the light source invisible to the camera?


I create a list in python using multiplication and a second more explicitly. I check that they are equal and then attempt to alter the same element in each. This alteration acts differently for each one. The code:  list1 = [[0]*2]*2 list2 = [[0, 0], [0, 0]] print(list1 == list2)  list1[0][0] = 3 list2[0][0] = 3 print(list1) print(list2)   prints out:  True [[3, 0], [3, 0]] [[3, 0], [0, 0]]   What is going on? Why is a multiply-initiated list acting differently?

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


I read an already old paperback novel in about 1969. Most human life is destroyed by a virus, and it is the story of one of the survivors.  I remember:  he survives because he had just been bitten by a rattlesnake and  as he finds other survivors his hammer becomes the symbol of authority.  There is a late scene when only his young son or protégé is willing to pick up the hammer.   It may have been called something like 'The Green Earth', 'The Good Earth', titles which do not do well on a Google search.  My impression at the time was that the author was not a regular sci fi writer, but I don't know for sure.

The main character is bitten by a snake and afterwards recovers but finds that almost all humanity died of an epidemic. Finally he finds some people to leave with and becomes a sort of legend but dies of appendicitis.


I read this story in the mid/late 90's, and I believe it was in a Sci-Fi anthology or a magazine (such as Asimov), so it's possibly much older.  Unfortunately, the only details I remember are very generic, so Google searches haven't been terribly helpful; it all centers around a specific scene, which I believe is near the end of the story.  Each piece I can remember is a concept which is present in numerous stories/movies/games, which further leads me to believe that this is much older than the 90's.  I remember that humans are at war with a hive-minded alien species, and this species initially stomps human fleets in virtually every battle.  Because they're a hive mind, they are perfectly unified in strategy, politics, and scientific research.    At the end, it's revealed that this race is doomed to lose, because it's unified.  Humans are constantly fighting, so our strategies quickly adapted to the enemy's, and we were able to rapidly reverse-engineer the aliens' superior technology to use it for ourselves.  I believe it's also revealed that the war was intentionally started by a human organization to give humans a common enemy.  I vaguely remember that all of this is revealed through a single conversation at the end of the story, but that's the extent of my memories on the subject.

I remember a story I have read buy could not remember the author the name or anything apart from the basic plot. The story is about some future where humanity has to fight with some aliens (not 100% sure). The story tells about a guy who was some kind of activist and who was in a prison two or more times and somehow helped humanity by being held in a prison (can't remember details). I think the story starts by saying that there is a statue in his honor that is not very well known but he did more to help humanity than famous politicians.   The story is most likely written by some famous English-speaking author, though I read it in a translation.


In the new gym system right before you start a battle against a defending Pokémon with with your own it shows the two Pokémon, their respective combat powers and battles won. How does the new battles won accumulate? Obviously every battle won increases the number, but do battles won when attacking and defending count? If a defending Pokémon beats multiple Pokémon in a row will it count as one or multiple battles and vice versa for attacking Pokémon? Do defeating raid Pokémon count? Also is the count still unique to a Pokémon when it is evolved?  The question is different from the former gym system () because it showed only the battles won by a defender when it defended a certain gym the time it was undefeated. Then a good gym could have Pokémon with about at best over 10 battles won. Now I've seen Pokémon with battles won count exceeding 900! Also when I attacked a gym every time my own Pokémon defeated the gym Pokémon the count went up.

I have just seen this on the top Pokémon on a gym. This is the first time I've seen it, so I'm not sure if it can/should apply to all Pokémon in the gym, or just the top.    What does this mean, and what does it apply to?


I'm making a blender addon located on the N panel with some custom error messages. On the first button, I get the error message working properly, but in the second button is not working although it seems the structure is the same. On the second button (the non-working one) if there is nothing selected then my error message should popup but is not working. What could be causing it? import bpy  structures_in_window = [     {         'name': 'WINDOWS',         'items': [             "frame-bnd-[!A-Z]*",             "glass[!A-Z]*",         ],     }, ]  class SelectByNameOperator_window(bpy.types.Operator):     """Select objects by name"""     bl_idname = "object.selected_by_name_operator_window"     bl_label = "Select by Name"     bl_options = {'REGISTER', 'UNDO'}      def execute(self, context):         try:             bpy.ops.object.select_all(action='DESELECT')             for structure in structures_in_window:                  selection_pattern = bpy.ops.object.select_pattern                                  for item in structure['items']:                     selection_pattern(pattern = item)                  all_in_list = bpy.context.selected_objects.copy()               bpy.context.view_layer.objects.active = bpy.context.selected_objects[0]                                       objects = bpy.context.scene.objects.keys()             if not 'WINDOW' in objects:                 print('There is no parent yet!!')              elif 'WINDOW' in objects:                    ob = bpy.context.scene.objects["WINDOW"]                 bpy.context.view_layer.objects.active = ob                    ob.select_set(True)                                                    except IndexError:                 self.report({'ERROR'}, "Windows not found")          return {'FINISHED'}   class MYADDON_OT_my_op_move_to_existing_collection(bpy.types.Operator):     """Move Selected to Existing Collection"""     bl_label = "Move Selected to Existing Collection"     bl_idname = "addonname.myop_operator_move_to_existing_collection"     bl_options = {'REGISTER', 'UNDO'}      def execute(self, context):         try:             bpy.ops.object.move_to_collection('INVOKE_DEFAULT')                      except IndexError:             if selection is None:                 self.report({'ERROR'}, "Why is not working")          return {'FINISHED'}   class MYADDON_PT_main_panel(bpy.types.Panel):     bl_label = "Main Panel"     bl_idname = "MYADDON_PT_main_panel"     bl_space_type = 'VIEW_3D'     bl_region_type = 'UI'     bl_category = "New Tab"       def draw(self, context):         layout = self.layout         scene = context.scene                  row=layout.row()         scale_row = row.row()                  scale_row.scale_x = 0.7         scale_row.label(text="Window", icon="OBJECT_DATA")           scale_row.scale_x = 2.1         scale_row.operator('object.selected_by_name_operator_window', text='', icon="RESTRICT_SELECT_OFF")          row = layout.row()         row.operator("addonname.myop_operator_move_to_existing_collection", icon="NLA_PUSHDOWN")   classes = [             SelectByNameOperator_window,             MYADDON_PT_main_panel,             MYADDON_OT_my_op_move_to_existing_collection, ]   def register():     for cls in classes:         bpy.utils.register_class(cls)             def unregister():     for cls in classes:         bpy.utils.unregister_class(cls)         del bpy.types.Scene.my_tool  if __name__ == "__main__":     register()

I have a button in my menu named "New File" as shown:    and I want when I click on the "New File" button to imitate what the Blender File->New does, where a check message box appear first confirming that you want to reload the Start-up File and if pressed then the startup file is loaded as shown below.    This is my script, when I press on new it opens the startup file without checking:  class NewFile(bpy.types.Operator):     """New File"""     bl_idname = "wm.newfile"       bl_label = "New File"     bl_options = {'REGISTER', 'UNDO'}      def execute(self, context):         bpy.ops.wm.read_homefile()         return {"FINISHED"}


I'm using windows 7 with a wireless internet connection and i want to share the internet to mobile devices.for this I set a "set up a new connection or network " in network and sharing centre in control panel but it's not working.is there any other possible ways to share the network.

Is there an option in Windows 7 (or 3rd party) to offer Tethering (that is, act as a WiFi hotspot while being connected to a WiFi network?)


I want to loop through a Python list and process 2 list items at a time. Something like this in another language:  for(int i = 0; i < list.length(); i+=2) {    // do something with list[i] and list[i + 1] }   What's the best way to accomplish this?

I have a Python script which takes as input a list of integers, which I need to work with four integers at a time.  Unfortunately, I don't have control of the input, or I'd have it passed in as a list of four-element tuples.  Currently, I'm iterating over it this way: for i in range(0, len(ints), 4):     # dummy op for example code     foo += ints[i] * ints[i + 1] + ints[i + 2] * ints[i + 3]  It looks a lot like "C-think", though, which makes me suspect there's a more pythonic way of dealing with this situation.  The list is discarded after iterating, so it needn't be preserved.  Perhaps something like this would be better? while ints:     foo += ints[0] * ints[1] + ints[2] * ints[3]     ints[0:4] = []  Still doesn't quite "feel" right, though.  :-/ Related question:


im trying to set the game object in script1 to be the game object script2 is on public class Script1 : MonoBehaviour {     public static GameObject ObjectToMove; }   public class Script2 : MonoBehaviour {    void Start()    {      Script1.ObjectToMove = this.gameObject;    } }

I need to access a variable from another script in Unity, but I can't figure it out. Script:  public class move : MonoBehaviour { public float speed; // Use this for initialization void Start () {  }  // Update is called once per frame void Update () {     transform.position += Vector3.left * Time.deltaTime * speed; }  }   I want to access the variable speed in another script, but I can't. Any help will be appreciated :)


When making a lemon dill sauce will limited ingredients due to Lenten restrictions, we found the sauce broke after simmering.  The sauce was vegetable stock with lemon juice then thickened with a roux of margarine and flour.  All was well for 10 minutes at a low simmer when suddenly it broke.  Did the lemon break the gluten?  Did the simmering cause the breakage? Was the margarine the cause?

Recently all my attempts at sauces are splitting and I'm not sure what's going wrong. Tonight I tried a balsamic vinegar reduction / chicken stock / pan juices recipe to go with my lamb chops, but once again the dreaded split occurred. My wife is patient and forgiving, but I feel like I must be missing something fundamental to get this wrong so often.  Two questions.   What could I be doing wrong to cause these sauces to split? What can I do to recover when it happens again?   UPDATE: The Pan juices contained a tbsp or two of olive oil, and some of the fresh herb rub I'd coated the lamb chops in (thyme, rosemary, and mint). I did not drain the pan before starting the sauce. It has crossed my mind that perhaps there was too much oil / fats in the pan at that point?  For completeness, I should point out that I also sauteed some chopped shallots in the pan juices immediately before adding the vinegar.


Let $W^{1,p}(\Omega)$ be the Sobolev space for $1<p<\infty$ and $\Omega$ a smooth bounded domain. Suppose $A:W^{1,p}(\Omega)\to (W^{1,p}(\Omega))^*$ satisfies is given by $$ <A(u),v>:=\int_{\Omega}|\nabla u|^{p-2}\nabla v\,dx. $$ Then, by Holder's inequality, $$ <A(u),v>\leq\left(\int_{\Omega}|\nabla u|^p\,dx\right)^\frac{p-1}{p}\left(\int_{\Omega}|\nabla v|^p\,dx\right)^\frac{1}{p}. $$ We observe that if $u=0$ or $v=0$ or $u=cv$ for some positive constant $c$, then the equality holds in the above estimate. My question is the converse true? That is if the equality in the above estimate holds, then can we get either $u=0$ or $v=0$ or $u=cv$ for some constant $c>0$. Indeed, for this please assume that $$ \int_{\Omega}|\nabla u|^p\,dx=\int_{\Omega}|\nabla v|^p\,dx. $$ Indeed, if the above two equalities hold, then we can get $|\nabla u|=|\nabla v|$ in $\Omega$. But I am unable to proceed after this. Thanks.

Let $u,v\in W^{1,p}(\Omega)$ with $1<p<\infty$ and $\Omega$ be a bounded smooth domain in $\mathbb{R}^N$. Suppose, we have $$\int_{\Omega}|\nabla u|^{p-2}\nabla u\nabla v\,dx=\left(\int_{\Omega}|\nabla u|^p\,dx\right)^\frac{p-1}{p}\left(\int_{\Omega}|\nabla v|^p\,dx\right)^\frac{1}{p} $$ Suppose the equality $$ \int_{\Omega}|\nabla u|^p\,dx=\int_{\Omega}|\nabla v|^p\,dx $$ holds. Then can we say that $u=v$ in $\Omega$? I tried in the following way: Since the first given equality, which is the equality in Holder's inequality holds, and by the second given equality holds, we have $|\nabla u|=|\nabla v|$ in $\Omega$. Then I am unable to proceed. Can someone please help to give an argument?


(This is exercise 2.2.28 from Hatcher) Consider the space $X$ (say) obtained from a $\Bbb RP^2$, by attaching a Mobius band $M$ via a homeomorphism from the boundary circle of the Mobius band to the circle $\Bbb RP^1 \subset \Bbb RP^2$. Compute the homology of the space   We set $A=N_{\epsilon}(\Bbb RP^2)$, $B=N_{\epsilon}(M)$, $X:=A^o\cup B^o $, s.t $A$, $B$ and  $A\cap B$ deformation retracts to $\Bbb RP^2$, $M$ and $ S^1$, so the (reduced) Mayer-Vietoris sequence yields  $$ \tilde H_2(S^1)\to \tilde H_2(\Bbb RP^2)\oplus\tilde H_2(M)\to \tilde H_2(X)\to \tilde H_1(S^1)\to \tilde H_1(\Bbb RP^2)\oplus \tilde H_1(M)\to \tilde H_1(X) \to 0$$ and replacing the homology groups we already know we have $$0\to 0 \to \tilde H_2(X) \overset{\partial}{\to} \mathbb Z \overset{\phi}{\to} \mathbb Z_2\oplus \mathbb Z\overset{\psi}{\to} \tilde H_1(X)\to 0$$  Now, I have to figure out what the maps $\partial,\phi,\psi$ do, and this is where I'm stuck. I'd appreciate a detailed explanation.   What I am thinking that $\partial$ is injective and $\tilde H_1(X)= (\mathbb Z_2\oplus \mathbb Z)/ Im \phi$. Again $\phi=(j_*,i_*)$ where $i: S^1 \hookrightarrow M , j: S^1 \hookrightarrow \Bbb RP^2$. Then $i_*(1)=2$, but little bit confused about $j_*$ is $j_*(1)=[0]$ because in calculating homology of $\Bbb RP^2$ the map from $e^1 \to e^0$ is zero map again I am thinking that the map might be $1 \mapsto [1]$. Now for $j_*(1)=[0]$.  $\tilde H_1(X)= (\mathbb Z_2\oplus \mathbb Z)/ Im \phi= (\mathbb Z_2\oplus \mathbb Z)/<(2,[0])>=\Bbb Z_2 \oplus \Bbb Z_2$. Then $ker \phi=0=Im \partial$. So, $\tilde H_2(X)=0$. Can anyone please tell me whether I am right or wrong or how to rectify it, moreover what is $ H_0(X)$?

(This is exercise 2.2.28 from Hatcher) Consider the space obtained from a torus $T^2$, by attaching a Mobius band $M$ via a homeomorphism from the boundary circle of the Mobius band to the circle $S^1\times \{x_0\} \subset T^2$.   We set $A=T^2$, $B=M$, $X:=A\cup B $, $A\cap B\simeq S^1$, so the (reduced) Mayer-Vietoris sequence yields  $$ 0\to \tilde H_2(T^2)\oplus\tilde H_2(M)\to \tilde H_2(X)\to \tilde H_1(S^1)\to \tilde H_1(T^2)\oplus \tilde H_1(M)\to \tilde H_1(X) \to 0$$ and replacing the homology groups we already know we have $$0\to \mathbb Z\overset{\alpha}{\to} \tilde H_2(X) \overset{\beta}{\to} \mathbb Z \overset{\gamma}{\to} \mathbb Z^2\oplus \mathbb Z\overset{\delta}{\to} \tilde H_1(X)\to 0$$  Now, I have to figure out what the maps $\alpha,\beta,\gamma,\delta$ do, and this is where I'm stuck. I'd appreciate a detailed explanation.


Infixes appear in words such as 'absolutely' to form 'abso-bloody-lutely', or as 'educate' to 'edu-ma-cate' in the Simpsons. I was wondering if there were any formal infixes.  The only ones I could come across were accepted by Merriam Webster and were 'cupsful' and 'handsful' (as opposed to the more common 'cupfuls' and 'handfuls'), and they don't seem overly correct, either.  The question this has been marked as a duplicate of is similar, though not the same, in the sense that prefixes 'un' and 'de' are not the same. My question was more so in regard to the words 'cupsful' and 'handsful' and whether or not they are acceptable alternatives to their common counterparts, though I didn't specify that very clearly. Thank you to Mari-Lou A and JEL for assisting me in finding the answer to the former question.

At university I was introduced to various affixes; prefix, suffix, interfix.  The latter, I was told, could be created by putting an adjective in the middle of a word, thus interrupting it; abso-bloody-lutely or done-diddely-one (as used by The Simpsons' character Ned Flanders). It is highly likely this kind of 'interruption' is mostly used in spoken language.  However, according to Wikipedia, Glottopedia, and other sites, an interfix has no intrinsic meaning and is phonological, used to link two morphemes; speed-o-meter, for instance.  What I would like to know is what to call an "interfix" that may have meaning, and/or is used as a form of exaggeration. Is it still considered an interfix?


a=[['']*2]*2 a[0][1]='previous'     a[1][1]='new' print(a[0][1])  The result of this code is 'new' instead of 'previous'. When I changed the declaration of list as a=[ [[''],['']], [[''],['']] ] now it is okay. But why difference?

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


It happens from time to time that a question is asked where maybe the asker doesn't understand the scope of what they're asking about. They know what they want to do but perhaps they ask for directions about how to fix it in a less than ideal way.  I just came across  where a user wanted to replace %20 with spaces. The most basic, and in my opinion, correct way to ask this would probably be "how do I decode URL encoded strings?" and be tagged javascript. But whether it be shortsightedness or a misunderstanding of the big picture, the question focused on string manipulation. All but one answer used string manipulation and the question has, as of this posting, 4 close votes saying the question is a duplicate of a string manipulation question.  I feel this is off the mark. The question is slightly off as the correct answer is actually to take a different approach. People's response to the question (I'm specifically talking about the votes to close) also seem a little misguided because the original question asked for a particular approach that should probably not be used. In fact, the requested approach should probably be avoided.  How should we go about setting a question like this back on track? Or should we stick to the methods defined in the question even if the asker is obviously a little less than knowledgeable on the subject?

Is answering beyond the scope of the question a valid thing? Or should we just stick to the question asked and ignore any potential bugs which might be present (of course OP is unaware of that, as of now).  To make myself more clear, please have a look at this .  There are 3 answers which talk about the issue asked and that's it. If you look at my answer, I've added an additional point about a potential bug which the OP has missed now (may find out later). So is it a good thing to point out such potential bugs or not? Should this practice be encouraged?


connection to database file contains:      $server="localhost";     $login="root";     $pass="";     $database="floweritem";      $con=mysqli_connect($server,$login,$pass,$database);     if(mysqli_connect_errno()){     echo "Failed connect to MYSQL".mysqli_connect_error();     }  PHP      <?php     if(isset($_POST['submit'])){     $Name=mysqli_real_escape_string($con,$_POST['Name']);     $Desc=mysqli_real_escape_string($con,$_POST['Desc']);     $Size=mysqli_real_escape_string($con,$_POST['Size']);     $Price=mysqli_real_escape_string($con,$_POST['Price']);       //no problwm with connection to table or database     $sql="INSERT INTO `items`(`Name`,`Description`,`Size`,`Price`)      VALUES($Name,$Desc,$Size,$Price)";     echo $Desc;       if(mysqli_query($con,$sql)){      echo "new record";     }     //always get wrong     //can't find problem     else{echo"Wrong";}     mysqli_close($con);     }     ?>  shows $Desc And then Wrong

I'm trying to post a sample of code that looks like this:        Look at all of those comments, and it still won't allow me post! What am I doing wrong?


Is there a function $f:\mathbb R\to\mathbb R$ such that $f(x+y)=f(x)+f(y)$ which is not continuous? I have proved that if it's continuous in one point $a\in\mathbb R$ then it's continuous on all $\mathbb R$, but I didn't find such a function which is not continuous everywhere. Therefore I tried to prove that all function of this form is continuous at $x=0$ but with no success. I think that if such a function exist it would be of the form $f(x)=...$ if $x\in\mathbb Q$ and $f(x)=...$ if $x\in\mathbb R\backslash\mathbb Q$ but I didn't find it.

As mentioned in , it shows that For any $f$ on the real line $\mathbb{R}^1$, $f(x+y)=f(x)+f(y)$  implies $f$ continuous $\Leftrightarrow$ $f$  measurable.  But   how to show there exists such an non-measurable function satisfying $f(x+y)=f(x)+f(y)$?  I guess we may use the uniform bounded principal and the fact that $f$ is continuous iff it is continuous at zero under the above assumption.  Thanks in advance!


As the title says, does a linear regression model make assumptions about distributions of depended and independent variables and what should these distributions be for the model to work as expected ?  I have a log normal distribution (or rather a very positively skewed one) for both  dependent and independent variables and I always log transformed them before doing any fitting but came across an article saying that is not necessary. Also just to add to this, I would like to use the model to predict values of individual data points.

I am trying to run a Multiple Regression model but I am not sure what should I do to prepare the data input. In my model the dependent variable is the artificial surfaces in hectares, the independent are the GDP (monetary value) and Population (inhabitants). The histogram shows that the data is not normal distributed.    I would like to know if I need to normalize the distribution of the data in order to get the "bell" curve and/or  if I need to normalize the data (with the max-min or standardize).


Looking here at the beta reg packge:    The code below is using a categorical batch variable and a continuous temp variable to predict yield which is (0,1).  How does one interpret the coefficients. For example:  (1) batch1 has a coefficient of 1.72.  This does NOT mean batch1 increases yield by 1.72%, relative to batch10-the reference group,  because yield is  between 0 and 1. Since the default betareg uses the logit link it appears the coefficient 1.72 is the log odds ratio and exp(1.72)= 5.58 is the odds ratio AND the interpretation is (using the odds ratio) that the batch 1 odds of "....." is 5.58 times higher than batch 10 the reference group.  I left "....." blank because if this was a typical logistic regression with 2 outcome categories (high yield and low yield) I would say the odds of batch 1 being in the high yield outcome category is 5.58 times higher than the odds of batch 10 the reference group. BUT with a beta regression the outcome is continuous so I cannot say "odds of batch 1 being in the high yield outcome category" because in a beta regression there is no category. SO what do you say:  the batch 1 odds OF WHAT? is 5.58 times higher than the referecce group batch10.    (2) SImilarly for temp.,  increasing temp by 1 degree increases the odds OF WHAT? by  1.01 [exp(.01)] times?  (3) Apart from the vignette link above. Can you provide any references for intuitive explanations of the beta regression model?  Can you the beta regression model have an identity link vs. logit? Intuitively what is the motivation for the logit link in the beta regression model?  Thank you.   > library(betareg) > data("GasolineYield", package = "betareg") > gy_logit <- betareg(yield ~ batch + temp, data = GasolineYield) > summary(gy_logit)  Call: betareg(formula = yield ~ batch + temp, data = GasolineYield)  Standardized weighted residuals 2:     Min      1Q  Median      3Q     Max  -2.8750 -0.8149  0.1601  0.8384  2.0483   Coefficients (mean model with logit link):               Estimate Std. Error z value Pr(>|z|)     (Intercept) -6.1595710  0.1823247 -33.784  < 2e-16 *** batch1       1.7277289  0.1012294  17.067  < 2e-16 *** batch2       1.3225969  0.1179020  11.218  < 2e-16 *** batch3       1.5723099  0.1161045  13.542  < 2e-16 *** batch4       1.0597141  0.1023598  10.353  < 2e-16 *** batch5       1.1337518  0.1035232  10.952  < 2e-16 *** batch6       1.0401618  0.1060365   9.809  < 2e-16 *** batch7       0.5436922  0.1091275   4.982 6.29e-07 *** batch8       0.4959007  0.1089257   4.553 5.30e-06 *** batch9       0.3857930  0.1185933   3.253  0.00114 **  temp         0.0109669  0.0004126  26.577  < 2e-16 ***  Phi coefficients (precision model with identity link):       Estimate Std. Error z value Pr(>|z|)     (phi)    440.3      110.0   4.002 6.29e-05 *** --- Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1   Type of estimator: ML (maximum likelihood) Log-likelihood:  84.8 on 12 Df Pseudo R-squared: 0.9617 Number of iterations: 51 (BFGS) + 3 (Fisher scoring)

I have a data that where the outcome is the proportion of a species observed in an area by a machine on 2 separate days. Since the outcome is a proportion and does not include 0 or 1 I used a beta regression to fit the model. Temperature is used as  an independent variable. Here is some toy R code:  set.seed(1234) library(betareg) d <- data.frame(   DAY = c(1,1,1,1,2,2,2,2),   Proportion = c(.4,.1,.25, .25, .5,.3,.1,.1),   MACHINE = c("A","B","C","D","H","G","K","L"),   TEMPERATURE = c(rnorm(8)*100) ) b <- betareg(Proportion ~ TEMPERATURE,   data= d, link = "logit", link.phi = NULL, type = "ML") summary(b) ## Call: ## betareg(formula = Proportion ~ TEMPERATURE, data = d, link = "logit", link.phi = NULL, type = "ML") ##  ## Standardized weighted residuals 2: ##     Min      1Q  Median      3Q     Max  ## -1.2803 -1.2012  0.3034  0.6819  1.6494  ##  ## Coefficients (mean model with logit link): ##               Estimate Std. Error z value Pr(>|z|)     ## (Intercept) -1.0881982  0.2620518  -4.153 3.29e-05 *** ## TEMPERATURE  0.0003469  0.0023677   0.147    0.884     ##  ## Phi coefficients (precision model with identity link): ##       Estimate Std. Error z value Pr(>|z|)   ## (phi)    9.305      4.505   2.066   0.0389 * ## --- ## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1    Above you can see the TEMPERATURE coefficient is .0003469. Exponentiating, exp(.0003469) = 1.000347  Update incorporating replies and comments:  You can see here how increasing temperature by 1 unit from -10 to 10 increase the proportion  nd <- data.frame(TEMPERATURE = seq(-10, 10, by = 1)) nd$Proportion <- predict(b, newdata = nd) nd$proportion_ratio <- nd$Proportion/(1 - nd$Proportion) plot(Proportion ~ TEMPERATURE, data = nd, type = "b")   The interpretation is: A 1-unit change in TEMPERATURE leads to a relative change of 1.000347 ≈0.04%  in the Proportion: $$\frac{\mathrm{E}(\mathtt{Proportion})}{1-\mathrm{E}(\mathtt{Proportion})}$$   The key word there is relative change so when you compare exp(coef(b))[2] to nd$proportion_ratio[2] / nd$proportion_ratio[1]  you'll see they are the same  ## ratio of proportion nd$proportion_ratio[2] / nd$proportion_ratio[1]  exp(coef(b))[2] nd$proportion_ratio[-1] / nd$proportion_ratio[-20]