Perl's floor function is giving me unexpected results. floor(13320) = 13320, but floor(133.20 * 100) = 13319. I'd think both of those would get the same result. Why is this happening? use POSIX;  print floor(133.20);       # 133, as expected print floor(13320);        # 13320, as expected print floor(133.20 * 100); # 13319?

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


There's a maths conference coming up and the whole thing amounts to about $1K, which is not the problem. I'm not going to be presenting, and I'm just going to be attending. I am planning to go next year to present a project I've currently started. Is it worth going this year?   Thanks!

I have recently been given an opportunity to attend a conference on Robotics although I don't have any paper to present. The registration fee is around 7k. Before spending such an amount, I wanted to know if it is worth attending conference sessions just for its sake. Please help.


If I state a proper noun such as Tahoe Lake, and then later in sentence refer to the lake, do I capitalize lake when it refers back to the proper name Tahoe Lake?

Which of the following sentences are correct?     "He gave two examples of large lakes, Lake Michigan and Lake   Superior."      "He gave two examples of large lakes, Michigan and Superior."      "He gave two examples of large Lakes, Michigan and Superior."      "He gave two examples of large lakes, Lakes Michigan and Superior."   This question is primarily about what variants are formally correct, not which one sounds the best.  I think that the question should be valid for several words of the same kind, such as mountain (Mount), figure (Figure), table (Table) and so on.


Making a simple L type Road. With the curve, mesh making follow the path. Scale and it has enough verts.Why at the corner its not a sharp edge. its going curve. I do not think this is the . I want sharp edge at the corner. And this answer show the round edge.    Any suggestion how to solve

I know the title is a mouthful, but this is the problem: I made a curve with 90 degree corners, like so:  I then beveled it, and this was the result:  As you can imagine, this isn't very pretty. I'm looking for something like this:  How can I achieve this look?


What is the coefficient of $x^{50}$ in $(\sum_{n=1}^{\inf} x^n)^3$ ?  Does there exist a combinatorial approach to this problem?

How do you find the coefficient of $x^{50}$ in $(\sum_{i=1}^{\infty}x^n)^3$?


what is the difference between Mutex,Semaphore and synchronization.  Is synchronization is way to achieve mutex in java.

Is there any difference between a binary semaphore and mutex or are they essentially the same?


I'm quite new to smart pointers and I encountered a problem with the code below  #include <memory> #include <vector>  using namespace std;  class A { public:     int var; };  class B : public A { public:     vector<unique_ptr<int>> vec; };  int main()  {     {         unique_ptr<B> b(new B);         b->vec.push_back(unique_ptr<int>(new int(4)));         unique_ptr<A> a = unique_ptr<A>(move(b));     }      system("pause");      return 0; }   In this example the 4 added to vector vec is not deleted when pointer a goes out of scope, but when I change it so that it doesn't cast to base class then all resources are returned as intended, how do I manage deleting variables defined in derived classes when using polymorphism and unique_ptr?

I have a solid understanding of most OOP theory but the one thing that confuses me a lot is virtual destructors. I thought that the destructor always gets called no matter what and for every object in the chain. When are you meant to make them virtual and why?


When I compile the following latex code:  \documentclass[british]{article} \usepackage[T1]{fontenc} \usepackage[latin9]{inputenc} \usepackage{babel} \begin{document} \cite{Lyklema_Fundamentals_1995_} \bibliographystyle{jjap_bml} \bibliography{tmp} \end{document}   With the following .bib file  @book{Lyklema_Fundamentals_1995_,   address = {Cambridge, Massachusetts},   title = {the title},   abstract = {},   publisher = {a publisher},   author = {Lyklema, J.},   month = oct,    year = {1995}}   And using  generated using makebst (), I get the following error:  You can't pop an empty literal stack for entry Lyklema_Fundamentals_1995_ while executing---line 1171 of file jjap_bml.bst (There was 1 error message)   But I cannot understand what the problem is. I can 'view the output anyway' and find the reference is formatted incorrectly as:  "J. Lyklema, the title, (a publisher, Cambridge, Massachusetts1995)."  i.e. there is no comma between the 'location' and 'date' field.   I'd be very grateful for any help.   EDIT: This issue has been resolved by simply editing one line of .bst; please see the first comment by Troy.

I created my own bibliography file with custom-bib (makebst), but when I run it with a reference to a book I get:  $ bibtex PhD [...normal output] Database file #1: PhD.bib You can't pop an empty literal stack for entry oecd2001brc while executing---line 1504 of file wdsphd.bst   The only thing on that line is a high-level ITERATE call.   The style was created with these options:  %% merlin.mbs  (with options: `head,exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}') %% english.mbs  (with options: `exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}') %% merlin.mbs  (with options: `tail,exlang,annote,seq-no,nm-rvvc,dt-beg,yr-par,xmth,tit-qq,qx,bt-qq,vol-bf,volp-sp,num-xser,pub-date,isbn,issn,doi,english,pp,ord,url,url-nl,nfss,,{}')   The code for book items looks like:  FUNCTION {book} { output.bibitem   author empty$     { format.editors "author and editor" output.check     }     { format.authors output.nonnull       crossref missing$         { "author and editor" editor either.or.check }         'skip$       if$     }   if$   format.btitle "title" output.check   crossref missing$     { format.bvolume output       new.block       format.number.series output       new.sentence       format.publisher.address output     }     {       new.block       format.book.crossref output.nonnull     }   if$   format.edition output   format.isbn output   format.doi output   new.block   format.note output   fin.entry   write.url }   And this is the entry:  @book{oecd2001brc,  author = {OECD},  doi = {10.1787/9789264193550-en},  isbn = {9789264186903},  publisher = {OECD Publishing},  title = {{Biological Resource Centres: Underpinning the future of life sciences and biotechnology}},  url = {http://www.oecd-ilibrary.org/science-and-technology/biological-resource-centres\_9789264193550-en},  year = {2001} }   Is there a way to get a better stacktrace from bibtex? What I have now doesn 't really tell me what is going on. If it can be fixed simply, help would also be appreciated.


I installed Android 5.0 on a second-hand HTC One (M7) device which comes from United Kingdom. The ROM 7.17.1540.7 comes from the official , and the  doesn't list any ROMs.  Since then, system update to 7.17.1540.21, performed automatically by the device, fails with the following error:     We have determined that your phone may be running a modified version of its system software. For your protection, we cannot update your phone. Please revert your phone to the official HTC system softwarte to update your phone. If you did not modify your system software or would like help reverting your system, please contact us via the support section at www.htc.com.   Day after day, it downloads the huge update, and shows the same message, again and again.  I contacted the support from United Kingdom. After a long, unpleasant discussion, the person suggested to send the device to the UK repair center in order to reset it, which means lots of trouble of backing up the device and wiping all personal information, and then waiting at least three weeks for it to be “repaired” (given that I live outside UK.)  Is there any way I can either download a UK version of the ROM or trick Android to think either that it's from UK or that the phone is from USA?

There are several reasons to be looking for a ROM:   Upgrading or downgrading your stock ROM Looking for firmware from a different region/language Flashing a custom ROM for different features, removing bloat, etc.   But where can one find ROMs in the first place?  What sites are likely to have the ROM I need?  ; please add to the wiki answer instead of posting separate answers.  See also:


I have an Ipad that has ios 9.3.3 as the software version and i need your help because i want to update only to ios 11 and to update to ios 12, it says i need a computer so I need your help

I'm trying to downgrade my iPhone from the current iOS to an older one, as per .  But every time I try, I always receive this error:     The iPhone could not be restored. This device isn't eligible for the requested build.     I have tried many times with and without DFU mode. Any ideas regarding this?


In my class players below I have 2 methods. In the method playersFight in my main activity i did, so I am passing in the name fred and bill to my players fight method. I know that you are supposed to the the parameter values to the instance variables such as I did. However If I print player1 and player2 it achieves the same outcome so I am confused as to why we need to set them to the instance variables ??  public class GameTime { public static void main(String[]args){     Players hockeyPlayer=new Players();     hockeyPlayer.simpleMessage();     hockeyPlayer.playersFight("fred", "bill");     }  }    public class Players { String name;  int number; public void simpleMessage(){ System.out.println("This is another Class"); } public void playersFight(String player1,String player2){ name=player1; name=player2; System.out.println(player1+" fights "+player2);  } }

How do you decide between passing arguments to a method versus simply declaring them as object instance variables that are visible to all of the object's methods? I prefer keeping instance variables in a list at the end of the Class, but this list gets longer as my program grows. I figure if a variable is passed often enough it should just be visible to all methods that need it, but then I wonder, "if everything is public there will be no need for passing anything at all!"


Since Covariance matrix is symmetric it is Hermitian (self adjoint) and always diagonalizable. If the matrix has all non zero eigen-values its is a full rank matrix. But what is the importance of the covariance matrix being positive definite?  I am asking this question in context of principle component analysis. We often come across the statement that covariance matrix is positive semi-definite and also the proof for it. The proof and information are nice to know. But, by not being able to figure out its importance in given context i feel I am missing some important point.  For example the importance of positive definiteness of a kernel is often stated clearly that a positive definite kernel corresponds to a RKHS. But what is the importance of positive definiteness of covariance matrix.

I have been researching the meaning of positive semi-definite property of correlation or covariance matrices.   I am looking for any information on   Definition of positive semi-definiteness; Its important properties, practical implications; The consequence of having negative determinant, impact on multivariate analysis or simulation results etc.


I have two almost identical config files in two different directories  ## file1.conf ## tunnel:     enable: true     interval: 20     public: false  loop:     enable: false     interval: 20     public: false  link:     enable: true     interval: 20     public: false  ## file2.conf ## tunnel:     enable: true     interval: 20     public: false  loop:     interval: 20     enable: false     public: false  link:     enable: true     interval: 20     public: false   Now I want to change enable: false to enable: true but only for the loop section in both files. How can I do this using just one set of commands for both files?

IT seems that 'sed' and I will never be friends...  How can I find and replace a pattern within a range (within another pattern)?  In words: Find: AllowOverride None within the following range and replace it with AllowOverride All  ... <Directory "/var/www/html"> some text more text some comments AllowOverride None more text </Directory> ...   Please note (if not already done): This is related to httpd.conf which contains a lot more "modules" all ending with </Directory>  As this command is used within a yaml file, it would be aesome to achieve this with a one-liner (I am aware, that one-liners are getting ugly pretty fast...).   Also: I rely on using sed (requirement, dont ask me why - pls :))


