I am currently doing a research and recently encountered a few statistical concerns. I am basing this question on the   My question is quite similar to the above-mentioned one but has some important differences.  I designed a survey in order to get data from participants. This survey had 12 different items (ranked on a scale from 0 "minor importance" to 10 "major importance").  Before constructing my independent variables with these 12 items, I decided to get rid of the items that do not display a linear relationship with the dependent variable (the latter being a continuous value between 0 and 100).  After having done that, I am left with 10 items and I decide to create 3 independent variables. Each of the latter is constructed with some underlying items, based on a logical link between the items (i.e. the items referring to volatility are put together, the one referring to performance are put together...)   When constructing the variables, I decided to use the mean between the underlying items—for example, performance = (item1 + item2)/2.  My question is the following: I need to justify each step from a "mathematical" perspective with some references. For example, I know there is a unsettled debate for the use of ordinal data in regressions but fellow researchers argued that my data can be considered as interval, especially after using the mean between the items.  My question is the following: Is this mathematically ok? Also if you can cite work that did more or less the same, or that can mathematically support my steps, that would be greatly appreciated.   Thank you!

I've read in a number of places that calculating the mean of an ordinal variable is inappropriate. I'm trying to get an intuition for why it might be inappropriate. I think it is because, in general, an ordinal variable is not normally distributed and so calculating the mean will give an inaccurate representation. Could somebody give more detailed reasoning for why calculating the mean of an ordinal variable might be inappropriate?


I'm trying to make a POST request to  from Apex to include what is required; a task Id and a single file. It has been very difficult. At first, Bad Request responses was all I got, but after fiddling around with things such as \r\n in the construction of the blob, I started getting Internal Server Errors. My code below is mostly thanks to  by Enrico Murro, however he only includes a file without any additional parameters (there is a comment on that post by Vinod with a possible solution by Enrico, but I couldn't understand it, maybe someone here can). Here is how I have constructed the blob. If anyone has any expertise regarding the matter, please please share! String boundary = '----WebKitFormBoundary7MA4YWxkTrZu0gW'; String preheader = '--'+boundary+'\nContent-Disposition: form-data; name="task"\n'+taskId; String header = '--'+boundary+'\nContent-Disposition: form-data; name="file"; filename="'+file_name+'";\nContent-Type: application/octet-stream';  String headerEncoded = EncodingUtil.base64Encode(Blob.valueOf(preheader+header+'\r\n\r\n')); while (headerEncoded.endsWith('=')) {     header += ' ';     headerEncoded = EncodingUtil.base64Encode(Blob.valueOf(header+'\r\n\r\n'));}      String bodyEncoded = EncodingUtil.base64Encode(file_body); Blob bodyBlob = null; String last4Bytes = bodyEncoded.substring(bodyEncoded.length()-4,bodyEncoded.length()); String footer = '--'+boundary+'--'; if (last4Bytes.endsWith('==')) {     last4Bytes = last4Bytes.substring(0,2) + '0K';     bodyEncoded = bodyEncoded.substring(0,bodyEncoded.length()-4) + last4Bytes; } else if (last4Bytes.endsWith('=')) {     last4Bytes = last4Bytes.substring(0,3) + 'N';     bodyEncoded = bodyEncoded.substring(0,bodyEncoded.length()-4) + last4Bytes;     footer = '\n' + footer; } else {footer = '\r\n' + footer;}  String footerEncoded = EncodingUtil.base64Encode(Blob.valueOf(footer)); bodyBlob = EncodingUtil.base64Decode(headerEncoded+bodyEncoded+footerEncoded);  HttpRequest req = new HttpRequest(); req.setHeader('Content-Type','multipart/form-data; boundary='+boundary); for (String key : headerMap.keySet()) System.debug(key + ': ' + headerMap.get(key)); if (headerMap != null) for (String key : headerMap.keySet()) req.setHeader(key, headerMap.get(key)); req.setMethod('POST'); req.setEndpoint(url); req.setBodyAsBlob(bodyBlob); req.setTimeout(120000);  Http http = new Http(); HTTPResponse res = http.send(req);  After a lot of meddling around, I ended up with the following method of simply prepending the preheader string which is my additional parameter to the headerEncoded string. I've tried the placement of this additional parameter all over and around the body before and after constructing the blob, but to no avail.

I'm trying to integrate Kraken.io into our org so I can have Salesforce queue up image optimization jobs that our employees upload. Kraken.io requires that the requests post a multipart/form-data body which contains a JSON parameter and the file. I'm porting code from C# where I could just write to the request stream, but in APEX with the HttpRequest class this doesn't seem to be possible. How can I go about creating a request that can do this?


Although the reader is initially meant to believe otherwise, Snape essentially helps Harry and directly fights Voldemort's return in book 1 by opposing Quirrel's actions.  How could he justify this to Voldemort when becoming one of his followers after his return? And why would Voldemort believe whatever explanation he gives, since surely returning must have been his top priority at the time?

I read something online that got me thinking about this. Why didn't Voldemort suspect Snape had defected from the Death Eaters and was now working for Dumbledore during the events of *Philosopher's Stone?  Voldemort was possessing Quirrell's body and his head was protruding from the back of Quirrell's - in other words, Voldemort was with Quirrell constantly during the events of Philosopher's Stone, presumably overhearing whatever Quirrell himself heard.   Snape cornered Quirrell more than once (Halloween, when Quirrell let the troll in, and the night Harry broke into the Restricted Section over the Christmas holidays to look for information on Nicholas Flamel) and openly threatened him against working for Voldemort and pressuring him to declare his loyalties to Dumbledore. This obviously revealed Snape's loyalty to Dumbledore to Quirrell, and presumably Voldemort, and I can't think of a reason why Voldemort wouldn't have been able to hear Snape strong-arming Quirrell perfectly clearly.   Why didn't Voldemort attempt to make contact with Snape during Philosopher's Stone? After all, Snape was supposedly Voldemort's most faithful servant. How is it Voldemort didn't suspect Snape was working for Dumbledore and didn't orchestrate a move against him? Snape wasn't even pretending to be a double agent during Philosopher's Stone, so why Voldemort didn't kill Snape as soon as he was physically able, or have Quirrell attempt to kill him, is unclear.  So yes, why didn't Voldemort suspect Snape as a double agent during the events of Philosopher's Stone?


One of my servers is getting DOS'ed - there are a large number of connections in the CLOSE_WAIT state which are preventing legitimate users from connecting to the system.  So is there any way to close the CLOSE_WAIT connection without killing the underlying server process? Killing the process would result in downtime which I want to avoid.  Is there any other way?

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


I am able to find the sources of data used by Google Maps for travel time estimation but what is the actual algorithm used by Google Maps to calculate estimated travel time?

What is the simulated speed used to calculate the travel time for each route?  Is it the speed limit for each road, simulated speed by actual time, or something else?


I am writing a simple Python for loop to prnt the current character in a string. However, I could not get the index of the character. Here is what I have, does anyone know a good way to get the current index of the character in the loop?   loopme = 'THIS IS A VERY LONG STRING WITH MANY MANY WORDS!'   for w  in loopme:     print "CURRENT WORD IS " + w + " AT CHARACTER "

How do I access the index in a for loop like the following?  ints = [8, 23, 45, 12, 78] for i in ints:     print('item #{} = {}'.format(???, i))   I want to get this output:  item #1 = 8 item #2 = 23 item #3 = 45 item #4 = 12 item #5 = 78   When I loop through it using a for loop, how do I access the loop index, from 1 to 5 in this case?


How do I transfer a database from a physical server running SQL Server 2012 to another server running SQL Server 2008 Express? The database was created by sa under SQL Server 2012.  Thank you.

What are my options if I need to move a database from SQL Server 2012(32bit) to SQL Server 2005(64bit)?  I know I cannot:   restore a backup of the database on SQL Server 2005 detach & attach   I know I can:   use import data wizard, and I tried it on one database, but it only moves data, and even that was troublesome as I needed to do a lot of work creating temp tables to maintain identity columns, recreating all FKs, indexes etc.    Is there an easier option?


I am testing something in Javascript and when comparing 2 values in if statement like == or === returning different. Could somebody explain to me difference between these 2 comparisons?

I'm using  to go through JavaScript, and it's returning many suggestions to replace == (two equals signs) with === (three equals signs) when doing things like comparing idSele_UNVEHtype.value.length == 0 inside of an if statement.  Is there a performance benefit to replacing == with ===?   Any performance improvement would be welcomed as many comparison operators exist.  If no type conversion takes place, would there be a performance gain over ==?


I'm currently doing a research internship in the Photovoltaics laboratory of a university. I am writing my report, and in my bibliography, I would like to cite a document that is an International Standard for defining how to make measurements on photovoltaic systems.  More specifically, it's the international standard IEC 61724:1998 : Photovoltaic system performance monitoring - Guidelines for measurement, data exchange and analysis. . (unfortunately the full-text document is not available without paying)  Now, my question is: Which BiblateX bibliography entry type should I use to cite this document? Article, Technical Report, Reference, Patent, ... ?  Is there a bibliography entry type that is dedicated to this kind of documents (international standards)?

I want to cite an ISO standard using BibLaTeX. All guidelines I found for BibTeX suggested using misc and replacing the author and editor fields by a number field which was then the full string denoting the ISO standard ("ISO 9241-210:2010" say). BibLaTeX won't display the number though. I found this  where it was suggested to copy the misc BibliographyDriver to a new standard type (as suggested by the section "2.1.3 Unsupported Types" of the ) and replace  \usebibmacro{author/editor+others/translator+others}    by  \usebibmacro{series+number}   The result is a complete adapted copy of the standard.bbx file, renamed to din.bbx though. Is this the only/best solution? Can't I just change what I need and insert it somehow?    This link is not TeX-related but might be useful:


This is problem 14 from section 1.2 in the book Matrix Theory Basic Results and Techniques 2nd edition. If $A B=A+B$ for matrices $A, B,$ show that $A$ and $B$ commute, i.e., $$ A B=A+B \quad \Rightarrow \quad A B=B A $$ The problem appear to be a "simple" problem that we just need to play around with $AB=A+B$.  But after a hour of trying, I couldn't figure it out.  Any hint will be appreciated.

I was doing the problem $$ A+B=AB\implies AB=BA. $$  $AB=BA$ means they're invertible, but I can't figure out how to show that $A+B=AB$ implies invertibility.


I am writing a bash script and want it to tell me if the names of the files in a directory appear in a text file and if not, remove them.  Something like this:  counter = 1 numFiles = ls -1 TestDir/ | wc -l  while [$counter -lt $numFiles] do      if [file in TestDir/ not in fileNames.txt]      then           rm file      fi      ((counter++)) done

I have a directory with 1000+ files. In a text file, I have about 50 filenames, one per line. I'd like to delete all the files in the directory whose filenames don't correspond with an entry on the list. What's the best way to do this? I started a shell script, but couldn't determine the proper command to determine in the filename is on the list. Thanks.


