is an empirical formula stating that positions of planets in Solar system is described by:  $$a=0.4+0.3 \times 2^m [AU],$$ where $m$ are natural numbers.  All planets, with exception of Neptune, fall within a few percent of it. Moreover, it predicted the existence of Uranus (so, at least to me, it does not sound like a coincidence).  There are simulators of solar system formation ().  Are there numerical simulations generating such orbits (as expected from Titius–Bode law). Or are they showing that there is no preference for such orbits?  See also:

Background: I was recently reading a book on the planets to my son and I noticed a pattern in the distributions of the planets.  The planets' distances roughly follow an exponential distribution.  Below is a plot of scaled, log orbital distances $$ \tilde{d_n} = \frac{\log(d_n/d_1)}{\log(d_2/d_1)} $$ with the line $an+b$:   Where $d_1$ corresponds to Mercury and so on. Ceres is included, Pluto is excluded.  By linear regression, $a = 0.90, b = -1.06$.  For the statistically minded, the data has a Pearson's correlation of 0.996.  Note that this is a well known phenomenon, see  and references.  The code used to generate the plot may be provided on request.  Question: What is the mechanism that leads to this distribution?  Aside: Is there a good introductory text on solar system formation for the mathematically inclined?  Update: This is also known as Titius–Bode law.


I'm faced with an issue I can't seem to understand when it comes to RSA. Below are my values for all of the parameters, unfortunately I can't seem to get the expected decrypted values from my encryption message p=113, q=117,phi=12992,n=13221 encryptionKey = e = 8473 decryptionKey = d = e^-1 = 12969 msg = 3; (encryption) cipher = (3)^(8473) (mod 13221) = 6633 (decryption) msg = (6633)^(12969) (mod 13221) = 12546  why is the msg prior to encryption not equal to msg after encryption? how to get them equal ?

I'm trying to apply the RSA cryptosystem to encrypt a byte M=72, using predefined modulus n, public key exponent e and private key d.  (n, e, d, p, q) = (4802, 5, 59, 43, 8)  In order to accomplish that, I used the following code on Python console:  C=(M**e)%n M=(C**d)%n print M    the first instruction encrypts the byte as C: using the RSA encryption mathematical expression (** stands for exponentional, and % for modulus in Python programming language) the second decrypts C to get M back: using the RSA decryption mathematical expression.   However, the output shows:     2816   which means that M was incorrectly computed as '2816', although I'm pretty sure that all the values of n, e, d, p and q respect the RSA public key algorithm specification.  Does anyone have any idea?


I have two fields in database table, title and description. I am displaying tha data in php while loop.  My Code :   $sql = "select * from sightseeing";     $i = 1;     $res = mysql_query($sql, $conn);      if( mysql_num_rows($res) > 0) {         while($row = mysql_fetch_array($res))        {          echo "
           ".$i++."	           ".$row["title"]."	           ".$row["description"]."
";       }    }   I want to show only first 50 characters from description field. How to do that?

I am looking for a way to pull the first 100 characters from a string variable to put in another variable for printing.    Is there a function that can do this easily?  For example:  $string1 = "I am looking for a way to pull the first 100 characters from a string variable to put in another variable for printing."; $string2 = 100charfunction($string1); print $string2   To get:  I am looking for a way to pull the first 100 characters from a string vari


Trying to find a sample size for logistic regression I found a rule of thumb in   I cite:  Sample size considerations. Sample size calculation for logistic regression is a complex problem, but based on the work of Peduzzi et al. (1996) the following guideline for a minimum number of cases to include in your study can be suggested. Let p be the smallest of the proportions of negative or positive cases in the population and k the number of covariates (the number of independent variables), then the minimum number of cases to include is: N = 10 k / p If the resulting number is less than 100 you should increase it to 100 as suggested by Long (1997).  From:     I understand there are extra complexities like statistical power, stability and orthogonality of the variables.  But anyways, my question is if the fact that I have categorical variables would affect the sample needed. I ask this because for every level of a categorical variable you have one parameter.  More precisely, do I have to count every level of categorical variables as different variables to calculate sample size?

I want to make a logistic model from my survey data. It is a small survey of four residential colonies in which only 154 respondents were interviewed. My dependent variable is "satisfactory transition to work". I found that, of the 154 respondents, 73 said that they have satisfactorily transitioned to work, while the rest did not. So the dependent variable is binary in nature and I decided to use logistic regression. I have seven independent variables (three continuous and four nominal). One guideline suggest that there should be 10 cases for each predictor / independent variable (Agresti, 2007). Based on this guideline I feel that it is OK to run logistic regression.    Am I right? If not please let me know how to decide the number of independent variables?


Is it possible for dummy variables in a regression model to take on any value. I added a variable to my model with two variables (one dependent and one independent) and called it a dummy variable that can take on any Integer value > 0. This value also give me some information about my observations. But i was told i cannot call it a dummy variable as it is does not take on a binary value.  I did read some articles and got some definitions, but i can't seem to find an example of a dummy variable that can take on any value. I just want to confirm that a dummy variable can only be binary.

I understand the logic of coding for data analysis. My question below is on the use of a specific code.   Is there a reason why gender is often coded as 0 for female and 1 for male?  Why is this coding considered 'standard'?  Compare this with Female = 1 and Male = 2. Is there a problem with this coding?


A general way to get a matrix norm is inducing it from a vector norm.  The question is, can the Hilbert-Schmidt norm obtained this way?  As a norm general question, is every matrix norm obtained this way?  The crucial condition is $\|XY\| \leq \|X\|\,\|Y\|$.

My textbook says:     Frobenius norm defined on $\mathbb{R}^{m,n}$ by a formula: $$\|A\|_F=\sqrt{\sum_{i=1}^n\sum_{j=1}^m|a_{i,j}|^2}$$   when $n>1, \ m>1$ is not induced by any vector's $p$-norm.   But there is no proof. I searched over the Internet and didn't find one. Is it very hard to prove? I would be very grateful for help.


Actually after pressing a button i have a method which check if in my itemStorico ArrayList exist new added items from itemModel, then if the item exist in the new list called itemModel i'm removing the old item from itemStorico and adding the new one, else just adding the new item without removing the old.  But i'm getting the following error:  2018-12-11 16:34:04.067 29033-29033/it.gabtamagnini.realco E/AndroidRuntime: FATAL EXCEPTION: main     Process: it.gabtamagnini.realco, PID: 29033     java.util.ConcurrentModificationException         at java.util.ArrayList$Itr.next(ArrayList.java:831)         at it.gabtamagnini.realco.OrdiniActivity.saveStorico(OrdiniActivity.java:1396)         at it.gabtamagnini.realco.OrdiniActivity$29.onClick(OrdiniActivity.java:1368)         at android.view.View.performClick(View.java:5637)         at android.view.View$PerformClick.run(View.java:22433)         at android.os.Handler.handleCallback(Handler.java:751)         at android.os.Handler.dispatchMessage(Handler.java:95)         at android.os.Looper.loop(Looper.java:154)         at android.app.ActivityThread.main(ActivityThread.java:6130)         at java.lang.reflect.Method.invoke(Native Method)         at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)         at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)   While here is the code from my method:   for(ItemModel itemModels : itemModel){             boolean exist = false;             for(ItemModel itemModel2 : itemStorico){                 if(itemModels.getCodiceArticolo().contains(itemModel2.getCodiceArticolo())) {                     itemStorico.remove(itemModel2);                     itemStorico.add(itemModels);                     exist = true;                 }             }             if(!exist) {                 itemStorico.add(itemModels);             }         }

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


I'm currently in my final year of undergraduate study, and will be applying to physics PhD programs (for condensed matter theory) soon. Without going into details, I am convinced that deferring my admission for a year, i.e. taking a "gap year", would be beneficial for me personally, and it is my understanding that most schools permit a one-year deferral. I would most likely work in the tech industry for this time.   I am not worried about my physics/math abilities atrophying; I plan on actively keeping up with my studies independently during this time.   Assuming I am permitted to defer for a year, are there any negative perceptions related to time off before graduate school that might affect my future academic career, after the PhD?  Will some people in the community look down on me for taking time away from academia, or is this considered a fine thing to do? Could this hinder me in the future when applying for postdocs (both the year away from academia and the fact that I am probably finishing my PhD a year later than I otherwise would)?  I am asking about the general perception of a gap year as it pertains to and affects a career path, not about how a gap year impacts a PhD application (which is addressed in ).