I'm working on a problem for a preliminary exam, and I came across one that confused me.   For $n\in\mathbb{N}$, set   $t_n=\sum_{i=1}^{2n}\frac{(-1)^{i+1}}{2n+i}=\frac{1}{2n+1}-\frac{1}{2n+2}+\cdots+\frac{1}{4n-1}-\frac{1}{4n}$  Evaluate $\lim_{n\to\infty} nt_n$  $\textit{Hint:}$ Relate the given limit to suitable Riemann sums for $f(x)=(1+x)^{-2}$.  I've evaluated limits using Riemann sums before, and I've simplified  $\lim_{n\to\infty}nt_n=\lim_{n\to\infty}n(\sum_{i=1}^{2n}\frac{(-1)^{i+1}}{2n+i})=\lim_{n\to\infty}n\frac{1}{2n}\sum_{i=1}^{2n}\frac{(-1)^{i+1}}{1+\frac{i}{2n}}=\lim_{n\to\infty}\frac{1}{2}\sum_{i=1}^{2n}(-1)^{i+1}\sqrt{f(\frac{i}{2n})}$  This is as far as I've been able to complete however. I am confused as to the alternating nature of the sum, and how to complete the limit problem. Any help would be appreciated.

If $t_n=\frac{1}{2n+1}-\frac{1}{2n+2}+\frac{1}{2n+3}-\frac{1}{2n+4}+\cdots +\frac{1}{4n-1}-\frac{1}{4n}$  Find $\lim_{n \to \infty} nt_n$  First attempt: $t_n$ is positive(grouping two terms and performing subtraction we will get it) so is $nt_n$. Now can we prove it is monotonically decreasing? If so then $\lim_{n \to \infty} nt_n=\lim_{n \to \infty}[(\frac{1}{2+1/n}-\frac{1}{2+2/n})+(\frac{1}{2+3/n}-\frac{1}{2+4/n})+\cdots +(\frac{1}{4-1/n}-\frac{1}{4})]$ and each of these terms will go to zero so is the limit.  Second attempt: I was trying to use Riemann summation $t_n=\frac{1}{2n+1}-\frac{1}{2n+2}+\frac{1}{2n+3}-\frac{1}{2n+4}+\cdots +\frac{1}{4n-1}-\frac{1}{4n}= \frac{1}{2n+1}+\frac{1}{2n+2}+\frac{1}{2n+3}+\frac{1}{2n+4}+\cdots +\frac{1}{4n-1}+\frac{1}{4n}-2[\frac{1}{2n+2}+\frac{1}{2n+4}+\cdots \frac{1}{4n}]\Rightarrow \lim \frac 1n [nt_n]=\int_0^2\frac{dx}{2+x}-\int_0^1\frac{dx}{1+x}=\ln4-\ln 2-\ln 2=0$  So $\lim t_n=0$  So what will happen with $\lim nt_n$  Edit: As I got the answer is not $0$ because of the flaw. So can we have different approaches even with Riemann Sum to have the answer?


Suppose I am using user passwords to derive AES-128-CBC encryption key. This key will be used to encrypt some sensitive data for the user so that even the website owner / operator can not decrypt it.  Then why should I use PBKDF2 over taking the first 128-bit of the SHA-512 output over the salt and password?  If I use PBKDF2, then what is recommended iterations nowadays for PBKDF2 at this date?

I do not know how the Key Length extension attack works. So if we leave that aside for once, and say just about usual brute-force attack on the hash, I don't really know how is PBKDF2 so much better than usual hashing.   Mathematically I know that PBKDF2 is so better against rainbow table attacks and also slow to recreate, but as computing power is moving up in the world, how it's still keeping its integrity?  For an HMAC we use a salt, also we can do the same for an usual hash.  So, SHA256('Hello'), is easily rainbow tabled. So if I prepend a salt, it's a little bit better, like SHA256(salt+msg), but Salts are usually kept in DB as clear text, so if some hacker is able to crack that salt, he can manually append the salt and perform the same operation.   Now in HMAC, -> H(key(opad) + h(salt + key(ipad))) is mathematically secure, but one can easily brute-force all possible password by running it through an HMAC operation (if he knows the salt), and he gets the key. A bit slower, but possible, and in pbkdf2, this whole process is looped maybe a million times even, with that much mathematical complexity, yet, if one gets the salt. He could simply run a big list of passwords with through another pbkdf2 function, and maybe very slow, but still possible, right?    So what's the use of this much complex algorithms by hashing and hashing with previous results of HMAC and so on, if it's still very much prone to a slower bruteforce?


In the Ashok Das QFT book] pg. 212-213 (), the section on Noether's theorem,  the author considered general infinitesimal transformations of the form $$x^\mu\rightarrow x'^\mu,$$ $$\phi(x)\rightarrow\phi'(x'),$$ $$\partial_\mu\phi(x)\rightarrow\partial'_\mu\phi'(x')\tag{6.3}$$ where $x^\mu$ are spacetime coordinates and $\phi(x)$ is a field. For such transformations, the invariance of the action $S$ would imply $$\delta S=\int d^4x' \mathcal L(\phi'(x'),\partial'_\mu\phi'(x')) - \int d^4x\mathcal L(\phi(x),\partial_\mu\phi(x))=0,$$ or, $$\delta S= \int d^4x \mathcal L(\phi'(x),\partial'_\mu\phi'(x)) - \int d^4x\mathcal L(\phi(x),\partial_\mu\phi(x))=0,$$ $$\delta S= \int d^4x [\mathcal L(\phi'(x),\partial'_\mu\phi'(x)) - \mathcal L(\phi(x),\partial_\mu\phi(x))]=0.\tag{6.7}$$ The author then said that the last equality will hold if $$\mathcal L(\phi'(x),\partial'_\mu\phi'(x)) - \mathcal L(\phi(x),\partial_\mu\phi(x))=\partial_\mu K^\mu,\tag{6.8}$$ where $\partial_\mu K^\mu$ is a total divergence. Why is that so? According to the Gauss theorem, for the integral $\int\partial_\mu K^\mu d^4x$ to vanish, $K^\mu$ needs to vanish at the surface boundary, which I assume is at infinity. How can we be sure that $K^\mu$ will vanish at infinity when we don't know what $K^\mu$ is?

Let $\Omega\subset\mathbb R^n$ and consider an arbitrary functional $$ S\colon C^k(\Omega)\to\mathbb R $$ that is local, $$ \phi\overset S\mapsto \int_\Omega L(\phi,D\phi,\dots,D^k\phi) $$ for $L$ some $n$-form taking values in the $k$-jet space $J^k\phi$. We may call $S$ the action functional, and $L$ its associated Lagrangian (although we do not assume that $\delta S[\phi]=0$, i.e., we work off-shell).  There are two notions of a symmetry that are typically discussed:   Lagrangian symmetries, that is, transformations of the form $\phi\to\phi'$ that satisfy $$ L-L'=\mathrm d\Theta $$ for some $(n-1)$-form $\Theta$, and where $L'(J^k\phi)=L(J^k\phi')$. Action symmetries, that is, transformations of the form $\phi\to\phi'$ that satisfy $$ S-S'=0 $$ where $S'[\phi]=S[\phi']$.   If we assume that the boundary conditions are such that $\Theta|_{\partial\Omega}=0$, then it is clear that Lagrangian symmetries are also action symmetries.  If we assume that $\Omega$ is "nice-enough" (e.g. star-shaped) then I believe that any action symmetry is also a Lagrangian symmetry, although I would like to have a more precise statement about this fact. In other words, my question is     Are these two notions of symmetry equivalent? Under what conditions?   Moreover, how much can we weaken the assumptions? For example, can we take $\Omega$ to be simply-connected instead of star-shaped? Can we take $\phi$ to only have weak derivatives instead of strong derivatives?


I'm trying to horizontally center a div-block containing images (playing cards placed there by Javascript), but somehow it doesn't work (images are still left-aligned). Here's the HTML:

   And here's the CSS:  #dealerarea{ position:absolute; width:100%; height:96px; top:15px; } #dealercards{ display: block; margin-left: auto; margin-right: auto; }   What i'm doing wrong? Thanks in advance!  Edit: I can't give a fixed "width" to inner div, because it changes every time (depending on the number of card images).

How can I horizontally center a
 within another
 using CSS?

Foo foo


I am new to Ubuntu (and Linux).  As you might know after installing LAMP for Ubuntu, the default folder for the files /www lies inside the /var folder  The /var folder lies in the root.  Now, of course, I will need to make changes to the web files kept inside the /www folder to complete my website.  Now when I add this folder to the Atom, and try to edit any file e.g. index.php, I am not able to  I can understand that this is a file permission issue of the user and group. I have searched a lot but am unable to resolve the issue.

I want to stop having to use sudo everytime I work in /var/www. How can I do that? I simply want to put all of my sites into this directory and work with them without too much pain.


I remember reading this novel back in High School in the late 90s, possible early 00s.  The novel in paperback form was quite substantial, must have been at least 600 pages long.  The main character was a middle aged (I think) man.  The world was living a medieval-esque way of life. I imagine the actual apocalypse happened many decades, if not centuries, before, as no one could remember what happened. I recall people referring to a "great fire".  There were no aliens or other supernatural forces at work. It seems as though society as we know it just ceased to function, either because of war or something else.  Some technology from the pre-apocalyptic world was still being used.  There was this Shaman/Mystic character who I think knew more about the truth of what happened than he was letting on. I'm pretty sure he was able to generate and manipulate electricity to dupe the local populace into thinking he had powers.  The main character eventually goes on a journey over "cooled lava" (roads?), and that's as far as we got with the story before the end of the school year, sadly.

I am looking for a story I remember reading in the mid-90s. I can't remember if it was a trilogy or just a three part book, but I know it was in paperback book form. I also know it was found in the Young Adult section of the library at that time.  The general premise was that there had been some sort of war in the past and machines were outlawed. People visited priests who used magic. I remember that the main character discovers that the priest aren't using magic but are actually using machines.  I can also remember the main character ends up leaving the nation he is in and ends up in a neighboring nation where machines are allowed. I remember there being a scene where he watches a "movie" which I think was more like an old fashioned moving picture.  For some reason I keep wanting to tie this whole thing back to a sword, or blue sword, or something like that, but I might be mixing stories. Other things I keep linking to it: the character was in training to be a priest, he was forced to leave, he ended up using the neighboring nation to conquer his homeland. Again, still not sure if I am mixing things but they keep popping up.  I do know that it is not The Blue Sword by Robin McKinley, or its prequel, The Hero and the Crown.


Given that The Six Kingdoms are a democracy (of sorts), is there any history in the GRRM world of any other democracies?