I'm trying to remove the '-' from a string and capitalize the word before the '-'. For example: fraser-ultra-2019 becomes FraserUltra2019 Right now I can only remove the '-' with str_replace but not sure how to capitalize it. $string = fraser-ultra-2019 str_replace("-","",$string) // fraserultra2019

I have fname and lname in my database, and a name could be stored as JOHN DOE or john DOE or JoHN dOE, but ultimately I want to display it as John Doe  fname being John and lname being Doe


I have to pass a list  to a stored procedure which is selected by user. That list I have as a string at java end.  Example: String list="123,467,980";  Now if I take this string to stored procedure as it is then how would it work.  I cannot use it as mentioned below:  select * from table_name where code in (list_var)   So can anyone guide me that what would be best approach for achieving this functionality.

Using SQL Server, how do I split a string so I can access item x?  Take a string "Hello John Smith". How can I split the string by space and access the item at index 1 which should return "John"?


I generated Excel with Data from BD, All is correct a except the type float.  In my BD I have "3.2" but in my Excell I have -> 3,20000004768372      try {          XSSFSheet sheet = workbook.createSheet(eyelash);         XSSFDataFormat format = workbook.createDataFormat();         style.setDataFormat(format.getFormat("Text")); //I need type text for others inputs in my Excel         styleRow.setDataFormat(format.getFormat("Text"));         String[] header = {"width"};         XSSFRow rowhead = sheet.createRow((short) 0);         XSSFCell cell;              int myRowData = 1;             XSSFRow row = sheet.createRow((short) myRowData);              List<MyClass> list = this.select();              for (int i = 0; i < list.size(); i++) {                  row.createCell(0).setCellValue(list.get(i).getWidth());                  myRowData++;                 row = sheet.createRow((short) myRowData);          }      } catch (Exception ex) {}   CLASS JAVA->  public class MyClass{   private float width;   public MyClass(){}   public MyClass(float width){    width=width;  }  public void setWidth(float width) {     this.width= width; }   public Float getWidth() {     return width; }    }  I can't use round because else never know width real.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


My goal is to have is given a map of  to return an ascending array/list of sorted key values. For example:  Input: the Map containing the following key/value entries separated by a space:  "Apple" 10 "Orange" 8 "Kiwi" 15   Output:  {Orange;Apple;Kiwi}   The only other approach I could think of was creating a Map<Integer,Set<String>> and then sorting by the key which is fairly convoluted. I got this approach to work but it seems rather inefficient in terms of code and logic. Thanks so much!

I am relatively new to Java, and often find that I need to sort a Map<Key, Value> on the values.  Since the values are not unique, I find myself converting the keySet into an array, and sorting that array through array sort with a custom comparator that sorts on the value associated with the key.  Is there an easier way?


I have an answer to a question Tiger eats rabbit. What would be the question for this?     Tiger eats who?      Tiger eats whom?   Which is correct among these two sentences?

I can never figure out whether I should use who and whom. Most people use who for both colloquially, but some people say this is not correct.  What’s the rule for using who and whom correctly?


In particle in square potential barrier problem, we can easily find that some probabilities exist which express how many particles can go beyond of the potential wall.  So my question is that, can we find some particles in the potential wall - square of wave function's norm really means  probability of find a particle in the wall?

I understand that if a particle approaches a finite potential barrier of height $V_0$ with energy $E < V_0$, there is still a finite probability of finding the particle on the other side of the barrier due to quantum tunneling.  My question is, since the wavefunction is nonzero inside the barrier region, is it possible to actually make a position measurement and locate a particle inside the barrier?  I mean, if we can say that "there is a nonzero probability that the particle is inside the barrier", surely this would suggest we can do so?  If not, why not? Am I understanding the whole wavefunction/probability distribution thing right?


The hint is to use Fundamental theorem of calculus to the function, $1-(f'(z)-1)$. Can someone help me to solve this using this hint?

Let $G$ be a convex area and $f:G \rightarrow \mathbb C$ be a holomorphic function (with continious derivative). Prove: If $|f'(z)-1|\lt 1,$ then f is injective on $G$  Could anyone give me a hint ? I dont know how to tackle this problem


Yet another flag status question...  However I've read that:      A flag's status will never change once it has been set.            From:     And I've also found that when:      A spam or "rude or abusive" flag is cleared (but not declined) by a moderator [results] in a flag being disputed.   [...]   This can also be done retroactively, in which case the outcome will change from helpful to disputed. (*)            From:    (*) Notice this was recently  .    So, which is it?   Was there a change in this behaviour? Provided the status could actually change, how exactly is it that it's done retroactively? Does it mean a moderator is allowed to change spam/abusive flag from helpful to cleared? Are there any other paths where a flag status would be modified after it has been set?

In my flagging summary under the statistics, there is 1 flag listed as "disputed".  This is the first time I've ever seen a disputed flag in my summary, so I'm just curious, what is a disputed flag? How would you even dispute a flag? Is this the same as voting a flag as invalid?


Let $\Bbb{Z}^+$be the set of all non-negative integers where $n$ and $k$ are given natural numbers. We consider the following non-decreasing function,  $$f:\Bbb{Z}^+ \to \Bbb{Z}^+$$ such that   \begin{align} f\left(\sum_{i=1}^{n} a_{i}^{n}\right)  =\frac{1}{k}\sum_{i=1}^{n} \left(f(a_{i})\right)^{n}\\ \end{align}  1.Find all functions for $n=2014$ and $k=2014^{2013}$  2.Find, number of functions which satisfy the condition of the problem depending on the values of parameters $n$ and $k$.

Let $\Bbb{Z}^+$be the set of all non-negative integers where $n$ and $k$ are given natural numbers. We consider the following non-decreasing function,  $$f:\Bbb{Z}^+ \to \Bbb{Z}^+$$ such that   \begin{align} f\left(\sum_{i=1}^n a_i^n\right)  =\frac 1 k \sum_{i=1}^n \left(f(a_i)\right)^n \end{align}  1.Find all functions for $n=2014$ and $k=2014^{2013}$  2.Find, how many functions and which satisfy the condition of the problem depending on the values of parameters $n$ and $k$.  I have some ideas for this problem . I know how to found $f(0)$ (just take $a_1=a_2=\cdots=a_n=0$) . I also can found $f(1)$ (take $a_1=1$ and $a_2=\cdots=a_n=0$) Then if $f(0)=0$ I've get that $f(a_n)+f(b_n)=f(a_n+b_n)$. I also think thas all functions will be as $f(x)=kx$ but I can't prove it . Can you help me with some partical solution or some ideas which can help to find it.  And can someone tell me how in first example ($n=2014$ and $k=2014^{2013}$) found f(2015) or  $f(2016)$ using that $f(i^n)=i\cdot f(1)$ ( for $2015>i>1$)and $f(1)=0$ or $f(1)=2014$


What is the standard deviation and mean of the reciprocal of normal distribution in terms of the standard deviation and mean of the normal distribution?

My random variable $X$ is normally distributed with mean $b$ and variance $p$. I defined a new RV, $Y$, such that $Y=1/X$. Does anyone know how to find the mean of $Y$ and $Y^2$?


Cars pass a certain street location according to a Poisson Process with rate $\lambda$. An old lady and her trusty boyscout want to cross the street at this location. They wait until they can ensure no cars will pass in the next T time units. Find their expected wait time.   I'm approaching this via the double expectation formula, but I'm getting stuck towards the end of the problem.  Let $W$ = a random variable representing the expected wait time  Let $X$ = a random variable representing the time until the first car passes.  Then, I can say: $$ E[W] = E[E[W|X=x]] $$  Where $$E[W|X=x] = \begin{cases} 0, & \text{if }x\geq T \\ x + E[W], & \text{if } x < T \end{cases}$$ So Then $$E[E[W|X=x]] = \int_0^\infty E[W|X=x] * \lambda e^{-\lambda x}dx$$ $$ = \int_0^T E[W|X=x] * \lambda e^{-\lambda x} + \int_T^\infty E[W|X=x] * \lambda e^{-\lambda x}$$  According to how I defined $E[W|X=x]$, the second integral should drop out because $E[W|X=x] = 0 $ for $X \geq T, correct? $  So what I'm left with is the following:  $$E[W] = \int_0^T (x + E[W]) * \lambda e^{-\lambda x} $$  Now I'm not exactly sure how to reduce this further as it is recursive.  Also, I saw another solution which does not drop out the second integral as I have, but evaluated it instead, which I found somewhat odd. I'd appreciate any explanation about how to proceed further.         Again, to clarify, I am interested in how to handle the recursive nature of this integral. Not to mention, I did not find the explanation on the "duplicate" to be very straightforward and I would like further clarification. Hence this question is different from the said duplicate and I would appreciate that it be reopened.

(Why did the chicken cross the road?) A chicken wants to cross a single-lane road where the cars arrive according to a Poisson process with rate $\lambda$. She needs at least $k$ minutes to cross the road safely, so she will have to wait until she sees a gap of at least $k$ between the oncoming cars. If the gap between the car that just arrived and the next one is at least $k$ then she starts crossing the road immediately. Let $T$ denote the random time she needs to wait by the road.  Find the expected time needed to cross the road.


Prove that if $abc \geq 1$ and $a,b,c > 0$ then, $$\frac{1}{1 + a + b} + \frac{1}{1 + b + c} + \frac{1}{1 + c + a} \leq 1$$ Can anyone help me with this problem? Tried AM-GM and Cauchy-Schwarz inequality, but it didn't work.

If $abc=1$ and $a,b,c$ are positive real numbers, prove that $${1 \over a+b+1} + {1 \over b+c+1} + {1 \over c+a+1} \le 1\,.$$  The whole problem is in the title. If you wanna hear what I've tried, well, I've tried multiplying both sides by 3 and then using the homogenic mean.  $${3 \over a+b+1} \le \sqrt[3]{{1\over ab}} = \sqrt[3]{c}$$ By adding the inequalities I get $$ {3 \over a+b+1} + {3 \over b+c+1} + {3 \over c+a+1} \le \sqrt[3]a + \sqrt[3]b + \sqrt[3]c$$ And then if I proof that that is less or equal to 3, then I've solved the problem. But the thing is, it's not less or equal to 3 (obviously, because you can think of a situation like $a=354$, $b={1\over 354}$ and $c=1$. Then the sum is a lot bigger than 3). So everything that I try doesn't work. I'd like to get some ideas. Thanks.


I have a HP pavilion g6 series (32-bit) system. I was using Ubuntu 16.04 LTS and everything was working fine until I downloaded BleachBit and used the app incorrectly. It somehow damaged my Ubuntu badly.  I downloaded an ISO image of 32-bit Xubuntu. I have a 64GB sandisk USB, I copied the ISO image to the USB drive but I have another file on the USB device. I tried to boot my laptop with this USB but nothing appears; my system keeps on starting normally.  I want to install this new iso image but I can't. Is there a way to install it without USB or CD?

How do I make an Bootable Ubuntu USB containing the the latest version of Ubuntu?  For completeness, how would I be able to do this on Ubuntu, Windows, OS X or another Linux distro?


I am trying to create a Piped I/O mergesort. I have the sorting working, but I am struggling with merging the pipes.  This is my Merger.java     1 import java.util.*;   2 import java.io.*;   3 class Merger implements Runnable {   4   5     ObjectInputStream ins[] = new ObjectInputStream[2];   6     ObjectOutputStream out = null;   7     int b[] = null, start=0;   8     //1 level merger, we do other 4 levels   9     //Only last level need an array to write into it   10     public Merger ( PipedInputStream in1, PipedInputStream in2,      PipedOutputStream pout, int b[]) {   11         try {   12 ins[0] = new ObjectInputStream(in1);   13             ins[1] = new ObjectInputStream(in2);   14             if(pout==null) {   15                 System.out.println("POUT = NULL\n");   16                 out = null;   17             }   18             else{   19                out = new ObjectOutputStream(pout);   20             }   21             this.b = b;   22         } catch (Exception e) {}   23     }   24   25     public void run() {   26         int num[] = { -1, -2 },   27             errCnt=0, // number of pipes caused error   28             k = -1;   // k will be 0 or 2 indicating the pipe to read from   29   30         try {   31             num[0] = ins[0].readInt();     // read from first pipe   32             num[1] = ins[1].readInt();     // read from second pipe   33         } catch (IOException e ) {   34             System.out.printf("\n\t\tOne or two pipes are not connected.\n");   35             return;   36         }   37   38         //compares num[0] & num[1], k written to array   39         while(errCnt < 2) {   40             try {   41                 if( errCnt < 1 )  k = num[0] <= num[1] ? 0 : 1;   42   43                 if( b != null) b[start++] = num[k];   44                 else {   45                     out.write(num[k]);   46                     out.flush();   47                 }   48                 num[k] = ins[k].readInt();   49             } catch( IOException e ) {   50                 errCnt++;   51                 //find source of exception   52                 k = ( k == 0 ? 1 : 0);   53             }   54         }   55     }   56   57 }   I call this function in two different cases. I have 6 different levels of Merging. 0 - 5. On 1-4 I call     122         for(int i = level-1; i >= 0; i--){   123             n = (int) Math.pow(2,i-1);   124             for(int j = 0; j < n; j++){   125                 if (i == 1){   126                     mergers[i-1][j] = new Merger(pin[i][j*2], pin[i][j*2+1], null, b);   127                     System.out.printf("Merger[%d][%d]   (pin[%d][%d], pin[%d][%d], null, b\n", i-1, j, i  , j*2 , i, j*2+1);   128                 }   129                 else {   130                     mergers[i-1][j] = new Merger(pin[i-1][i*2], pin[i-1][i*2+1], pout[i-1][j], null);   131                     System.out.printf("Merger[%d][%d]   (pin[%d][%d], pin[%d][%d], pout[%d][%d], null\n", i-1, j, i , j*2 , i, j*2+1, i-1, j);   132                 }   133   134             }   135         }   I get the error on line 126 and 130. I think it's because on the last level I pass null to the Pipedoutput (pout) and the other levels I pass null to array b.  The print statements are just to debug that I'm passing in the correct values

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


I read this series around 1994.  The protagonist was a boy who could summon elemental magic, or maybe it was just that he could summon elementals - I can't remember.  A companion of the boy, an old man, was some kind of wizard or magic user who had a phoenix as a familiar. Another of the boys companions obtained a sword that could absorb the souls of its enemies.  I think much of the series consists of the boy and his companions battling demons.  I think the boys elemental magic makes the demons weak when they are in its presence.  At the climax of the series there is a battle between the old man (wizard) and a powerful demon made of diamond.  The boy is also here but is unable to summon his elemetal magic because the substance the floor is made of prevents it.  The old man is lying on the floor, almost dead, and scratches some symbols.  The old man cries out "Uriel" and the angel Uriel is summoned.  Uriel askes the demon why he has summoned him.  The demon says, "I did not summon you, the old man did."  The demon happens to be Uriel's most hated enemy, and Uriel is happy to finally find him alone, without backup.  So Uriel and the demon battle and the demon is defeated.  Can anyone remember the series this is from?

This is a book I read as a child, so sometime in the 1980's  . It was actually a two part book series, both normal novel length. It was a swords and sorcery style setting.  Details are sketchy, but I'll give you what I can remember.  It centred around  a boy on a quest against some demon-like villain wizard type character. At some stage a girl was kidnapped and they were off to rescue her ( fairly generic stuff)  . I think the girl also had magic powers, healing I think.  This boy could control the weather or elements. He encounters a monk type character who ends up travelling with him and becomes a teacher of sorts. This monk is actually blind, but can still sense his surroundings, DareDevil style. ( I cannot remember if this was a magical ability or just something the monk had developed over time. ). I seem to remember this character had black, reptilian style eyes.  There may have been more people travelling with them I don't recall.  I recall the encounter with the main enemy took place on the top of a mountain, this mountain had the top taken off so was perfectly flat. ( I hope I'm not getting muddled with a different book with this detail)  The baddie know the boy could only control the elements if he was exposed to them, so ended up sealing the room he was fighting in so the boy had no contact with the outside. He won through by using a dagger or sword to make a crack in the floor through the protection, giving him enough of a connection with the outside to use his powers. I /think/ he died during this battle, and the girl they were rescuing brought him back to life. ( Or maybe she dies, and was brought back to life somehow)


This porgram prints different permutations of a string.It works correctly if I declare string as char array in main and pass array name in printAnagram function.But if I declare string as char* s = "hello" and pass 's' then it crashes. Why?  #include <stdio.h> #include <conio.h>  void printAnagram(char *str, int b, int e);  int main() {     char *s = "ABC"; // works fine when char s[] = "ABC" is used.     printAnagram(s, 0, 2);     return 0; }  void swap(char *a, char* b) {     char temp = *a;     *a = *b;     *b = temp; } void printAnagram(char *str, int b, int e) {     int i = 0;     if(b==e)         printf("%s\n", str);     else     {         for(i=b;i<=e;i++)         {             swap((str+b),(str+i));             printAnagram(str, b+1, e);             swap((str+b), (str+i));         }     } }

The following code receives seg fault on line 2:  char *str = "string"; str[0] = 'z';  // could be also written as *str = 'z' printf("%s\n", str);   While this works perfectly well:  char str[] = "string"; str[0] = 'z'; printf("%s\n", str);   Tested with MSVC and GCC.


Usually when on Earth we can use as an approximation:  g = a = 9.18 $\frac{m}{s^2}$ s = vi + 1/2 a$t^{2}$  However, how would I determine the distance traveled in situations where the the acceleration due to gravity is changing non-negligibly because the distances are so large? I know that the following equation has to be used somehow:  a = $Gmr^{-2}$  I am not sure exactly how though. For example, if given the information that an object is at a certain distance and is being attracted by a larger object of a given mass, the method should calculate where the object will be at a given time.

I was taught in school that acceleration due to gravity is constant. But recently, when I checked Physics textbook, I noted that  $$F = \dfrac{G  m_1   m_2}{r^2}. $$  So, as the body falls down, $r$ must be changing, so should acceleration due to gravity.


I have the following task:  On an interval $[0,a]$ one can use the substitution $y=a-x$ to try and exploit symmetry about the midpoint $a/2$  1) Evaluate $\int^{\pi}_0\frac{x\sin(x)}{1+\cos^2(x)}dx$   Where it is recommended to try the substitution $x=\pi-y$.  I tried using the substitution but I get nowhere with it:  $$\int^{\pi}_0\frac{x\sin(x)}{1+\cos^2(x)}dx$$  Substitution $u=\pi-x \Rightarrow du=-dx\Rightarrow$  $$-\int^0_{\pi}\frac{(\pi-u)\sin(\pi-u)}{1+\cos^2(\pi-u}du=\int^{\pi}_0\frac{(\pi-u)\sin(\pi-u)}{1+\cos^2(\pi-u)}du=$$  $$\int^{\pi}_0\frac{\pi \sin(\pi-u)}{1+\cos^2(\pi-u)}du-\int^{\pi}_0\frac{u\sin(\pi-u)}{1+\cos^2(\pi-u)}=$$  $$\int^{\pi}_0\frac{\pi \sin(u)}{1+\cos^2(u)}-\int^{\pi}_0\frac{u\sin(u)}{1+\cos^2(u)}$$  Well, I don't know what to do. I have been trying to tackle this integral with other different strategies but to no avail. Any help hinting how can I use the "midpoint" thing that the exercise mentions in the beginning?

Could someone help with the following integration:   $$\int^0_\pi \frac{x \sin x}{1+\cos^2 x}$$  So far I have done the following, but I am stuck:  I denoted $ y=-\cos x $ then: $$\begin{align*}&\int^{1}_{-1} \frac{\arccos(-y) \sin x}{1+y^2}\frac{\mathrm dy}{\sin x}\\&= \arccos(-1) \arctan 1+\arccos 1 \arctan(-1) - \int^1_{-1}\frac{1}{\sqrt{1-y^2}}\frac{1}{1+y^2} \mathrm dy\\&=\frac{\pi^2}{4}-\int^{1}_{-1}\frac{1}{\sqrt{1-y^2}}\frac{1}{1+y^2} \mathrm dy\end{align*}$$  Then I am really stuck. Could someone help me?


Let's say I want to build just another voucher code website (don't worry, I don't) and also I'd like to categorize my listed shops. What would be the best URL structure?  My ideas are as follows:  Idea 1:     www.example.com/voucher - overview of all shops with codes (with   pagination)       www.example.com/voucher/shoes-c1 - filtering by category,   ID 1 (c1)       www.example.com/voucher/amazon-s1 - the important   landing page, ID 1 (s1)   So maybe you have seen that I would use s or c to determine weather it's a shop or a category.  Idea 2:     www.example.com/voucher      www.example.com/voucher/cat/shoes-1      www.example.com/voucher/amazon-1   Idea 3:     www.example.com/voucher      www.example.com/voucher/shoes-1      www.example.com/amazon-1   This looks clean to me but I would lose the "voucher" keyword at the most important landing page.  Idea 4:     www.example.com/voucher      www.example.com/voucher/shoes-1      www.example.com/amazon-voucher-1   I've read very much on the internet about this topic and there are so many different opinions. Some people say that a keyword is important. And some other will tell you that the important pages should be as close as possible to the TLD.  So what's the right way?

Let’s take an example of a movie site. So a well structured set of URLs for this site can be:     Movie page - example.com/movies/the-matrix Review for movie - example.com/movies/the-matrix/reviews Trailers for movie - example.com/movies/the-matrix/trailers Specific trailer for movie - example.com/movies/the-matrix/trailers/trailer1   where it’s possible to navigate the resource even by directly deleting/appending resource name seamlessly.  For SEO purpose I read somewhere that for two given pages, Google will prefer the page which have search query up in the URL hierarchy among other things. So for the given 2 URLs and the query "the matrix trailer"    example.com/movies/the-matrix/trailers example.org/trailers/the-matrix/    `     Google might prefer the second URL as it has the keyword "trailer" at first level comparing to first URL which has "trailer" at 3rd level (a resource deeper in URL hierarchy may be less important).    If it is correct, one may be tempted to create URL hierarchy somewhat like      Movie page - example.com/movies/the-matrix Review for movie - example.com/reviews/the-matrix/ Trailers for movie - example.com/trailers/the-matrix/ Specific trailer for movie - example.com/trailers/the-matrix/trailer1     which will break the seamless hierarchy.    My questions are:   Is it true that resource deeper in URL hierarchy is tend to be less important when comparing to URLs of other site?   Is sacrificing meaningful, seamless hierarchy worth for this SEO optimization?


We're looking for a better PageDown toolbar than the default OOTB sprite, and like the looks of  on :    Are we allowed to use this same sprite for our site?

Suppose a commercial organisation decided to create a Q&A site that had the look and feel of Stack Overflow, calling itself Stocks&sharesOverflow.com, with a logo inspired by, but sufficiently different from stackexchange.com.  A  stated that look and feel of a site isn't copyrightable, but what about modifying the name and logo of stackoverflow.com to maintain the same "feel"?


I am using ubuntu 14.04 lts. Since last week I have been noticing this weird display glitch as in the image above whenever I hover or click over an icon. What can I do to fix this?  I looked up some questions like  and , and I checked if there's some issue with my graphics card but it seems fine.

NB: Nvidia has released an official fix; please see ,  and/or .  Upon waking up Ubuntu 16.04 from Suspend, the following graphical glitches appear around all windows, context menus, and similar:      This is currently known to affect the following NVIDIA cards running the proprietary drivers:  NVIDIA GeForce 610M, driver version 375.39, 340.102 NVIDIA GT 630M, driver version 375.39 NVIDIA GTX 650, driver version 375.39 NVIDIA GT 740M, driver version 378.13 NVIDIA GTX 745, unknown driver version NVIDIA GTX 850M, driver version 375.39, 378.13 NVIDIA GT 940M, driver version 375.39 NVIDIA GTX 950M, unknown driver version NVIDIA GTX 960M, driver version 378.13 NVIDIA GTX 970, driver version 375.39 NVIDIA GTX 970M, driver version 375.39 NVIDIA GTX 980 TI, unknown driver version NVIDIA GTX 1060, driver version 375.26, 375.39, 378.09 NVIDIA GTX 1070, driver version 378.09  The above above list has been sourced from reports from other users here on AU,  thread, and  thread. NB: This is be no means an exclusive list. It probably effects nearly all Nvidia cards.  Furthermore, this issue has been replicated on a clean install where the only change was a software update and the installation of the latest NVIDIA drivers.  What is going on, and how can it be resolved?


I updated my kernel. However, problems have arisen after that. So I started to download multiple kernels and install them through   sudo dpkg -i *.deb   I thought that at any time, the kernel was changing. However, among all version, my computer still see the latest version. All my installed kernels are now:  ii  linux-image-5.3.0-18-generic                    5.3.0-18.19+1                          amd64        Signed kernel image generic ii  linux-image-5.3.0-40-generic                    5.3.0-40.32                            amd64        Signed kernel image generic ii  linux-image-generic                             5.3.0.40.34                            amd64        Generic Linux kernel image ii  linux-image-unsigned-5.6.0-050600rc3-lowlatency 5.6.0-050600rc3.202002240232           amd64        Linux kernel image for version 5.6.0 on 64 bit x86 SMP ii  linux-image-unsigned-5.6.0-050600rc4-lowlatency 5.6.0-050600rc4.202003012332           amd64        Linux kernel image for version 5.6.0 on 64 bit x86 SMP ii  linux-image-unsigned-5.6.0-050600rc5-lowlatency 5.6.0-050600rc5.202003082130           amd64        Linux kernel image for version 5.6.0 on 64 bit x86 SMP   The one used by my acutal Ubuntu is the last one. How can I select a different version to run?

The latest kernel is causing problems with my sound, which worked fine with an older version. As I have only Ubuntu installed, Grub is not getting displayed while booting. How can I manually choose my kernel version while booting?


I have this error:   chown: missing operand after 'www-data:www-data/var/www/'

I am trying to install Wordpress on Lubuntu. I followed the instructions . Including PHP Apache and MySQL setups. Apache and MySQL appear to be running fine.  However, when I go to http://localhost/blog/, I get the following error:     Neither /etc/wordpress/config-localhost.php nor /etc/wordpress/config-localhost.php could be found.   Ensure one of them exists, is readable by the webserver and contains the right password/username.


I recently upgraded my computer from 32 bit ubuntu 14 to 64 bit ubuntu 16. My computer takes much longer to boot now. When I boot I see the dell logo and loading screen for 5 seconds and then I get a black screen for 50 seconds. After that I get a screen that shows a lot of [ OK ] 's and other text. This shows for about 30 seconds and then it shows my lockscreen. I am not satisfied with my 1:30 boot time and am wondering if there is a fix. I am on a Dell Inspiron 1525 and want to know if there is a way that I can speed up the boot. After running systemd-analyze blame | head -n 10 I got these results      16.294s dev-sda1.device     15.127s NetworkManager-wait-online.service     11.512s irqbalance.service     11.447s grub-common.service     11.398s ondemand.service     11.387s speech-dispatcher.service     10.328s apport.service     10.192s lightdm.service      9.473s systemd-udevd.service

When I boot up my my newly installed copy of Ubuntu on my custom rig w/4GB DDR3 RAM and a 3 Ghz Intel Core i7, it takes about a minute and a half at the purple loading screen, and then after logging in it takes a while for the icons to show up on the screen. This computer could run and boot Windows 7 faster, so  i have a problem here.


In computer, for example, if we use integer to represent position of objects, position can be (0,0) , (3,5), but not in (1.5,3.5).  In real world, there are something that is discrete, such as atomic energy level. Is there similar concept about the matter(eg: quark) that can exists in some position only?

Is the spacetime continuous or discrete? Or better, is the 4-dimensional spacetime of general-relativity discrete or continuous? What if we consider additional dimensions like string theory hypothesizes? Are those compact additional dimensions discrete or continuous?   Are there experimental evidences of continuity/discreteness?  When particles move inside space do they occupy spacetime by little chunks? What would imply if spacetime is discrete on continuous theories?  I've found little information on the web and books.  Probably my question is ill-posed and I apologize for this.


On locked questions and answers (), the "add comment" button is disabled. Makes sense, since commenting is disabled on locked posts. However, it indicates a requirement of 1 reputation to be able to comment:      Since 1 reputation does not allow you to comment a locked post, can this be removed?

So I recently saw add comment (requires 50 reputation) on a deleted answer. After looking around a bit, it seems to be on all deleted posts now (only deleted posts, normal posts still say just add comment).  I'm sure it wasn't there before (I think it just said add comment (unclickable) or possible nothing).  It is also on , presumably the root cause is the same.  And yes, I do have more than 50 reputation (in case anyone was wondering).  Just to clarify, requires 50 reputation obviously shouldn't be there for users with 50 or more reputation. Choices:   Display nothing Unclickable add comment - probably not ideal Unclickable add comment (disabled for deleted posts) or something along those lines   FYI - You may be somewhat confused right about now if you can't  yet.


The element i'm working with is a image i would like displayed during load time.  I am trying to set a css class attribute, i can set attributes on my image but its class attributes override's it.  So i need to set the class attribute. The class is .bgImage  This is how i set the attribute:  LoadingImg.setAttribute("display", "block");     This is what i have tried:  LoadingImg.className("display", "block");   And  LoadingImg.setAttribute(".bgImage display", "block");     CSS:  .bgImage {   position: fixed;   top: 0; left: 33%;   right: 0; bottom: 0;   z-index: 1;   display: none;   background-repeat:no-repeat; }   Exstra info:  LoadingImg is the image object, i had to grab it through iFrame levels.  var HomeDoc = $('#ContentFrame').contents()[0]; var LoadingImg = HomeDoc.all.namedItem('LoadingImg');

I have an element that already has a class: <div class="someclass">     <img ... id="image1" name="image1" /> </div>  Now, I want to create a JavaScript function that will add a class to the div (not replace, but add). How can I do that?


If the liqueur cherries have a stem and seeds will they be allowed into Australia through Australian customs?

Australia is well known for having very strict rules on what food and plant-based materials can be brought into the country, to try to keep the country free of diseases. Some food/animal/plant things can never be brought into the country, some may be if suitably declared, and a very small number are always fine.  What's the situation with chocolates though? I'd quite like to take a nice box of chocolates with me as a gift for someone when I go to Australia, but only if I'll be allowed to take them in. Does anyone know what the rules are for chocolates? Are they a never / usually ok if declared / normally fine thing?


Let's assume two waves with same phases and same wave speed $c$ in the same plane overlap, thus creating a constructive interference.  The elongation and speed of both waves is added to create the new interference wave:  $$s_{1} + s_{2} = s_{3}$$ and $$v_{1} + v_{2} = v_{3}$$  Due to energy conservation, the sum of kinetic energies and potential energies of waves 1 and 2 should be equal to the kinetic and potential energy of wave 3.  Simplifying and using the same mass each time:  $$\frac{mv_{1}^{2}}{2} + mgh_{1} + \frac{mv_{2}^{2}}{2} + mgh_{2} = \frac{m(v_{1}+v_{2})^2}{2} + mg(h_{1} + h_{2})$$ $$\frac{mv_{1}^{2}}{2} + \frac{mv_{2}^{2}}{2} = \frac{m(v_{1}^2+v_{2}^2 + 2v_{1}v_{2})}{2}$$ $$0 = mv_{1}v_{2}$$ Obviously I'm forgetting something here, but what?

I have a problem with energy conservation in case of interfering waves.  Imagine two harmonic waves with amplitudes $A$. They both carry energy that is proportional to $A^2$, so the total energy is proportional to $2A^2$. When they interfere, the amplitude raises to $2A$, so energy is now proportional to $4A^2$ and bigger than before.  The equivalent question is what happens to the energy with the superposition of two waves that interfere destructively.  Also, if someone could comment on the statement about this problem in my physics book (Bykow, Butikow, Kondratiew):      The sources of the waves work with increased power during the interference because they feel the wave from the other source.


I am going from India to Japan. I have Japan visa. My flight is via Hong kong. Transit time is around 5 hours. Is it required to have Hong kong visa?

We are (2) Indian nation and travelling from India to USA via Hong Kong airport and about 15 hours layover in Hong Kong airport. Do we need a transit visa even if only changing planes? And can we apply in Hong Kong Airport?


I would like to create two differents longtables, with the same width of columns from one longtable to an other other.  Here some specifities.   The longtable have the same number of columns The content of the lastest column have the same size from one header to an other one. Only the content of the first columns could have different size   I would like the size of the first columns be the same from table to an another one, the size should be the max of "autocalculated size".  Here a MWE  \documentclass{article} \usepackage{longtable} \begin{document}  \begin{longtable}{|l|l|} Head & 1 \\ \endhead text & other \end{longtable}  \begin{longtable}{|l|l|} Head & 2 \\ \endhead longer text & other \end{longtable} \end{document}

I am trying to align the columns of multiple tables.  I know I can use p column format to fix column widths but I would prefer that TeX automatically figure out the widths for me.  I was hoping to:    output one table with all rows of each subsequent table so that the column widths of the combined table would be automatically good for all the subsequent tables  then output each subsequent table using the same settings and  figure out some way in which the first combined table could be generated but not visible.   Here is my attempt.  The first combined table uses \savetabu to save the settings and then each subsequent table uses \usetabu to retrieve them.  Unfortunately this does not work as I had hoped.  The columns do not line up as the output below (after the code) shows. Does anyone have a method of accomplishing this?  \documentclass{article}  \usepackage{tabu} \begin{document}  Output both tables together as one table and then output each individual table.  We had hoped that this would cause the subsequent tables to be the same width as the first since the first contains all columns of the subsequent tables but it seems that that does not work.  \begin{center} \begin{tabu}{ll}\savetabu{mytabu2} 1 & 2 \\ 3 & 4 \\ abcdefghijklmnopqrstuvwxyz & 10 \\ 5 & 6 \\ \end{tabu} \end{center}  \begin{center} \begin{tabu}{\usetabu{mytabu2}} 1 & 2 \\ 3 & 4 \\ \end{tabu} \end{center}  \begin{center} \begin{tabu}{\usetabu{mytabu2}} abcdefghijklmnopqrstuvwxyz & 10 \\ 5 & 6 \\ \end{tabu} \end{center}  \end{document}   Here is the output:


The .profile file includes a statement to add the $HOME/bin directory to the PATH (if that bin directory exists). This is not being executed on my bash login.  If I manually load the .profile file   . .profile    then the PATH is set.  On session start, the .bashrc file is read. It includes a statement to read the .bash_aliases file if it exists, and I can see that the aliases are set.   The .profile file includes a statement to read the .bashrc file if it exists so I assume that the bash init should read the .profile where it is now reading the .bashrc.   This isn't happening. Please advise.  Thanks.

The three files are read in this order?  .bash_profile .profile .bashrc   This is not happening when I first open a terminal.   I have trace statements in the files appending to the file init.log. Please take a look at the following. It begins after opening a terminal. I have placed a comment to show where the log picks up after the su command.  stephen@debian:~$ cat init.log reading .bashrc done reading .bashrc stephen@debian:~$ su - stephen Password:  stephen@debian:~$ cat init.log reading .bashrc done reading .bashrc # # after su # reading .bash_profile reading .profile reading .bashrc done reading .bashrc done reading .profile done reading .bash_profile stephen@debian:~$    So the su - login triggers the expected sequence however the initial login reads only the bashrc. This cannot be correct. Can someone explain under what conditions this would occur. I could modify the bashrc and profile files so that the initial read includes all expected files but I would rather get to the root of the problem and fix it there.


$a, b$ are relatively prime and $a > b$.  Prove that $\text{gcd}(a-b,a+b) = 1 \,\,\text{or}\,\, 2$.   Attempt: Since $a, b$ are relatively prime, I know that $\text{gcd}(a,b) = 1$.  Also, know that $ax + by = 1 \,\,\text{for some}\,\, x,y \in \mathbb{Z}$.  Not sure where to go from there.  I suppose a proof by contradiction with the assumption that $\gcd(a-b,a+b) \neq 1 \,\,\text{or}\,\, 2$.  Thanks.

Here is the question I am trying to prove:     If $a,b$ are relatively prime and $a>b$ prove that $\gcd(a-b, a+b) \in \{1, 2\}$.   Can I begin with something like $(a-b)k + (a+b)l = d$ where $k,l$ are integers and $d=\gcd(a-b,a+b)$?


I have been invited for a phd interview and I was asked to prepare a 4 minute presentation with a max of 2 slides only on myself and my research interests. The fact that it's extremely restricted in time and number of slides makes me a bit too anxious. I'm not sure what info I'm expected to present in such a short time and in just 2 slides. Any tips?

I got invited for a PhD interview to the University of Edinburgh. I was asked in the email to prepare a 10 mins presentation on a recent research I was involved in. I did a sandwich placement year and it just so happened that this week I just gave a presentation about my placement project. I was given 30mins, which was still barely enough to cover everything. Now with 10mins, I might struggle to convey everything. What's more, what should I focus on in such presentation? I believe it's not to manage to show everything possible within the given (I don't want to try to squeeze too much data and speak ridiculously fast), but is it perhaps to show that I can present in scientific way? That's what my university tutor has told me. What exactly does it mean? Should I show that I fully understand what I present (which I believe I do), explain well my graphs etc? Any tips? What are they looking for in this short presentation?   I struggle a lot with presenting/public speaking, which is why I might worry too much over it but then again, I need to prepare twice as much as a person who is good at presenting.  Many, many thanks for help!   Edit: I realise that I'm still a bit stuck in the format of presentations I have given at the university and I wanted to ask what I should change to make this 10mins presentation as good as possible.  The format that I usually follow is:  introduction to the topic --> should I make it as short and simple as possible?  aims/objectives  methods/materials --> I wonder if I should skip it or make it very short?  results --> I believe I need to select most relevant ones  discussion --> this part usually takes some time in presentations, maybe I could combine it with conclusion to prevent repetitions maybe?  conclusion  further experiments  acknowledgement  references


The idea is to print out a simple line saying the book title, author, and price. However, I cannot seem to return any value even after constructing a Book object.  I'm building a Book class, an Author class, and using a Tester to run the program.  Here's what I'm looking at:  package book;  public class Book {      String title;     Author author;     double price;      public Book(String title, Author author, double price){}      public Book(){}      public void setbookTitle(String title) {         this.title = title;     }      public void setPrice(double price) {         this.price = price;     }      public String getTitle() {         return title;     }      public Author getAuthor() {         return author;     }      public double getPrice() {         return price;     }  }   package book;  public class Author {      String name;     String email;     char gender;      public Author(String name, String email, char gender){     }      public String getName() {         return name;     }      public String getEmail(){         return email;     }      public char getGender(){         return gender;     }      public void setName(String name) {         this.name = name;     }      public void setEmail(String email) {         this.email = email;     }      public void setGender(char gender) {         this.gender = gender;     }      @Override     public String toString(){         return name;     }    }    package book;  public class BookTester {      public static void main(String[] args) {      Author author1 = new Author("Horstmann", "horstmann@gmail.com", 'm');     Book book1 = new Book("Big Java", author1, 60);      Double number = book1.getPrice();         System.out.println(number);      System.out.println ("The Book information is: ");     System.out.println(book1.getTitle() + book1.getAuthor() + book1.getPrice());       }  }   Any advice would be appreciated!

I am trying to learn how to specify class constructors in Java. I am starting to understand that they specify the types of instance variables of objects made from that class. They also can be used to set the instance variable initial values. The follow example is from the Java tutorial on Sun's website:  public Bicycle(int startCadence, int startSpeed, int startGear) {     gear = startGear;     cadence = startCadence;     speed = startSpeed; }   Where in your classes source code should you put the constructor(s)?  Are these arguments the names of the variables?: (int startCadence, int startSpeed, int startGear) or are gear, cadence and speed the names of the variables?  What is the difference between (int startCadence, int startSpeed, int startGear) and gear, cadence and speed?  In the unlikely event that my instructor or any administrator from Salt Lake Community College ever comes across this question, let me make my intentions clear. This question is posted in the greatest spirit of academic honesty. I ask this question to seek general advice and help in understanding the proper way to use the Java programming language. I in no way use the work of others and represent it as my own work. I use the answers provided here as a general aid in my understanding. I do all my own work and do not copy work provided by people answering my question.


I got this one from Demidovich's "Problems and exercises in Calculus".  I tried to rewrite this as  $$\sqrt{(\sqrt{a^2}-\sqrt{b^2})^2} \le \sqrt{(a-b)^2} \\ \Leftrightarrow \sqrt{a^2-2\sqrt{(ab)^2}+b^2} \le \sqrt{a^2-2ab+b^2} \\ \Leftrightarrow a^2-2ab+b^2 \le a^2-2ab+b^2$$  This certainly proves that they are equal but one isn't lesser than the other... is it correct? It looks like something is missing. If it's correct, then why $\le$ and not "="?

Prove that $| |a|-|b| | \le |a-b|$  (1) I square both sides since I know they are positive:  $$a^2-2|ab|+b^2 \le a^2-2ab+b^2$$ $$|ab| \ge ab$$ Let $m=ab$ $$|m| \ge m$$ Which is part of the definition of the absolute value.  Is it enough or I need to rewrite my proof?


Determine whether or not the following limit exists, and find its value if it exists: $$\lim \limits_{n \to\infty}\ \left[n-\frac{n}{e}\left(1+\frac{1}{n}\right)^n\right] $$  I think the limit of $\left(1+\frac{1}{n}\right)^n$ is $e$, but I am not sure I can use this or not in the limit calculation. Could you please help me to solve this? Thank you!

I'm working on a practice exam for my masters quals and I am having difficulties with the following limit. According to wolfram alpha, it's value is 1/2. Does anyone know how to find this limit?   $$\lim_{n\to\infty} \left[ n-{n\over e}\left(1+{1\over n}\right)^n \right].$$


On Ubuntu 16.04 I'm stuck with this command:  sudo apt-get update 0% [Connecting to archive.ubuntu.com (2001:67c:1560:8001::14)]

When I do upgrade it gets stuck here:  user@plato:~# sudo apt-get upgrade Reading package lists... Done Building dependency tree        Reading state information... Done Calculating upgrade... Done The following packages will be upgraded:   bind9-host coreutils cpio curl dnsutils libbind9-90 libc-bin libc-dev-bin   libc6 libc6-dev libcgmanager0 libcurl3 libcurl3-gnutls libdns100   libdrm-intel1 libdrm-nouveau2 libdrm-radeon1 libdrm2 libisc95 libisccc90   libisccfg90 libjasper1 liblwres90 libplymouth2 libsepol1 libssl-dev   libssl-doc libssl1.0.0 linux-libc-dev mime-support multiarch-support ntp   ntpdate openssl plymouth plymouth-theme-ubuntu-text python3-distupgrade   ubuntu-release-upgrader-core unzip 39 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Need to get 16.0 MB of archives. After this operation, 12.3 kB of additional disk space will be used. Do you want to continue? [Y/n] y 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::15)] ░   When I do update it gets stuck here:  user@plato:~# apt-get update 0% [Connecting to us.archive.ubuntu.com (2001:67c:1562::14)] [Connecting to sec░   I'm able to ping us.archive.ubuntu.com just fine:  user@plato:~# ping us.archive.ubuntu.com PING us.archive.ubuntu.com (91.189.91.23) 56(84) bytes of data. 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=1 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=2 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=3 ttl=54 time=81.5 ms 64 bytes from economy.canonical.com (91.189.91.23): icmp_seq=4 ttl=54 time=81.4 ms ^C --- us.archive.ubuntu.com ping statistics --- 4 packets transmitted, 4 received, 0% packet loss, time 3004ms rtt min/avg/max/mdev = 81.425/81.528/81.582/0.355 ms   What can i do to fix this?    What I have tried so far.  I've tried following directions on this blog:   To force apt-get to use IPv4 exclusively   Create a file in /etc/apt/apt.conf.d/99force-ipv4 Add this line to newly created file Acquire::ForceIPv4 false; Apt-get will now use IPv4 exclusively


this is a number systems question and I am currently trying to prove this statement :  "A fraction $\frac{a}{b}$ (with $a, b \in \mathbb{Z}$, where $b\neq0$) in lowest terms has a terminating decimal if and only if the prime factorization of b has only factors of 2 and factors of 5."  I am not sure how to start the proof is it's very general so any tips are much appreciated.Thank you very much in advance !

I am trying to figure out how to prove that all rational numbers are either terminating decimal or repeating decimal numerals, but I am having a great difficulty in doing so. Any help will be greatly appreciated.


I can remember one short story where the explorer finds life - I think on the Venus surface, so an early story before we knew how hostile the surface is. and he leaves a poop bag there, not realizing that it would make the lifeform extinct, a unique lifeform, only known life on Venus. The lifeform penetrates it and eats the rich material, and that kills it. I don't think it is intelligent, just multicellular. But it is destroyed because it is the only remaining example of its species on the planet, and not destroyed by the microbes. As the explorer leaves the planet, he doesn't know that he has made this lifeform he just discovered extinct.   Does anyone know this story? (Answered, thanks!)

In the 70's or 80's I read a short story in which 2 astronauts looking for a nice place to eat lunch choose a spot at the pole of a small desolate planet, overlooking the world's only pool of surface water.  Due to the harsh extremes of heat, and lack of water, this is the home of the planet's single living organism, which has grown slowly over eons,  surviving the daily extremes, moving slowly over the bare rock, dissolving it with acidic digestive juices to get the nutrients it needs for survival. The men watch the organism while eating their lunch, then depart, unknowingly leaving death behind them in their garbage - cigarette butts, tin cans, wrappings - a bonanza that the creature moves over to dissolve and ingest, along with the human-based microscopic organisms that will destroy the alien being. The theme of the story is that although we reach out to the stars to seek life, we are much more connected to the lowest forms of life on Earth, than to any life we may find on other planets. I don't remember the author and title.  Can someone identify the story?


A square matrix $A$ is idempotent if $A^2 = A.$  Prove that if $A$ is an $n\times n$ matrix that is idempotent and invertible, then $A$ is the identity.  How do i prove this?

So I get a square matrix $A$ is idempotent when $A^2 = A$.  How can you prove that if $A$ is an $n \times n$ matrix that is idempotent and invertible, then  $A = I$??  I'm quite confused on this.  Any help much appreciated, Thanks.


I have the following mixed models:  modeloIa<-lmer(log(FstPSAmm2+1)~AntherAreamm2+(1|plant), REML = F)  modeloIIa<-lmer(log(FstPSAmm2+1)~AntherAreamm2*color+(1|plant), REML = F)  modeloIIIa<-lmer(log(FstPSAmm2+1)~AntherAreamm2*color*FlPerBranch+(1|plant), REML = F)  modeloIVa<-lmer(log(FstPSAmm2+1)~color*AntherAreamm2*PlVoldm3+(1|plant), REML = F)   The first one is the null modell. The variable color is the fixed effect I want to test. FlPerBranch and PlVoldm3 are covariables.   How do I select the best model? How do I know if the variables are significant? These two questions are for me a dilemma.  If I use the AIC criterion I should select one model, but if I use the likelihood ratio test, starting from my null modell, I should select another. Any advice will help me a lot, thanks.

I use lme4 in R to fit the mixed model  lmer(value~status+(1|experiment)))   where value is continuous, status and experiment are factors, and I get  Linear mixed model fit by REML  Formula: value ~ status + (1 | experiment)    AIC   BIC logLik deviance REMLdev  29.1 46.98 -9.548    5.911    19.1 Random effects:  Groups     Name        Variance Std.Dev.  experiment (Intercept) 0.065526 0.25598   Residual               0.053029 0.23028  Number of obs: 264, groups: experiment, 10  Fixed effects:             Estimate Std. Error t value (Intercept)  2.78004    0.08448   32.91 statusD      0.20493    0.03389    6.05 statusR      0.88690    0.03583   24.76  Correlation of Fixed Effects:         (Intr) statsD statusD -0.204        statusR -0.193  0.476   How can I know that the effect of status is significant? R reports only $t$-values and not $p$-values.


My content is fully static, using only HTML, CSS, JS. It's only one page, which needs to load really fast from any country, and should be online for only 3 months.  I already have the domain name.  I just need a CDN where I would keep my HTML, CSS, JS and image files, to be served really fast in Japan, China or USA.  Do I still need to have a web server? Do CDN provider also offers simple hosting?

This is a "catch-all" question designed to serve as an answer for all questions about choosing web hosting.  Pro Webmasters no longer accepts new questions about how to choose hosting.  All future questions pertaining to finding web hosting should be closed as a duplicate of this question. For more information about this policy please see .    How to find web hosting that meets my requirements?  What we're looking for in answers to this question are the basics about web hosting:   What is web hosting? What is the difference between shared, VPS, and dedicated hosting? How does a content delivery network relate to web hosting? Anything else you feel is helpful in finding a web host.   What we do not want is:   Endorsements or recommendations for specific web hosts We do not want your experience or other subjective information (just the facts please)


Let p be prime ideal in the ring R. I want to show that there is a bijection between the set of prime ideals of R and the set of prime ideals of localization of R.   I am quite confused about the localization of a ring. How do the elements of localization of R look like and how do its prime ideals look like?

Refer to localization of rings in Lang's Algebra p. 108. In particular, let $A$ be a commutative ring, $S$ a subset of $A$ that is a submonoid of the multiplicative monoid structure of $A$, containing the identity. Then  $S^{-1}A$ is the set of elements $\frac{a}{s}$ with $a \in A$ and $s \in S$.  We have $\frac{a_1}{s_1}=\frac{a_2}{s_2}$ if there exists $\bar{s} \in S$ such that $\bar{s}(s_2a_1 - s_1 a_2)=0$. Now consider the injection of $A$ into $S^{-1}A$ given by $x \mapsto \frac{x}{1}$. This is a ring homomorphism. Let $J$ be an ideal of $A$. Ring homomorphisms preserve ideals and so the injection of $J$ into $S^{-1}A$, call it $J^{*}$, will be an ideal. My problem is that i don't see why for any $\frac{a}{s} \in S^{-1}A$ and any $\frac{j}{1} \in J^{*}$ we will have that $\frac{aj}{s}$ will be in $J^{*}$, i.e. why there must exist an element $\kappa \in J$ such that $\frac{aj}{s}=\frac{\kappa}{1}$.


I have a problem with these sentences. which one is correct?and why?  He studied the role of an/the/ ' extended family in caring for older people.

I can’t for the life of me figure out where to use a and where to use the — and where there is no article at all. Is there a simple rule of thumb to memorize?   The standard rule you always hear:     “If a person knows which item you are talking about then use "the"   . . . doesn’t clear things up for me, as I have no idea whether or not they know.


Recently I upgraded from 16.04 to 18.04 and really happy with it.  I would like to decrease the brightness when running on battery and increase the same when connected to an external power supply. I checked the settings and there was no option. It can be done manually, but I am looking for an automated way of doing it.  Any script or an application would really help.

I just installed Ubuntu 17.10 (with GNOME 3) on my new HP laptop, and I noticed that the screen does not dim when the charger is unplugged.   Is there a way to set up two brightness profiles, one for AC adapter, and one for battery?   Most of the tutorials say to install tlp, but from what I notice it does not change the brightness level... it seems to increase the battery life though.


In the book Analysis of Financial Time Series by Rue Tsay, I read:     A time series $\{p_t\}$ is a random walk if it satisfies $p_t = p_{t−1} + a_t$    where $p_0$ is a real number denoting the starting value of the process   and $\{a_t\}$ is a white noise series. If $p_t$ is the log price of a   particular stock at date $t$ , then $p_0$ could be the log price of the   stock $a_t$ its initial public offering (IPO) (i.e., the logged IPO   price). If $a_t$ has a symmetric distribution around zero, then   conditional on $p_{t−1}$, $p_t$ has a 50–50 chance to go up or down, implying   that $p_t$ would go up or down at random. If we treat the random-walk   model as a special AR(1) model, then the coefficient of $p_{t−1}$ is unity,   which does not satisfy the weak stationarity condition of an AR(1)   model. A random-walk series is, therefore, not weakly stationary, and   we call it a unit-root nonstationary time series.   If $p_t$ has a 50–50 chance of going up or down, then its mean is constant, correct? So if $p_0=1$, and it can go to 0 with a probability of 0.5 or go to 2 with probability of 0.5, then the mean is constant at 1.  So why is this not a stationary process?

The  that is defined as $Y_{t} = Y_{t-1} + e_t$, where $e_t$ is white noise. Denotes that the current position is the sum of the previous position + an unpredicted term. You can prove that the mean function $\mu_t = 0 $, since $$E(Y_{t}) = E(e_1+ e_2+ ... +e_t) = E(e_1) + E(e_2) +... +E(e_t) = 0 + 0 + \cdots + 0$$ But why is it that the variance increases linearly with time? Does this have something to do with it's not “pure” random, since the new position is very correlated with the previous one? EDIT: Now I have a much better understanding by visualizing a big sample of random walks, and here we can easily observe that the overall variance does increase over time,  and the mean is as expected around zero. Maybe this was trivial after all, since in the very early stages of the time series (compare time = 10 with time = 100) the random walkers have not had yet the time to explore as much.


Let $\sum_{n=1}^\infty a(n)$ be a series such that $(a(n))$ is a decreasing sequence of positive numbers. Prove that $\sum_{n=1}^\infty a(n)$ converges if and only if $\sum_{n=1}^\infty 2^na(2^n)$ converges.

I have to prove the  by tomorrow and I am really unconfident about what I did:  $$\sum_{n=1}^\infty a_n\text{ converges } \iff \sum_{n=1}^\infty 2^n a_{2^n}\text{ converges}$$  I did the following:  Let $(b_n)$ be a sequence as follow: $b_{2^k+m}:=a_{2^k}$ with $k\in\mathbb N_0$ and $0\leq m<2^k$.  It's $a_{n+1}\leq a_n$ and so $0\leq a_{n+p}\leq a_n$ for all $n,p\in\mathbb N$.  So $\sum\limits_{n=1}^\infty b_n$ converges by the majorizing series $\sum\limits_{n=1}^\infty a_n$. And it's $\sum\limits_{n=0}^\infty b_n=\sum\limits_{n=0}^\infty\sum\limits_{m=0}^{2^n-1}a_{2^{n+1}}=\sum\limits_{n=1}^\infty 2^{n-1}a_{2^n}$ so $\Rightarrow$ is done.  For $\Leftarrow$ consider $c_{2^k+m}:=a_{2^k}$ with $k\in\mathbb N_0$ and $0\leq m<2^k$.  It's $|a_n|\leq c_n$ and $\sum\limits_{n=0}^\infty c_n=\sum\limits_{n=0}^\infty\sum\limits_{m=0}^{2^n-1}a_{2^{n}}=\sum\limits_{n=1}^\infty 2^{n}a_{2^n}$ and so $\sum\limits_{n=1}^\infty a_n$ converges by the majorizing series $\sum\limits_{n=0}^\infty c_n$.  Is this in form and content correct?


This code:  \documentclass[12pt]{article} \begin{document}  \begin{equation}\label{eq:test} \begin{array}{l} \left[ \displaystyle \frac{e^{ix}}{2} = \\ = \sin (x) + \cos (x) \right] \end{array} \end{equation}  \end{document}   generates an error:  Missing \right. inserted. \left[ \displaystyle \frac{e^{ix}}{2} = \\ Extra \right. = \sin (x) + \cos (x) \right]   If I modify it as  \documentclass[12pt]{article} \begin{document}  \begin{equation}\label{eq:test} \begin{array}{l} \left[ \displaystyle \frac{e^{ix}}{2} = \right. \\ = \left. \sin (x) + \cos (x) \right] \end{array} \end{equation}  \end{document}     it can be built, but the closing square bracket \right] appears smaller than the opening \left[. I would like to have them instead of the same dimensions (as \left[).  Is it possible? How?

I have a very long equation that must be separated into two lines, and it has several pairs of nesting \left \right delimiters. Unfortunately, it seems that they need to be on the same line in order for them to work.  Also I'm using the align environment because I need the aligning functionality. Is there a way to have the size of delimiters automatically adjusted over multiple lines?


I just realized I have 18.10 installed instead of the LTS 18.04 (yes, I am such a noob) because apt repositories have stopped updating. Is there a way to upgrade, given that do-release-upgrade does not work anymore?

I'm trying to upgrade from 18.10 to 19.10, using sudo do-release-upgrade however I only get an error: An upgrade from 'cosmic' to 'eoan' is not supported with this tool. I performed the steps to update my sources.list to point to old-release server, as suggested here:  This did not help. I get the same error.


I'm searching for a PhD position in theoretical physics. My question is:  Should I do my PhD with a prominent professor who is 60 years old and does not care too much about their students or with a junior professor who is not famous and does not have published too much papers, but cares too much about his students and is very supporting and nice professor?

I plan to apply for PhD in Finance/Statistics next semester, and hence searched for potential supervisors.  An issue I have is that many interesting candidates are above age 60, and in Germany Professors retire at 65, such that a subsequent post-doc/habilitation would most likely require a different supervisor after PhD. One Professor just started his position at age 40, but so he has not many notable publications and I am unsure whether he might change university soon (he just changed it from another 4 years position).  Could someone advise me on the importance of age for selecting a PhD supervisor in context of a long-term future academic career?  The time for PhD would be 4-5 years, and PostDoc/Habilitation/AssociateProf usually again 4-6 years, with goal of potentially becoming Full Professor in Finance/Statistics.


Suppose I am talking about three people:       John, Jane "," or Joey could finish the task on time.     Do I need the comma before "or"?    EDIT:  This asks about using a comma with "or", not "and". So this question is different from .

I have seen many sentences like this:     "Capitalism, Socialism, and Anarchism"   and this:     "She was happy, and cheerful"   Do we have to use a comma before "and", or is it incorrect?  If it is not, then why?


I've got a decent machine, 8 GB RAM, good motherboard etc and an Radeon HD6870 GC. I'm desperately trying to run three monitors on the card. The card has 1 HDMI, 2 DVI and 2 Mini DisplayPorts. The set up is as follows:   Monitor 1 is connected via the DVI cable. Monitor 2 is connected via a DVI to HDMI lead into the HDMI slot. Monitor 3 is connected via a DVI lead into a DVI to Mini DisplayPort adapter.   Now, in Ubuntu, I have no problems whatsoever, they all work completely fine as extended desktops. Windows is seeing none of this. I've got the Catalyst Control Centre, and I tried setting up an Eyefinity group, but I can only ever have 2 enabled at once.

How do I setup  to support three monitors on a Radeon  card? Currently I can setup only two at once in any combination.  Monitors are connected as DVI-DVI-HDMI.


I'm trying to filter a part of a file that holds 2 digital certificates. Basically, I want the first part (let's say Cert1) and not the second part (Cert2).  Content of the file is:  -----BEGIN CERTIFICATE----- AAAA AAAA ETC -----END CERTIFICATE----- -----BEGIN CERTIFICATE----- AAAA AAAA ETC -----END CERTIFICATE-----   I was under the impression that this would give me the content of Cert1 (the first part between the first BEGIN and the first END):  cat /etc/nginx/cert.pem | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p'   For some reason, though, it still presents me all the content between the second BEGIN and the second END (basically, nothing changes; all content is the same).  Any pointers?

How can I select first occurrence between two patterns including them. Preferably using sed or awk.  I have:  text something P1 something content1 content2 something P2 something text something P1 something content3 content4 something P2 something text   I want the first occurrence of the lines between P1 and P2 (including P1 line and P2 line):  something P1 something content1 content2 something P2 something


I find that my expectations of a nominated person and where my votes should go are affected by what number I see next to them, even if I don't want it to. I feel I gravitate towards nominees who already have a larger number of votes, and away from ones with smaller.  Is there a benefit to this that I'm missing?

I believe that showing the post score for nomination posts during primaries is a bad idea.  When I loaded the primaries page during the election, the first thing I saw was a post voted -1. This immediately colored my impression of the post. Reading his post didn't indeed make me wish he was a moderator, but at the same point I couldn't bring myself to click on the down arrow. He wasn't an awesome candidate, but he wasn't a -2 score candidate either. Actually, I kinda wanted to sympathy upvote instead.  I want to judge by myself whether a candidate is worth or not my +1. For some of those people I don't have an opinion already, and I want to form one on my own. I don't want game theory to kick in, I don't want to be tricked into sympathy upvotes.  Having those numbers in large print as the first thing I see about them honestly prevents me from doing so. I'd rather have their avatar there.     Some people on chat do not agree with me;  I imagine they'll post explaining why I want to be aware of their opinion while forming my own.      Regardless of the discussion here, if you do prefer to hide the scores as you vote, here's the jQuery oneliner that does just that:  $(".vote-count-post").hide()


I am not sure if the phrase Times are a changing is used exclusively within or related to  but the A is bugging the hell out of me every time I see it.  Why is there an  in front of an adjective which is not followed by a noun?

I have always been intrigued by the word usage in the title of this . Wikipedia mentions that the song was influenced by Irish and Scottish ballads:     Dylan recalled writing the song as a deliberate attempt to create an anthem of change for the moment. In 1985, he told Cameron Crowe: "This was definitely a song with a purpose. It was influenced of course by the Irish and Scottish ballads ...'Come All Ye Bold Highway Men', 'Come All Ye Tender Hearted Maidens'. I wanted to write a big song, with short concise verses that piled up on each other in a hypnotic way. The civil rights movement and the folk music movement were pretty close for a while and allied together at that time.    Is there a dialect where the form a-<gerund> is common? e.g. a-cooking, a-cleaning, etc.  If so, in what context would you use the form a-<gerund>?


I have a Realtek 8812AU WIFI USB adapter,and till yesterday, it was working fine on Ubuntu 18.04. But, today, all the sudden, Ubuntu stopped recognizing the adapter. I am not familiar with Linux or hardware stuff... But, I am still writing the symptom as much as I can describe.   When I installed a driver for it a month ago, I used a command, apt-get install rtl8812au-dkms, and it was recognized with no trouble. Today, Ubuntu suddenly stopped enabling the adapter. Wifi adapter list is empty on Setting menu. My Ubuntu is running on a dual boot machine. So, I restarted with Windows10, and the adapter has no issues working. So, I believe the adapter is fine physically. I typed the  apt-get install rtl8812au-dkms command again. Ubuntu replied that the newest version is installed. So, the driver is still on Ubuntu.  I researched online and found the  lsusb command. By typing it, I found the adapter's company name was on a result from the command. So, at least, Ubuntu recognizes the adapter at the USB socket. I also switched it to another USB socket, and run the command. Then, it also showed the adapter on the different port. There is a small issue with the machine; the Ubuntu machine currently doesn't have any access to a wired LAN connection. So, if you know a solution, please teach me where I can download a driver or some other required files from to the other machine, and what commands I need to type after I copy those files to the Ubuntu machine physically... After I got a request from @Jeremy31 and @abu_bua (thanks for your quick reply!), I typed dmesg | grep 8812au and I received the following message from Ubuntu:   [  19.514781] 8812au: version magic '4.15.0-34-generic SMP mod_unload ' should be '4.15.0-36-generic SMP mod_unload '

Problem  I had a Linksys WUSB 6300 dual-band USB WiFi adapter happily running on on my desktop PC with driver module 8812AU.  When I first got it to work I used the  to get it to work with Secure Boot. It worked fine with Kernel version 4.4.0-23-generic and later also with 4.4.0-24-generic where I resigned it after the update.  After the update to 4.4.0-28-generic resigning for some reason does not have the desired effect anymore and it does not seem to load the driver module 8812AU.  After updating to 4.4.0-38-generic the behavior remains the same.  The Additional Drivers tool now shows me , so I am not sure if somehow the module files got messed up. I am pretty new to Ubuntu, so I wouldn't know how to tell. When it was still working it showed me .  So in consequence the network adapter is not working and I am out of ideas what to check or do in order to get it back to work.  Details  lsusb shows me that the adapter is recognized as USB device:  Bus 002 Device 002: ID 13b1:003f Linksys WUSB6300 802.11a/b/g/n/ac Wireless Adapter [Realtek RTL8812AU]   sudo lshw -C network only shows me the Ethernet and the internal WiFi (it has a very similar name). It is an integrated WiFi adapter which is working poorly under Ubuntu and is thus not useful for me.  Note: 8821AE is the internal WiFi. I am trying to get 8812AU to run which is not listed here because it does not seem to be loaded.  *-network    description: Ethernet interface    product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:03:00.0    logical name: enp3s0    version: 11    serial: 54:a0:50:d5:4b:0b    size: 10Mbit/s    capacity: 1Gbit/s    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation    configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8168g-2_0.0.1 02/06/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s    resources: irq:42 ioport:e000(size=256) memory:f7d00000-f7d00fff memory:f0000000-f0003fff *-network    description: Wireless interface    product: RTL8821AE 802.11ac PCIe Wireless Network Adapter    vendor: Realtek Semiconductor Co., Ltd.    physical id: 0    bus info: pci@0000:04:00.0    logical name: wlp4s0    version: 00    serial: 54:27:1e:d6:91:8d    width: 64 bits    clock: 33MHz    capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless    configuration: broadcast=yes driver=rtl8821ae driverversion=4.4.0-22-generic firmware=N/A ip=192.168.0.20 latency=0 link=yes multicast=yes wireless=IEEE 802.11abgn    resources: irq:46 ioport:d000(size=256) memory:f7c00000-f7c03fff   Running rfkill list all shows that nothing seems to be blocked:  0: hci0: Bluetooth     Soft blocked: no     Hard blocked: no 1: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no   Any help would be greatly appreciated!  Many thanks.


Given a metric space $X$ and an equivalence relation $\sim$, the quotient (pseudo-)metric on $X/\sim$ is defined as follows:   $d'([x],[y]) = \inf \left \{ d(p_1,q_1) + d(p_2,q_2) + ... + d(p_n,q_n)\right \}$   where $[p_1] = [x], [q_n] = [y],$ and $[q_i] = [p_{i+1}]$.  Under what circumstances does this reduce to the much simpler equation   $d'([x],[y]) = \inf \left \{ d(p,q): [p] = [x], [q] = [y] \right \}$   ?  It appears to work for $\mathbb{R}^n/\mathbb{Z}^m$ for $m \leq n$, but I'm curious about the general case.

There have been at least two discussions in this forum about why a (pseudo) metric is defined in the quotient of a metric space by: $$ d([x],[y]) = \inf \{ d(p_{1}, q_{1}) + \ldots, d(p_{n}, q_{n}) \} $$ where $[p_{1}] = [x]$, $[q_{n}] = [y]$ and $[q_{i}] = [p_{i+1}]$ for $i = 1, \ldots, n-1$. I understood that this is defined in order to guarantee the triangle inequality. I wasn't able, myself, to verify it, so some help here would be appreciated.  Nevertheless, the main point of my question is the following: in Anatole Katok's book A First Course in Dynamics, proposition 2.6.7 asserts that the far more natural function $$ d([x],[y]) = \min \{ |b-a| : a \in [x], b \in [y] \} $$ is actually a metric in $\mathbb{R} / \mathbb{Z}$. That left me wondering: is there some general extra condition ensuring that the more natural function $\inf$ of distances over all representatives is a metric in the quotient? What's special about this example that doesn't work in the general case? Reading Katok's proof, I had a guess that it lies in the fact that there is a minimum-attaining representative in this case, which can be fixed.


I've encountered this example of implicit differentiation. The problem asks us to find the derivative of $y^2 + x^2 = 4$    How can they assume that y is a function x when it clearly is not? If we isolate y, we get: $y = \pm \sqrt{4-x^2}$. So then how can we assumt that y is a function of x?  On a high level, I'm still a bit confused. So I guess implicit differentiation is useful when we have relations between y and x that aren't functions. That's why the $\frac{dy}{dx}$ is in term of 2 variables. $\frac{dy}{dx}$ has two values depending on the value of x and the value of y since at x, there are 2 values of y. Is that right?

I've been reading Keisler's Calculus book, and there's an example where he does implicit differentiation on the equation: $$x^2+y^2=1$$ which yields:$$\frac{dy}{dx}=-\frac{x}{y}$$ I understand the technique of implicit differentiation, and I understand that it's just an application of the chain rule when $y$ is a function of $x$, or $x$ and $y$ are both functions of some third variable.   What I don't understand is how you can get the derivative of a non-function. In the case above, $y$ is not a function of $x$, and as far as I know, looking at the definition of the derivative, derivatives only seem to be defined for functions.   Sorry for the noob question, but what am I missing here?


After running apt-get update I receive the following errors:  E: Could not get lock /var/lib/apt/lists/lock - open (11: Resource temporarily unavailable) E: Unable to lock directory /var/lib/apt/lists/ E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?   I tried what is written :  rm /var/lib/apt/lists/lock   In this case I'm able to run apt-get upgrade successfully. But after a reboot the issue is return.  I searched for the problem. But I didn't find a solution. A tried what is written , but I have no output for ps -aux | grep 'apt-get'.  I use Ubuntu 16.10.

I get this error when trying to use apt-get:  E: Could not get lock /var/lib/dpkg/lock - open (11 Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/) is another process using it?     How can I fix this?


If you can't use msg, (due to Migraines), what other seasoning can be used to make korean yaki mandu?

I have always heard that you should stay away MSG. For example when buying bouillon crystals we should always make sure that it doesn't contain MSG. Yet I came across  for spinach soup that calls for 1/2 teaspoon of MSG. This got me wondering are there any pros to MSG. Should we stay away from it or should we incorporate it into our diet and if so should we limit how much we ingest? If it is 'bad' then is there something I can replace it with when a recipe calls for it?


I have had this question for quite some time now but never tried to look for the answer but now it bugs me. When simplifying $y=\dfrac1{\frac1x}$ we get $y=x$ where $0$ is defined ,I presume it is because the denominator can not be zero in a fraction ? Even if that is true what is wrong with it being zero as we get zero eventually : $$y=\frac{1}{\frac{1}{0}}$$ $$y=\frac{1}{\infty}=0$$ Sorry if this is very naive :(

Is the fraction  $$\frac{1}{\frac{1}{0}}$$  undefined?   I know that division by zero is usually prohibited, but since dividing a number by a fraction yields the same result as multiplying the number by the fraction's reciprocal, you could argue that  $$\frac{1}{\frac{1}{0}} = (1)\left(\frac{0}{1}\right) = 0$$  Is that manipulation permissible in this case? Why or why not?


The question is that, Find all primes $p$ such that $p!+p$ is a perfect square.  By using Wilson's Theorem I got,   $$p!+p=p((p-1)!+1)=p^{2}k$$ If $p^{2}k$ is a perfect square, then k must be a perfect square.  I was unable to proceed after this. I also tried another approach   We can see that for p=2,3 the given expression is a perfect square. Let $p>3$. If $p!+p=k^{2}$, then it is easy to see that k must be odd. Also, if k is odd, we know that $k^{2}\equiv 1\pmod{8}$, which implies that $p\equiv 1\pmod{8}$, since $8|p!$ Similarly, we also get $p\equiv 1\pmod{3}$. Thus, we get $$p\equiv 1\pmod{24}$$Unfortunately, I was unable to capitalze from here as well   Could someone please complete my solutions or provide an alternate solution. Thanks a lot for your help!! :)

Find all prime numbers $p$ such that $p!+p$ is a perfect square.  I think the only ones are when $p!+p=p^2$, i.e. $p\in \{2,3\}$.  Any ideas at all?


I am completely a novice at computers please can anyone provide basic easy to follow instructions of how to install ubuntu on my elderly Toshiba laptop currently running windows xp. And is ubuntu my best option? Thankyou

I would like to see a full how-to guide on how to install Ubuntu.


There are many cases where I'm given the option to do something, only to find out much later that it's impossible.  For example:   I voted to reopen a question. The "reopen (4)" still appears. If I click it, I'm alerted, "Nominate this question for reopening?" If I then click okay, I'm told that I already voted. If I don't have enough reputation to upvote (questions or comments) or downvote, the icons still appear. This was really annoying: I wanted to delete my own question. I clicked "delete" and a popup showed, asking if I was absolutely sure. In this case I was, so I clicked "Delete Question" only to receive a vague error message suggesting that I ask for a moderator's help.   Is there a reason for this confusing behavior? If I can't do something, why wait to the last possible moment to tell me?

Recently I just deleted one of my answer in stackoverflow where there was one comment. After deleting the answer it also show for sometime that we all know but in the comment it still allow us to up to make it useful but as I clicked it it just showed me the message:  If we are not allowed to do then what was the meaning? Why don't it just be removed or make it disable if the answer is deleted. Just don't show UI for actions that can't be actioned


so I want this to be independent of the computer the code is used on, so I want to be able to create a directory in the current directory and save my plots to that new file. I looked at some other questions and tried this (I have two attempts, one commented out):       import os     from os import path     #trying to make shift_graphs directory if it does not already exist:      if not os.path.exists('shift_graphs'):         os.mkdirs('shift_graphs')      plt.title('Shift by position on '+str(detector_num)+'-Detector')     #saving figure to shift_graphs directory     plt.savefig(os.path.join('shift_graphs','shift by position on '+str(detector_num)+'-detector'))     print "plot 5 done"     plt.clf   I get the error :   AttributeError: 'module' object has no attribute 'mkdirs'   I also want to know if my idea of saving it in the directory will work, which I haven't been able to test because of the errors I've been getting in the above portion.

What is the most elegant way to check if the directory a file is going to be written to exists, and if not, create the directory using Python? Here is what I tried:  import os  file_path = "/my/directory/filename.txt" directory = os.path.dirname(file_path)  try:     os.stat(directory) except:     os.mkdir(directory)         f = file(filename)   Somehow, I missed os.path.exists (thanks kanja, Blair, and Douglas). This is what I have now:  def ensure_dir(file_path):     directory = os.path.dirname(file_path)     if not os.path.exists(directory):         os.makedirs(directory)   Is there a flag for "open", that makes this happen automatically?


In my scene I have a wheel shaped cylinder with rigid body dynamics attached to it. I also have a floor with passive rigid body dynamics. Now what I want to achieve is to have the wheel spinning while it falls down to the plane, to then get grip and roll off the plane. I already tried these three scenarios.   Rotating the wheel using an animation. In this scenario the animation doesn't play anymore once the dynamics kicks in. Checking the "Animated" option in the rigid body settings eliminates the gravity effect. Using a shape key to rotate the wheel. This doesn't work either because the shape keys deform the object in the transition. Using bones but this gives the exact same result as using animation.   I'm sure there is a ways so I am curious to hear your suggestions.  UPDATE:  Animating the "Animated" checkbox works partly. So the "" does not work as I tried it already earlier. Rotation is lost eventually and I need it to work like a motor.

I'm trying to create a bowling animation and I want the ball to hit the pins. I already added the Rigid Body physics to the objects but can't get the ball to move.  Obviously I could just add keyframes but   that seems to interfere with the Rigid Body physics it doesn't look too realistic.   Is there a way to add some kind of motion to the ball?


I am having trouble creating a buffer around a polygon of a county in QGIS. When I run the "fixed distance buffer" geoprocessing tool, no features are returned in the 'buffer' shapefile that is created. Has anyone had trouble with this as well? Or does anyone have suggestions of what I may be doing wrong?  Here is the polygon I am attempting to buffer:

I'm completing online course GST 101 for QGIS (my version is 2.18.3) and I'm stuck on the Buffer tool.   All of my layers are set to CRS "NAD83(HARN)/New Mexico Central (ftUS) (EPSG:2903)" as instructed in the lab.   The goal is to use the query builder to filter the municipal limits in Bernalillo county down to only Albuquerque. Then after filtering create a buffer layer of 5280 ft around it.   The problem is I get an empty layer from the buffer tool with no entries in the attribute table. So I tried Buffer on the entire layer (with 0 ft buffer to pinpoint the problem areas) and this is the result.    There appears to be a number of features in this layer that aren't recognized because I would have expected the entire layer to be selected.   I've also tried the query builder to filter Albuquerque and save to a new layer. Then try to buffer the new layer, still results in an empty attribute table.  I've tried the shp file included in the lab as well as downloading the file directly from here:  (Municipal Limits / Various municipal limits in Bernalillo county / SHP File).   I'm still fairly new at GIS but I'm following a youtube video and pdf instruction but I'm clearly on a newer version of QGIS.     Any suggestions on what the problems may be?