I am an undergraduate mathematics major, entering my fourth year. I plan on applying to graduate school, but I have not yet taken the GRE exams, and there a few key courses (Topology and Algebra in particular) that I have not taken yet, so I am hesitant to take the Advanced Math GRE too soon. (If you're wondering why I haven't taken Topology and Algebra yet, it's because I was trying to secure a CS degree, which sidetracked my mathematical studies last year. It was a healthy branching out experience, and one that helped me realize my true academic passion.)  My main question: what is the perception of students who take a gap year between their graduation and starting graduate school?  I think I will take the GRE tests this fall, a) for practice and b) if I score high, then I might as well apply sooner rather than later. However, I ask this question to gauge how much energy I should put into preparing for the tests this fall. If I hear, "You should really do your best to avoid any gap in your education," then I will work my butt off in preparation for the tests. But if I hear, "It's totally okay take a gap year before going into graduate school," then I would give myself more freedom in terms of my non-standardized-exam studies, extracurriculars, and in general social activities. I figure the answer to this question won't be as cut-and-dry as I hope, but any advice would be appreciated!  Just to clarify, my gap year would not consist of me sitting at my desk taking practice GRE exams all day... That would be a pitiful use of my time. I definitely plan working either as an intern or a research assistant at a successful organization. It seems like the general consensus is that taking time off is okay, and potentially beneficial, assuming you actually do something in that gap.


Which of the three articles (a/an/the) would the blanks in the following sentence take?  It is not unusual for ____ editor to tamper with _____ writer's manuscript.  I think it should be 'an' and 'the' in the first and second blank respectively, but my colleagues think otherwise. Please suggest.

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.


can someone please help me what wrong with below written "IF CODE" this is not coming inside block everytime even the values before if is logged in console.  if(userNameString == userInstance.getUsername() && passwordString == userInstance.getPassword())  Here is the complete code: if(userInstance == null)     {         Log.i("no record found againse User Instance",""+userInstance);          Toast.makeText(getApplicationContext(),                 "User Id and Password is wrong", Toast.LENGTH_SHORT).show();         getLoaderManager().destroyLoader(arg0.getId());          }     else     {         Log.i("Record found againse User Instance 1st",""+userInstance + "userName:" + userNameString +":pass:::"+passwordString);           if(userNameString == userInstance.getUsername() && passwordString == userInstance.getPassword())         {             Log.i("Record found againse User Instance 2nd",""+userInstance);                 //Log.i("UserInstance else","" + userInstance);             SessionManager.saveLoginCredentials(context,userInstance.getUsername().toString(),userInstance.getPassword().toString());             Intent intent = new Intent(LoginActivityService.this,                     ProposalListActivity.class);             startActivity(intent);                          getLoaderManager().destroyLoader(arg0.getId());         }              }  Here is the LogCat:  02-04 22:36:39.150: I/on LoadFinished of Loader(14572): Name: kong,Password: f10343d1dc8d44c8935b356aa3f8aae2,First Name: Kong 02-04 22:36:39.150: I/Record found againse User Instance 1st(14572): Name: kong,Password: f10343d1dc8d44c8935b356aa3f8aae2,First Name: KonguserName:kong:pass:::kongkong  EDIT: There was some logical problem the password i was getting from webservice is encoded instead of text and i was comparing the text with encoded value thats why the block of if statements were not executed.*

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I'm trying to remove all the unecessary space, but I don't know how to proceed here, I already done what is possible to delete all blank space of the graph (the figure starts at the edge of the chart). Does anyone know how to remove or decrease this space?  \begin{figure}[ht] \includegraphics[width=0.4\textwidth]{figures/pontosdesejados.pdf}\centering \caption{$r$ fixed points} \label{desiredpoints} \end{figure}

\documentclass{article} \usepackage[draft]{graphicx} \begin{document} \begin{figure} \centering \setlength\fboxsep{124pt} \setlength\fboxrule{1pt} \fbox{\includegraphics{dummy}} \caption{Dummy caption} \end{figure} \end{document}   How can I increase vertical space between figure and caption?


How will I proceed for the question 63? Can anyone help me out?

Let $S$  be the set of$(\alpha , \beta)\in \mathbb{R^2}$ such that $\frac{x^{\alpha}y^{\beta} }{(x^2 + y^2)^{1/2} }\rightarrow 0 $ as $(x,y) \rightarrow (0,0)$   then $S$ is contained in    {$(\alpha,\beta) : \alpha>0, \beta> 0 $} {$(\alpha,\beta) : \alpha>2, \beta> 2 $} {$(\alpha,\beta) : \alpha+\beta> 1 $} {$(\alpha,\beta) : \alpha+4\beta>1 $}   What I have tried is   Putting $ y=mx$   $  $  then we will get in the power of $x$  $ \alpha + \beta-1 $ so for convergence to  $  0 $ we yield option 3


I recently had an electric dryer fail and I have been unable to determine the reason.  All of the obvious items within it to check for (as mentioned in many youtube videos on such appliance repairs) all were in proper working order.    When I first checked the line-to-line voltage at the socket where the dryer cord plugged into, I measured around 208Vac.  That seemed a bit low and the dryer is spec'ed for 220/240Vac.  After trying to make several attempts at repairing the dryer, including carefully taking some measurements at various points with it plugged in, I checked the voltage at the socket again...  To my surprise, I was only reading about 160Vac line-to-line.  Clearly that is way low.   I also did not see any evidence of short circuits or melted/scorched connections and wiring inside the dryer.  Also, the circuit breaker for the dryer circuit was not tripped at all at any time from first noticing the dryer no-start situation to during the troubleshooting.  Before I contact a local electrician, I figured I'd ask here.  What would cause a circuit that is supposed to be 220/240V line-to-line to only be about 160V line to line??

I just moved into a home and I am hooking up a used dryer (which I'm told works).  The dryer spins, but I get no heat.  I bought a multimeter, and it tells me that the receptacle provides insufficient voltage for both the dryer's spin and heat.  The receptacle is a NEMA 10-30.  Referring to the poles as listed in , I get the full 120V between poles W and Y, but only 45V between poles W and X (and 70V between X and Y).  I think, from these DIY questions ( ), that I should get 120V between W and X and 240V between X and Y.    I even took the receptacle off the wall, and I get the same readings from the bare wires.  So here's my question: is it time to call an electrician, or are there some other things I can investigate on my own?


Is there a way in C++ to get nanosecond accuracy? Something equivalent to the nanosecond timer  in Java (System.nanotime).

I wish to calculate the time it took for an API to return a value. The time taken for such an action is in the space of nanoseconds. As the API is a C++ class/function, I am using the timer.h to calculate the same:   #include <ctime>   #include <iostream>    using namespace std;    int main(int argc, char** argv) {        clock_t start;       double diff;       start = clock();       diff = ( std::clock() - start ) / (double)CLOCKS_PER_SEC;       cout<<"printf: "<< diff <<'\n';        return 0;   }  The above code gives the time in seconds. How do I get the same in nano seconds and with more precision?


Basically   $\sum_{i=0}^{33}\binom{99}{3i} $   I have read about this .  I am looking for a conventional approach. Like the one we use in $\sum_{i=0}^{n}\binom{2n}{2i} = 2^{2n-1}$

closed form for  $$\binom{n}{0}+\binom{n}{3}+\binom{n}{6}+...+\binom{n}{n}$$  I tried to solve it by :   $$\binom{n}{0}+\binom{n}{3}+\binom{n}{6}+...+\binom{n}{n}=\sum_{k=0}^{n/3}\binom{n}{3k}$$  $$\sum_{k=0}^{n/3}\binom{n}{3k}=\sum_{k=0}^{n/3}\frac{1}{2\pi i}\int_{\left |z  \right |=1}\frac{(1+z)^n}{z^{3k+1}}dz$$  then using geometric series but i got no result .  what is your suggest to solve ?


Now I learn about network programming. I wanted to write myself a recvall function. My messages are sent through a TCP sockets and always end with the \r\n. Googling some articles and blog posts, I found a method I do not understand. Can it be written simpler?  def recvuntil(s, needle):     data = ""     while data[-len(needle):] != needle:         data += s.recv(1)     return data   The line I do not understand: while data[-len(needle):] != needle:.  It does not make any sense to me (but, however, it works). -len(needle) should return a negative number and strings are numbered starting from 0 ...

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I wanted to automatically pass to a newpage when i'm near the end of one on special occasions and so i was wondering if they were anything that would tell where it should be based on what is above. Exactly i would like something giving either the distance to the upper border of the page or the purcentage of advencement in the page.  PS: If you have a way to pass to a new page when near the end of one page, i will gladly accept it even if it doesn't match the rest of my question  Thanks for your answers

I have a document with some tabulars one after the other.  I want the tabulars begin on a new page if there is very little room left on the actual page, like 1/4th.  Otherwise, there should not be a pagebreak.  So I need some kind of conditional \pagebreak, how can I do this?


Just a dumb question from just a newb in git, Messed up alot with git, but now I was wondering if how can I restore to a previous version in the application, since my .env environment configuration file is now gone in my current master branch, I did merge my other branch with this one. I knew I made my latest work on my chat-feature branch, pretty much the 100% of the application was there, since the chat part and the payment feature of the application was there but when I checkout there, its not even working, I was wondering how can I go back to that previous commit that I made. When I git log I want to be back to this specific version.

I have made some changes to a file which has been committed a few times as part of a group of files, but now want to reset/revert the changes on it back to a previous version.   I have done a git log along with a git diff to find the revision I need, but just have no idea how to get the file back to its former state in the past.


I would like to know how can I filter the packets of a particular process using Iptable. I read the documentation but I am still confuse how to use --pid-owner processid option.

Is it possible to block the (outgoing) network access of a single process?


In Anime/Manga One piece, when straw hat pirate had finished explore the entire island ( or beat the bad guys ), straw hat pirate will continue their journey to the next adventure ( a.k.a next island ). They travel around grand line using Going Merry soon will be replaced with Thousand sunny. The manga/anime never mention how long they have been in sea ( cause using a boat to travel in sea would be take a month maybe a year ). In anime/manga it's like the distance between previous island and the next island only take an hours to make it. Is the distance of island in one piece not really that far ?

Rewatching a few episodes of One Piece made me wonder:  How much time did the Straw Hats spend with each other before the timeskip?  [It's not necessary for all of them to be present. I'm looking for the time span between the Episode 3 (when Zoro joins the crew) and Episode 405 (when the Straw Hats are separated by Kuma)]  How much time has it been since the timeskip (till the start of Zou arc)?


I want to install chrome and enter the source list  when doing sudo apt-get update there is an error as follows:  E: Type 'Debb' is not known on line 1 in source list /etc/apt/sources.list.d/google.list E: The list of sources could not be read.   how do I fix it?

I was trying to install spotify for Ubuntu when this error appeared:  E: Type 'debo' is not known on line 1 in source list /etc/apt/sources.list.d/spotify.list E: The list of sources could not be read.   I don't know what to do to solve it.


I'm fairly new to JavaScript and TypeScript. As far as I'm concerned, TypeScript is compiled into regular JavaScript. Coming from C#, where objects are passed by reference (if they're not primitive types or structs). I've written some TypeScript code to test something: interface IRunner {      run(): string; }  class TestDI {     private readonly Runner: IRunner;      constructor(runner: IRunner) {         this.Runner = runner;     }      test(): void {         console.log('Result of runner: ' + this.Runner.run());     } }  class FooRunner implements IRunner {     run(): string {         return 'Foo';     } }  class BarRunner implements IRunner {     run(): string {         return 'Bar';     } }  let runner: IRunner; runner = new FooRunner();  const SUT: TestDI = new TestDI(runner);  // Expected output: Foo // Actual output: Foo console.log(runner.run());  // Expected output: Foo // Actual output: Foo SUT.test();  runner = new BarRunner();  // Expected output: Bar // Actual output: Bar console.log(runner.run());  // Expected output: Bar // Actual output: Foo SUT.test();  In the code above I've passed an instance of IRunner interface into a class c-tor, then, a field of my class is populated with whatever I passed in the c-tor. Later in the code I change the variable I passed into the c-tor, however, when I call the test function Runner field of my class seems to not reflect any changes done on the original variable I passed when creating an instance of my TestDI class. In C# the code I've written would behave as I expect it to. But here it's not. What's going on?

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


I’m new in Arcgis, and I have some trouble in this task: I downloaded from ICC (www.icc.cat) a raster data map that is a in a specific coordinate system, if I right click to view its properties, it says:  spatial reference : ETRS_1989_UTM_Zone_31N.  but it says nothing about projection reference so if I try to do a Define Projection it warns me that I have one defined and nothing happens.  On the other hand, I have a gpx file with data extracted from a GPS and I found a geoprocessing tool that converts gpx into features. Once I have it converted and situated in my data frame, I can see that the Projected Coordinate system is:  Geographic Coordinate System: GCS_WGS_1984  So, the raster data map and the vector data points does not match on the screen.  Trying to solve this problem, I used a Project tool to convert from GCS_WGS_1984 coordinate system to ETRS_1989_UTM_Zone_31N the vector data, but map and track still don’t match. If I zoom to layer the map is in one site of the screen and if I zoom to layer the track, is in the other site.  I tried different thinks but I cannot succeded on match the data on the screen. I also created another dataframe with an empy projection defined and inserted the map and the reprojected track, but I still have the same problem.  Can someone tell me what I’m doing wrong?  Raster Data   Vector Data

I put 4 different layers into my ArcMap document, but only one of them will show up on the map! I should be seeing the other 3 layers as well. When I do a Zoom to layer, I can see one layer, but I cannot figure out how to make the other 3 show up at once on top of each other.  Before I opened ArcMap, I used ArcCatalog where I right-clicked 3/4 of the shapefiles and  clicked Properties → Coordinate system → Import and then clicked on my Trees layer, which has the coordinate system I want the other 3 to have. But when I opened ArcMap the 4 layers did not overlap, nor could I move them above or below each other.


Assuming that someone is theoretically able to make a hole through the center of a large planet, and then jumps down the hole, what will happen?  Given my understanding of gravity and energy, my estimate is that in the absence of any resistive forces, the person would fall right through to the other side, with at least part of their body coming through, and would continue oscillating like this.  If there were resistive forces, such as air resistance, the person would oscillate similar to a spring winding down, eventually stopping in the middle of the planet.  Is this what would happen, or are my calculations off somewhere?

...And you jumped in.  What would happen when you got to the middle of the Earth? Would you gradually slow down, until you got to the middle and once you were in middle would every direction feel like it was up?


Say, we define the logit model as follows: $$ P[y=1]=\Lambda = \frac{1}{1+e^{-x'\beta}} $$ Where $x$ is a vector with the attributes of an observation and $\beta$ a vector of the parameters attached to each attribute. How would one go about to calculating the standard errors of each parameter $\beta_j$ (an element of the vector $\beta$) such that a t-statistic can be calculated?

We usually get an estimate of $\beta$ in the logistic regression by finding the $MLE$ of the observed random samples of $X_1,X_2....,X_N$. Then we use Wald's test i.e. ${[\hat \beta / S.E.(\hat \beta)]}^2$ to test whether that variable is significant or not.   From what I have read, this Wald's test is based on two facts (or assumptions, I am not sure).    $\hat \beta$ follows a normal distribution Standard Deviation of this normal distribution is given by the inverse of Fisher's Matrix   Can someone explain the proofs behind these two facts/ (or assumptions). I have read this  but most of the intuition went over my head.


Suppose that I have $n$ independent samples from a probability distribution. I believe that the distribution is Gaussian ($G$) but I don't know; then my question is: does there exist a test such that I can interpret the result of the test to be something like "the probability that my samples are the output of a non-Gaussian distribution T with $d(G,T)>\epsilon$ is smaller than $x$%", where $d$ is the variational distance.  I have Googled and found the Kolmogorov-Smirnov test and some others, but I'm not sure if I can use the results of those tests to make a strong statement like the one above.

A former colleague once argued to me as follows:      We usually apply normality tests to the results of processes that,   under the null, generate random variables that are only   asymptotically or nearly normal (with the 'asymptotically' part dependent on some quantity which we cannot make large); In the era of   cheap memory, big data, and fast processors, normality tests should   always reject the null of normal distribution for large (though not insanely large) samples. And so, perversely, normality tests should   only be used for small samples, when they presumably have lower power   and less control over type I rate.   Is this a valid argument? Is this a well-known argument? Are there well known tests for a 'fuzzier' null hypothesis than normality?


Assume that we do not know Prime Number Theorem yet.  Then     What is the limit of $\frac{\pi(x)}{x}$ as $x \to \infty$. I feel that is should go to $0$, but I am not sure about that. How should I find that out. May be we should bound it above by some function. How should I proceed with that?    $\pi$ is the prime counting function.

I need to show that: $$\lim_{x\to\infty}(\pi(x)/x) = 0$$ Where $\pi(x)$ is the number of primes smaller then $x$.  I tried using the fact that: $$\pi(x)<(1-1/2)(1-1/3)...(1-1/k)X + O(1)$$ but didn't get anywhere. any help will be appreciated


I'm training C# on a simple card game. I have methods that shuffle and deals the cards. I have a random deck that is well generated. Is it possible to set an array for the player1 cards, picking up the first ten values of the array. Here is a part of my code :   currentCard = 0;     public Card DealCard()     {         if (currentCard < deck.Length)             return deck[currentCard++];         else             return null;     }   I want to pick up for example ten first values of   deck[currentCard++]   Any suggestions will be appreciated, thanks for your help !

I would like to use Linq to query a bus schedule in my project, so that at any time I can get the next 5 bus arrival times. How can I limit my query to the first 5 results?  More generally, how can I take a slice of a list in C#? (In Python I would use mylist[:5] to get the first 5 elements.)


So this is probably something quite basic but I can't get my head around it, I'm trying to automate a backup using crontab but whenever I run the jar file from anywhere outside the directory it's in, I get a message saying it cannot find the properties file.  Even when running the command from sudo I get the same error, the error is not with cron.

There is a Cron job on Ubuntu 16.04 which runs a PHP script  $parseinfo = 'parseme.json'; $handle = fopen($parseinfo, 'w'); fwrite($handle, json_encode($res));   to parse data into a JSON file. The PHP script is supposed to write data within the same folder where this PHP script is located in but I've faced a problem that JSON is being saved into root's home directory:    This is how I set Cron job:  */10 * * * *  root    /usr/bin/php    /var/www/somederictory/somefolder/parse.php > /dev/null   From terminal:  ssh root@example.com cd /etc crontab -e :x   In short words: JSON is being saved into /root while I want it to be saved into /var/www/somederictory/somefolder/ What should I do to fix it?  Edit: It is not a duplicate, PHP works, JSON is being saved, but in a wrong way. And I'm asking to help me understand what's wrong with current Cron settings.


A pair is concordant if the subject ranked higher on X also ranks higher on Y. The pair is discordant if the subject ranking higher on X ranks lower on Y. The pair is tied if the subjects have the same classification on X and/or Y.   Say I have a table (e.g., $n_{11}$ is the first cell: $i=1$, $j=1$)  \begin{array}{rrrr}     1   &3   &10    &6  \\     2   &3   &10    &7  \\     1   &6   &14   &12  \\     0   &1    &9   &11 \end{array}  Can you help me to understand how to select the concordant and discordant pairs?  Here's my understanding for concordant: First we select $n_{11}$, then $n_{22}$ is $3$ which is greater than $1$, (higher $Y$ and higher $X$). So we have $1(3+10+7+6+14+12+1+9+11)$, is that right? Then how about $n_{13}$? For $n_{13}$, we have $7$ ($n_{24}$) which is less than $n_{13}$ (lower $Y$). So we don't count this pair right?   I am confused about discordant, how could you select the discordant pairs?


I have question about sorting files,and my question is different from other questions about sorting I have a folder including hundereds of files looks like this  anacovaux_1052_summary_betai.out anacovaux_1052_summary_Pdelta.out anacovaux_1052_summary_pij.out anacovaux_1053_DIC.out anacovaux_1053_summary_betai.out anacovaux_1053_summary_beta_params.out anacovaux_1048_DIC.out anacovaux_1048_summary_betai.out anacovaux_1043_summary_pi_xtx.out anacovaux_1058_DIC.out   I wanted to know is there any way that I could sort them numerically? I mean get something like this:   anacovaux_1043_summary_pi_xtx.out anacovaux_1048_DIC.out anacovaux_1048_summary_betai.out anacovaux_1052_summary_betai.out anacovaux_1052_summary_Pdelta.out anacovaux_1052_summary_pij.out anacovaux_1053_DIC.out anacovaux_1053_summary_betai.out anacovaux_1053_summary_beta_params.out anacovaux_1058_DIC.out

I have a bunch of files from log1 to log164.  I'm trying to LIST the directory (sorted) in a UNIX terminal but the sort functions are only providing the format like this:  home:logs Home$ ls -1 | sort log1.gz log10.gz log100.gz log101.gz log102.gz log103.gz log104.gz log105.gz log106.gz ...etc   What I want is  home:logs Home$ ls -1 | sort log1.gz log2.gz log3.gz log4.gz log5.gz log6.gz log7.gz ...{more here} log99.gz log100.gz log101.gz log102.gz ...etc   Any suggestions in what I could use to do this?


I am pretty new to this and I am trying to boot Ubuntu from a 1Tb extra hard drive. I have the iso installed already but not sure where to go from there. I've read about burning it to the external drive, which isn't working out out for me. I've also seen some posts about partitioning but I'm not sure what that means.

OS: Windows 7. I want install Linux Ubuntu on portable external Hard Drive USB 2.0. I read a variety of methods, but I'm confused by contradictory advices and methods. Actually, installing Ubuntu on anything other than clean PC looks much more complicated than installing Windows. I need to have Ubuntu package + Python 2.7 + C compiler installed. My external hard drive is partially filled, I need to keep all files.   Will Ubuntu run entirely on external hardrive, without writing anythinhg to Windows system folders and to registry?  Can anyone post detailed guide how install Ubuntu on external hard drive?


I want to compare two matrices element-wise and return a matrix containing a 1 if the elements in that location match, or a 0 otherwise. I created a simple test function that does this:  template <class A, class B> void func(const A& a, const B& b) {     auto c = (b.array() == a.array()).cast<int>();     std::cout << c; }   So I wrote a main function like this to test it:  int main() {     Eigen::Array<int,Eigen::Dynamic,Eigen::Dynamic> b;      b.resize(2,2);     b.fill(2);      auto a = b;     a(0,0) = 1;     a(0,1) = 2;     a(1,0) = 3;     a(1,1) = 4;      func(a,b);     return 0; }   But I keep getting this error:   eigenOperations.cpp: In function ‘void func(const A&, const B&)’:  eigenOperations.cpp:8:24: error: expected primary-expression before  ‘int’   auto c = temp.cast<int>();   eigenOperations.cpp:8:24: error: expected ‘,’ or ‘;’ before ‘int’ make: *** [eigenOperations] Error 1   What am I doing wrong here?

In templates, where and why do I have to put typename and template on dependent names? What exactly are dependent names anyway?    I have the following code:  template <typename T, typename Tail> // Tail will be a UnionNode too. struct UnionNode : public Tail {     // ...     template<typename U> struct inUnion {         // Q: where to add typename/template here?         typedef Tail::inUnion<U> dummy;      };     template< > struct inUnion<T> {     }; }; template <typename T> // For the last node Tn. struct UnionNode<T, void> {     // ...     template<typename U> struct inUnion {         char fail[ -2 + (sizeof(U)%2) ]; // Cannot be instantiated for any U     };     template< > struct inUnion<T> {     }; };   The problem I have is in the typedef Tail::inUnion<U> dummy line. I'm fairly certain that inUnion is a dependent name, and VC++ is quite right in choking on it. I also know that I should be able to add template somewhere to tell the compiler that inUnion is a template-id. But where exactly? And should it then assume that inUnion is a class template, i.e. inUnion<U> names a type and not a function?


I tried sudo apt-get update, but got   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?   Any advice? Let me know if you need any more info.

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?


I have a problem when trying to start a messenger between my activity and a service. On my activity, I have this:  Messenger bluetoothServiceMessenger; private ServiceConnection bluetoothServiceConnection = new ServiceConnection() {         @Override         public void onServiceConnected(ComponentName name, IBinder service) {             bluetoothServiceMessenger = new Messenger(service); ... }   As you can see, i'm trying to create the messenger using the IBinder. On my service, the method onBind() is this one:  @Nullable     @Override     public IBinder onBind(Intent intent) {         Log.d(TAG, "BluetoothService has been started.");         return bluetoothServiceBinder;     } public class BluetoothServiceBinder extends Binder {         public BluetoothService getService() {             return BluetoothService.this;         }     }   So, the problem is I'm getting the following NullPointerException on the onServiceConnected() method:  04-16 20:15:32.365 2117-2117/com.alejandro_castilla.heartratetest E/AndroidRuntime: FATAL EXCEPTION: main                                                                                Process: com.alejandro_castilla.heartratetest, PID: 2117                                                                                java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.lang.String.equals(java.lang.Object)' on a null object reference                                                                                at android.os.Binder.queryLocalInterface(Binder.java:254)                                                                                at android.os.IMessenger$Stub.asInterface(IMessenger.java:27)                                                                                at android.os.Messenger.<init>(Messenger.java:146)                                                                                at com.alejandro_castilla.heartratetest.MainActivity$1.onServiceConnected(MainActivity.java:129)                                                                                at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1223)                                                                                at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1240)                                                                                at android.os.Handler.handleCallback(Handler.java:739)                                                                                at android.os.Handler.dispatchMessage(Handler.java:95)                                                                                at android.os.Looper.loop(Looper.java:148)                                                                                at android.app.ActivityThread.main(ActivityThread.java:5422)                                                                                at java.lang.reflect.Method.invoke(Native Method)                                                                                at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)                                                                                at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)   I've been trying some things but nothing works. I can confirm that the service works correctly if I don't this, so I think it isn't a problem with binding. Any help would be appreciated.  Thanks in advance.

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 am using an android app that connects on php files that insert values in mysql database. the problem is the database isn't saving the arabic input correctly but in strange characters. I searched the internet and tried to set everything to UTF-8 .. but it seems there is something missing .. what is it?  edit: this is solved by adding the below command after connecting to the mysql:  $mysqli->set_charset('utf8mb4');    I changed the database collation to utf8_general_ci as per below pic:    (I don't know how to alter Latin1_Swedish_ci) ?!! changed the table collation to utf8_general_ci. Changed the column collation to utf8_general_ci. set the php auditor to utf-8. I put that in the php file start:  I also used utf8 in coding my variables in the android app before sending to php files.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


This is how post looks in responsive design on mobile  And that's how in mobile site  The font on responsive design looks as small as what subscript and superscript fonts used to look like. Can we have little bigger fonts? I'm using Firefox on Android 10.

Update 3 It took me longer than I wanted, but I’ve got some updates for you on our s-prose component. You can see the  with my thinking over at our design system’s repo. It does the following:  Spreads s-prose headers out from paragraphs for better grouping. Tightens up s-prose paragraphs a bit, and made sure spacing under headings are more consistent. Replaces all s-prose margins internal to the component with a CSS variable var(--s-prose-spacing) so our users can more easily tinker with it in their browsers and user scripts. Kills trailing margins in s-prose  You can see  of content at our Stacks documentation.  Update 2 I’ve split the difference between the original 1.3 line-height and the proposed 1.6 line-height. We’re now at 1.5, with additional refinements to spacing between elements. I’ve also reduced line height within code blocks back to near the original value.  Update 1 This is now live.  We’re doing a bit of refactoring on our post formatting. Currently, we apply a single class with both layout and styling called .post-text. Our first goal is to separate layout from our text styles. Simple enough! However, our current post styling has a few missing spots and areas for improvements. Using our  as a sandbox, we’ve beefed up our styling and created a new component called .s-prose. It’s designed to offer styling for everything the  spec allows. This should allow us to add Stack Overflow-flavored styling anywhere we need to consume Markdown—questions and answers, of course, but also things like user profiles. Our .s-prose component adds:  Proper formatting for   Further header support and better spacing there  Additional blockquote refinements.  Refinements for revealing spoilers. We now reveal this on click / tap for a more consistent experience across devices—fewer accidental reveals as well, since it’s no longer a :hover interaction. Clicking again does not hide the spoiler. We also now add a badge to the top right corner. You can see how these work on our . It looks something like this:   This is a spoiler  It has two lines   General refinements to spacing including nested lists, images within lists  Sizing variations for different contexts. We offer xs, sm, and md variations of the .s-prose component.   As with everything, our prose component is a work in progress. We think we’ve got a heck of a start to a reusable component. We plan on going live with the new component network wide on Thursday, August 27, 2020. We’ll edit this post if that changes. If you see something funky, let us know. Some things are intended but might feel like regressions—images have a slightly different baseline—but others may have slipped through the cracks.


My model has property TimeScheduleOnUtc like this  [DisplayFormat(DataFormatString = "{0:MM/dd/yyyy HH:mm}")] public DateTime? TimeScheduleOnUtc { get; set; }   My form has  <input type="text" class="form-control datetimepicker" placeholder="MM/dd/yyyy HH:mm" name="TimeScheduleOnUtc" />   But when I submit the form I always get a null value in TimeScheduleOnUtc. It just happened on my computer and all of my members seem they work fine. I can't find a reason why, and how can I fix. I think it may be a bug depends on date time configuration on my computer.

Asp.net-MVC now allows for implicit binding of DateTime objects. I have an action along the lines of  public ActionResult DoSomething(DateTime startDate)  {  ...  }  This successfully converts a string from an ajax call into a DateTime. However, we use the date format dd/MM/yyyy; MVC is converting to MM/dd/yyyy. For example, submitting a call to the action with a string '09/02/2009' results in a DateTime of '02/09/2009 00:00:00', or September 2nd in our local settings.  I don't want to roll my own model binder for the sake of a date format. But it seems needless to have to change the action to accept a string and then use DateTime.Parse if MVC is capable of doing this for me.  Is there any way to alter the date format used in the default model binder for DateTime? Shouldn't the default model binder use your localisation settings anyway?


I have run across this interesting identity that I am unable to verify.  $$\sin(nx)=2^{n-1}\prod_{k=0}^{n-1}\sin\left(\frac{k\pi}n+x\right)$$  Can anyone provide a hint as how one would prove this?   This identity was found on the Wolfram site.

I have seen this identity on Wolfram mathworld and in a comment to another similar trigonometric proof:    I can't seem to find a proof to this identity online anywhere. What method is used to prove this?


I have N distinct balls labelled 1 to N, and associated N boxes labelled 1 to N. How many different ways can I place all balls into the boxes (one ball per box) so that there is no ball-box label matching, i.e. ball $i$ is not in box $i$, for all $i=1,...,N$?  Thank you in advance.

I was going through .Suppose that there are n persons who are numbered 1, 2, ..., n. Let there be n hats also numbered 1, 2, ..., n. We have to find the number of ways in which no one gets the hat having same number as his/her number. Let us assume that the first person takes hat i. There are n − 1 ways for the first person to make such a choice. There are now two possibilities, depending on whether or not person i takes hat 1 in return:  A) Person i does not take the hat 1. This case is equivalent to solving the problem with n − 1 persons and n − 1 hats: each of the remaining n − 1 people has precisely 1 forbidden choice from among the remaining n − 1 hats (i's forbidden choice is hat 1).  B) Person i takes the hat 1. Now the problem reduces to n − 2 persons and n − 2 hats.  From this, the following relation is derived: !n = (n - 1) (!(n-1) + !(n-2))  I have a hard time understanding point B and the equation derived. I was trying to understand with an example of 4 people named A, B, C and D and the corresponding hats A, B, C and D. Everyone of them are supposed to wear any hat except their own matching hat i.e. A can wear B, C or D.  If suppose A wears B hat so we will be left with only 3 people and 3 hats. So I can understand "(n-1)!(n-1)" part but what i didn't understand is part B(marked above). Can anyone help?


I am looking to create a formula which will allow me to use a formula to categorize values into 6 different groups, the formula would need to return the group letter.  A= More than 800 units sold   B= Between 300-800 units sold  C= Between 200-300 units sold   D= Between 160- 200 Units Sold  E= Between 1- 160 Units Sold   F= Zero Units Sold   I have attached an example of the data I am working with:    I have tried the below formula with no luck   =IF([@[Sales]]<=1, "F",IF(AND([@[Sales]<=160, [Sales]]>1),"E",IF(AND([@[Sales]]<=200, [@[Sales]]>=160)),"D",IF(AND([@[Sales]]<=300,[@Sales]]>=201),"C", IF(AND([@[Sales]]<=301,[@[Sales]]>=800),"B","A"))))  This is not a Duplicate, must more information needed, before I was after 3 groups now I am after 6 groups now and the previous question's answer does work on in this case

I want to use a formula which allows me to categorize my data into 3 groups. I want:   Units shipped <100 to be called Group "A" Units shipped Between 100-999 to be group "B" Units Shipped >1000 to be group "C"     I have tried:  IF(Sales<100,"A", IF(AND(Sales>=100, Sales<=999, "B", IF(Sales>1000, "C",0)))   But it keeps coming up with the:     we found a problem with this formula   error message and I can't work out what is wrong with the formula.


Crossposted from StackApps as per a request in there. I'm currently designing an app for the StackApps beta. One of the challenges I found when writing descriptions and user-facing material for my app is how to refer to the "trilogy" + StackExchange. Are Stack Overflow, Super User and Server Fault part of StackExchange, or are they separate? If they are separate, is there a better term than "the trilogy" (which is probably incomprehensible to people not as familiar with the site), and what should we call the combination of them and Stack Overflow?

How are sites in the Stack Exchange network, including Stack Overflow, officially branded? How are their names abbreviated? What conventions should be used in the FAQ?


I've gotten to the Muffet boss fight, and it's getting annoying. I know you need to eat her donut/cider to let her spare you instantly, but I ate the cheap one in Undyne's fight. Earlier I didn't know about the dog residue, so I sold it. Does anyone know a way to get enough money to buy her crazy expensive donuts?

There is several expensive items in Undertale, such as the Spider Donut or the Temmie Armor, which are both worth 9999G. What are the best ways to generate such an amount of money ?


I'm working on a classification problem where I expect   $True\ Positive\ Rate =0.999$   $True\ Negative\ Rate = 0.001$   To model this data, I have created a training set with an equal proportion of true positives and true negatives. I am using this data in a logistic regression model, from which I receive probabilistic classifications. These classification probabilities, however, do not reflect the distribution of the unbiased data. Is there a way to correct this bias without creating an unbiased data set and refitting?   Thank you!  EDIT: After doing some research, I have come across this reference as a starting point:   EDIT2: The above paper and its associated  provide a means of correcting sample selection bias by regressing upon a learned model of the sample selection bias. The exact implementation, however, assumes normality of the joint distribution of the error terms. I'm not sure if this assumption holds for logistic regression.  EDIT3: The assumption of normality for the error terms in logistic regression does not hold because there is in fact no error term in logistic regression. For explanation see .  Side note: I'm not sure what the etiquette here is regarding answering your own question, but I suppose I'll do that and mark it as accepted.

Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables.   My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate).   But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?


Suituation: Windows 10 itself is broken and wouldn't startup anyhow. I have Ubuntu 18 Machine. The drive is absolutely healthy but mounts in readonly mode. I've managed to find out that in happens due to special Windows 10 feature called "Fast startup" (may be I'm wrong). Anyway. There are many answers that in general begin with something like "Boot your Windows...". But I cant't, its totaly ruined and ends up with BSOD.

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


After finding these two lines online, I don't understand how the first line works to have the same effect as the second line  current = letter >= prev_letter and current + letter or letter  current = current + letter if letter >= prev_letter else letter

If Python does not have a ternary conditional operator, is it possible to simulate one using other language constructs?


I need a symbol behaving like $\sum$ and $\prod$  but for exponentiation. The best I got is  Is it possible to do better? Ideally, should look like $\sum$ or $\prod$ but with capital Epsilon instead Sigma or Pi.

How can i write my own math operator with limits? I want it to look like:  \sum\limits_{e=1}^{m} but with a capital A (if possible bigger than the normal text) instead of the sum.  Thanks for the help!


I am new to programming. Just have a quick question. What a difference between int main() and just a main(). Because in my book example, the author didn’t write int in a program and when I wrote that program in a codeblock. I was asked to put int main() and program ran. Thanks

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


what does this code : E: Unable to locate package nvidia-driver-340

When I try to install any package through the command line, I get an error.   $ sudo apt-get install <package> Reading package lists... Done Building dependency tree        Reading state information... Done E: Unable to locate package <package>   Can anyone help me on this?


Is there an expansion of the expression in the bracket such as  $$ \sqrt{a + b} = (a + b)^{1/2}$$  If not do you know of a method that lets us solve such expression and ones with higher roots?

Could we use the binomial theorem for non integers? This comes from:   $$\sqrt{(a+b)}$$ which I can write as $$(a+b)^{1/2}$$  Could I then use the binomial theorem to figure out the value of this expression?


I'm currently residing in the USA with a non-expired H-1B visa, but I stopped working 24 days ago, so I have 36 days left in my grace period. In about 36 days, can I drive to Canada and re-enter the USA under VWP to extend my allowable stay by 90 days? I just need a little more time to stay with my family until my wife graduates soon.  I'm a South Korean citizen (VWP country).

I'm from Italy and I had a J1 visa for the US for a year and a half. Now it's expired (I'm in the grace period) but I want to stay longer in California to travel a little bit, because this year I did this trainee-ship and I didn't have the possibility to visit all places that I wanted to.  The question is: Can I go to Canada and come back to the US with an ESTA? I'm not subject to the two years rule to go back to Italy? Is it risky after a J1? Do they believe me? How can convince them that I want to travel a little?   Is it easier to do this via Canada than Mexico? My lawyer said yes but I want to be sure.


This is my first attempt to define my own environment. I fail with the number of parameters. LateX complains Illegal parameter number in definition of endperformance. This should be a standard textbook example but I can't see what I am doing wrong.   \newenvironment{performance}[1] { \begin{table}[ht] \begin{tabular} {llllllll}   \toprule {} &   {Return} & {Annua Return} & {Volatility} & {Sharpe Ratio} & {Max DD} & {YTD}  & {2015}\\ } { \bottomrule \end{tabular} \caption{#1} \end{table} }

Environments are allowed to have arguments, but reference to those arguments can only appear in the opening code of the environment, and not the closing code.  What is the reason for this, and are there preferred ways around it?  e.g.  \newenvironment{foo}[1]% {some code #1} % allowed {some code #1} % not allowed


This is the code that i was trying :  #include <stdio.h> main(){     int k = 35;     int x = (k==35);     printf("%d %d %d %d", (k==35), k=50, (k>40), x); // gives output => 0 50 0 1     printf("\n%s",k==35); // gives output => (null)     return 0; }   I was wondering that a relational check returns Boolean true or false. Even when converted to integer type it should become 0 for false and 1 for true. What am i missing?

Can it be assumed a evaluation order of the function parameters when calling it in C ? According to the following program, it seems that there is not a particular order when I executed it.   #include <stdio.h>  int main() {    int a[] = {1, 2, 3};    int * pa;      pa = &a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa), *(pa++),*(++pa));    /* Result: a[0] = 3  a[1] = 2    a[2] = 2 */     pa = &a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(pa),*(++pa));    /* Result: a[0] = 2  a[1] = 2     a[2] = 2 */     pa = &a[0];    printf("a[0] = %d\ta[1] = %d\ta[2] = %d\n",*(pa++),*(++pa), *(pa));    /* a[0] = 2  a[1] = 2 a[2] = 1 */  }


I am trying to create an environment wrapping a task environment (from the tasks package). To build the new environment I am using the xparse package.  \documentclass{article}  \usepackage{xparse} \usepackage{tasks}  \NewTasks[% counter-format=tsk[a]), item-indent=0pt, after-item-skip=0pt, %label-offset=0.1em ]{aaaa}   \DeclareDocumentEnvironment{bbbb}{} {%     \begin{aaaa} }{%     \end{aaaa} }%  \begin{document} \begin{bbbb}   \task first   \task secod \end{bbbb} \end{document}   But when I compile I got the error:  ERROR: LaTeX Error: \begin{aaaa} on input line 23 ended by \end{bbbb}.  --- TeX said ---  See the LaTeX manual or LaTeX Companion for explanation. Type  H <return>  for immediate help.  ...                                                l.25 \end{bbbb}   It seems that tne \DeclareDocumentEnvironemnt is not working fine in this case.

I need to wrap a tasks environment inside a custom \NewEnviron. Apparently, tasks chokes on code besides its \task or \item due to the , presumably causing it to do so on \BODY. Any way to get around this? Exact error given is "Something's wrong--perhaps a missing \item", as per:  \documentclass[a4paper]{book} \usepackage{environ} \usepackage[more]{tasks}  \NewTasks[style=enumerate,counter-format=tsk[1]),label-width=2ex]{mytaskenum}[\item](3) \NewEnviron{mytaskenv}[1][Exercises]{   % Misc. stuff to precede the tasks env here   \begin{mytaskenum}   \BODY   \end{mytaskenum}   % Misc. stuff to follow }{}  \begin{document}  \begin{mytaskenv}   \item item 1   \item item 2   \item item 3 \end{mytaskenv}  \end{document}


FYI: I'm using SQL Server.  I have a table where I query for one column but it may contain multiple records:  SELECT CodeNumber FROM Books WHERE Type='Children'  CodeNumer --------- A B C D E   I want to PIVOT the table and concatenate the column data into a computed column such that it looks like this:  ComputedColumn -------------- A; B; C; D; E;   I'm open to using something else other than pivot in the query. I'd prefer not to write a stored procedure which will perform this action.  Thank you for any help.

I'm trying to migrate a MySQL-based app over to Microsoft SQL Server 2005 (not by choice, but that's life).  In the original app, we used almost entirely ANSI-SQL compliant statements, with one significant exception -- we used MySQL's group_concat function fairly frequently.  group_concat, by the way, does this: given a table of, say, employee names and projects...  SELECT empName, projID FROM project_members;   returns:  ANDY   |  A100 ANDY   |  B391 ANDY   |  X010 TOM    |  A100 TOM    |  A510   ... and here's what you get with group_concat:  SELECT      empName, group_concat(projID SEPARATOR ' / ')  FROM      project_members  GROUP BY      empName;   returns:  ANDY   |  A100 / B391 / X010 TOM    |  A100 / A510   So what I'd like to know is: Is it possible to write, say, a user-defined function in SQL Server which emulates the functionality of group_concat?   I have almost no experience using UDFs, stored procedures, or anything like that, just straight-up SQL, so please err on the side of too much explanation :)


I am aware that these types of questions are dealt with by the properties of $\tan^{-1} x_r-\tan^{-1} x_{r-1}$ but here I am not able to proceed by that approach...PLEASE HELP!  $$ \sum_{r=1}^\infty\tan^{-1}\left(\frac{2r}{1-r^2+r^4}\right) $$

I want to find  $$L=\lim_{n\rightarrow\infty}\sum_{r=1}^{n}\arctan\left(\frac{2r}{1-r^2+r^4}\right)$$ I already know that I need to split the expression $\frac{2r}{1-r^2+r^4}$ of the form $\frac{a_r+a_{r-1}}{1-a_ra_{r-1}}$ or $\frac{a_r-a_{r-1}}{1+a_ra_{r-1}}$ so that the main expression gives $$\lim_{n\rightarrow\infty}\sum_{r=1}^{n}\arctan\left(\frac{a_r-a_{r-1}}{1+a_ra_{r-1}}\right)=\lim_{n\rightarrow\infty}\sum_{r=1}^{n}(\arctan(a_r)-\arctan(a_{r-1}))=\arctan(a_\infty)-\arctan(a_0)$$ But I am not able to split up that thing. Any hints on how to start? Thanks in advance.


I was given an iPhone but I don't have the Apple iCloud password.   I don't use as the iPhone as a phone, so no carrier is enabled. I just use it with my home wifi.   A message to enter the old users iCloud password pops up at times.   Any suggestions to make the pop ups for past owners password to stop?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


Mila has four ropes. She chooses two of the eight loose ends at random (possibly from the same rope) and ties them together, leaving six loose ends. She again chooses two of these six ends at random and joins them, and so on, until there are no loose ends. At this point she has somewhere between one and four loops of rope (inclusive). Find the expected value of the number of loops Mila ends up with.   Should the probability just be $4$ as it doesn't matter in which order we tie the ropes? I really stuck up on this.

There are 100 ropes in a bag. In each step, two rope ends are picked at random, tied together and put back into a bag. The process is repeated until there are no free ends. What is the expected number of loops at the end of the process?


I am trying to get a substring which is inside curly brackets by using regular expression.  Assuming that I have the following string:   "This is a {nice} text to search for a {cool} substring".   I'd like to be able to search for nice and cool

Unfortunately, despite having tried to learn regex at least one time a year for as many years as I can remember, I always forget as I use them so infrequently. This year my new year's resolution is to not try and learn regex again - So this year to save me from tears I'll give it to Stack Overflow. (Last Christmas remix).  I want to pass in a string in this format {getThis}, and be returned the string getThis. Could anyone be of assistance in helping to stick to my new year's resolution?    Related questions on Stack Overflow:


I want to see if it is possible to pass part of vector to a function so that it appears as a normal vector to the function. More importantly, I want this to be done in O(1), constant time. I don't want to iterate the vector to make a new one. In fact, I also want the size of the new vector to change to 40 in the following example.  void func(vector <int> &v){      //calling index 10  to 50 of v     func(v[10..50]) }

Suppose I have a std::vector (let's call it myVec) of size N.  What's the simplest way to construct a new vector consisting of a copy of elements X through Y, where 0 <= X <= Y <= N-1?  For example, myVec [100000] through myVec [100999] in a vector of size 150000.  If this cannot be done efficiently with a vector, is there another STL datatype that I should use instead?


Simply stated, I wish to show that convolution behaves nicely with respect to norm, i.e. that for $f\in L^1(\mathbb{R}^n)$ and $g\in L^p(\mathbb{R}^n)$, then $\lVert f*g\rVert_p\le\lVert f\rVert_1\lVert g\rVert_p$. I can prove this for $p=1$, but when $p>1$, the power of $p$ seems to get in the way. So, how is this proved?  If this isn't true, then I wish to prove the weaker statement that for a mollifier $\phi\in C_0^\infty(\mathbb{R}^n)$ such that $\lVert\phi\rVert_1=1$ and $\phi\ge0$, we have $\lVert g*\phi\rVert_p\le\lVert g\rVert_p$.

I was reading the wikipedia article about convolution and I found this one:     If $f \in L^1(\mathbb{R}^n)$ and $g\in L^p(\mathbb{R}^n)$, then $||f\ast g||_p \leq ||f||_1||g||_p$.   But to $f\ast g$ be well-defined, $y\mapsto f(x-y)g(y)$ must be of $L^1$. Right? But why? How do I prove this?


I already know that if $X$ is a compact metric space then the space of continuous real valued functions $C(X \to \mathbb R)$ are separable. What I'm trying to prove that if $X$ is a locally compact metric space and is $\sigma$-compact. The space of continuous compactly supported functions $C_c( X \to \mathbb R)$ are separable.    Here's my approach: As $X$ is $\sigma$-compact, we can write $X = \bigcup_{ n=1}^\infty K_n$, where $K_n$ are compact and increasing. Then since each $C(K_n \to \mathbb R)$ is separable, it suffices to show that the set $ \{ f \in C_c (X \to \mathbb R) : \operatorname{supp}(f) \subset K_n \}$ is dense in $C(X \to \mathbb R)$ (Not sure). Then get I stuck.  Any help is appreciated.

Let $X$ be a locally compact metric space which is also $\sigma$-compact. Let $C_{c}(X)$ be the continuous functions on $f$ from $X$ to $\mathbb{R}$ with compact support. Is $C_{c}(X)$ separable?  My work so far:   If $X$ is a compact metric space, then by Urysohn's Lemma and Stone-Weierstrass, the continuous functions $C(X)$ on $X$ are separable and hence the result follows as $C_{c}(X) = C(X)$.  Suppose $X = \mathbb{R}$. Write $\mathbb{R} = \bigcup_{N  = 1}^{\infty}[-N, N]$. Let $f \in C_{c}(\mathbb{R})$. Then $f$ is supported on a compact set $K \subset [-N, N]$ for some $N$. Thus $C_{c}(\mathbb{R}) =\bigcup_{N = 1}^{\infty}C([-N, N])$. Each $C([-N, N])$ has a countable dense subset $\{\psi_{N, n}\}_{n = 1}^{\infty}$ and so $\bigcup_{N, n = 1}^{\infty}\{\psi_{N, n}\}$ is a countable dense subset of $C_{c}(\mathbb{R})$.  In the general case, $X = \bigcup_{i = 1}^{\infty}X_{i}$ where each $X_{i}$ is compact and $X_{1} \subset X_{2} \subset \cdots$. Let $f \in C_{c}(X)$. Then $f$ is supported on a compact set $K = \bigcup_{i = 1}^{\infty}K \cap X_{i}$. Is it still true that $C_{c}(X) = \bigcup_{i = 1}^{\infty}C(X_{i})$?


I have a MWE in which a line is provided by length and angle with \draw. The units for length I provided is cm, which is not consistent with the axis units. I need 2 units (cm,em,.. ?) in \draw to be 2 units on the axis, i.e., the first line from (1,1) should end at (1,3). How should I represent length \draw such that the units of length and axis are consistent?   MWE  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{     compat=1.9,     }  \begin{document} \begin{figure}[h] \begin{tikzpicture}     \begin{axis}[         axis equal,         xlabel=x,         ylabel=y,         cycle list name=exotic,         ]         \addplot+[solid,line width=1.0pt] coordinates {(10,10) (1,1)};         \addplot+[dotted,line width=1.0pt] coordinates {(10,1) (1,10)};         \addplot+[loosely dotted,line width=1.0pt] coordinates {(1,1) (1,10)};         \draw (1,1) -- ++(0:2cm) -- ++(90:3cm);         \draw[solid,line width=1.0pt] (axis cs:5.5,5.5) circle [radius=1];     \end{axis} \end{tikzpicture} \end{figure} \end{document}

I would like to annotate a patch plot with lines whose start and end points are given in absolute polar and relative polar coordinates, respectively.  The patch plot, based on cartesian data, comes out as a circular shape centred around the origin (0,0) and shall be simulated here by a plain circle.  Lines should start at the circumference of the shape and point away from the shape under a given angle and have a well defined length. Therefore, the use of relative polar coordinates for the line's end point.  What seems to be straightforward with TikZ (left) fails inside the axis environment of pgfplots (right): neither the inclination angle nor the length of the line are correct if relative polar coordinates are used.    What is wrong with the rel. polar coordinates here?  The code:  \documentclass{standalone}  \usepackage{pgfplots} \pgfplotsset{compat=1.13}  \begin{document}  \begin{tikzpicture}   \draw(0,0) circle[radius=0.01];   \draw[blue] (0,0) circle[radius=1];   \draw[thick] (45:1) -- ++(45:0.5); \end{tikzpicture}  \begin{tikzpicture}   \begin{axis}[tiny,enlargelimits,   axis equal,   xmin=-2,xmax=2,   ymin=-1,ymax=1,   xtick={-2,-1,0,1,2},   ytick={-2,-1,0,1,2},   grid=major,   ]   \draw[blue] (0,0) circle[radius=1];   \draw[blue, dashdotted] (0,0) -- (45:2);   \draw[thick] (45:1) -- ++(45:0.5); %  \draw[thick] (45:1) -- (45:1.5); %absolute coordinates do work   \end{axis} \end{tikzpicture}  \end{document}


root@areeb-Inspiron-3420:/var/www/html# apt install php5 Reading package lists... Done Building dependency tree        Reading state information... Done Package php5 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'php5' has no installation candidate root@areeb-Inspiron-3420:/var/www/html# apt-get install libapache2-mod-php5 Reading package lists... Done Building dependency tree... 50% Building dependency tree        Reading state information... Done Package libapache2-mod-php5 is not available, but is referred to by another package. This may mean that the package is missing, has been obsoleted, or is only available from another source  E: Package 'libapache2-mod-php5' has no installation candidate   What should I do now?

I need to use php5 (5.6) because I'm working on a Drupal 7 project which doesn't support php7. The problem is I recently updated to ubuntu 16.04 Xenial which seems to .   I tried to install it from , however when It try to install it with apt I always get similar errors.  $ sudo apt-get install php5-cli Cependant les paquets suivants le remplacent :   php7.0-cli:i386 php7.0-cli`   Which means it's obsolete. How can I install PHP 5.6 on Xenial?


If we have, say, a material point with a zero velocity at the time $t=0$, and this point starts moving at a time $t>0$ , then we look at the force impressed on the point by inspecting the second derivative of the motion of the point. If our point follows a motion law of $e^{-\frac{1}{t^2}}$, then we have that all derivatives at $t=0$ are $0$. So my question is, why doesn’t this go against Newton's second law? To me it is like there is a correspondence between successive derivatives and the force impressed.

Suppose you have an object with zero for the value of all the derivatives of position. In order to get the object moving you would need to increase the value of the velocity from zero to some finite value. A change is velocity is acceleration, so the value of the acceleration would have to increase from zero to some value. You would also need to increase the jerk from zero to some value to have a change in acceleration.  Is there an infinite series of higher derivatives of position for this to work? Or am I missing something?


Greetings,  I have an apache2 server with 4 domain names point to my server's single IP address.  When I type in www.site1.com it serves pages from /home/eamorr/site1/index.php Same for www.site2.com, www.site3.com and www.site4.com  However, when I type in to the address bar of a browser without the www, it always redirects to site1.com!  i.e.  site1.com -> site1.com site2.com -> site1.com site3.com -> site1.com site4.com -> site1.com  How do I configure apache to do the following:  site1.com -> site1.com site2.com -> site2.com site3.com -> site3.com site4.com -> site4.com  Here is my default config:           ServerAdmin admin@site1.com         ServerName www.site1.com      DocumentRoot /home/eamorr/sites/site1.com/www     DirectoryIndex index.php index.html      <Directory /home/eamorr/sites/site1.com/www>             Options Indexes FollowSymLinks MultiViews             Options -Indexes             AllowOverride all             Order allow,deny             allow from all             php_value session.cookie_domain ".site1.com"              #Added by EOH for redirection             RewriteEngine on             RewriteRule ^([^/.]+)/?$ driver.php?uname=$1 [L]      </Directory>      ErrorLog /var/log/apache2/error.log      # Possible values include: debug, info, notice, warn, error, crit,     # alert, emerg.     LogLevel warn      CustomLog /var/log/apache2/access.log combined     I'd like to look at the domain name and then redirect to www.sitex.com. Is there an Apache rule to do this?  I hope someone can help. My SysAdmin/apache2 config skill aren't the best.  Many thanks in advance,

It's the following part of a virtual host config that I need further clarification on:  <VirtualHost *:80>   # Admin email, Server Name (domain name), and any aliases   ServerAdmin example@example.com   ServerName  141.29.495.999   ServerAlias example.com ...   This is and example config, similar to what I currently have (I don't have a domain name at the moment).  <VirtualHost *:80> - Allow the following settings for all HTTP requests made on port 80 to IPs that this server can be contacted on. For instance, if the server could be accessed on more than one IP, you could restrict this directive to just one instead of both.  ServerName - If the host part of the HTTP request matches this name, then allow the request. Normally this would be a domain name that maps to an IP, but in this case the HTTP request host must match this IP.  ServerAlias - Alternate names accepted by the server.  The confusing part for me is, in the above scenario, if I set ServerAlias mytestname.com and then made an HTTP request to mytestname.com, there would have to be a DNS record pointing to the server's IP for this to work? In which case, is ServerAlias just basically EXTRA ServerName entries?  Say I had a DNS entry such that foobar.com = 141.29.495.999 but then I had ServerName = 141.29.495.999 and ServerAlias was empty, would that mean that although foobar.com gets resolved to the right IP, because there is no reference to accept foobar.com in ServerName or ServerAlias?  Or something. Man I'm confused.


I have some     vector<string> v1, which was filled using push_back:  v1.push_back("a"); v1.push_back("b"); v1.push_back("c"); v1.push_back("d"); v1.push_back("e");   I have some another vector<string> v2 and an iterator, which contains some element  vector<string>::iterator v2iter;//some element of v2   And I need to check, is an v2iter element presents in v1, or not  find(v1, v2iter); //smth like this

All I want to do is to check whether an element exists in the vector or not, so I can deal with each case.  if ( item_present )    do_this(); else    do_that();


I seem to misunderstand the whole concept of .  Let`s imagine a charged black hole. It does not let out anything that travels at any speed less than or equal to the speed of light, right?  So how can we even know the black hole is massive and it has a charge if nothing (which also includes all force-conveying particles) can be faster than light?  Okay, for quantum gravity there is no conclusive theory as of now, and the graviton is yet to be discovered experimentally. But what about the electric charge?

My understanding is that light can not escape from within a black hole (within the event horizon).  I've also heard that information cannot propagate faster than the speed of light.  It would seem to me that the gravitational attraction caused by a black hole carries information about the amount of mass within the black hole.  So, how does this information escape?  Looking at it from a particle point of view: do the gravitons (should they exist) travel faster than the photons?


I have to display the values in DataTable with Exactly Two Decimal places.  I want to display like this to looks like a time format. (I apologize for my English) thank you.         protected void Page_Load(object sender, EventArgs e) {     try     {         DataTable dt = new DataTable();         dt.Columns.Add("SOT", typeof(Decimal));         dt.Columns.Add("SVT", typeof(Decimal));         dt.Columns.Add("SCT", typeof(Decimal));         dt.Rows.Add(12.22,23.44,22.00);         dt.Rows.Add(2.20, 23.00, 22.23);         dt.Rows.Add(12.00, 23.20, 22.05);             GridView1.DataSource = dt;             GridView1.DataBind();     }     catch (Exception d)     {         Response.Write(d.Message.ToString());     } }   DataTable Can take values like (2.2,23,22.5) not (2.20,23.00,22.5). Is there any method to insert values in DataTable like (2.20,23.00,22.5)

When displaying the value of a decimal currently with .ToString(), it's accurate to like 15 decimal places, and since I'm using it to represent dollars and cents, I only want the output to be 2 decimal places.   Do I use a variation of .ToString() for this?


Please could you tell me where can I find the File Manager Preferences in Ubuntu 13.04. I want to run a sh file.

When I double-click on a script in Nautilus to run it, the script just opens in my text editor with no option to run it. Using Nautilus, how do I run executable text files and/or scripts?


The title says it all. I would like to create a list in a macro, and then iterate over it using TikZ's \foreach macro. Alas, as usual, superimposition does not work here, as the following MWE shows. What do I miss?  \documentclass{standalone} \usepackage{tikz} \begin{document} \newcommand\magic{tiddly, tiddly, winky, woo}  \begin{tikzpicture} \foreach \w [count=\n] in {tiddly, tiddly, winky, woo}  \node[anchor=west] at (0,-\n) {\n.\w}; \foreach \w [count=\n] in {\magic} \node[anchor=west] at (3,-\n) {\n.\w}; \end{tikzpicture} \end{document}

The code below generates:    What I expect is:    Why does the \foreach seem to treat the entire list as one value? How do I fix it?  \documentclass{article} \usepackage{xparse} \usepackage{xstring} \usepackage{etoolbox} \usepackage{expl3} \usepackage{tikz}  \begin{document}  \ExplSyntaxOn  \DeclareDocumentCommand{\separate}{m} {   \StrLeft{#1}{1}[\head]   \StrBehind[1]{#1}{\head}[\tail]   \IfInteger{\tail}{\head,\separate{\tail}}{\head} }  \DeclareDocumentCommand{\map}{m} {   \def\list{#1}   \foreach \i in \list   {     [\i]   } }  \ExplSyntaxOff  \def\arg{3669887}  \arg  \separate{\arg}  \map{\separate{\arg}}  \end{document}


Hello everyone how can I find the vertex of a square that circumscribed the ellipse $\frac{x^2}{9}+y^2 =1$? I tried to mark the vertex at $(u,v),(-u,v),(u,-v),(-u,-v)$ and use the equation to calculate the tangent lines to the ellipse by the vertex points, but I don't know how to continue.

I'm trying to find the formula of a bounding square of an ellipse. So in other words: I want a formula that gives the size (length of one side of a the square) that bounds a given ellipse with width $a$ and length $b$.   I know that the formula of an ellipse is given by: $$\frac{x^2}{a^2}+\frac{y^2}{b^2}=1$$ but I just cant figure out what the length of one side of a bounding square is.


Python's builtin pow function pow(-1, 0.5) and exponentitaion function (-1)**0.5 return non-zero real value as 6.123233995736766e-17. Why is the real part of the complex number not absolute zero?

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


I'm using Ubuntu 18.04.4 LTS. I have installed Chrome browser v81 but when I'm trying to launch the browser, I'm getting below error message:  [22725:22742:0418/111128.075479:ERROR:disk_cache.cc(184)] Unable to create cache [22725:22725:0418/111128.075495:ERROR:process_singleton_posix.cc(404)] readlink failed: Permission denied (13) [22725:22725:0418/111128.075524:ERROR:process_singleton_lock_posix.cc(19)] readlink(/home/ewsetiawan/.config/google-chrome/SingletonLock) failed: Permission denied (13) [22725:22742:0418/111128.075531:ERROR:shader_disk_cache.cc(606)] Shader Cache Creation failed: -2 [22725:22725:0418/111128.075545:ERROR:process_singleton_posix.cc(256)] readlink(/home/ewsetiawan/.config/google-chrome/SingletonLock) failed: Permission denied (13) [22725:22725:0418/111128.075552:ERROR:process_singleton_posix.cc(280)] Failed to create /home/ewsetiawan/.config/google-chrome/SingletonLock: Permission denied (13) [22725:22725:0418/111128.075565:ERROR:process_singleton_posix.cc(404)] readlink failed: Permission denied (13) [22725:22725:0418/111128.075574:ERROR:process_singleton_lock_posix.cc(19)] readlink(/home/ewsetiawan/.config/google-chrome/SingletonLock) failed: Permission denied (13) [22725:22725:0418/111128.075607:ERROR:chrome_browser_main.cc(1408)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption.   Uninstalling and reinstalling doesn't solve the problem. What to do The browser isn't launched. How can I do to solve this problem?

I've just installed Ubuntu 16.04 LTS on dual boot. I've looked for many solutions and tried them all but Chrome never starts; the logo appears on the left but no window opens.  I downloaded the deb file on google chrome website and installed it through Ubuntu Software, but it doesn't start.   I have tried installing it through the command line with   sudo dpkg -i --force-depends google-chrome-stable_current_amd64.deb sudo apt-get install -f   I have checked with uname -a and my system is 64 bit. I have also tried gdebi with the same result.   My repository universe is up to date.  I only have one display in settings>displays> so I can't turn off built-in display nor check the mirror display (I read it could be the problem as I also have a graphic card but it seems it is not in my case).  Here is what I get in the command line when I try to run Chrome from it ( the message is the same, whatever the method I used to install Chrome):  ~$ google-chrome [11831:11831:1122/114854.195473:ERROR:process_singleton_posix.cc(433)] readlink failed: Permission denied (13) [11831:11831:1122/114854.195493:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195508:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195515:ERROR:process_singleton_posix.cc(280)] Failed to create /home/basil/.config/google-chrome/SingletonLock: Permission denied (13) [11831:11831:1122/114854.195538:ERROR:process_singleton_posix.cc(433)] readlink failed: Permission denied (13) [11831:11831:1122/114854.195564:ERROR:process_singleton_posix.cc(256)] readlink(/home/basil/.config/google-chrome/SingletonLock) failed: Permission denied (13) [11831:11831:1122/114854.195622:ERROR:chrome_browser_main.cc(1498)] Failed to create a ProcessSingleton for your profile directory. This means that running multiple instances would start multiple browser processes rather than opening a new window in the existing process. Aborting now to avoid profile corruption. [11831:11868:1122/114854.209297:ERROR:browser_gpu_channel_host_factory.cc(108)] Failed to launch GPU process.   Any new approach will be much appreciated


Is there anyway to use a different desktop than the one that ships with this Ubuntu? I'm sorry if the question is weak, I understand I can change display managers and so on, but the new desktop is so detached from any file explorer (I use nautilus), it is off putting.

I have just installed the final version of Ubuntu 20.04 LTS desktop system from ubuntu-20.04-desktop-amd64.iso. After two days of testing I completely do not like its graphical interface - the GNOME Shell. Even installation of GNOME Flashback does not help either.  So I want to completely remove the GNOME Shell with all its trails from my system without re-installation. Just want to start from scratch like it was approximately if I have installed Ubuntu from .


import java.util.Scanner; public class bmi {     public static void main(String[] args) {         Scanner scan = new Scanner(System.in);          float height,heightSquared,BMI;          int weight;          System.out.println("Your height in meters:");          height = scan.nextFloat();          System.out.println("Your weight in kilograms:");          weight = scan.nextInt();          heightSquared = (height*height);          BMI = weight/heightSquared;          if (BMI < 18.5) {             System.out.println("Your BMI result:"+ BMI + "(UNDER-WEIGHT)");         }         else if (BMI > 18.4 && BMI < 24.6) {             System.out.println("Your BMI result:"+ BMI + "(NORMAL-WEIGHT)");         }         else if (BMI > 24.9 && BMI < 30) {             System.out.println("Your BMI result:"+ BMI + "(OVER-WEIGHT)");         }         else {              System.out.println("Your BMI result:"+ BMI + "(OBESSE)");         }      } }   This is my code for getting the body mass index (BMI) of a person it's okay when running but my only problem is how do i turn the answer in 2 decimals? for example:  Your height in meters:  1.70  Your weight in kilograms:  50  Your BMI result:17.301032(UNDER-WEIGHT)  i want the output to be only 17.30 or in 2 decimals. what should i change?

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I'd like to delete everything from this pc's HDD. It has Ubuntu on it, so I can't reformat it. I got a Live CD with Ubuntu 12.04 on it from a library.   I went to BIOS and set DVD-ROM as the first boot device, saved and rebooted. It still boots into Ubuntu 16.04 that is on my HDD, so I can't delete the partion.   The CD shows up in the Home Folder with the name "Ubuntu 12.04 LTS i386" it has all the files in it, so the CDROM is fine. What should I do? I do not have multiple partitions. My problem is the PC won't boot using the CDROM, so I can't delete the partion with ubuntu 16.04 on it. I am planning on installing Steam OS so I'd like the drive to be clean.

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


If I enter the following command in CMD prompt...  netstat -ano   I get a list of active connections as expected. What confuses me is that there are many different formats for my "Local Address"...   Proto  Local Address          Foreign Address        State           PID TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       656 TCP    208.80.154.224:13      0.0.0.0:0              LISTENING       4 TCP    127.0.0.1:2559         0.0.0.0:0              LISTENING       8628 TCP    [::]:135               [::]:0                 LISTENING       656 UDP    [::1]:1900             *:*                                    4512   For a particular connection, what determines which format is used for my "Local Address"? i.e. why is 0.0.0.0 displayed for some connections and [::] displayed for other connections, and so on?

When running netstat -a on my local machine, i see ports on the 0.0.0.0 address listening.    I would assume that 0.0.0.0 is my local machine, except that i also see 127.0.0.1 listening to specific ports.  What is the 0.0.0.0 address?  What is the difference between 0.0.0.0 and 127.0.0.1?  Below is an example of the output:  Proto  Local Address          Foreign Address        State TCP    0.0.0.0:445            MyComputer1:0          LISTENING TCP    0.0.0.0:49156          MyComputer1:0          LISTENING TCP    0.0.0.0:49157          MyComputer1:0          LISTENING TCP    127.0.0.1:6999         MyComputer1:0          LISTENING TCP    127.0.0.1:6999         MyComputer1:49801      ESTABLISHED TCP    127.0.0.1:6999         MyComputer1:57172      TIME_WAIT


Suppose $G$ is a group such that there exists $k\in\mathbb{Z}$ satisfying $(ab)^k = a^k b^k$ and $(ab)^{k+1} = a^{k+1} b^{k+1}$. Is $G$ abelian?  I've tried to use the same argument in  post, but it doesn't work. Is there a non-abelian group $G$ with this property?

I am looking for an example of a group $G$ where the equality $(ab)^{n}=a^{n}b^{n}$ holds for two consecutive integers $n$, but $G$ is not an abelian group. I've started do some calculations in the group $D_{4}$ (I gave up!) Do you know where I can find that example? Is it possible find such example without doing a lot of calculations?  Thanks for your help!


I have a .Net Console application which processes jobs.   People are able to both submit and view the running and failed statuses of jobs.  To imagine a job, each one can be thought of as follows:    Excel file in (open) Process the Excel file Excel file out (save)   When a job is scheduled, a series of processes are scheduled to run based on the type of job it is, as follows:   Import data from Excel files Perform C# operations on the data Execute a series of sql Stored procedures on the data Export the results through spread gear to an Excel file   Due to the time taken for each job, I want people to get a rough idea on when their Excel export files will be ready.  Each job requires an estimated time for completion, which can be split into the groups above and/or an overall estimate shown.  My idea is to keep a record of how long the tasks took in the past and use that data for estimating, but I want to make sure there aren't already tools built into C# for doing this before I reinvent the wheel.  As a bonus, I would also appreciate any stories, tips and suggestions for estimation process time estimation in general.

What's a good algorithm for determining the remaining time for something to complete?  I know how many total lines there are, and how many have completed already, how should I estimate the time remaining?


I had two versions of skype installed: one from Skype (package skypeforlinux) and one using snap package in Ubuntu 18.04 Gnome. I removed the snap version but an empty icon in the launcher remains. /usr/share/applications/ contains only skypeforlinux.desktop. ~/.local/share/applications/ is empty. How can I get rid of the empty icon?

When searching for "Skype" I always see these 2 entries.  There is this duplicate blank Skype icon. Both of them seem to run Skype in the same way.    But I've checked both /usr/share/applications, and ~/.local/share/applications, and can't find the extra icon so I can delete it.    Also as described , sometimes similar ghost icons are present even after removing associated applications.