From S05E02 and A Storm of Swords:     In this episode, a new Lord Commander of The Night's Watch is appointed after the death of Jeor Mormont. But to my surprise, the appointment takes place not from the direct orders of the King (Tommen or Stannis, your pick) but through a truly democratic process. Yes, elections, where anybody can stand for the post & only the members of the Night's Watch gets to vote.      So, the question, why is the Night's Watch the only democracy in an otherwise feudal Westeros? Army is the last place you would expect to find a true democracy.    Is it just a happenstance because     Stannis Baratheon has claimed the Wall   or is the practice followed through the ages?


So I've been working in Flask and ran into an irritating problem. I'm creating a website and using the redirect function the website doesn't switch pages. Each place I'm attempting to go to can render_template() when not called via redirect. Here's my code (yes, the hashed_password isn't hashed and I should probable redirect to next, but these are are problems for another day):  @app.route('/logIn',methods=['Get', 'Post']) def logIn():     _name = request.form['inputName']     _password = request.form['inputPassword']     # _hashed_password = bcrypt.hashpw(_password, bcrypt.gensalt( 12 ))     _hashed_password = _password      conn = mysql.connect()     cursor = conn.cursor()     cursor.execute("SELECT * FROM tbl_user WHERE user_name = '" + _name + "'")      user = cursor.fetchone()     print(user[0])      if len(user[2]) is not 0 and user[3] == _password:          active_user = User(user[0])         login_user(active_user)         return (redirect(url_for('home')))     else:          return json.dumps({'message': 'Username or Password not correct'})   @app.route('/Home') @login_required def home():     return render_template("home.html")   This all works with a html and js background. The HTML doesn't have any code, only contains the button to be clicked (though if it'll help I can post the html). The JS looks like this for the login button:  $(function() {     $('#btnLogIn').click(function() {          $.ajax({             url: '/logIn',             data: $('form').serialize(),             type: 'POST',             success: function(response) {                 console.log(response);             },             error: function(error) {                 console.log(error);             }     }); });   });  Finally, the output spits back the html for the Home page, the one I want to be rendering in the browser (this is the output):  <!DOCTYPE html> <html lang="en">   <head>     <title>Python Flask Bucket List App</title>       <script src="static/js/jquery-3.3.1.min.js"></script>       <script src="static/js/logout.js"></script>   </head>    <body>    <form class="form-signout">        <button id="btnLogOut" class="btn btn-lg btn-primary btn-block" type="button">Log Out</button>    </form>   </body>  </html>   I've been looking everywhere. Also, adding /Home after the local host domain calls the same GET as the one called after clicking the button and successfully loads the page. If anyone knows how to do this with loading the "next" url, that would be even better.

I'm using $.post() to call a servlet using Ajax and then using the resulting HTML fragment to replace a div element in the user's current page. However, if the session times out, the server sends a redirect directive to send the user to the login page. In this case, jQuery is replacing the div element with the contents of the login page, forcing the user's eyes to witness a rare scene indeed.   How can I manage a redirect directive from an Ajax call with jQuery 1.2.6?


Let $E\subset \mathbb{R}$ be a Lebesgue measurable subset of reals such that $\mu(E)>0.$ Consider the set $E+E=\{x+y: x,y\in E\},$ prove that $E+E$ contains an interval of length greater than $0$.  Is this problem even true? Let's say the set $E$ is our set of irrational numbers, then $E+E$ doesn't contain positive length interval. If this is indeed true, how can we go about proving this statement?

This is a question from Stromberg related to Steinhaus' Theorem:     If $A$ is a set of positive Lebesgue measure, show that $A + A$ contains an interval.   I can't quite see how to modify the Steinhaus proof though.


I'm reading about the following set-up:     We have a body of mass $m$ attached to a spring. The restoring force is proportional to the displacement of the body from equilibrium. Using Newton's 2nd law we derive the equation of motion being a sine curve.    The author specified however that the spring was massless. How does the spring having a mass affect the situation?

Consider a massless spring system which is hanging vertically. Attach a mass $M$ and set it into simple harmonic motion. Let the period with which the mass oscillates be $T$.   We assume that the spring is massless in most cases. Would taking effect of the non-zero mass of the spring affect the time period ($T$)?


So I'm having a hard time conceptualizing how to make mathematical representation of my solution for a simple logistic regression problem. I understand what is happening conceptually and have implemented it, but I am answering a question which asks for a final solution. Say I have a simple two column dataset denoting something like likelihood of getting a promotion per year worked, so the likelihood would increase the person accumulates experience. Where X denotes the year and Y is a binary indicator for receiving a promotion: X | Y 1   0  2   1 3   0 4   1 5   1 6   1  I implement logistic regression to find the probability per year worked of receiving a promotion, and get an output set of probabilities that seem correct. I get an output weight vector that that is two items, which makes sense as there are only two inputs. The number of years X, and when I fix the intercept to handle bias, it adds a column of 1s. So one weight for years, one for bias. So I have two few questions about this. Since it is easy to get an equation of the form y = mx + b as a decision boundary for something like linear regression or a PLA, how can similarly I denote a mathematical solution with the weights of the logistic regression model? Say I have a weights vector [0.9, -0.34], how can I convert this into an equation? Secondly, I am performing gradient descent which returns a gradient, and I multiply that by my learning rate. Am I supposed to update the weights at every epoch? As my gradient never returns zeros in this case so I am always updating. Thank you for your time.

I am trying to get a better understanding of the math behind logistic regression.  Logistic regression is looking to give a prediction based on data likelihood.  From my understanding it is making a posterior prediction.  Suppose we have a two-class model. So this becomes the equation  \begin{align} p(C_1|x) &= \frac{p(x|C_1)p(C_1)}{p(x|C_1)p(C_1)+p(x|C_2)p(C_2)}\\ &=\frac{1}{1+\exp(-a)} = \sigma(a) \end{align}  where $a= \ln \frac{p(x|C_1)p(C_1)}{p(x|C_2)p(C_2)}$  My questions are what does $a= \ln \frac{p(x|C_1)p(C_1)}{p(x|C_2)p(C_2)}$ intuitively mean? Does it imply that the $\theta x$ of our model, is trying to estimate the ratio in $a$? And why in the first step is the equation equivalent to the same as the naive bayes classifier; how does logistic regressor distinguish itself from the naive bayes if the background math is the same


Sometimes I get questions on my Stack Overflow front page, and I don't understand why. I mainly use the site in the , tags, with some light  activity added recently.   Today, I've got plenty of Android/Java questions on the front page, but also some that I just don't understand. For instance, , and . One is tagged with , the other with . I've never used these tags, so what makes them appear?  I know about the , but mine doesn't show anything related. I even browsed my profile's tag listing, but it turns out I've never asked or answered a single question for any of the three.  So my question is, why are they there? I don't browse -related tags, and I don't use  at all, so no action there either. It can't be based on being a "popular" question, because they both have zero votes and low views (at this time).   The questions aren't even topically related to my main tags as far as I can tell. Is there some sort of question scanning algorithm that lumps things together even with differing tags?

I asked , but within minutes, it was off the question list even though the question list went back an hour in time.  Is this some form of moderation?  If so, it seems weird that no comment was made within the thread that the question was deleted, moved, or otherwise removed from the question list.


Its a minor nuisance, but its still a nuisance. Everyone once in a while Ill find a new SE site that looks interesting or that Ill have a comment for, but when I go to make the comment, the system asks me to make an account. Generally, its a very small comment and I'm too lazy to make an account for that.   What I don't understand is why I need to make an account every time. They all get linked anyways, so why isn't it just assumed we have an account everywhere?  Edit: For those who think that this is a bad idea because (1) some users don't want to associate with some site, (2) it would ruin site's user statistics or (3) it would spam their communities list, this can be avoided by doing this with a 'copy-on-write' mentality. In other words, you wouldn't actually have an account on the site until you performed your first action. Then an account would be created and linked for you instantly and (more importantly) seamlessly. This means (1) you aren't part of the community unless your actually part of the community, (2) the sites don't get the user statistics until they actually get the user, and (3) you dont see a massive list of communities your part of until you are actually part of those communities.

I understand the reason why Stack Exchange has different sites to separate  from  or . I understand too why the reputation is associated on each site.   Why do I have to create a new  for each web site? I know that when I create a new account, it is automatically associated to my other accounts. But, is there a reason why, when I originally create a user on the first site, I can't go on another site with this user?


I am developing Android application and I am trying to insert some data to mysql database, one of the columns is storing the name of the gps location,I read values like this ("Alfa Gas Station"), but when I read unknown place the value become like this (29°17'37.3"N 47°52'23.4"E) and when I try to save it, the php code returns Not registered as shown in my code and I want to save it in my database in this form. when I tried the solution of in this link to prevent SQL-Injection  , It prevent the insertion process but this is not what do I want, I want the code insert the string value whatever it was consisting of, because this value is generated from google map not written by users so it can't be harmful, so I wish anyone can help me:   <?php if($_SERVER["REQUEST_METHOD"]=="POST") {        require "init.php";        creat_Student(); } function creat_Student() {     global $con;     $id=$_POST["id"];     $lat=$_POST["lat"];     $long=$_POST["long"];     $price=$_POST["price"];     $name=$_POST["name"];     $address=$_POST["address"];     $status=$_POST["status"];                                  $query="INSERT INTO  parking (`userid`, `lat`, `long`, `price`, `name`, `address`, `status`) VALUES ('$id','$lat','$long','$price', '$name','$address','$status');";     if(mysqli_query($con,$query)){     echo "Successfully Registered";     }     else      {     echo "Not registered";     }     mysqli_close($con);  }   It works well but it didn't work when it is unknown place , and the name column in my database is 400 Varchar

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


I have a macbook that is running OS X 10.8 (Mountain Lion); for various compatibility-related reasons I would like to upgrade the system, but not to El Capitan. Yosemite (OS X 10.10) would be dandy. The App Store, of course, only offers an upgrade to El Capitan, currently the newest OS X version.  I know that it is possible to restore a computer to the OS it had prior to an upgrade, but is it possible to upgrade to a (never-seen before) OS version that is not the latest available?  Edit:  is related (but only if Yosemite had been downloaded via the App Store in the past).

Sometimes it's hard to search for older versions of macOS & OS X  on the App Store.  This is an attempt to provide the canonical QA for this issue, as per the Meta QA -  I expect it to be modified over time to hopefully become a complete information resource.  How can I get any older version of a Mac OS to be able to run as a VM, or to reinstall on my Mac?


He keeps ringing me up saying, 'Hello trouble', or 'bye trouble. I don't understand it. I've never heard of this as a nickname

What does it exactly mean if somebody says "Hello, Trouble" to you?  One of my colleagues said "Hello, Trouble" to me this morning.  I just replied "Hi", as I was not sure what to say.   So just wanted to check what exactly Trouble here means...


Downloaded Ubuntu 12.04.3 package for bootable CD. This package is 707MB and will not fit on normal 700MB CD, please advise. Thanks.

Why is the Ubuntu 12LTS 4MB bigger than all the blank CDs I have?  I had to burn it on to a DVD.  This never used to be the case.


I got 11+ upvotes and only 29 rep for an answer but my daily reputation was only at 156. That's 44 short of the daily cap! I'm trying to make 20k before the Boston Dev Days, too!

On Stack Exchange, users may gain a certain level of reputation.  What does reputation do? How can a user gain or lose reputation?   See also   in the Help Center  - Maximum amount of votes a user can use in a day and reputation requirements to vote.  - How to get an exact overview of the actions that got you your reputation.  - A full list of all privileges granted at each reputation level on all sites.


I'm using canon 700d. I'm trying to shoot some shots water drops with flash.But When I turn on flash in Manual mode I'm restricted to max shutter speed of 1/200. Is that the way it was or did I messed up somewhere.Please suggest your ideas.

I'm using a T4i with a 100mm f/2.8L (with macro twin flash). In manual mode, I could select any shutter speed down to 1/4000. However, when shooting the DSLR would set it back to 1/200. Does it depend on some configuration parameters I did not check/uncheck or upon the flash speed? I'm sure I remember shooting at higher shutter speeds, perhaps with other lenses, if I'm not mistaken.


Here I am stuck again!  I have this equation 4.42 but I need to display this same equation, with this original number (4.42), in chapter 6. How can I do that?  The equation is:  \begin{equation} \label{Po}     \Pi=\pi-\frac{1}{3}c_s k_B T \phi \textbf{F}^2 \end{equation}   And below you can see the equation in chapter 4.    How to put this equation in chapter 6, but enumerated 4.42?

Let's say I have written an equation in my paper and numbered it:  y = a + bx    (1)   Then, later in the paper, I want to remind the reader by showing the same equation with the same equation number.  Sure, I can repeat the equation, but LaTeX gives it a new equationn number:  y = a + bx     (2)   How do I force LaTeX to use the original equation numbers?


nowadays there are too many devices with different height and different aspect ratio, should I make the design for a smaller device and top of that I add a percentage respectively? or there is any other way to look at?

I am scoping a responsive project and thinking it will need views spanning from mobile to desktop. I am just wanting to confirm if it is necessary/helpful to do mockups for all 4 sizes (Extra small devices (phones, up to 480px), Small devices (tablets, 768px and up), Medium devices (desktops, 992px and up), and Large devices (large desktops, 1200px and up)?


I have calculated AIC by using R-studio to compare models. However, I got the following both negative and positive AIC  AIC  8.52  0.41  -7.70  -5.84  -3.84  -2.10  Should I select the negative AIC or positive AIC?  Should I select the absolute value of AIC?  Should I select the lowest AIC although it is the negative value?  Which model should I choose?  I am a bit confuse because normally I get the positive value of AIC.  Thank you.

My question is related to the thread .  I often get negative AIC values from the software I use.  I notice it most when I'm doing time series.  But here is what I don't get.  When defining the AIC like   $$AIC = 2k-2\ln(L)$$  $L$, the likelihood, is a joint probability and to my understanding must be bound between 0 and 1.  Mathematically this implies the $AIC$ must be positive.  So I don't know what my software is giving me for the value labeled $AIC$.  Any thoughts?


I am trying to make a gear material where there are highlights that are like lines facing outward from the gear's center. This image shows what I am trying to accomplish. How can such an effect be done?  Thanks in advance!

Is possible align the center of radial anisotropic shader with the center of the hole? I tried:   Move origin (I always think origin determines the center of anisotropic- not true) Separate tangent values and change each individual by multiply different numbers - something changes, but I was not able to move the anisotropic's center.   Any other ideas?


Something about having to deal with this feels really clunky. Am I the only one who feels this way? Is there anything that can be done to improve this user experience?  (source: ) Said another way, if I had to deal with this going from gmail to google docs to google reader, it would annoy me to no end. Especially as stackexchange grows and the network becomes a destination for interesting content, I don't really want to confront this boundary every time I go from site to site.

Update: Universal login is in place and considered "done". If you see anything weird, please submit new bug reports.   As y'all know, our current flavor of "global authentication" leaves a few things to be desired. It's flaky, requires a page refresh, etc. etc. Wouldn't it be nice if you could just sign in once and be automatically logged in across the network?  We are ready to roll out Stage 1 of Project "Make Authentication Suck Less". It is live as of a few minutes ago. What this means right now:  When you log into any Q&A site on the stackexchange.com domain, you will be automatically logged into all other Q&A sites on the stackexchange.com domain + stackexchange.com itself.   is excluded from this.   , , and other Q&A sites with their own domains will still use the old flow.  We are going to recognize you in some ways on sites where you don't have a profile. This is still a work in progress, but most notably you will see "join this community" in the top bar instead of "sign up" and "log in".   But I use multiple accounts! What do? We aren't intending to break the ability to run multiple accounts. The same guidelines as before still apply — we don't officially support that, you might end up with an accidental automatic merge if you're not careful with your credentials, any interaction between the accounts is right out, and so on. If you're already using different browsers or different browser profiles for your accounts, nothing will change for you. If you are somehow logged into multiple accounts in the same browser... I'm sorry to say, but that's a bug even for our current global auth setup. You will now only be able to log into one at a time, and you'll need to log out when you want to switch. (Or start using different browsers.) What's next:  Remember  we tested a few months ago? It's coming back. Stage 2: bring other domains into the fold (this is also live now) Stage 3: make cross-domain experience smoother and support browsers that reject third-party cookies in all conditions (looking at you, Safari) - this is not currently feasible. Safari users and users who reject third-party cookies will need to sign in separately to every second-level domain (e.g. stackexchange.com, stackoverflow.com, etc).  If you see any issues… Good luck, because you probably can't log in to report them here. =) But seriously, let us know via the contact form linked at the bottom of any page. If you are able to log in, report issues here on meta as normal. So, in conclusion…


Question:  Let $ A_{1}, A_{2}, ...$ be a sequence of sets, each of which is countable. Prove that the union of all the sets in the sequence is countable.  My attempt:  We know that for each set in the sequence, $ \exists \ f: \mathbb{N} \to A_{k}$  a bijection. Now I'm not sure how to prove that the union of all these sets is countable.

I am doing some homework exercises and stumbled upon this question. I don't know where to start.      Prove that the union of countably many countable sets is countable.   Just reading it confuses me.   Any hints or help is greatly appreciated! Cheers!


I want to import my own PDF files to google play book reader and read them using this application. But without any hacking I cannot read not purchased PDFs in google playbook.  I'm not looking for an alternative because they are not good enough (such as ezPDF or Moon+ and ...)

Has anyone been able to take and place an epub book inside the Google Books app or know how to do it?


Most shell scripts I use have syntax like   ./shellscript.sh -first_argument_flag <first_argument_value> -second_argument_flag <second_argument_value>   but all of the online resources for shell scripters only discuss passing positional arguments like  ./shellscript.sh <first_argument_value> <second_argument_value>    which are subsequently used in the script as "$1" , "$2", etc.   I would like to use the first, more user-friendly syntax rather than the positional argument syntax. As an example, suppose I want to echo a filename with flag -f and a directory with flag -d. Call this script echofd.sh. I want  ./echofd.sh -f myfile.txt -d /my/directory/    to produce the output  Your File is: myfile.txt  Your Directory is: /my/directory/   and regardless of which order -f and -d are positioned in calling the script.

For I school project, I have to implement a shell/terminal app. But I am wondering how are command line options parsed, because it appears abit weird to be. For example for the command paste (and I believe other utilities behave similarly)  [jiewmeng@JM tmp]$ paste --help Usage: paste [OPTION]... [FILE]...   Behavior when combining multiple options into one  [jiewmeng@JM tmp]$ paste -ds file1 file1 xxx file1 d aaws dafd a   Here it appears options are just ignored ...   [jiewmeng@JM tmp]$ paste -sd file1   It behaves the same as paste -, waiting for stdin. But when its valid combination  [jiewmeng@JM tmp]$ paste -sd. file1 file1 xxx.file1.d aaws dafd a   It works. Shouldn't the invalid one give an error instead of waiting for stdin?  [jiewmeng@JM tmp]$ paste -d paste: option requires an argument -- 'd' Try 'paste --help' for more information.   Ok, makes sense d requires an argument, but ...   [jiewmeng@JM tmp]$ paste -d file1   ... waits for stdin. why?


I'm using ubuntu 15.10(unity), I want some scripts running when a session starts. I tried the following methods:   Put those scripts in the file ~/.xsession, but it didn't work (It worked when I executed those scripts manually in gnome-terminal).  Add those scripts to Startup Applications in unity, it didn't work, either. I guess it's because Startup Applications runs those scripts when OS starts, but the scripts that I want to run demands a session.   How to achieve this?

I have a simple one line command which works perfectly in terminal, but does not work in the "Startup Applications" app thing.  The line of code is : xmodmap /home/seph/Code/Ubuntu\ Scripts/Xmodmap  It's not that much of a hassle to copy it from "Startup Applications" and paste it into terminal, but I don't really get why it isn't working.  I followed someone else's instructions to do it in the first place, so maybe I did something wrong?  In any case, wouldn't it be the obvious and logical assumption that it just types whatever you put in it into Terminal?


I need to estimate the Bayesian posterior of my model parameters ($\theta$) for some observed data ($D$), given a likelihood $P(\theta|D)$, and assumed priors $P(\theta)$:  $$P(\theta|D)= \frac{P(\theta|D)\; P(\theta)}{P(D)}$$  I use a MCMC algorithm which as far as I understand samples the unnormalized posterior (edit: I was wrong, the draws are taken from the full posterior).  After the MCMC is done, I can construct the probability density function for each $\theta_i$ in my set of parameters $\theta$ (from which I can obtain the necessary statistics: mean, median, confidence intervals, etc.) but I also have a rather large set of unnormalized posterior values.  As far as I understand, these values are not used at all in the analysis of the model parameters. Does this set of unnormalized posterior values have any use at all, or are they simply discarded?

I'm currently estimating parameters of a model defined by several ordinary differential equations (ODEs). I try this with a bayesian approach by approximating the posterior distribution of the parameters given some data using Markov Chain Monte Carlo (MCMC).   A MCMC sampler generates a chain of parameter values where it uses the (unnormalized) posterior probability of a certain parameter value to decide (stochastically) whether it will add that value to the chain or add the previous value again. But, it seems to be the practice that the actual posterior probabilities do not need to be saved, rather is a n-dimensional histogram of the resulting parameter values generated and summary statistics like highest density regions (HDRs) of a parameter posterior ditribution is calculated from this histogram. At least that's what I think i learned from .  My Question: Wouldn't it be more straightforward to save the posterior probabilities of the sampled parameter values along with these and approximate the posterior distribution from these values and not from the frequencies of parameter values in the MCMC chain? The problem of the burn-in phase would not arise as the sampler would initially still sample low probability regions more often than they would "deserve" by their posterior probabilities but it would not be anymore the problem of giving unduly high probability values to these.


Bernardo chooses a three-digit positive integer $N$ and writes both its base-5 and base-6 representations on a blackboard. Later LeRoy sees the two numbers Bernardo has written. Treating the two numbers as base-10 integers, he adds them to obtain an integer $S$. For example, if $N=749$, Bernardo writes the numbers 10,444 and 3,245, and LeRoy obtains the sum $S=13,689$. For how many choices of $N$ are the two rightmost digits of $S$, in order, the same as those of $2N$?  The first observation is that for the units digit to be the same between $S$ and $N$, we need $(N\bmod 5)+(N\bmod 6)\equiv 2N\pmod{10},$ so $N\equiv 0,1,2,3,4\pmod{30}.$ We can get this by parity or because $2N\bmod 10 = 2(N\bmod 5)$ and go from there. But now I'm not sure how to get the second digit, and I've been stuck for a while. How can I go on from here? I think something that can help is that we can write $N=30n+a$ and take mods, but I've made no real progress.

I am looking over , and I came across a solution containing this:  Problem Bernardo chooses a three-digit positive integer $N$ and writes both its base-5 and base-6 representations on a blackboard. Later LeRoy sees the two numbers Bernardo has written. Treating the two numbers as base-10 integers, he adds them to obtain an integer $S$. For example, if $N = 749$, Bernardo writes the numbers $10,\!444$ and $3,\!245$, and LeRoy obtains the sum $S = 13,\!689$. For how many choices of $N$ are the two rightmost digits of $S$, in order, the same as those of $2N$? $\textbf{(A)}\ 5 \qquad\textbf{(B)}\ 10 \qquad\textbf{(C)}\ 15 \qquad\textbf{(D)}\ 20 \qquad\textbf{(E)}\ 25$ Solution 1 First, we can examine the units digits of the number base 5 and base 6 and eliminate some possibilities. Say that $N \equiv a \pmod{6}$ also that $N \equiv b \pmod{5}$ Substituting these equations into the question and setting the units digits of $2N$ and $S$ equal to each other, it can be seen that $b < 5$ (because otherwise $a$ and $b$ will have different parities), and thus $a=b$. $N \equiv a \pmod{6}$, $N \equiv  a \pmod{5}$, $\implies N=a \pmod{30}$, $0 \le a \le 4$ Therefore, $N$ can be written as $30x+y$ and $2N$ can be written as $60x+2y$ Just keep in mind that $y$ can be one of five choices: $0, 1, 2, 3,$ or $4$, ; Also, we have already found which digits of $y$ will add up into the units digits of $2N$. Now, examine the tens digit, $x$ by using $\mod{25}$ and $\mod{36}$ to find the tens digit (units digits can be disregarded because $y=0,1,2,3,4$ will always work) Then we take $N=30x+y$ $\mod{25}$ and $\mod{36}$ to find the last two digits in the base $5$ and $6$ representation.[N \equiv 30x \pmod{36}][N \equiv 30x \equiv 5x \pmod{25}]Both of those must add up to[2N\equiv60x \pmod{100}] $N\equiv{30x\mod{36}}\\N\equiv{30x}\equiv{5x\mod{25}}$ Both of these must add up to $2N\equiv{60x\mod{100}}$ [...]  I'm not really sure which modular arithmetic rule to apply in the final three congruences, or where to start. How would I go about understand this?


How do I combine 5 pdf documents I created in Word and put in one pdf file? I have tried several things, none of which work.

Say I have some image files (for instance, the result of scanning some sheets) and I want to combine them into a single pdf file, each image on a different page. Is there a faster / more convenient way than converting each one to a pdf file and then combining those (say, as explained )? Or, if this is more or less how it is to be done, which is the most intelligent and less tedious possible way to do it?


Basically, I have a new laptop which needs a new driver. I have an Hp pavilion x360 [Pavilion x360 14-cd0520sa ] with the RealTek Wireless adapter and need the apt' driver for this. Any clues? I have posted a support request to HP as well, so I'll wait for that answer as well. Obvioulsy, as I can not get the laptop in question online, I can't post any log files [or at least, I don't know /how/ to post log files] but the issue is simple. Ubuntu 18.04lts [for which I have a bootable USB] just does not see the wireless adapter, so I need a new driver.  This is the manually typed output of the instructions below:      0: hci0: Bluetooth soft blocked: no hard blocked: no  1: acer-wireless: Wireless LAN soft blocked: yes hard blocked: no   Result of Wireless Info Script:

We just bought a Lenovo  (which is supposed to have the Intel 8265 for wireless). This laptop was bought in part because it is certified to run Ubuntu and as such to me at least it would make sense for things to work out of the box... but no such luck.  First, I installed Ubuntu 17.10 and after installation realised Wi-Fi was not working. I also tried Ubuntu 16.04 from a USB drive since that is the version of Ubuntu it is certified for, but no luck there either.  The wireless chip is not detected by lshw (or even lspci by the looks of it), ip link does not show a wireless interface, and the iwlwifi kernel module is not loaded at boot (I can load this myself using modprobe iwlwifi but this does not make Wi-Fi work). I think it is a combined Wi-Fi/Bluetooth chip, and Bluetooth does appear to work (or at least Bluetooth shows up in Gnome and rfkill list).  modinfo iwlwifi | grep 8265 shows me a file ending in -34 is supposedly loaded but only a file ending in -33 (and some other lower numbers) is present in /lib/firmware, if that helps).  I have also installed the Linux 4.14.9 kernel in an attempt to get things to work, but this did not resolve the issue either.  Further information  root@ThinkPad-E570:~# modinfo iwlwifi | grep 8265 firmware:       iwlwifi-8265-34.ucode root@ThinkPad-E570:~# rfkill list all 0: tpacpi_bluetooth_sw: Bluetooth     Soft blocked: no     Hard blocked: no 1: hci0: Bluetooth     Soft blocked: no     Hard blocked: no root@ThinkPad-E570:~# dmesg | grep iwl root@ThinkPad-E570:~# lspci -nnk | grep 0280 -A3 05:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd. Device [10ec:c821]     Subsystem: Lenovo Device [17aa:c024]   Update  I just noticed that the laptop does not have an Intel wireless chip at all, but in fact has a Realtek one... which means that the  of the shop I bought this laptop at were not accurate... Sigh. Same problem stands, however, just with a crappier wireless chip.


I have a question about how to interpret or use the result of an OLS regression w a log transformed DV. Due to non-normal distribution of the Dependent variable, I used a log10 transformation to coax it into normality. I'm looking at a state by state dataset, each row is a state IE N=51. Data are industry data.  EQ: Ylog10(market_size)= B0 +  Bx1(consumption) +  Bx2(price) +  Bx3(income) +  Bx4(govt intervention) +  Bx5(climate) +  Bx6(socioeconomic proxy).  Exact question:  With a non-transformed Y, I can get a state total by multiplying the value of each variable by its coefficient, and summing them for each state.   Because log transformed data are percentage change rather than raw number, can I do the same thing with the logged result?  If not, is there something else I can do with the logged coefficients to see where states rank in terms of their values for the variables above? If I multiply the value for each state datapoint by the coefficient and sum them, does it matter that they're percentage change and not raw numbers?  The ranking of states differs in a few noticeable ways if I use raw numbers vs logged results.  Any help would be very much appreciated. Thank you.  EDIT: Gung linked a thread I had previously read before asking my question, it is/was helpful but did not fully answer my question. I know that in an OLS regression with a log transformed DV with non-transformed IVs, the IV coefficients reflect percent changes in the DV.   Maybe an example is better:  Values for CA: consumption=50  price=10  income=12  govt intervention=2  climate=0  socioeconomic proxy=5  Non-transformed coefficients: consumption 1.3 price 3258 income 42 intervention 18 climate 1 socioecon 5968  Transformed coefficients: consumption 0.0 price 0.0005 income 0.04 intervention 0.00001 climate 1 socioecon .2  'Value' for CA non-transformed (50*1.3)+(10*3258)+(12*42)+(2*18)+(0*1)+(5*5968)=63205  'Value' for CA transformed (50*0.0)+(10*.0005)+(12*.04)+(2*.00001)+(0*1)+(5*.2)=1.48502  With the above example - are the two values for CA valid? Specifically, is the 2nd value with the log transformed data as valid as the non-transformed value?  Thank you again.

I'm wondering if it makes a difference in interpretation whether only the dependent, both the dependent and independent, or only the independent variables are log transformed.  Consider the case of  log(DV) = Intercept + B1*IV + Error    I can interpret the IV as the percent increase but how does this change when I have   log(DV) = Intercept + B1*log(IV) + Error   or when I have   DV = Intercept + B1*log(IV) + Error   ?


I'd just installed ubuntu 20.04 and after 1 day it's stuck at black screen after booting. An underscore is blinking on the top corner ... There are many solutions regarding ubuntu 16, 18 but I'm new in ubuntu 20 Is there any change?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


Difference between hard and hardly? Is hardly an adverb? [Duplicate]

I have always found the pronounced distinction in meaning between "studying hard" and "hardly studying" a bit amusing.   What is the origin of the word hardly?  How is it etymologically connected to the word hard?


I'm having a weird issue with a form, if a send any spanish character (á, é, í, ñ, etc...) in the form, it appears as a blank string in the $_POST array.  This is the form:  <form action="<?php echo site_url("home/register"); ?>" method="post">

             <input type="text" placeholder="Nombre" name="user[name]"  class="form-control"/>

             <input type="text" placeholder="Apellido" name="user[lastname]"  class="form-control"/>

             <input type="text" placeholder="E-Mail" name="user[email]" class="form-control"/>

             <input type="password" placeholder="Clave" name="user[password]"  class="form-control"/>

             <input type="password" placeholder="Confirmar Clave" name="user[password_confirmation]"  class="form-control"/>

             <input type="submit" value="Registrar" class="btn btn-primary"/>

 </form>   I already tried without the "user[]".  I have never had this problem before, i know about the enconding problems but just not sending the value is completely new for me.  I google a lot, but i think i'm making the wrong search because i cant find anything similar.  I'm using PHP 5.5.9, Apache 2.4.7 and using Codeigniter 2, i have worked with this config many times before and, again, never saw this problem before.  Here a test:  If i send the data without spanish characters, there is no problem:  array(1) {   ["user"]=>   array(5) {     ["name"]=>     string(4) "Jose"     ["lastname"]=>     string(5) "Lopez"     ["email"]=>     string(7) "t@t.com"     ["password"]=>     string(1) "a"     ["password_confirmation"]=>     string(1) "b"   } }   if i change, for example, Jose with José, i get:  array(1) {   ["user"]=>   array(5) {     ["name"]=>     string(0) ""     ["lastname"]=>     string(5) "Lopez"     ["email"]=>     string(7) "t@t.com"     ["password"]=>     string(1) "a"     ["password_confirmation"]=>     string(1) "b"   } }

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.


Im trying to create a program that allows me to change the the variables R,G,B in the Text class. Whenever I try to run the Applet, by clicking the "SubmitR" Button, it gives me a Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException.   public class Main extends JApplet { private ButtonHandlerR buttonHandlerR;     @Override public void start() {     super.start(); }   @Override public void init() {       this.setSize(750, 300);      setLayout(new BorderLayout());      add(new SetTextColour(), BorderLayout.NORTH);     add(new Text(),BorderLayout.CENTER);       }   }  public class SetTextColour extends JPanel {   private JLabel labelR; private JLabel labelG; private JLabel labelB;  public JTextField textR; public JTextField textG; public JTextField textB;  public JButton submitR; public JButton submitG; public JButton submitB;   public SetTextColour() {      labelR = new JLabel("RED: ");     labelG = new JLabel("GREEN: ");     labelB = new JLabel("BLUE: ");      textR = new JTextField(10);     textB = new JTextField(10);     textG = new JTextField(10);       add(textR, BorderLayout.NORTH);     submitR = new JButton("SubmitR");     add(submitR, BorderLayout.NORTH);      add(textB, BorderLayout.NORTH);      submitG = new JButton("SubmitG");     add(submitG, BorderLayout.NORTH);      add(textG, BorderLayout.NORTH);      submitB = new JButton("SubmitB");     add(submitB, BorderLayout.NORTH);      ButtonHandlerB BHB = new ButtonHandlerB();     ButtonHandlerG BHG = new ButtonHandlerG();     ButtonHandlerR BHR = new ButtonHandlerR(this);      submitB.addActionListener(BHB);     submitR.addActionListener(BHR);     submitG.addActionListener(BHG);   }   }  public class ButtonHandlerR implements ActionListener { private SetTextColour colour; private Text text;   ButtonHandlerR(Text change){     this.text = change;  }  ButtonHandlerR(SetTextColour set){     this.colour = set;  }       @Override public void actionPerformed(ActionEvent e) {      JButton Clicked = (JButton) e.getSource();     double tempV;     int tempV2;      if(colour.submitR == Clicked){         tempV = Double.parseDouble(colour.textR.getText());         tempV2 = (int) tempV;         text.R = tempV2;         System.out.println(text.R);         text.repaint();       }    }   }  public class Text extends JApplet { private String textField = "Welcome to CE203 Assignment 1 - Hassan Khan, 1404460";  public int R=50;  private int G=32;  private int B=54;  public void start(){  }      public void init(){     }  public void paint (Graphics g) {       Color customColor = new Color(R, G, B);      g.setColor(customColor);      g.drawString(textField, 125, 150);    }   }

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 purchasing a Ubuntu Server machine specified with a 480GB SSD. I am interpreting the said line as the root directory has a 195-ish GB in memory. I am confused!

I found a 6 GB IDE HDD in my basement. I want to plug it in and see what might be on it. The drive seems to be recognized in BIOS.   I can't find it in Ubuntu to view files, and Ubuntu is the only OS on that particular computer. I was wondering if Ubuntu has an equivalent to the Windows feature "My Computer", which lists all available drives/storage devices. Typically, My Computer shows C:, which can be opened to view all of your directories and files. At this point, it is very similar to Ubuntu's Home Folder.  How to view/select all available partitions of that drive or all available HDD's without formatting or tampering with the contents in any way?


Which one is correct and why?  A: I want a potato! B: We have no potatoes or we have no potato.

a) They have no child. b) They have no children.  Are both a) and b) correct? Though b) seems more common.


Suppose , that I have an object and I am describing how it works to other people. Which sentence of the below should I use? Why?   How does it work?  How it works?    Please give an explanation.

What is the difference between:        "How it works?"      and        "How does it work?"


Recently, a user 'called to arms' on chat to cast flags on potentially incorrect advise on Stack Overflow. As this incorrectness was seemingly correct, I flagged en mass, without giving it much thought (main reason was that I trusted the user. That trust has now evaporated. Trust comes on foot, but leaves by horse...).  However, after looking more carefully, most answers only needed a simple caveat to be fixed! (this has since been added).   After looking even more carefully, I noticed the factual inaccuracy was due to a generalization of the question by the same users calling to arms!  Clearly, I have been misled! Personally, I will be more critical of these 'calls to flag' in the future, but I hope I can shield others from making the same mistake!  All that ends well is well, and the answers now have the caveat and that makes them correct.  However, all the flaggin was completely unnecessary! Hence, a call of      Hey, I think these answers are incorrect, can someone fix them?   Would have been a lot better than     Hey, these answers are wrong. Go flag them!   This is an advice to be very cautious when 'subverting the system' in this manner!  Perhaps this needs implementation as policy or a mod tool, but I think being aware of the issue is a good start.  So, my main point is this:  Wouldn't it be better if people simply called for attention, instead of for flags? And if such requests of the 2nd nature are made, assume the first.     is related but not a dupe. That one talks about when to flag. This one talks about when to listen to people who ask you to flag.

I came across some scenarios like these:     Case 1: Obviously not true       Q: Why does the sun rise and fall every day?   A: Because the Earth .   A2: Because .     Case 2: Letting the OP do what is declared not to       Q: How can I charge my phone without a charger?   A: Try the USB ports on your computer.   A2: Go buy a charger.    Case 3: Attempt to joke (despite looking like a real answer)       Q: What's this round bird in bright red? [An image]   A: It may be a rare or mutated species of sparrow.   A2: It's a .   A3: It's an .    Should I flag A2/A3 as NAA in those cases?


I am working in some cardinal functions in topological spaces, and I need to either define a new cardinal function or use an existing one that behaves in the following way:  Lets say $\varphi$ is my desired cardinal function, and let $X$ be a topological space with $\varphi(X)=\kappa$ for some cardinal $\kappa$, I need that for every family of open sets $\mathcal{F}$ such that $|\mathcal{F}|\leq \kappa$ it holds that $$\bigcap_{U\in\mathcal{F}}U $$ is an open set.  I have been looking around and it seems like there is nothing that behaves this way, and yet I cannot come up with some cardinal function that makes this statement true; any help is appreciated, Thanks in advance.

Recall that in a topological space $X$, we say that a subset $A\subset X$ is a G$_\delta$-set if $A$ is the intersection of countably many open sets of $X$. Also, we say that $X$ is a  if G$_\delta$-sets are open.  Now, call as G$_\kappa$-set the intersection of $\kappa$ many open sets, where $\kappa\geq\aleph_0$ is a cardinal. I would like to know if there is some standard name for those spaces in which G$_\kappa$-sets are open, for a fixed cardinal $\kappa\geq \aleph_0.$  Motivation: this kind of space arose in my PhD thesis, but I do not know any references in which they appear. I'm temporary calling them as $P_\kappa$-spaces.


Let's $f:R\rightarrow R,~r\gt0.$ And we have that for every $x,y\in R\Rightarrow |f(x+y)-f(x)-f(y)|\le r.$ Prove that there are $h:R \rightarrow R$ additive and $g:R \rightarrow [-r,r]$ functions such that $$f(x)=g(x)+h(x).$$ I have no idea how I can approach this problem.

Let $G$ be an abelian group, and $\Phi:G\to \mathbb{R}$ is a function with the following property: $$\forall a,b\in G,~~ |\Phi(a+b)-\Phi(a)-\Phi(b)|<c$$  The problem asks to prove the existence of homomorphism, $\Phi^*$, where $\Phi^*:G\to\mathbb{R}$ and  $$\forall a\in G, |\Phi(a)-\Phi^*(a)|<c$$


Let $f\colon \mathbb R \to \mathbb R$ be a continuous function such that $\lim\limits_{x\to +\infty} f(x) = \lim\limits_{x\to -\infty} f(x) = +\infty$.  Prove that there exists $x_0$ in $\mathbb R$ such that $f(x_0) \le f(x)$, $\forall x \in \mathbb R$.

Let $f:\mathbb R\to\mathbb R$ continuous and $$\lim_{x\to-\infty }f(x)=\lim_{x\to\infty }f(x)=+\infty$$ then $f$ takes its minimum. This is a homework. My solution looks to simple, that's why I would like to have confirmation if it's correct or not.  My attempts  Let $a,b\in\mathbb R$, $a<b$. Let denote $M$ the maximum of $f$ on $[a,b]$. By definition of the limits, there is $N_1<a$ and $N_2>b$ such that $f(x)\geq M$ when $x<N_1$ and $x>N_2$. If $f(x)\geq M$ for all $x\in [N_1,N_2]$, then $M$ is the minimum. Otherwise, $f$ takes its minimum on $[N_1,N_2]$ (since $f$ is continuous on the compact $[N_1,N_2]$), and it's a global minimum.   Do you think it's correct ?


Let $\frac{1}{2} + 1 + \frac{9}{8}+1+\frac{25}{32}+\frac{36}{64}+\cdots$ be a series. I need to calculate its sum using $$\sum_{n=1}^{\infty}n^2x^n.$$ I was trying to set $x=\frac{1}{2}$, so: $$\sum_{n=1}^\infty n^2x^n=x\sum_{n=1}^\infty n^2x^{n-1}=x\sum_{n=1}^\infty (nx^n)'=x^2\sum_{n=1}^\infty (x^n)''.$$ Then I was differentiating separately: $$x^2\sum_{n=1}^\infty (x^n)'' = x^2\left(\frac{1}{1-x}\right)''=x^2\left(\frac{1}{(1-x)^2}\right)'=x^2\frac{2(1-x)}{(1-x)^4}=\frac{2x^2}{(1-x)^3}.$$ And finally calculate the sum: $$\frac{2 \cdot \frac{1}{4}}{\frac{1}{2}^3} = 4.$$ But I got the wrong answer. What did I miss? How do I solve it correctly?

It seems that I'm missing something about this.  First of all, the series is convergent: $\lim_{n\rightarrow\infty}\frac{2^{-n-1} (n+1)^2}{2^{-n} n^2}=\frac{1}{2}$ (ratio test)  What I tried to do is to find a limit of a partial sum $\lim_{n\rightarrow\infty}S_n$ as follows: $S_n=\frac{\frac{1}{6} n (n+1) (2 n+1)}{\frac{1-\left(\frac{1}{2}\right)^n}{2 \left(1-\frac{1}{2}\right)}}$. Still, the limit is $\infty$ and I'm clearly doing something wrong.


Files in my SSD get duplicated on my Desktop. When I delete any folder/file it gets automatically deleted from the second location (Home) and when I create a folder in any of the locations it gets created in both places.  Take this screenshot for reference:    I am running Ubuntu 19.04 LTS.

As of now, my desktop has begun showing the contents of my home folder (~) instead of the contents of ~/desktop. I must have changed something, but I have no idea what, or what I was doing exactly when it happened.  How do I re-point gnome to the right folder?  I'm running Ubuntu 11.04.


If I write this line in a story:     She said: when are you going?  Does the "when" have to be capitalized?  Also, if the "she said" part is not part of a conversation in a novel does the word after the colon have to be capitalized?  Additional info from OP's comment: I know English uses a comma after "said". I just use a colon for some avant-garde writing. What I am curious about is the capitalization of "when" if a colon is used in whatever context.

Should the first word after a colon be capitalized? Which of the following is correct?   For example: This. For example: this.


I have 5 Windows Server 2012 servers and around 100 computers in our domain.  Recently I noticed that the time on the servers and computers is around 30 seconds fast.  Where do servers and computers on the domain get their time settings from? Is that set on a domain controller or elsewhere (I have 2 domain controllers).  On a Linux server I would use  server 0.pool.ntp.org server 1.pool.ntp.org server 2.pool.ntp.org server 3.pool.ntp.org   to keep the time in sync but to be honest I've never ever had a problem with time on a Windows domain so I've never had to look at it.  Where would I set it so that all servers and computers automatically use {0-3}.pool.ntp.org (or whatever the recommended would be)?

Our Computers are out by a couple of minutes on the network. I have checked the registry on a computer and found that the type is NT5DS which I believe that it is getting the time from our Domain Server. Also in the registry under NtpServer it is stating time.windows.com.  I have searched around and found that w32tm may have something to do with changing the time.   I'm looking for the correct way of changing the time, but keep the NTP internal rather than get the time from an external source. Also my concerns are, will the computers on the network be OK after the time change, as I have heard that if the system is more than 5 mins out of the NTP it can stop things from working.


Long story short, I was caught up in the party life in my early 20's and my GPA was a 2.5 when I came back to school. Since returning to school I have done a 180 with straight A's for two of my last 3 semesters. From my current school, my GPA is a 3.5. I have yet to take the GRE but I know I will have strong letters of recommendations from professors and one offered to turn my research design for our final into an independent study with me the summer before I apply for Ph.D. programs. My question is will GPA reflect too poorly on me with a high GRE, strong letters of recommendation and research experience?

I have a master's degree in International Studies, and a double major with Computer Science from undergrad.  My transcripts suck.  There's no other way to dress it up.  I have pretty good teaching experience, and my GRE scores are awesome, and I suspect my recommendations are as bland as everyone else's.  Basically, to an admissions committee, I suspect I'm the model of a student who is probably smart enough but didn't work hard enough.  I want to do a Ph.D. in Political Science, but the response from my applications is looking pretty grim.  Am I permanently out of the running, or is there something I can do for the next few years which will help to counterbalance my unfavorable GPA?


Is it possible to change raster cell values individually or as a group?     Currently, I am digitizing around cells I want to change and then doing a polygon to raster conversion and then a merge to new raster.   I'm using ArcGIS 10.3 for Desktop.

I have a land cover classification derived from Landsat TM imagery - I created this classification using ENVI. I would like to edit individual and groups of cells in some areas of the classification in order to improve the accuracy of the output by comparing it with aerial imagery.  Is there a way, using ArcGIS Desktop, to manually edit large groups of cells by selecting them and assigning them to a new or existing class?   I am aware of merging methods based on class statistics, but the area I'm classifying has a high amount of spectral confusion due to thin cloud cover - it seems like a manual edit is the only way to go.


I want to combine a multiple row and a column table in LaTeX format yet I'm not able to do.  Here is what I want in latex template.    Can anyone help me with this? Thank you.

When combining multirow and multicolumn in the same cell of a table I am getting extra vertical lines:  \documentclass[plain]{article} \usepackage{multirow} \pagestyle{empty}  \begin{document}  \begin{tabular}{|l|l|l|l|}\hline   \multirow{10}{*}{numeric literals} & \multirow{5}{*}{integers} & in decimal & \verb|8743| \\ \cline{3-4}   & & \multirow{2}{*}{in octal} & \verb|0o7464| \\ \cline{4-4}   & & & \verb|0O103| \\ \cline{3-4}   & & \multirow{2}{*}{in hexadecimal} & \verb|0x5A0FF| \\ \cline{4-4}   & & & \verb|0xE0F2| \\ \cline{2-4}   & \multirow{5}{*}{fractionals} & \multirow{5}{*}{in decimal} & \verb|140.58| \\ \cline{4-4}   & & & \verb|8.04e7| \\ \cline{4-4}   & & & \verb|0.347E+12| \\ \cline{4-4}   & & & \verb|5.47E-12| \\ \cline{4-4}   & & & \verb|47e22| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{3}{*}{char literals}} & \verb|'H'| \\ \cline{4-4}   & & & \verb|'\n'| \\ \cline{4-4}   & & & \verb|'\x65'| \\ \cline{1-4}   \multicolumn{3}{|l|}{\multirow{2}{*}{string literals}} & \verb|"bom dia"| \\ \cline{4-4}   & & & \verb|"ouro preto\nmg"| \\ \cline{1-4} \end{tabular}  \end{document}     Notice the vertical lines in the char literals and string literals cells (which should span three columns). How can they be avoided?


Here is an excerpt from Steve Job's speech:     On the back cover of their final issue was a  photograph of an early morning country road, the kind __ you might find yourself walking along if you wanted to see the world.   I'm just wondering what words could be possibly omitted between "the kind" and "you might find..."  Is that a relative adverb, "where"? or a relative pronoun "which/that"? - the kind of road where you might find yourself walking along? OR - the kind of road that/which you might find yourself walking along?  I know that the omitted words are not necessary to understand the sentence, but it's just out of curiosity...

He will understand that I was not joking.   He will understand I was not joking.  Which of the sentences is correct? Are there any specific rules about the use of "that" in the sentences I reported as example?


The badge description for Populist is described as:     Highest scoring answer that outscored an accepted answer with score of more than 10 by more than 2x   I recently asked a question over on SFF and shortly afterwards found the answer myself and so answered my own question. A while later another answer was posted that came from a different source and was in my opinion better. As such at the time of writing my answer is +30 and the other is +14 and accepted. This would seem to qualify me for Populist but it has yet to come through (I know there is usually a delay with some badges).  Can I be awarded the Populist badge for an answer to my own question?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


The  find command  find /MOS -name "001.txt"   The print      /MOS/XNF/N01/001.txt   My questions  Which option could only print the filepath,without the filename ?  The print       /MOS/XNF/N01/

Please check the below  awk '/SOURCE/ {print $3}' /MAC/Delete_Name.txt |      while IFS= read -r file; do find /OS/ -iname "$file.pdf" ; done    This results in output like this:  /OS/001DAY/11file/cooke.pdf   We want it to only print the file's path, like this:    /OS/001DAY/11file/


I want to set a camera so what the camera sees is exactly what I see in the viewport.  I know that Ctrl+Alt+Numpad0 will move the camera to my 3D Viewport location, but it also severely crops the sides and sometimes does not show all geometry.  3D Viewport:    Camera view after pressing Ctrl+Alt+Numpad0:    Hitting Ctrl+Alt+Numpad0 crops the camera view, zooms out, and clips off the plane in the background.  How do I make it so that hitting Ctrl+Alt+Numpad0 actually sets the camera view to the 3D Viewport view, without distorting it, clipping geometry, or otherwise altering the view?

Pressing Ctrl Alt NumPad 0 causes the camera to teleport over and align itself to the current view in the 3D viewport. However, it usually takes up only a small portion of the view, meaning that you have to move the camera back to fit the same view you had before. Is there a way to set the camera view to fill more of the 3D viewport when using this feature?


ArXiv requires submission of .bbl instead of .bib. What is .bbl and how is it used with .tex files?

I want to use a .bib file in a conference .tex file where they precise that we should use a bibliography generated by BibTeX as a .bbl file:         \bibliographystyle{IEEEtran} % argument is your BibTeX string definitions and bibliography       %database(s) \bibliography{IEEEabrv,../bib/paper}   When I use directly:   \bibliography{refs} %refs is my refs.bib   I get an error.   Must I convert the .bib to a .bbl? If yes, how?


I have a homework question and I don't know how to approach this exercise.  The exercise is the following:     Let's suppose $G$ is a set with binary function * defined for its members, which is:         closings;   associative;   there's $e\in G$, so that $a\star e=a$ where $a\in G$;   for each $a\in G$, there's a $b\in G$ so that $a\star b=e$.         Prove that $G$ is a group.   I have no Idea how  approach this exercise.  pay attention that 3,4 are Noncommutative.

Let $(G, *)$ be a semi-group. Suppose   $ \exists e \in G$ such that $\forall a \in G,\  ae = a$;  $\forall a \in G, \exists a^{-1} \in G$ such that $aa^{-1} = e$.    How can we prove that $(G,*)$ is a group?


My code for presenting results looks like this:      private void presentResult(List<Long> result) {     if(result.size() == 0) {         System.out.println("No matching values for the provided query.");     }            for(String s : result) {         System.out.println(s);     } }   But I want to return a hashmap instead of a list so I want it to be like this:      private void presentResult(Map<LocalDate, Long> result) {     if(result.size() == 0) {         System.out.println("No matching values for the provided query.");     }            for(Map<LocalDate, Long> s : result) {         System.out.println(s);     } }   But then I get this error: "Can only iterate over an array or an instance of java.lang.Iterable" How can it be solved?

If I have an object implementing the Map interface in Java and I wish to iterate over every pair contained within it,  what is the most efficient way of going through the map?  Will the ordering of elements depend on the specific map implementation that I have for the interface?


I want to write a script that add a cron job to my crontab but without user intervention like editing a file using crontab -e. Is there a way to programatically manipulate the cron jobs from command line? Any suggestion on how to do that? Thanks in advance.

Is there a way to add lines to a user's cron via script?  I usually do it using crontab -e, but I would like to automate this task with a shell script.


I have created a servlet that gets credentials from a .jsp file (works). The servlet connects to the DB, gets the data and forwards it to another .jsp file (works).  Getting the data and displaying it is happening in one function getLaneInfo().  Now I have implemented a DBListener which executes getLaneInfo() every time the data in the DB changes (doesn't work). getLaneInfo() is called first when the connection has been established and it works fine. But I get a NullPointerException when the DBListener wants to execute it. The exception is thrown when I want to access the variable request (HttpServletRequest).  I'm forwarding the data like this:  request.setAttribute("Info", infoList); request.getRequestDispatcher("WEB-INF/show.jsp").forward(request, response);   This is the exception that I get:  java.lang.NullPointerException at org.apache.catalina.connector.Request.setAttribute(Request.java:1509) at org.apache.catalina.connector.RequestFacade.setAttribute(RequestFacade.java:503) at banner.Index.getLaneInfo(Index.java:237) at banner.Index$1.onDatabaseChangeNotification(Index.java:122) at oracle.jdbc.driver.NTFRegistration.notify(NTFRegistration.java:208) at oracle.jdbc.driver.NTFConnection.unmarshalNSDataPacket(NTFConnection.java:582) at oracle.jdbc.driver.NTFConnection.unmarshalOneNSPacket(NTFConnection.java:405) at oracle.jdbc.driver.NTFConnection.run(NTFConnection.java:182)   Any ideas?

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 want to create a class that has a variable, that this variable can be modified and obtained from other activities and this varable always be saved.  I've tried to do this class with the variable "TipoAnuncio":  public class Filter_Object  {     private String TipoAnuncio ="Perdidos";      public String getTipoAnuncio(){         return TipoAnuncio;     }     public void setTipoAnuncio(String TipoAnuncio){         this.TipoAnuncio = TipoAnuncio;     } }   And i've tried to get and to set this variable from other Activities, for example:  public class FilterActivity extends AppCompatActivity {      private Filter_Object filter; protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         setContentView(R.layout.activity_filter);           Log.i("anuncioahora", filter.getTipoAnuncio()); } }   An error appears which says :java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.julianrc1.petracecitm/com.example.julianrc1.petracecitm.fragments.Intents.FilterActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String com.example.julianrc1.petracecitm.Objects.Filter_Object.getTipoAnuncio()' on a null object reference  Thanks for your help :)


The last question that was asked about this was in 2013. While looking at the question the site I found that it was pretty outdated. Yahoo has recently made some changes where I cannot go to Yahoo without a phone number. I would like to know is there any way that I can pass this or join Yahoo without one? I want to make a new more professional account.

I'd like to create a Yahoo! account. The signup page won't let me proceed without entering a cell phone number, and it won't recognize my Google Voice number as a valid cell phone number. Is there a workaround to be able to create a Yahoo! account without having a cell phone that can receive SMS messages?


Good Morning English experts!  I'm confused about using the salutations such as above. I know 'Good Morning' should be used before noon, and then 'Good Afternoon', and 'Good Day' is considered obsolete, but what more formal greeting to use in e-mails?  'Hi' is commonly accepted in not fully-formal e-mails, but when I write e-mail to help support, I don't think that 'Hi Help Support' is appropriate. 'Dear Help Support' sounds strange for me (Dear Human Being Which Name I Don't Even Know). I'd like to use something like 'Good Morning', but...  Well, I usually write e-mails in the evening so I could use 'Good Evening', but I don't know when the mail would be read. Probably early morning, but I can't be sure.  So, what of 'Good Something' greeting forms is the most acceptable in such e-mails? Or is there some similar alternative?

How do you greet multiple recipients in an e-mail?  Assuming they're both male, I just use "Sirs", but it seems a bit informal.


I'm completely confused when it comes to the combinations with over / down / out:     Thank you for coming over / - coming down / - coming out.      Come over here / - down here / - out here.      Over there / Down there / Out there.   How do I decide which one and when to use?

I am travelling geographically down the country from north of the city of London. Do I state "I am travelling down to London" or do I state "I am travelling up to London" in reference to its capital city status?


I am using ubuntu 16.04 in dual boot with windows 10.     This is how my disk profile in Gparted looks like, how should I use those unallocated 300 GB (or some of it) to extend my ubuntu ext4 partition, what procedure should I follow?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


I have just burned an .iso onto a usb drive, and i suspect something has gone wrong as it won't boot, so i want to wipe it and try again, but it won't let me remove files. When I use fdisk -l I get:  Disk /dev/sda: 119.2 GiB, 128035676160 bytes, 250069680 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0xd9dca955  Device     Boot     Start       End   Sectors   Size Id Type /dev/sda1  *         2048 233469951 233467904 111.3G 83 Linux /dev/sda2       233471998 250068991  16596994   7.9G  5 Extended /dev/sda5       233472000 250068991  16596992   7.9G 82 Linux swap / Solaris   Disk /dev/sdb: 14.3 GiB, 15376000000 bytes, 30031250 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes   But under /dev/sdb there used to be a devices section like with /dev/sda, I'm assuming its to do with that. How do I get that back?

I have a MicroSD card in a USB adapter (which plugs into a USB port on my machine, and acts like a USB flash drive). I was using Unetbootin to make this a bootable USB flash drive with Kubuntu. But I needed to cancel while it was working. So I killed the Unetbootin process from the console.  Since then, I can't format the MicroSD or delete the folder that Kubuntu made. I have also tried mkdosfs, with no success. I can't mount the drive anymore either? What can I do to make this drive usable again?  Trying to create a new partition table in GParted, as described in Eliah Kagan's answer, does not work. It fails with the error message "imposible crear tabla de particiones" ("unable to create a partition table").


I have a html context that has usernames, mails and passwords in plain text format. There are two line breaks between information groups.  nickname mail@example.com pass   nickname2 mail2@example.com pass2   I want to get all mails with a comma seperator and set them to a big string variable.  I tried many regexes but could not resolve the problem. Any suggestion to find the true regex will be appreciated.

Over the years I have slowly developed a  that validates MOST email addresses correctly, assuming they don't use an IP address as the server part.  I use it in several PHP programs, and it works most of the time.  However, from time to time I get contacted by someone that is having trouble with a site that uses it, and I end up having to make some adjustment (most recently I realized that I wasn't allowing 4-character TLDs).  What is the best regular expression you have or have seen for validating emails?  I've seen several solutions that use functions that use several shorter expressions, but I'd rather have one long complex expression in a simple function instead of several short expression in a more complex function.


If you draw the "Take a trip to King's Cross Station" Chance card, do you move your piece forwards or backwards?  The logical answer might be forwards because most Monopoly Chance cards say "advance".  However, in the case of this card, it says "If you pass go"; you would always pass go when moving forwards from a Chance space to King's Cross, so what’s the use of the word "if"?  Note: This is London Edition Monopoly; this space and card are the equivalent of Reading Railroad and the "Take a ride on the Reading" Chance card in standard edition.

In the American edition of Monopoly, there is a Chance card that says:  Advance token to nearest railroad Pay owner twice the rental to which he/she is entitled. If railroad is unowned, you may buy it from the bank.   However, is this the closest railroad, or the next one? If you are standing on the Chance spot in the light blues, do you go all around the board to Reading, which is the closest to you, or do you go to Pennsylvania, which is the first one you land on?


I am trying to have this paper in my bibliography   I export the BibTeX file and put it in my .bib. But it is shown like this:     FROM Ga(As[sub 1 - x]P[sub x])    instead of proper chemical formula with subscripts. I use the ieeetran style. Is there a way to fix this?

I am writing a PhD thesis using LaTeX. Every thing is going fine, but I have problem with the output of the mathematical symbols in the references lists. I copy one example from the Pdf file to make it clear for you. You can see that the fraction remains the same.      [1] Mezzacapo, F. and Cirac, J. I. (2010) Ground-state properties of   the spin-\frac{1}{2} antiferromagnetic Heisenberg model on the   triangular lattice: a variational study based on entangled-plaquette   states. New. J. Phys., 12,   103039.   You can see below the all the packages I use:  \documentclass[12pt,PhD,twoside,a4paper]{GB_muthesis}%[10pt,PhD, singlespace] \usepackage[pdftex]{graphicx} \usepackage[bookmarks=true,colorlinks=true,linkcolor=blue, urlcolor=blue,citecolor=blue]{hyperref} \usepackage[numbers,comma, sort&compress]{natbib} \usepackage{amsmath} \usepackage{amssymb} \usepackage{mathtools} \usepackage{rotating} %\usepackage{GE_manthesis} \usepackage{GB_thesis} \usepackage{bm} \usepackage{fmtcount} \usepackage{setspace} \usepackage{chapterbib} \usepackage{subfigure}% allow subfigures \usepackage{amsfonts} \usepackage{url, enumitem} \usepackage{lscape} \usepackage{notoccite}%This package is for ingnoring the citation in the caption of the figures and tables. \begin{document}


public static void main(String[] args) {     Integer i = new Integer(4);     System.out.println(i.toString());     if (i.toString() == i.toString()) {         System.out.println("true how");     } else {         System.out.println("false how");     }  }   While executing above code, I am getting output as "false how".  Can you explain how Jvm treats this object?

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?


Thinking of time as the dimension orthogonal to depth, it seems logical that the rate at which a body moves through time could vary.  Do units exist for rate of movement through time?  The numerator seems clear (e.g. seconds), but what could the denominator be?

When we measure the speed of a moving element we do it with the help of a reference frame. Now if we need to measure the speed of time, is it possible? Does time actually have a speed?


I am a noob.  My app developer wants me to send him my scans with UVs mapped out.  I have only basic UV knowledge.  I can unwrap, add a texture and save the files okay.  But he wants me to export FBX files with separate .map files I think.  I cannot understand his output instructions.  I do not know where these "output" settings are in Blender. here is the menu that I cant locate:

I have been experiencing an issue that once I have a material created and looking the way I want it, I cannot seem to export it correctly with the textures mixed.  I don't know the correct words to use, but in blender I have the material created using the nodes editor, and I have placed two textures inside of there (one for the rock texture and one for moss, my object is a rock). When I export this model and import to Unity (the game engine I am using), I find a materials folder but the material inside of it does not have the textures assigned, it's just a plain white material?  How can I export my material from blender in a way that it will allow me to import it WITH TEXTURES into Unity?