Before you mark it as duplicate, please note that I had a look at the thread about null pointer exception we have on stackoverflow. Unfortunately, I have not managed to solve the problem and I would be grateful if someone could point me in right direction, since I am stuck for quite a while now.  I am getting an error      java.lang.NullPointerException at   sample.LoginWindow.setBtnLogin(LoginWindow.java:39)) point at the   following line preparedStatement.setString(1, txtUserName.getText()   I have class DBUtilities which holds my database connection and some closing methods:   public class DBUtilities {     // Getting connection to the database.     public static Connection getConnection() throws SQLException {         String url = "jdbc:mysql://localhost:3306/studentmanagementdb";         String user = "admin";         String pass = "administrator";         Connection connection = DriverManager.getConnection(url, user, pass);         return connection;     }     // Close prepared statement.     public static void closePreparedStatement(PreparedStatement pStmt) {         try {             if(pStmt != null) {                 pStmt.close();             }         }catch(SQLException sExepction) {             showErrorMsg("SQL Database Error:", "Prepared Statement could not be closed.");         }     }     // Close result set.     public static void closeResultSet(ResultSet resSet) {         try {             if (resSet != null){                 resSet.close();             }         }catch (SQLException sException) {             showErrorMsg("SQL Database Error:", "Result Set could not be closed.");         }     }     public static void closeConnection(Connection connect) {         try {             if(connect != null) {                 connect.close();             }         }catch (SQLException sException) {             showErrorMsg("SQL Database Error:", "Database Connection could not be close.");         }     }     // Shows error message.     public static void showErrorMsg(String title, String msg) {         Platform.runLater(() -> {             Alert alert = new Alert(Alert.AlertType.ERROR);             alert.setTitle(title);             alert.setHeaderText(msg);             alert.setWidth(200);             alert.setHeight(200);             alert.showAndWait();         });     } }   Class which uses the connection:  public class LoginWindow implements Initializable{      @FXML     private TextField txtUserName;     @FXML     private PasswordField txtPassword;     @FXML     private Button btnLogin;      Connection connection = null;     PreparedStatement preparedStatement = null;     ResultSet resultSet = null;     DBUtilities dbUtil =  new DBUtilities();        // Setting the login button.     @FXML     private void setBtnLogin(ActionEvent event) {          try {             connection = dbUtil.getConnection();             String sqlQuery = "SELECT * FROM 'User_Login_Details' WHERE 'User_Name' = ? AND 'User_Password' = ?";             connection.prepareStatement(sqlQuery);             preparedStatement.setString(1, txtUserName.getText());             preparedStatement.setString(2, txtPassword.getText());             resultSet = preparedStatement.executeQuery();          }catch (Exception exception) {             //dbUtilities.showErrorMsg("Database Connection Error:", "Could not connect to the database.");             exception.printStackTrace();         }finally {             dbUtil.closePreparedStatement(preparedStatement);             dbUtil.closeResultSet(resultSet);             dbUtil.closeConnection(connection);         }     }     @Override     public void initialize(URL location, ResourceBundle resources) {         btnLogin.setOnAction(this::setBtnLogin);     } }

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


Is it possible to say "it was a pleasure meeting you" after the phone call? Or should we better say ""it was a pleasure to talk to you"?

Is it acceptable English to use the verb meet in the context of a phone call or a video conference?   To provide a bit of background, I am writing an email to a business associate overseas. There is little chance of an actual face-to-face meeting taking place anytime soon, however a phone call or a video conference would obviously work fine.  I don't want to be the one to suggest a method of communication, but would rather let the business associate decide in what way would they prefer to conduct the conversation. For this reason, I was thinking of using a neutral verb, e.g. meet. Can I use a phrase such as "I hope we can meet to discuss topic X in the near future" in the context of a phone call or a video conference?  Intuitively, I would say that this sounds a little awkward. Nevertheless, given the fact that phone conference calls are often referred to as meetings, I was thinking that this sort of usage of the word might be acceptable after all. What do you think?


I'm new to Linux and Ubuntu so I'm still learning many of the features it has to offer. Today I installed OBS and a icon theme (shadow-icons) and when I run sudo apt-get update I get these errors.  W: The repository 'http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. W: The repository 'http://ppa.launchpad.net/upubuntu-com/icons/ubuntu xenial Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://ppa.launchpad.net/kirillshkrogalev/ffmpeg-next/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Failed to fetch http://ppa.launchpad.net/upubuntu-com/icons/ubuntu/dists/xenial/main/binary-amd64/Packages  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.   I've looked all over the web for a solution and can't seem to find one. Only thing I could locate remotely close was commenting out   # deb cdrom:[Ubuntu 16.04.3 LTS _Xenial Xerus_ - Release amd64 (201708$   but alas this helps none and was already commented out before hand. Any help would be appreciated for a solution to this issue. Thanks!

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


i am not sure the best way to go about this. here is the problem. i have a menu (list items) that has an irregular pattern of display. i cant alter the html directly as it is being spit out of a cms. i would like it so that if a word in an array matches a word in the link then that word has a span wrapped around it. this is that code simplified:
About My Store

Find Locations
   result i want is this:
About My Store

Find Locations
   i can find the first word(s) doing this:        $(function() {     $.fn.wrapStart = function (numWords) {     var node = this.contents().filter(function () { return this.nodeType == 3 }).first(),         text = node.text(),         first = text.split(" ", numWords).join(" ");      if (!node.length)         return;      node[0].nodeValue = text.slice(first.length);     node.before('' + first + ''); };   $("li.item1 a").wrapStart(1);   however, what i would like to do is look through an array list and wrap those specific words that i want  in whatever position they occur.  the array would be like about, store, faq...  the script would look for those words and wrap them...  not really sure how to go about this. if its easier. since the big words only occur either at the beginning or the end but not in middle... i could have another function that looks for the last word(s).  there are only 5 menu  items (wont change) and the words will never change, which is why i thought of just using an array...  here is the output i get of the plugin use:

   About   my store

I basically need to highlight a particular word in a block of text. For example, pretend I wanted to highlight the word "dolor" in this text:
     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

     Quisque bibendum sem ut lacus. Integer dolor ullamcorper libero.     Aliquam rhoncus eros at augue. Suspendisse vitae mauris.
  How do I convert the above to something like this:
     Lorem ipsum dolor sit amet, consectetuer adipiscing elit.

     Quisque bibendum sem ut lacus. Integer dolor ullamcorper     libero. Aliquam rhoncus eros at augue. Suspendisse vitae mauris.
  Is this possible with jQuery? Edit: As  , this is quite possible without jQuery - but I was hoping there might be a special method of jQuery which would let you do selectors on the text itself. I'm already using jQuery heavily on this site, so keeping everything wrapped up in jQuery would make things perhaps a bit more tidy.


I have dependent variable ( Y) is in continuous.  My independent variables ( X1 , X2 , X3, X4,  X5, X6, X7, X8) are in continuous.  And independent variables ( X9 , X10 ) are categorical variables.   In X9, there have 3 levels ( TV , News Paper , Radio )  In X10 there have 2 levels ( High Addicted , Low Addicted).  So, How can I work with this kind of data in multiple regression analysis?

I have a data having 2 continuous and 4 categorical variables. Each categorical variable has 3 levels. I want to know how to include the variables  in the model. I am using SPSS  Variables:   Sales - Dependent Variable Retail Price Location : TX, CA, PY Display Location in Store : DL1, DL2, DL3 Price Point : 2.5, 4.5, 1.0   I have created 9 dummy variables. 3 for Location, 3 for Display Location in Store and 3 for Price Point.  I am confused on how to use these independent variables. How to add the independent variables into the models. Should I add all the nine dummy variables or two dummy variables of each categorical variables along with Retail Price.  I searched on net but , did not get any solution. I would appreciate any kind of help.  Thanks in advance.


How to find $\left|\operatorname{Aut}(\mathbb Z_2\times\mathbb Z_2)\right|=?$  Since $\mathbb Z_2\times\mathbb Z_2$ has 4 elements, $1 \leq \left|\operatorname{Aut}(\mathbb Z_2\times\mathbb Z_2)\right|\leq \left|S_4\right|$.  How to proceed further?  Thanks in advance...

I'm currently working my way through Harvard's online abstract algebra lectures (if you're interested, you can find them ).  The lectures come complete with notes and homework problems.  Of course, since I don't actually go to Harvard, I can't hand in the homework assignments to find out if I'm doing them correctly.  So I've decided to try to crowd source the grading of my solutions.  I'll post individual questions as I finish them and wait for comments.  I would like to get critiques of not just my reasoning but the style of my write ups as well.  Also, any alternative approaches to the problem would be welcome.  I've looked for forums dedicated to these kinds of OCW courses but have not been able to find any.  This surprises me.  It seems like, with the advent of these free online educational resources, an online meeting place for those who take advantage of them would be a natural offshoot.  So this might be a bit of an experiment.  Unless I'm the 873rd person to post something like this here.  If that's the case, sorry for being so long winded.  Anyway, on with the question.  This one is assigned in the 4th lecture.     Let $V$ denote the Klein 4-group.  Show that $\operatorname{Aut}(V)$ is isomorphic to $S_3$.   (I've moved my solution below to keep this question from showing up in the unanswered list.)  Thanks...


how would i get the File extension of the file in a variable? like if I have a file as 1.txt I need the txt part of it.

See code:   var file1 = "50.xsl"; var file2 = "30.doc"; getFileExtension(file1); //returns xsl getFileExtension(file2); //returns doc  function getFileExtension(filename) {     /*TODO*/ }


When I run software updater I get     The Package system is broken   Check if you are using third party repositories. If so disable them, since they are a common source of problems.   Furthermore run the following command in a Terminal: apt-get install -f   That command entry returns with  $ apt-get install -f E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?

I get this error whenever I try to install programs using the terminal:  home@ubuntu:~$ apt-get install myunity E: Could not open lock file /var/lib/dpkg/lock - open (13: Permission denied) E: Unable to lock the administration directory (/var/lib/dpkg/), are you root?   Also I'm unable to install updates using the terminal.


My wordpress blog has encountered this issue about a week ago. Before that nothing was wrong with it. I got suspicious on web host provider, but they said many times that rewrite engine is on and it works properly.  I ported all source code to my localhost and I have the same issue again. I cannot go to admin section, blogs, etc.    I've read many posts here, but unfortunately gained no success!    What has happened to my blog?    <IfModule mod_rewrite.c>  RewriteEngine On  .  .  . </IfModule>     EDIT 1:    RewriteEngine on     RewriteRule ^/vorood/?$ /wp-login.php [QSA,L]              Order allow,deny         Deny from all                   Order allow,deny         Deny from all                   Order allow,deny         Deny from all                   Order allow,deny         Deny from all                   Order allow,deny         Deny from all       # Rules to disable directory browsing Options -Indexes  <IfModule mod_rewrite.c>     RewriteEngine On      # Rules to protect wp-includes     RewriteRule ^wp-admin/includes/ - [F]     RewriteRule !^wp-includes/ - [S=3]     RewriteCond %{SCRIPT_FILENAME} !^(.*)wp-includes/ms-files.php     RewriteRule ^wp-includes/[^/]+\.php$ - [F]     RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F]     RewriteRule ^wp-includes/theme-compat/ - [F]      # Rules to prevent php execution in uploads     RewriteRule ^(.*)/uploads/(.*).php(.?) - [F]      # Rules to block unneeded HTTP methods     RewriteCond %{REQUEST_METHOD} ^(TRACE|DELETE|TRACK) [NC]     RewriteRule ^(.*)$ - [F]      # Rules to block suspicious URIs     RewriteCond %{QUERY_STRING} \.\.\/ [NC,OR]     RewriteCond %{QUERY_STRING} ^.*\.(bash|git|hg|log|svn|swp|cvs) [NC,OR]     RewriteCond %{QUERY_STRING} etc/passwd [NC,OR]     RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]     RewriteCond %{QUERY_STRING} ftp\:  [NC,OR]     RewriteCond %{QUERY_STRING} http\:  [NC,OR]     RewriteCond %{QUERY_STRING} https\:  [NC,OR]     RewriteCond %{QUERY_STRING} (\<|%3C).*script.*(\>|%3E) [NC,OR]     RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [NC,OR]     RewriteCond %{QUERY_STRING} base64_encode.*\(.*\) [NC,OR]     RewriteCond %{QUERY_STRING} ^.*(\[|\]|\(|\)|<|>|ê|"|;|\?|\*|=$).* [NC,OR]     RewriteCond %{QUERY_STRING} ^.*(&#x22;|&#x27;|&#x3C;|&#x3E;|&#x5C;|&#x7B;|&#x7C;).* [NC,OR]     RewriteCond %{QUERY_STRING} ^.*(%24&x).* [NC,OR]     RewriteCond %{QUERY_STRING} ^.*(127\.0).* [NC,OR]     RewriteCond %{QUERY_STRING} ^.*(globals|encode|localhost|loopback).* [NC,OR]     RewriteCond %{QUERY_STRING} ^.*(request|concat|insert|union|declare).* [NC]     RewriteCond %{QUERY_STRING} !^loggedout=true     RewriteCond %{QUERY_STRING} !^action=rp     RewriteCond %{HTTP_COOKIE} !^.*wordpress_logged_in_.*$     RewriteCond %{HTTP_REFERER} !^http://maps\.googleapis\.com(.*)$     RewriteRule ^(.*)$ - [F]      # Rules to help reduce spam     RewriteCond %{REQUEST_METHOD} POST     RewriteCond %{REQUEST_URI} ^(.*)wp-comments-post\.php*     RewriteCond %{HTTP_REFERER} !^(.*)mywebsite.com.*      RewriteCond %{HTTP_REFERER} !^http://jetpack\.wordpress\.com/jetpack-comment/ [OR]     RewriteCond %{HTTP_USER_AGENT} ^$     RewriteRule ^(.*)$ - [F] </IfModule>     Let's consider that rewrite engine is not enabled in the host provider. I got the same result in my localhost. In localhost I have several other projects that use rewrite rules extensively. In wordpress I get 404 Not Found

My WordPress site is returning a 404 not found error on any page apart from the homepage and /wp-admin. I have no absolutely no idea why this is. My Permalinks are set up to use /year/month/date/post-title/ (e.g www.domain.com/2014/04/28/sample-post/). When I change the permalinks to the default (?p=123) it works fine, but not on any of the other ones.  Here is the contents of the .htaccess file:  <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule>   I have also installed the plugin 'Debug This', which provides details on the Rewrite Rules. However because it's a pretty big list and unformatted it would look quite bad, I've put it in a jsfiddle, here:   I think that's all the details I have, I've disabled all plugins and stuff like that. Thanks for any help.  EDIT: ok so I've since discovered a bit more info. I also forgot to say that the host for the site is Heroku (I'm building for a client and for some reason he's insisting I use Heroku, which is bad choice for WP I know but I can't persuade him otherwise so that's life). I recently installed , which also installed Nginx. So I'm assuming that's whats broken my Permalinks. I then found , which seems to be about the issue I'm having, which links to this page on the Nginx Documentation. Problem is I've never used Nginx before so I don't know where to put all the code it's got in the first section entitled Abridged Basic Setup. Can someone help me out? Thank you :)


I remember reading this story many years back, and I vaguely started to recall it the past few weeks.  Here is the image that jump-started the recall process—    But for the life of me, I can't recall much else than what I've written below. It's starting to get on my nerves now, halp!   The story is set in the future, but the story describes space-war as if it was written a few decades back, so think more like Star Wars/Star Trek style writing rather than, say, Avengers/Guardians of the Galaxy. (I know I'm using movie analogies to describe a book, sorry, they are the best examples.) Protagonist is a run-of-the-mill soldier. (I think) Humans are at war with aliens, quite a prolonged war. (I think) He is suddenly thrown into an arena, where is made to fight aliens, one-on-one. Arena doesn't mean a colossuem-style building, its more like a empty grassland/marshy patch of land. Aliens also aren't like your typical little-green-men(this I'm quite sure of). I think they were different, maybe invertebrates the size of a large dog(But this could also be the image biasing my memory.) He begins with nothing but minimal clothing, and starts using sticks, stones and other things he finds around. I also think he fashions a sort of knife. He ultimately prevails. Finds himself back with his squad, and humans ready for their last stand, in an all-out face-off in space. Human ship fires first salvo, and hits one alien ship. But this blast jumps from ship-to-ship, destroying all alien ships. Protagonist realises he is the cause of the human victory, but I think he decides not to disclose it.   That's it. That's all I can remember. Anyone else remember reading anything like this?

From a collection of short stories I read at least 30 years ago. :/  This is going to be incredibly vague, so apologies in advance.  A human and alien (blob/octopus-like...I think) from warring races are captured by an unidentified higher intelligence and put in an enclosure (more like a zoo habitat rather than a prison cell). They are separated by an invisible barrier and can see each other.  I think they were both trying to escape or trying to figure out how they could kill the other first. There was a bulldozer/loader type vehicle they could use at one point to build a shelter (or something).  I believe they were crafting makeshift weapons as well. There was no communication between the two as far as I remember.  The main tension in the story seemed to be was the race to get to the other first.  This has been stuck in my head forever. I know its a very common theme.  The short stories may have included Asimov.


I am aware that there is a similar question elsewhere, but I need help with my proof in particular. Can someone please verify it or offer suggestions for improvement?     Show that $X$ is Hausdorff if and only if the diagonal $\Delta = \{(x, x):x \in X\}$ is closed in $X \times X$   The proof is trivial if $|X|=1$. So, assume that $|X|>1$.  Suppose $X$ is Hausdorff. Let $(a, b) \in X \times X - \Delta$. Note that such an element exists, since $|X|>1$. Then, $a \neq b$. Since $X$ is Hausdorff, we can pick open sets $U_a$ and $U_b$ such that $a \in U_a$, $b \in U_b$, and $U_a \cap U_b = \varnothing$. Now, note that $(U_a \times U_b) \cap \Delta = \varnothing$ (Assume $(p, q) \in (U_a \times U_b) \cap \Delta.$ Then, $(p,q) \in \Delta$ implies that $p = q$. But then, $p \in U_a$ and $p \in U_b$, contradicting the fact that $U_a \cap U_b = \varnothing$). This implies that the set $X \times X - \Delta$ is open in $X \times X$. So, $\Delta$ is closed in $X \times X$.  Now, suppose $\Delta$ is closed in $X \times X$. Then, $X \times X - \Delta$ is open in $X \times X$. So, there exists a basis element $U \times V$ of $X \times X$ such that $(a, b) \in U \times V$ and $U \times V \subseteq X \times X - \Delta$. This implies that $(U \times V) \cap \Delta = \varnothing$. Then, $a \in U$ and $b \in V$. Note that $U \cap V = \varnothing$. If such were not the case, then there exists a $y \in U \cap V$. This implies that $(y, y) \in U \times V$, contradicting the fact that $(U \times V) \cap \Delta = \varnothing$. This shows that $X$ is Hausdorff.

Let $X$ be a topological space. The diagonal of $X \times X$ is the subset $$D = \{(x,x)\in X\times X\mid x \in X\}.$$   Show that $X$ is Hausdorff if and only if $D$ is closed in $X \times X$.   First, I tried to show that $X \times X \setminus D$ is open using the fact that $X \times X$ is Hausdorff (because $X$ is Hausdorff), but I couldn't find an open set that contains a point outside $D$ and is disjoint to it...


Is there a way to export (as a high-resolution image or vector file) the node setup of a given material? As I'm setting up some tutoring material I would prefer to avoid screenshots for material with approx. 15 nodes or more.

Would it be possible to screen capture or output node-tree network like really big, bigger than actual monitor screen. If possible, a way to capture the node-tree boundary.  So far, I only screen shot limited to my monitor.  Thanks.


Of course I know I can issue delete statement for each table in DB but my question is  there any trick to do this automatically with one statement or not really. I have  large amount of data and for testing purposes I need a shrunk version os DB. top 10 records only will be fine.

What's the best way to delete all rows from a table in sql but to keep n number of rows on the top?


I'm running Arch Linux in a virtual machine and it's getting REALLY annoying that since some thing require that I cannot be root, I need to sudo most of my commands. It would be nice if I could do something to detect a command needing root, and automatically run/re-run it with sudo giving it root powers. Can someone help me out with this? Thanks. Also, I know this isn't secure, but it's just a VM to experiment in. Also, I have NOT found any automatic solutions. I'm looking for an automatic solution, the question this is supposedly duplicate to does not have an answer that is automatic.

Can I configure Fedora 22 so anything needing root privileges asks for a password, rather than giving an error, and needing me to re-run with sudo?  I wouldn't even mind having to type my password every time, without the few minute (or whatever it is) timer that it remembers the password for.  i.e. Instead of:  $ dnf history You don't have access to the history DB.   It would:  $ dnf history [sudo] password for <username>:   I think some of the gui apps do that, like the gui yum frontend back when I had that installed.  I'm thinking not... That it would be up to each app to implement this.  But, I'm hoping it might instead be that apps say root privilege is needed, and there might be some way for the kernel (or wherever else) to remain in a blocking input stage (for the password) before returning whether the user has access.


As the supersymmetric particles have spin which differs by half, why cant the superpartners have a spin = 1. Why does it always have to be 0?

I'm currently working on my master thesis, and I need to know a bit of supersymmetry. I have been looking the theory and I have a basic knowledge about it.  I have a problem with understanding the spin of the superpartners. When the multiplets are build, we have the operators which rise and lower the spin of the state by 1/2. Therefore the superpartners will have a spin which differs by 1/2 respect to the usual particle. But, why the squarks have spin 0 instead of 1? Quarks have spin 1/2, thus I understand that the superpartner should have either spin 0 or 1. But why 0 and not 1? This question applies of course to other particles, such as the photino(why not 3/2?), slepton(why not 1?), etc.  Finally, we know that the gauge fields (graviton, photon, etc) are the connections for forces. Do the superpartners of the gauge fields play a role in the forces as well? I know that the gravitino can't, since there are not interacting theories of massless particles with spin greater than 2. What about the other gauge fields?


Example question in a textbook that I don't understand.  Proof works for n = 1  Setting for k makes $k < 2^k $  Setting for k  + 1 makes $k+1 < 2^{k+1}  $.  Here, I would be stuck, the book takes the equation to:  $k+1<2^k +1\leq 2^k+2^k = 2 \cdot 2^k=2^{k+1}$.  NB: $<2^k +1$ is not a typo.  There doesn't seem to be a good explanation for this in the book (although it does mention adding 1to both sides of the equation), could I have some advice on how the method used works?

Prove that  $ n < 2^{n}  $ for all natural numbers $n$.  I tried this with induction: Inequality clearly holds when $n=1$. Supposing that when $n=k$, $k<2^{k}$. Considering $k+1 <2^{k}+1$, but where do I go from here?  Any other methods maybe?


I have been with StackOverflow since almost more than a year (as a user). I have always been willing to contribute to StackOverflow by voting for the best contributions at the very least.  The problem is: I don't have the need to code extensively, so I really don't have any unique questions - all of them so far had been asked! And since I am much of a beginner to coding world, I really don't have answers to any questions as they are of a good stature!  I am able to find answers to my questions very easily on SO or Google. But if I don't ask question, and if I am not good enough to answer a question - how ever will I be able to vote (to Vote you require 15 Rep!). And yes, I have been helped by users extensively - I have over 50 bookmarks saved over my browsers for really good questions and answers! All I have is 1 Rep on SO, I just can't vote!  What else can you do to improve your rep when you are starting off at 1? Or at least, should voting be given a privilege to all the beginners?

As a new user, I find it impossible to contribute to the community or to even begin contributing. I know why the reputation system is in place and I respect it, but at the same time it is too hard on new users.  It started with me wanting to upvote a question...     "Vote Up requires 15 reputation"   Just to appreciate a good question that helped me I need 15 rep? OK..., so I find out how I can get reputation points. More or less, I need to ask a question for +5 and add an answer for +10. I don't have any questions at the moment and I don't want to spam a random question, but I did happen to have a slightly different answer to the earlier question that I wanted to upvote. So I try to answer...     This question is protected to prevent "thanks!", "me too!", or spam answers by new users. To answer it, you must have earned at least 10 reputation on this site.   Now... I know this doesn't apply to every question, but at the same time, this means I'm forced to answer yet another question, and I don't want to go around looking for random questions and spam irrelevant answers...  Now I'm stuck. So I try to talk to some other users in the chat rooms about how to go about getting reputation points and how they first started. I entered into a "casual chat room".     You must have 20 reputation on Meta Stack Overflow to talk here.   Yes... I can understand why this is enforced, because we don't want new users to spam chat rooms, but all I wanted to do was ask for help. So I can't even talk to anyone about my newbie problems. So okay, I'll just settle for upvoting comments in the question that helped me. I don't see an upvote hover-over button so I can't even do that.    So now I'm stuck at 1 reputation point, unable to cross that 15 rep barrier, and even after posting this question I'll only have 6 rep points and still unable to do anything, and I'll be forced to look for questions to answer. Yes, I should be contributing to the community, but I shouldn't need to begin answering or making questions to upvote questions and answers. This only spurs more spam/irrelevant answers if anything.   Very, very, very new-user unfriendly.


Newbie question. Trying to get my head around reference vs value arguments in Java, consider the following:  //Helper function int[] to csv     public static String csv(int[] values){     String ret = "";     for(int i = 0; i < values.length; i++)         ret = String.format("%s%s%s",ret,i == 0 ? "" : ", ",values[i]);     return ret; }  //Helper function, print to console public static void print(int[] v){     System.out.println(csv(v)); }    public static void method1(int[] input){     input[0] = 3; input[1] = 4; input[2] = 5; }  public static void method2(int[] input){     input = new int[]{6,7,8}; }  public static void main(String[] args) throws Exception {     int[] original = {0,1,2};     print(original);      method1(original);     print(original);   //As expected      method2(original);     print(original);   //Modification ignored }   In the above, changes to the array in method 1 are stored, but in method 2, the new assignment inside the function does not affect the original array and therefore has local scope.  So what if for example I need to do an array resize operation on an array passed by reference? is this not possible in java?

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


Someone has downvoted a lot of my questions or answers.   What should I do?  How does the system prevent this? How often does the system look for suspicious behavior?

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


My Girlfriend and I have been forming an alliance as soon as possible when playing against AI... when we get to the end though, all other races wiped out we were hoping to have a shared victory.  In the end she gave me most of her planets and then the game gave me the victory, but if we had split the galaxy basically in half do we REALLY have to fight each other once there are no other contenders?

Question is pretty much in the title: is it possible for an alliance to win as one, instead of a single player being the winner?  And if there is such way, is there a difference between classic and disharmony?


What is difference between End process and End process tree options in task manager? Is it the similar behavior?

What is the primary difference between the two? I always see this in the right click menu in windows. What happens if you end a process that is relied upon by another process? Is there a way to "kill" a process tree in linux or is the technology different?


Recently I installed ScreenFlow app and then I found this thing called "video streaming audio device " in my audio selection and it screws everything up. Sometimes I can't hear people and sometimes they can't hear me. I am trying to get rid of it but nothing has worked.  So far I have tired:   removing the ScreenFlow app. removing "video streaming audio device " from Audio MIDI Setup app but (but the - sign is disabled.    Any help?

I logged into my iCloud account from a fresh install of macOS Sierra. I had a very old version of ScreenFlow (from 2011) under Purchases in the App Store. Installing it worked. When I try to open it (from the App Store or from Spotlight), it says it's incompatible and offers me to search for a newer version.   Now how do I remove this old installed version? The App Store only shows me an "Open" button under Purchases, but I can't click on the icon to take me to a details page with an option to uninstall it.  It's harmless to just leave it there, but besides taking up a little disk space for nothing, it pollutes the Spotlight search index and just makes me feel my computer a little "dirty".


To create the disc shown in the image, I added a circle with a triangle fan. Into edit mode, select the outer edges and extrude with cancel. Scale the new edges outside of the original edges. Then, select the original edge and slide it towards the center. And finally, I added several edge loops.  It seems a long way around. Is there an easier way?

Need a way to do a loopcut- ish thingy on the blue line


Every folder in my computer has a shortcut to the same folder inside the folder.  Please see the below picture:    How do I resolve this?

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


Let $x_1,x_2..x_n$ be real numbers in $[-1,1]$ with $$\sum_{i=1}^{n} {x_i}^3=0$$ then find maximum value of :$$A=\sum_{i=1}^n x_1$$   As i don't know how to start i give a brief background of the problem along with some of my intuition. Background we define for each $i$: $b_i={x_i}^3$. Hence we require the minimum of: $\sum {(b_i)}^{1/3}$.The most interesting part of the problem is that $f(x)={x}^{1/3}$ is convex for all $x<0$ and concave $x>0$. If we assume $b_1,b_2,..b_k$ as negative then we can apply the following lemma with $a=-1,b=0$.  Lemma:Suppose that f(x) is a real convex function defined on $[a,b]$ and $x_1, x_2, ... , x_n$ belonging to  $[a, b]$ such that $ x_1 + x_2+ ... + x_n = S$,then the function $$F=f(x_1)+f(x_2)..+f(x_n) $$ attains maximum value if and only if $n-1$ elements are equal to $a$ or $b$.  But i am stuck on how to handle $b_{k+1}...b_n$ Jensen  would work as by assumption $b_{k+1},b_{k+2}..b_n $ will be postive.But again i don't know how to start.

Assume that $a_1,...a_n$ are real numbers and $-1 \leq a_i\leq 1$ for $1\leq i\leq  n$. If $$a_1^3+\ldots +a_n^3=0$$ Then show that $$a_1+a_2+\ldots+a_n\le n/3$$   I just came cross this problem the other day. I totally have no idea how to prove it. Are there any hints about which theorem, principle or method to apply?


When I save my .ai file as Jpeg by pressing Ctrl+Alt+Shift+S and it gets blurry. No matter how high or low I set in presets. Why? Help!!

I am making my son's birthday invitation on illustrator. It looks perfectly fine until I save it for web so it will be a .jpeg so I can print it. Once it is a .jpeg it looks blurry. I am planing to print this like a photo. I have made things like this before just never ran in to a problem like this. How do I fix this so when they are printed it, it will be clear?  Just scared they will come out blurry when I print.


I want to show that if $H\subseteq Z(G)$ and $G/H$ is nilpotent then $G$ is also nilpotent.   $$$$   I have done the following:   Since $G/H$ is nilpotent there is a series of normal subgroups $$1\leq N_1\leq N_2\leq \cdots \leq N_k=G/H$$ with $N_{i+1}/N_i\subseteq Z((G/H)/N_i)$.   From the correspondence theorem we have that there is a bijective mapping between the subgroups of $G$ that contain $H$ and the subgroups of $G/H$, right?   Using this theorem could we take the preimage of the mappings that map to $N_i, i=1, \dots , k$ to get the corresponding series of normal subgroups $$1\leq \tilde{N}_1\leq \tilde{N}_2\leq \cdots \leq \tilde{N}_k=G$$ with $\tilde{N}_{i+1}/\tilde{N}_i\subseteq Z(G/\tilde{N}_i)$ ?

Let $G$ be a group. If $H\leq Z(G)$ and $G/H$ is nilpotent, then $G$ is nilpotent. To prove this proposition, first, I have tried to show that $G/Z (G)$ has non-trivial center. I can see that all cosets of $H$ in $Z (G)$ belongs to $Z (G/H)$ but this does not satisfy $G/Z (G)$ has non-trivial center. Can any one give me a hint for the proposition. Thanks.


how do you randomly select a uniform value from a range of numbers?  i am trying to select a uniform value from a range of numbers like 1-10, randomly. please help me how to do it  what is the enum in C++ ? purpose of #define ?  thanks  regards  Cash

I need to generate random numbers within a specified interval, [max;min].  Also, the random numbers should be uniformly distributed over the interval, not located to a particular point.  Currenly I am generating as:  for(int i=0; i<6; i++) {     DWORD random = rand()%(max-min+1) + min; }   From my tests, random numbers are generated around one point only.  Example min = 3604607; max = 7654607;   Random numbers generated:  3631594 3609293 3630000 3628441 3636376 3621404   From answers below: OK, RAND_MAX is 32767. I am on C++ Windows platform. Is there any other method to generate random numbers with a uniform distribution?


I would like to map the AltGr key on my keyboard to produce Ctrl+Alt. I am aware of xkb and xmodmap. As far as I could tell, however, using those you can only map from key combinations onto single keys, not the other way round.

I have just recently moved from MS windows to Linux, and it is great; but there is one thing that really bugs me, and that is the use of Ctrl+Alt+key instead of using Alt Gr+key.  When I program, it irritates me that often used buttons like curly-braces and square-brackets are not easily accessed through Ctrl+Alt+key. How do I change the behavior of Ctrl+Alt+key to do the same as Alt Gr+key?  As mentioned earlier, my keyboard has a Danish layout.


I have a mesh that was created from an SVG file (using InkScape) and I want to bend it around a smooth curved wall. I am using a lattice but there's not enough vertical cuts and I don't know how to create them in this instance, so I end up with a deformed mesh. Can anyone help? Thanks

Shaping curve object by curve (modifier) results in a terrible shape with cracked surface. Here is an extreme situation, but good visible issue.  Perspective   Top   How can I curve it smootly without adding more control points or remeshing?


Show that $2^n \not \equiv 1 \pmod n$ for any $n$. This is obvious for even $n$, and for odd $n$ we get that $2^n \equiv 2^{\phi(n)} \pmod n$. Can I derive a contradiction from this?

Show that $n$ does not divide $2^n - 1$ where $n$ is an integer greater than $1$?  Clearly $2^n - 1$ is an odd integer, therefore, let $n$ be an odd integer and it divides $2^n - 1$. We can write $2^n - 1 = (2-1)(2^{n-1} + \cdots \cdots + 1) = (2^{n-1} + \cdots \cdots + 1)$ From here on I don't know how to proceed?


Do we have any residue formula to value the integral:  $$\int_{0}^{2 \pi}\frac{\sin^2 x}{ 5 + 4 \cos x} dx$$  I mean without finding out the pole and applying  the residues theorem each time.  Any fast and convenient approach will be appreciated.  I have found a very useful formula which is $$\int_{0}^{\infty}\frac{dx}{1 +x^n}= \frac{\pi}{n} cosc \frac{\pi}{n}$$  I can evaluate a lot of integral using the theorem.

Evaluate $$\int_0^{2\pi} \frac{\sin^2\theta}{5+4\cos(\theta)}\mathrm d\theta$$   This is the final question on my review for my final exam tomorrow, and I will be honest and say that I have no clue how to begin problem. Any hints in the direction of how to solve this would be helpful.  Following from @Adam Hughes,   $-\dfrac{\pi}{2}[f'(0)+Res_2]$When I took the derivative of $f(z)=\dfrac{(z^2-1)^2}{2z^2+5z+2}$ and evaluated for 0, I got $-\dfrac{5}{4}$ Now, $Res_2$


I know in a graph with n vertices, there are m = (n(n-1)/2) edges, but in a graph with m edges, how many vertices are there?

I am given this problem: Suppose you have a complete graph with $n$ edges. How many vertices does your graph have?  I have this math figured out so far: We know that a complete graph has $m$ vertices, with $m-1$ edges connected to each. This makes the sum of the total number of degrees $m(m-1)$. Then, since this sum is twice the number of edges, the number of edges is $\frac{m(m-1)}{2}$.  But I don't think that is the answer. I think I am missing a piece of the math, but I can't figure out what else I need to do. Can anyone help me with what I'm missing or doing wrong?


Here, cohort is a group of 12-13 year olds.

I'd say Microsoft have a way of bending the rules and I know that McLaren have won the championship. While this sounds strange, I believe it is correct English (sorry, I'm not native).   But when it's a small company, would you still use it this way? Is a company always plural, or are small companies singular? I.e., would you say Bakery Johnson makes fine bread or Bakery Johnson make fine bread? Is it My book seller, Woody's, have moved or is it has moved?


I start off by doing the base case: Base Case: Let P(n) be $n! \ge 2^{n-1}$. Then $P(1)$ will be: $$ 1! \ge 2^0  $$ $$ 1 \ge 1 $$ So the base case is true. Induction: I assume $P(k)$ is true for some arbitrary positive integer $k$. Now I need to show that $P(k+1)$ is true. So assuming $k! \ge 2^{k-1} $ is true, I need to show that $(k+1)! \ge 2^{(k+1)-1} $ is true. $$ 2^{(k+1)-1} = 2 \cdot  2^{k-1} $$ $$\le 2 \cdot k! \tag{By inductive hypothesis}$$ My question So I have solved this to this point but I don't really know where to take it from here. I would appreciate any help on completing this proof.

I'm having difficulty solving an exercise in my course.  The question is:      Prove that $n!\geq 2^n$.   We have to do this by induction. I started like this:   The lowest natural number where the assumption is correct is $4$ as: $4! \geq 2^4 \iff 24 \ge 16$. The assumption is: $n! \ge 2^n$.   Now proof for $(n+1)$ which brings me to: $(n+1)! \ge 2^{(n+1)}$  I think I can rewrite it somehow like this:  $$ {(n+1)} \times {n!}  \stackrel{\text{(definition of factorial)}}{\ge} 2^n \times 2 $$  $$ (n+1) \times 2^n \ge 2^n \times 2 $$  Then I think I can eliminate the $2^n$ and have something like this: $n+1 \ge 2$, or $n \ge 1$.  But I think I'm wrong here some where and was hoping somebody has some advice on this. How can I prove the above assumption?  Any help would be appreciated, kind regards.


Why does this happen? Two methods that should give the same result but they don't:  a_good=[[0,0],[0,0]] for i in [0,1]:     for j in [0,1]:         a_good[i][j]=str(i)+str(j) #[['00','01'],['10','11']]  a_error=[[0]*2]*2 for i in [0,1]:     for j in [0,1]:         a_error[i][j]=str(i)+str(j) #[['10','11'],['10','11']]  !?

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


I download minecraft_server.1.6.4.exe from Minecraft.net.  I get Minecraft launcher 1.2.5.  The Minecraft server says,   "Starting minecraft server version 1.6.4  [INFO] Loading properties  [WARNING] server.properties does not exist  [INFO] Generating new properties file  [INFO] Default game type: SURVIVAL  [INFO] Generating keypair  [INFO] Starting Minecraft server on *:25565  [WARNING] Failed to load operators list: java.io.FileNotFoundException: .\ops.txt (The system cannot find the file specified)  [WARNING] Failed to load white-list: java.io.FileNotFoundException: .\white-list.txt (The system cannot find the file specified)"   Minecraft 1.6.4 is not an option in the profile editor, nor is, "use most recent version."  Java is updated.  I CAN get minecraft 1.6.2.  ideas?  Thanks for the link.  This is my daughter's issue, and now I notice the word "Forge."  I will have to ask her about this.

I tried connecting to a server this morning but it said "outdated client". I understand that that means I have to get Minecraft 1.6.4 but I have no clue how to do it. I tried getting it on Minecraft.net but I couldn't find it. Please tell me how to download it and use it.


I Just bought a Dell D620 on the cheap and it comes without an OS. Initially I figured I could just download Ubuntu on a USB, plug it in, and boot up Ubuntu, obviously there is more to it.  Where do I begin?

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


I have a Lambda expression that search the column after submitting a form. It does work when I submit it but its doesn't search the right way I would like to search. I would like to make it work the same way it search in SQL like statement.  select * FROM tableSearch where subject like '%f5%'   This way even if 'F' is capital it still finds it. Can this be possible using Lambda expression.  With the below code it only finds it if 'F' is not capital unless i enter 'F5' in subject.  if (!string.IsNullOrEmpty(searchControl.subject))      {         searchList = searchList.Where(x => x.subject.Contains(searchControl.subject)).ToList();      }

Is there a way to make the following return true?  string title = "ASTRINGTOTEST"; title.Contains("string");   There doesn't seem to be an overload that allows me to set the case sensitivity.. Currently I UPPERCASE them both, but that's just silly (by which I am referring to the  issues that come with up- and down casing).  UPDATE This question is ancient and since then I have realized I asked for a simple answer for a really vast and difficult topic if you care to investigate it fully. For most cases, in mono-lingual, English code bases  answer will suffice. I'm suspecting because most people coming here fall in this category this is the most popular answer.  answer however brings up the inherent problem that we can't compare text case insensitive until we know both texts are the same culture and we know  what that culture is. This is maybe a less popular answer, but I think it is more correct and that's why I marked it as such.


According to the various grammar books that I have read, the question and negative , with "used to" starting with "did" has two forms. One for example is "Did he used to smoke Cigars?" and the other is "Did he use to smoke cigars?".  I would just like to know which form is correct and widely used.

What is the negative form of "I used to be"? I often hear "I didn't used to be" but that sounds awfully wrong in my ears.


I am following  and tried creating a new page.  It works.  <html>     <head>         <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />         <title id='title'>HTML Page setup Tutorial</title>          <!-- ** CSS ** -->         <!-- base library -->         <link rel="stylesheet" type="text/css" href="ext-3.3.1/resources/css/ext-all.css" />          <!-- overrides to base library -->           <!-- ** Javascript ** -->         <!-- ExtJS library: base/adapter -->         <script type="text/javascript" src="ext-3.3.1/adapter/ext/ext-base.js"></script>         <!-- ExtJS library: all widgets -->         <script type="text/javascript" src="ext-3.3.1/ext-all-debug.js"></script>           <!-- overrides to library -->          <!-- extensions -->          <!-- page specific -->          <script type="text/javascript">             // Path to the blank image should point to a valid location on your server             Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif';              Ext.onReady(function () {                  console.info('woohoo!!!');              }); //end onReady         </script>      </head>     <body>     </body> </html>   However, if I change the script tag line to use self closing tag, like following, it doesn't work.  <!-- ExtJS library: base/adapter --> <script type="text/javascript" src="ext-3.3.1/adapter/ext/ext-base.js"/>   In Firebug, it complains Ext.EventManager is undefined.  I have two questions   Is it generally a bad idea to use self-closing tag for script?  I have read this  but it sounds to me it's talking about xhtml. I am trying to learn Javascript.  Although I know the way to fix it is to not use self closing tag, I would still like to know why  FireFox think Ext.EventManager is undefined?

What is the reason browsers do not correctly recognize:  <script src="foobar.js" /> <!-- self-closing script element -->   Only this is recognized:  <script src="foobar.js"></script>   Does this break the concept of XHTML support?  Note: This statement is correct at least for all IE (6-8 beta 2).


I have this data and would like to access the length (i.e. number) of procedures nested within 'procedures'. How might I do this? let specialties = [   {     name: 'Emergency)',     number: '1',     procedures: {       procedure1: 'PoPo',       procedure2: 'Lala',       procedure3: 'Dipsy',     }]

I have a JavaScript object. Is there a built-in or accepted best practice way to get the length of this object? const myObject = new Object(); myObject["firstname"] = "Gareth"; myObject["lastname"] = "Simpson"; myObject["age"] = 21;


I am looking for a good way to add security at a field level based on a group.  Different groups will use the same content type. Does OG handle this requirement. I don't want to make the full node private.

What is the best way to create a piece of content with multiple fields... allowing users to edit the content as a whole yet blocking the ability to edit.  The setup I have is a piece of content that has 3 fields: Body, PDF, SWF... and a "Selector" (List Text) that's tied via dependancy. So the user chooses BODY, PDF or SWF and that's what available to edit and shown on the page when live.  What I want to do is add a PHP field... that's either:     greyed out (unable to edit) if your not admin...   doesn't show up in the Drop Down list... Can't select it if you can't see it Shows up on the drop down, but the field doesn't show up in the editor without permissions.   I hope I'm making sense... I can provide an example if needed.


I need to know the meaning of the higher order derivatives of a polynomial.   Let make an example. Assume we have a polynomial of degree n. Then $$ f(x)=a_0+a_1x+a_2x^2+\ldots+a_nx^n $$  We know that the first derivative means the slope of the polynomial (in a certain point, x) and also we know that the second derivative means the curvature of the polynomial (again at the certain point). So, I need to know if other derivatives have any meaning for us.

I have been trying to analyse the meaning of higher order derivatives and their geometrical significance.  Given a function $f(x)$ what are the unique geometric interpretation of its higher orders?   $f'(x)$ - slope (rate of change of x w.r.t y) $f''(x)$ - convexity / concavity of $f(x)$ based on $sign(f''(x))$ $f'''(x)$ - increasing / decreasing slope of $f'(x)$ $f''''(x)$ - ?? ... $f^n(x)$ - ??   I apologize if this question is rudimentary.


How I can allow two html tags <sup> and <sub> in node title of all content types.  Or may be is there some module for BB tags which allow using BB-codes in title?  Or my ba is there some hook for preprocess all titles?

I have a bespoke Content Type pertaining to venues. These are not user-creatable; they are all created from importing a trusted third-party feed, which sanitised the titles before they come to me (so there's no risk of  or  here). The titles might, however, contain accented characters (é, ô etc), apostrophes (') or ampersands (&); these are coming out as HTML escapes (so &#039; instead of an apostrophe, &amp; instead of an ampersand, etc).  The Content Type Venue has a field title, which is a Node module element, so doesn't allow me to mess with its display settings. In the Node template page, I can use substitutions in the display of this title, but I can't work out how to make it be the raw text version. The title is currently set to display as %node:title and I tried using %node:title:raw and %node:title-raw in case one of those would magically work, but they had no effect.  I saw something that looks like a potential solution at  on zerotodrupal.posterous.com, which attaches to the hooks hook_preprocess_page and hook_preprocess_node, creating a new method like  function hhhdarkelegance_custom_title($node) {       return check_markup(strip_tags($node->title, '<em><em>'));   }   but, while that blog post looks like it will work well for named HTML tags, I'm not sure it will necessarily deal with HTML entities, which are what my problem is here. I suppose I could do the opposite to the blog-post code and replace out &amp; to & before display, but that feels really kludgy and, frankly, it would be nice to be able to do this just using a substitution, if possible.  Is there some way of achieving this that doesn't involve cutting code? If so, is  what is causing the HTML escapes? (The function description reads as though it's only causing the removal of HTML tags, which I am fine with either way — they won't occur in my node titles. I am wanting to stop escaping the HTML escapes, however.)  So how can I (on a specific Content Type, without worrying about security concerns) prevent Node titles from rendering HTML escape characters to the usual and just write the damn output to the page?  I did scan through several pages of similar-looking questions before posting and I couldn't find one that addressed this, so my apologies if someone has asked this already; if you point me towards it I'll be suitably embarrassed and try even harder next time. Thanks for your help, everyone!


I have installed Ubuntu alongside windows but the problem is I am unable to get the dual boot screen where we have the windows boot loader listed, instead of that the computer directly boots into Ubuntu.....I  am unable to see the grub screen.  Any suggestions how to enable the dual boot list.

So, I've successfully dual-booted my Windows 8 machine with Ubuntu 12.04 . However, I still don't have a convenient method of choosing what OS to load at boot time.  After installing Ubuntu, my computer still loads Windows 8 directly. I then added grubx64.efi to the white list of my boot loader. But after that, my machine loads Ubuntu directly without even a shadow of GRUB showing up!  I used boot-repair and I got this paste.ubuntu URL: . After running boot-repair (and re-white listing the grubx64.efi file), GRUB now shows up but without any Windows 8 option!  Lastly, I ran sudo fdisk -l and it gave me this:  WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.   Disk /dev/sda: 750.2 GB, 750156374016 bytes 255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x6396389f     Device Boot      Start         End      Blocks   Id  System /dev/sda1               1  1465149167   732574583+  ee  GPT Partition 1 does not start on physical sector boundary.   I'm guessing my problem has something to do with the warning from fdisk above but I don't know what to do with it. How do I proceed now?  Edit  My etc/default/grub is as follows:  # If you change this file, run 'update-grub' afterwards to update # /boot/grub/grub.cfg. # For full documentation of the options in this file, see: #   info -f grub -n 'Simple configuration'  GRUB_DEFAULT=0 #GRUB_HIDDEN_TIMEOUT=0 GRUB_HIDDEN_TIMEOUT_QUIET=true GRUB_TIMEOUT=10 GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian` GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""  # Uncomment to enable BadRAM filtering, modify to suit your needs # This works with Linux (no patch required) and with any kernel that obtains # the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...) #GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"  # Uncomment to disable graphical terminal (grub-pc only) #GRUB_TERMINAL=console  # The resolution used on graphical terminal # note that you can use only modes which your graphic card supports via VBE # you can see them in real GRUB with the command `vbeinfo' #GRUB_GFXMODE=640x480  # Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux #GRUB_DISABLE_LINUX_UUID=true  # Uncomment to disable generation of recovery mode menu entries #GRUB_DISABLE_RECOVERY="true"  # Uncomment to get a beep at grub start #GRUB_INIT_TUNE="480 440 1"   Also, just for the record,  in installing my dual-boot. The tutorial (which uses, 11.10, I must note), doesn't mention anything about this problem. Is there anything there I shouldn't have done?


I have a 14.04 LTS CD, which I used to help to reinstall the OS over my old installation of Ubuntu.  The process was pretty standard : insert disc, boot from CD, erase existing OS and install 14.04.  Everything looked fine, and I even got the message that installation was complete.  Then, I removed the CD as prompted, and rebooted the machine. That's when things went crazy. I see the DELL logo, and then a purple border, followed by a black screen. Then, ... nothing. Ever.  I had to do multiple force reboots by holding down the power button. Holding on to the right-shift button did not open up the Grub menu. I still get back the same purple border and black screen.  Edit : I managed to enter Grub menu by holding on to the ESC key, but I am getting the Grub error below.  Minimal BASH like line editing is supported. For the first word, TAB lists possible command completions. anywhere else TAB lists possible device or file completions.   Subsequently, I reinserted the disc and selected the option to try Ubuntu without installing, which is how I am here now.  sudo parted -l  shows the following:  Model: ATA ST2000DM001-1ER1 (scsi) Disk /dev/sda: 2000GB Sector size (logical/physical): 512B/4096B Partition Table: gpt  Number  Start   End     Size    File system     Name  Flags  1      1049kB  538MB   537MB   fat32                 boot  2      538MB   1863GB  1863GB  ext4  3      1863GB  2000GB  137GB   linux-swap(v1)   Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only. Error: Can't have a partition outside the disk!     The Ubuntu OS seems to be installed on dev/sda2, while dev/sda1 seems to be the /boot/efi partition.  According to boot-repair,  GUID Partition Table detected.  Partition  Attrs   Start Sector    End Sector  # of Sectors System /dev/sda1                 2,048     1,050,623     1,048,576 EFI System partition /dev/sda2             1,050,624 3,638,751,231 3,637,700,608 Data partition (Linux) /dev/sda3         3,638,751,232 3,907,028,991   268,277,760 Swap partition (Linux)   Edit : I reinstalled 14.04 again, and now boot-repair can run just fine. It says Repair Successful, but I am getting Grub error when I hold on to the ESC key when booting up :  Minimal BASH like line editing is supported. For the first word, TAB lists possible command completions. anywhere else TAB lists possible device or file completions.   When I exit from this CLI, it says that it is not able to find a system to boot. I select F1 to Retry boot, and it shows me a nice Grub menu, from which I selected the first option Ubuntu after adding the parameters nomodeset and nolapic. It then blank screened... Really not sure what is going on here.  I have tried numerous things I have read over the net over the past day, but it is still stuck at this same problem. I am no expert on this! Please help! Thank you :)!  Additional Info:  lspci | grep VGA returns  VGA compatible controller: NVIDIA Corporation Device 13bb (rev a2)  It is a DELL Precision Tower 5810. Pastebin for Boot Info report is at .

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:


I have this site I am working on, its a travel site. Today I saw a very unusual result in Google. For query - "flight from x to y" I am seeing my client site title as - "to y- flight from x to y".   I am not sure why this is happening, why google is showing "to y". Only explanation I have right now is text in schema markup, last element is used is "to y" but again google never grabs content from markup. And I could not find "to y" being used as it is anywhere on the page.  Page does have content targeted towards "flight from x to y" and used many time but not as "to y".

I'm just wondering how it is possible that IGN.com has this in its title tag:      Video Games, Cheats, Walkthroughs, Game Trailers, Reviews, News, Previews & Videos at IGN   while on Google its title is simply "IGN".   How can one achieve such a thing? Does it use some special meta tag I can't see?


So I m using Htmlagilitypack on server side to parse html in C#. Here's a Question.. i have 2 div elements

   i am looping through the div elements and want to find specific data-clear attributes for that. problem is when i am selecting nodes using   var cols = fdm.SelectNodes("//@data-clear");   on second case i am finding 4 instead of 2 columns..  how to select within only currently looping through div

I'm trying to retrieve a specific image from a html document, using html agility pack and this xpath:  //div[@id='topslot']/a/img/@src   As far as I can see, it finds the src-attribute, but it returns the img-tag. Why is that?  I would expect the InnerHtml/InnerText or something to be set, but both are empty strings. OuterHtml is set to the complete img-tag.  Are there any documentation for Html Agility Pack?


After some gorgeous updates I witness this:

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


I want to show the above assertion, I guess I am not sure what's the definition of a set, I thought it's the basic building block.  Anyway, if the above titled assertion weren't true then for every $Y \subset X$ we will also have $Y \in X$, which should contradict $X$ being a set, but why is that?

I've been trying to challenge myself but with no luck. Maybe one of you will have a better idea. How can it be proven that there can't be a set which contains its own powerset, using only russell's paradox? I've managed to prove it with other principles or axioms, such as that a set can not belong to itself, or that a powerset cannot belong to itself.


I just got promoted to diamond league. If I stop playing for a while, will I get demoted back to a lower league? If so, how lang can I stay inactive without this happening? Also, will I get demoted, when I lose to much games?

I've just been promoted from platinum league to diamond and master pretty fast (in 4 vs 4). This was totally amazing for me but I'm afraid I will be demoted again to a lower league as fast as I came higher.   If I don't play any 4 vs 4 anymore, will they demote me to a lower league automatically or do they only do so, if I play?


If I write a letter to someone I have not written to before, I do my best to discover their name and use the appropriate title and their surname.  I recently needed to write to the administration section of a University, and I was wondering whether the traditional "Dear Sir/Madam" was still acceptable given the fact that some women prefer to be called "Ms" instead of "Miss" or "Mrs" and that the LGBTQ members of society may not identify as either Male or Female.  I have read ,  and even , however, none of them seem to provide an answer.  Note that I do not believe this is a duplicate of  as that question does not take the concern of gender identity into account, merely the concern of not knowing who to address a letter to.  Can anyone enlighten me on current protocol?

When is it appropriate to use the terms Dear Sir or Madam and To whom it may concern?  The rules I was taught state that Dear Sir or Madam should be used when you're writing a letter to a person about something that person has direct involvement in (e.g. returning a defective product to a customer service department).  By the same rules, To whom it may concern would be used for situations in which the recipient is a third party to the topic of the letter (e.g. regarding a letter of reference or recommendation).  Was I taught correctly?  Is the rule actually something else?  Or is this one of those situations where many people have an opinion but there is no real rule?


I want create register page and for this i write php codes. but when show result in json, not show UTF-8 characters!  my code:  <?php  require_once 'DBOperations.php';  class Functions{  private $db;  public function __construct() {        $this -> db = new DBOperations();  }  public function registerUser($name, $email, $password) {     $db = $this -> db;     if (!empty($name) && !empty($email) && !empty($password)) {        if ($db -> checkUserExist($email)) {           $response["result"] = "failure";          $response["message"] = "اين ايميل قبلا ثبت شده است";          return json_encode($response);        } else {           $result = $db -> insertData($name, $email, $password);           if ($result) {                $response["result"] = "success";             $response["message"] = "تبريک، در کلوني عضو شدي";             return json_encode($response);           } else {              $response["result"] = "failure";             $response["message"] = "ثبت نام با خطا روبرو شده است";             return json_encode($response);           }       }    } else {        return $this -> getMsgParamNotEmpty();     } }  public function loginUser($email, $password) {    $db = $this -> db;    if (!empty($email) && !empty($password)) {      if ($db -> checkUserExist($email)) {         $result =  $db -> checkLogin($email, $password);         if(!$result) {          $response["result"] = "failure";         $response["message"] = "ايميل يا کلمه عبور اشتباه است";         return json_encode($response);         } else {          $response["result"] = "success";         $response["message"] = "با موفقيت وارد شديد";         $response["user"] = $result;         return json_encode($response);         }     } else {        $response["result"] = "failure";       $response["message"] = "خطا در اطلاعات وارد شده";       return json_encode($response);      }   } else {        return $this -> getMsgParamNotEmpty();     } }  public function changePassword($email, $old_password, $new_password) {    $db = $this -> db;    if (!empty($email) && !empty($old_password) && !empty($new_password)) {      if(!$db -> checkLogin($email, $old_password)){        $response["result"] = "failure";       $response["message"] = "کلمه عبور قبلي نادرست است";       return json_encode($response);      } else {      $result = $db -> changePassword($email, $new_password);        if($result) {          $response["result"] = "success";         $response["message"] = "کلمه عبور با موفقيت تغيير يافت";         return json_encode($response);        } else {          $response["result"] = "failure";         $response["message"] = 'خطا در تغيير کلمه عبور';         return json_encode($response);        }     }   } else {        return $this -> getMsgParamNotEmpty();   } }  public function isEmailValid($email){    return filter_var($email, FILTER_VALIDATE_EMAIL); }  public function getMsgParamNotEmpty(){    $response["result"] = "failure";   $response["message"] = "فيلدها نبايد خالي باشند";   return json_encode($response);  }  public function getMsgInvalidParam(){    $response["result"] = "failure";   $response["message"] = "فيلدها نامعتبر هستند";   return json_encode($response);  }  public function getMsgInvalidEmail(){    $response["result"] = "failure";   $response["message"] = "ايميل نامعتبر است";   return json_encode($response);  } }   How can i show "message" for utf-8 in json?

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.


executing ifconfig I found network loopback device which was not expected to show (maybe some linux packages created it on it's own?) but I would like to analyze it what it does - any ideas how to track which process uses it and what it does, if it uses any files to keep some log etc? one of ideas is that it's malicious creation of some 3rd party so I would like to know what it does, other is to be able to access local Ipython notebook but I would like to be sure what is the purpose of this device on my machine  below ifconfig result  lo: flags=73<UP,LOOPBACK,RUNNING>  mtu [[some_mtu]]         inet 127.0.0.1  netmask 255.0.0.0         inet6 ::1  prefixlen 128  scopeid 0x10<host>         loop  txqueuelen 1000  (Local Loopback)         RX packets 787  bytes 46448 (45.3 KiB)         RX errors 0  dropped 0  overruns 0  frame 0         TX packets 787  bytes 46448 (45.3 KiB)         TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

When I run ifconfig -a on my Chromebook (both through shell inside ChromeOS and my Ubuntu chroot) I get the following entries:  acrbr0: ... lo: ...  veth_android: ... wlan0: ...   I was able to find information about wlan0 and veth_android but not about the others. I don't really know much about networking so I would really appreciate some run down.


I asked a question over on StackOverflow and got two answers to my question. The one answered my question in the most technical sense, but an integration of the two answers received is what I used in my actual code, since that actually delivers the result I was looking for.  I couldn't have done it without the two answers I received, but who do I give credit now? Which one should I mark as "correct"? Or should I answer my own question, mark it as correct, and just up-vote the other two? I just want to be fair to the people that helped me and give them the credit they deserve, I couldn't do it without them.  This question is different to the one  because without the one answer, the other doesn't entirely do what I want it to do, and vice versa.  Here is my question if you're interested:

I asked  that turned out to have multiple correct answers. How do I pick between them to determine which to accept?  All of the answers were different. They were not the same answer given multiple times.


Why is it that the plural of goose is geese but the plural of moose is moose? The same goes for mouse and house. Mouse becomes mice, yet house becomes houses.

"Foot" is a curious word in English because it is pluralized in an unusual way; the "oo" in the word is changed to "ee".  Did this once use to be a standard way of pluralizing things in English (or a language that contributed to English), which would mean that the plural of "book" was "beek" instead of "books"?  Or, is "feet" just a one-off?


How to establish the formula for this without induction?  $$1 + 2 + 3 + · · · + n =\sum_{j=1}^n j=\frac{n(n + 1)}{2}$$

I am trying to compile a list of the different ways to come up with the closed form for the sum in the title. So far I have the famous Gauss story, the argument by counting doubletons, and using generating functions. Is there any other (significantly) different way to discover the closed form?  To clarify, Gauss's method was to take $1+2+3+\dots+n$, write it backwards, and add it up.


Seems that there is a weird interaction with amsthm and tikzposter  \documentclass{tikzposter}  \usepackage{amsthm}  \theoremstyle{definition} \newtheorem*{defi}{Definition}   \begin{document}  \begin{columns} \column{1} \block{Methodology}{      \begin{defi}        Hello World     \end{defi} } \end{columns} \end{document}   Results in a missing \item error and we lose the Definition.     Puttting an \item in the \block eliminates the error.  \documentclass{tikzposter}  \usepackage{amsthm}  \theoremstyle{definition} \newtheorem*{defi}{Definition}   \begin{document}  \begin{columns} \column{1} \block{Methodology}{\item      \begin{defi}        Hello World     \end{defi} } \end{columns} \end{document}   Gives some screwy spacing but no more errors and Definition. label is there:    I've tried it with multiple definitions and only the first one is broken.  \documentclass{tikzposter} \usepackage{amsthm}  \theoremstyle{definition} \newtheorem*{defi}{Definition}  \begin{document}  \begin{columns} \column{1} \block{Methodology}{      \begin{defi}        Hello World     \end{defi}     \begin{defi}        Hello World (again)     \end{defi} } \end{columns} \end{document}   Yeilds:

Context: I'm doing a poster using tikzposter. Also I'm on ShareLatex, I suspect it might be source of the problem as well.  Problem: I can't add a theorem, this is simply ignored when I compile. Here is a sample:   First:     \documentclass[18pt, a0paper, portrait, noamsthm]{tikzposter} \usepackage[utf8]{inputenc} \usepackage{amsmath} \usepackage{amsfonts} \usepackage{amsthm}  \usepackage{hyperref} \newtheorem{definition}{Definition} \newtheorem{theorem}{Theorem} \usepackage{tikz-cd} \usepackage{etoolbox} \patchcmd{\thebibliography}{\section*{\refname}}{}{}{} \newcommand{\g}{\mathfrak{g}} \newcommand{\h}{\mathfrak{h}} \renewcommand{\b}{\mathfrak{b}} \newcommand{\N}{\mathcal{N}} \newcommand{\NN}{\tilde{\mathcal{N}}} \newcommand{\C}{\mathbb{C}}  \title{Talk} \author{Nicolas Hemelsoet} \date{\today}   \usetheme{Simple}  \begin{document}  \maketitle  \block{test}{ \begin{theorem} Hi \end{theorem} }  \end{document}   For the first code, I got this answer:      There are no entries found in a list you have created. Make sure you label list entries using the \item command, and that you have not used a list inside a table.   Any help is really appreciated, many thanks in advance !


If I dd my disk and compress the image with lzma or lzo the image is still big. The partition is 10GB used, 90GB available. But the image still around 20GB. I believe that is because I have copied many and deleted many files on that disk and the filesystem doesn't zero the unused blocks from those deletions.  How can I zero the unused blocks in order to minimize the disk image? So that dirty bytes don't add up on my image. I'm using ext4.

How to clear unused space with zeros ? (ext3,ext4)  I'm looking for something smarter than  cat /dev/zero > /mnt/X/big_zero ; sync; rm /mnt/X/big_zero   Like  is looking for "used space" and ignores unused, but opposite site.  Purpose: I'd like to compress partition images, so filling unused space with zeros is highly recommended.  Btw. For btrfs :


I was trying to open ubuntu.css from command line in gedit and got  error. It shows error about GVfs metadata. I am new to Ubuntu and Don't know anything about why is this happening?

I recently installed a GRUB theme from  on Ubuntu 20.04 LTS (my PC is Windows 10 dual-boot with Ubuntu). To install the theme successfully, the file at /etc/default/grub needs to be edited. So I used sudo gedit /etc/default/grub command to do so. After editing when I save it I, see the following warning in Terminal:  (gedit:7169): Tepl-WARNING **: 21:13:18.135: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.  Later on I also edited the grub menu by editing the file at /boot/grub/grub.cfg by using sudo gedit /boot/grub/grub.cfg. Upon saving the file I got a similar warning  (gedit:8887): Tepl-WARNING **: 21:18:46.163: GVfs metadata is not supported. Fallback to TeplMetadataManager. Either GVfs is not correctly installed or GVfs metadata are not supported on this platform. In the latter case, you should configure Tepl with --disable-gvfs-metadata.  Can someone tell me the reason? And also how to deal with it?


In several places on this site the sum $\displaystyle\sum_{n=1}^{\infty}\dfrac{\sin(n)}{n}$ has been discussed as a generalized alternating series, which therefore converges. I am curious about the sum $\displaystyle\sum_{n=1}^{\infty}\dfrac{|\sin(n)|}{n}$, which I am sure does not converge.  Here is my "proof".  Steps 2 and 3 clearly needs some clarification.  Step 1) Define $A\subset\mathbb{R}$ by $A:=[\pi/4,3\pi/4]\cup[5\pi/4,7\pi/4]\cup\ldots$.  For any $x\in A$, $|\sin(x)|\geq\sqrt{2}/2$.  Step 2) Since $\pi$ is irrational, roughly half the integers are in $A$.  That is, if we define $\#_A(n)$ to be the cardinality of $\{1,\ldots,n\}\cap A$, $\displaystyle\lim_{n\to\infty}\dfrac{\#_A(n)}{n}=\dfrac{1}{2}$.  Step 3) Therefore $\displaystyle\sum_{n=1}^{\infty}\dfrac{|\sin(n)|}{n}>\sum_{n>0,n\in A}\dfrac{|\sin(n)|}{n}>\sum_{n>0,n\in A}\dfrac{\sqrt{2}/2}{n}\approx\dfrac{1}{2}\sum_{i=1}^n\dfrac{\sqrt{2}/2}{n}$.  Step 4) Since the last sum in Step 3 diverges, the sum $\displaystyle\sum_{n=1}^{\infty}\dfrac{|\sin(n)|}{n}$ diverges.  I beleive this is more or less intuitively right, but I do not really know the theory to make rigorous Steps 2 and 3.

Does $\sum_{k=1}^\infty |\sin(ak)/k|$ converge for all $0<a<\pi$? I do not think so since for $a=\pi /2$: $$\sum_{k=1}^\infty\left\vert\frac{\sin(ak)}{k}\right\vert=\sum_{k=0}^\infty (2k+1)^{-1}=\infty.$$  But is this true for all $a$?


I'm using Intellij Idea on Mac, that heavily utilizes hotkeys including Function keys + the Option and Command keys.  While hardware keys + the Option and Command keys work okay, Touch Bar keys + the Option and Command keys pressed don't register the combination, essentially breaking so many hotkey commands in Idea.  Has anyone been able to resolve this problem?

I've configured my touch bar to always show function keys in one program where I use those frequently (IntelliJ IDEA, code editor). Many hotkeys in IDEA are triggered using a function key together with shift, alt or control, e.g. for renaming a variable, I use Shift+F6.  With the emulated function keys, this does not work, the program acts as if I had just hit F6 without holding down the alt key.  It was no problem with the hardware function keys on my old MacBook.  Is this a known bug, or a limitation one has to live with? Or is there some way to work around it? Perhaps I'm just to stupid and missing something obvious?  This is a major pain for me as a software developer…


I am currently at 15.04. I want to upgrade to a stable version soon, but after I finish some projects I am working on every day. I assume these projects will take another 6-8 weeks, but my system is now complaining about system errors and that there are no software updates for this version.  I can still use my computer, but how long will it will take before this all comes crashing down? Do I have enough time to finish my projects, or should I update immediately?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


I got an A from Game Theory. But after that i forgot almost all the formulas and theorems. What should i do to prevent that? Do you forget math like i do?

What is a good way to remember math concepts/definitions and commit them to long term memory?  Background:  In my current situation, I'm at an undergraduate institution where I have to take a lot of core classes and easy math classes because there are no higher level courses available. Therefore, I have to study math on my own. It worked out fairly well, but I have a big problem when there's a lapse in my studying. For example, in February, I was working on transfer college applications, so I was unable to study math. Right now, I have less than a month left in school, so I need to work on all my term papers. It seems that when I take these extended breaks from studying math, like 2+ weeks, I have trouble going back, and occasionally I have to re learn a lot of the material. Previously, I was able to understand the definitions, theorems, etc and solve some of the exercises. Now, I need to look back on the definitions to understand what I wrote down! It's frustrating that I'm regressing in my mathematical education when I'm not actually studying math.


I made simple funny character in blender without animations. In Blender it looks good, this is the screenshot of it:    When i put my character.blend file into Unity assets folder, it says    "Meshes may not have more than 65534 vertices or triangles at the moment.   Mesh 'Plane' will be split into 2 parts: 'Plane_MeshPart0', 'Plane_MeshPart1'".   Also in Unity my character was cut down at joining of the legs and body as shown in figure.   How to import .blend file into Unity and avoid these artifacts ? Which format should I use ?

I have modeled a simple pocket watch in Blender. Every time I import it into Unity3D, regardless of whether I export it from Blender as an FBX or 3ds file, it always comes out missing faces! Why is this happening? I have never had problems importing models into Unity3D like this before.  Blender Screenshot    Unity Screenshots     It seems to me that different faces appear when I rotate it differently. How can I prevent this? Thanks!


I'm having trouble understanding if the following series converges or diverges:  $$ \sum _{n=1}^{\infty }\ln\left(\frac{n}{n+1}\right) $$  I've noticed that $\lim _{x\to \infty \:}\ln \left(\frac{x}{x+1}\right) = 0$ and therefore I can't deduce that it diverges, but other than that I'm really not sure what is the right way to go here. Any help is appreciated

Does this series converge or diverge? $$\sum_{k=1}^{\infty}\ln(\frac{k}{k+1})$$   my thought is that, I can break it down to $$\sum_{k=1}^{\infty}\ln(k) - \sum_{k=1}^{\infty}\ln(k+1)$$ then maybe using comparison test or something? But I don't know exactly how to prove whether this series converges or diverges.  Any help would be appreciated!


We know that the energy in a wave goes as electric field amplitude squared($E_0^2$) as given by poynting vector but the amplitude of electric fields are added linearly. To see why this creates a paradox, consider 2 lasers both with linearly polarized lights with electric field $E_0$. The total energy coming out of these lasers is then proportional to $2*E_0^2$. Now, suppose you find a way to add the amplitude of these 2 waves coherently so that the crest and trough match exactly with each other giving a net amplitude as $2*E_0$. Now, the energy carried by this wave would turn out to be proportional to $4*E_0^2$ which is greater than the energy we started out with!!!. How is this possible?

I have the following statement which I don't know how to explain:  Suppose I have 2 identical monochromatic waves (same intensity and phase) shooting into the same receiver. If each wave's intensity is I, based on energy conservation I would expect the 2 waves together will bring a total intensity of 2I. For example if each wave carries 100mW power, I'm expecting a 200mW total power on the receiver side.  However the summation using phasor gives a different result: if we consider that intensity is proportional to the square of wave's amplitude, the square root of 100 gives 10 for the amplitude of 1 wave (for simplicity I use 10 as amplitude which included the constants), adding the other wave of the same phase which gives 20 as amplitude of the new beam, then square it to get intensity which is 400mW instead of 200 in the above example.  If we keep going by summing 4 50mW waves with the same convention, we get (4 x sqrt(50))^2 = 800mW ... which the logic is obviously not correct.  My ultimate goal is to sum up power of beams with different intensities and phases. Phasor addition works great if I have amplitude and phase, but when I try to use intensity to get wave's amplitude I got the above dilemma. Could someone point out where my logic go wrong, and please explain the way to do power summation with intensity and phase known for each wave? Thanks!


I have the following class. Every instance of the class that I create is having the same copy of the list field  class Vertex:     label = None     data = None     connected_vertices_ids = []      def __init__(self, data):         self.data = data         self.label = randint(1, 100)      def __init__(self, vertex_id, data):         self.data = data         self.label = vertex_id      def print_vertex(self):         print(self.label, self.connected_vertices_ids)   Usage  arr = [] arr.append(Vertex('Tampa', None)) arr.append(Vertex('Clearwater', None)) arr.append(Vertex('St. Pete', None)) arr.append(Vertex('Largo', None)) arr.append(Vertex('Seminole', None)) arr.append(Vertex('Orlando', None)) for vertex in arr:     print(id(vertex), id(vertex.connected_vertices_ids))   Result     140582021542688 140582025347656   140582021542744 140582025347656   140582021542800 140582025347656   140582021542856 140582025347656   140582021542912 140582025347656   140582021542968 140582025347656

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


Is this following characterization true?  Let $x_n\subseteq \mathbb{R}$ a sequence, and define $\limsup_nx_n:=\lim_n\sup_{m\geq n}x_m$. Then $\limsup_n x_n=\max\{L$ such that $L$ is the limit of a converging subsequence$\}$  My try (for $x_n$ bounded): yes, indeed if $x_{n_k}$ is a convergent subsequence we have $\limsup_n x_n=\lim_n \sup_{m\geq n}x_n=\{$ this limit exists, hence it is equal to the limit of any converging subsequence $\}=\lim_k\sup_{m\geq n_k}x_m\geq \lim_k \sup_{l\geq k}x_{n_l}=\lim_kx_{n_k}$. Here, all the sequences inside $\lim$ are converging since monotonous and bounded. Also, from the original definition of $\limsup$ it is clear there is a converging subsequence $x_{n_k}\rightarrow _k \limsup_nx_n$, so that my claim follows. Is this (also?) true for unbounded sequences?

I have come across these three definitions of the limit superior (or upper limit) and the limit inferior (or lower limit) of a sequence of real numbers and I wonder how to establish the equivalence of these.    Walter Rudin: PRINCIPLES OF MATHEMATICAL ANALYSIS, 3rd edition:  Definition 3.16: Given a sequence $\{s_n\}$ of real numbers, let $E$ be the set of numbers $x$ (in the extended real number system) such that $s_{n_k} \to x$ for some subsequence $\{s_{n_k}\}$. This set contains all subsequential limits ..., plus possibly the numbers $+\infty$, $-\infty$. We now ... put  $$s^{*} = \sup E,$$ $$s_{*} = \inf E.$$ The numbers $s^{*}$, $s_{*}$ are called the upper and lower limits of $\{s_n\}$; we use the notation  $$ \lim_{n \to \infty} \sup s_n = s^{*}, \, \, \, \lim_{n \to \infty} \inf s_n = s_{*}.$$ Tom M. Apostol: MATHEMATICAL ANALYSIS, 2nd edition:  Sec. 8.3: Definition 8.2: Let $\{a_n\}$ be a sequence of real numbers. Suppose there is a real number $U$ satisfying the following conditions:    i} For every $\epsilon > 0$ there exists an integer $N$ such that $n > N$ implies $$a_n < U + \epsilon.$$ ii) Given $\epsilon > 0$ and given $m > 0$, there exists an integer $n> m$ such that $$a_n > U - \epsilon.$$ Then $U$ is called the limit superior (or upper limit) of $\{a_n\}$, and we write $$U = \lim_{n \to \infty} \sup a_n.$$ Statement (i) implies that the set $\{a_1, a_2, a_3, \ldots \}$ is bounded above. If this set is not bounded above, we define $$\lim_{n\to\infty}\sup a_n = +\infty.$$ If the set is bounded above but not bounded below and if $\{a_n\}$ has no finite limit superior, then we say $\lim \sup_{n\to\infty} a_n = -\infty$. The limit inferior (or lower limit) of $\{a_n\}$ is defined as follows: $$\lim_{n\to\infty}\inf a_n = -\lim_{n\to\infty}\sup b_n,$$ where $b_n = -a_n$ for $n= 1, 2, 3, \ldots$.    Robert G. Bartle and Donald R. Sherbert: INTRODUCTION TO REAL ANALYSIS, 3rd edition: Exercises for Section 3.3: Problem 10: Let $(x_n)$ be a bounded sequence of real numbers, and for each $n\in \mathbb{N}$ let $s_n \colon= \sup \{x_k \colon k \geq n\}$ and let $t_n \colon= \inf \{x_k \colon k \geq n\}$. Prove that $(s_n)$ and $(t_n)$ are monotone and convergent. Also prove that if $\lim (s_n) = \lim (t_n)$, then $(x_n)$ is convergent. [One calls $\lim (s_n)$ the limit superior of $(x_n)$ and $\lim (t_n)$ the limit inferior of $(x_n)$.]   Now how can one show that the above three definitions are equivalent (i.e. these three definitions are of the same pair of numbers)?


Using an iPhone 6, iOS 8.1, I have a reproducible issue with push notifications:   A really cool push notification comes to my phone over the data-waves with a subject like "Hey bro, I answered your question with a picture of my cat Rommel!" Me, being the touch-savvy user that I am, swipe the notification to instantly take me to the StackExchange iOS app. The StackExchange iOS app loads up and shows me the awesome blue nav bar, and ... WHITE. Yep! Whiteness. Now, don't get me wrong, I really love white (I have white shirts and a white mouse and I wish my teeth were white). But in this one particular case, I think I should actually be seeing some text and a picture of Rommel the cat.   y/n?  P.S. This is probably a duplicate, but mine is better because it is about cats also.  Edit: Super sad that it's a duplicate, but I did the right thing and flagged it as a duplicate. But given how much effort (and cats) went into writing this, I'm leaving it.

In my device (iPhone 6, iOS v8.0.2, app v1.2.0.138) whenever I receive a notification and I tap it in order to open the application, the screen that is displayed is blank.  I need to quit the app, re-open it, go to my 'inbox' and tap the last notification in order to see the question screen, focused on the comment.  This is not new (for me) in v1.2.0.138; it has been happening for at least the last ~7 updates that I've done.


I have developed a simple MIPS instruction set assembler that takes instruction from the user & output the machine code in text file using python 2.7. I want to make this program executable out of IDE; I mean I want to deliver this project to someone that doesn't have python installed on his computer. What should I do?

Python works on multiple platforms and can be used for desktop and web applications, thus I conclude that there is some way to compile it into an executable for Mac, Windows and Linux.  The problem being I have no idea where to start or how to write a GUI with it, can anybody shed some light on this and point me in the right direction please?


How to read all files and also the filenames? I am using MAC so is there any there a different way to give path on MAC in Python?

How do I get a list of all files (and directories) in a given directory in Python?


If square matrix $M$ is diagonal and positive definite, does it mean that all $m_{ii}$ (diagonal entries) of this matrix are necessarily positive?

I'm studying for my exam of linear algebra.. I want to prove the following corollary:     If $A$ is a symmetric positive definite matrix then each entry $a_{ii}> 0$, ie all the elements of the diagonal of the matrix are positive.   My teacher gave a suggestion to consider the unit vector "$e_i$", but I see that is using it.   $a_{ii} >0$ for each $i = 1, 2, \ldots, n$. For any $i$, define $x = (x_j)$ by $x_i =1$ and by $x_j =0$, if $j\neq i$, since $x \neq 0$, then:  $0< x^TAx = a_{ii}$  But my teacher says my proof is ambiguous. How I can use the unit vector $e_1$ for the demonstration?


I have several hard drives loaded with Linux/UNIX-style operating systems. Is there some way to tell the distribution or operating system installed on the drive without booting into each individually? I thought I might be able to open each drive in a GUI as root and check their /etc/issue but that file doesn't appear to be on all of the drives.

I'm working on a simple bash script that should be able to run on Ubuntu and CentOS distributions (support for Debian and Fedora/RHEL would be a plus) and I need to know the name and version of the distribution the script is running (in order to trigger specific actions, for instance the creation of repositories). So far what I've got is this:  OS=$(awk '/DISTRIB_ID=/' /etc/*-release | sed 's/DISTRIB_ID=//' | tr '[:upper:]' '[:lower:]') ARCH=$(uname -m | sed 's/x86_//;s/i[3-6]86/32/') VERSION=$(awk '/DISTRIB_RELEASE=/' /etc/*-release | sed 's/DISTRIB_RELEASE=//' | sed 's/[.]0/./')  if [ -z "$OS" ]; then     OS=$(awk '{print $1}' /etc/*-release | tr '[:upper:]' '[:lower:]') fi  if [ -z "$VERSION" ]; then     VERSION=$(awk '{print $3}' /etc/*-release) fi  echo $OS echo $ARCH echo $VERSION   This seems to work, returning ubuntu or centos (I haven't tried others) as the release name. However, I have a feeling that there must be an easier, more reliable way of finding this out -- is that true?  It doesn't work for RedHat. /etc/redhat-release contains : Redhat Linux Entreprise release 5.5  So, the version is not the third word, you'd better use :  OS_MAJOR_VERSION=`sed -rn 's/.*([0-9])\.[0-9].*/\1/p' /etc/redhat-release` OS_MINOR_VERSION=`sed -rn 's/.*[0-9].([0-9]).*/\1/p' /etc/redhat-release` echo "RedHat/CentOS $OS_MAJOR_VERSION.$OS_MINOR_VERSION"


I am entirely new to Ubuntu. I installed v14.04 LTS on the C drive of a functional PC which has a working D drive containing data. Ubuntu does not recognise it.  I have looked at similar requests for help but have not yet succeeded in solving the problem. My partitions search produced this:     11        0    1048575 sr0       11        1    1048575 sr1        8        0  312571224 sda        8        1  309686272 sda1        8        2          1 sda2        8        5    2882560 sda5   What does this tell me and what can I do, please?  The result of sudo fdisk -l was:  Disk /dev/sda: 320.1 GB, 320072933376 bytes 255 heads, 63 sectors/track, 38913 cylinders, total 625142448 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 Disk identifier: 0x000c2ac6     Device Boot      Start         End      Blocks   Id  System /dev/sda1   *        2048   619374591   309686272   83  Linux /dev/sda2       619376638   625141759     2882561    5  Extended /dev/sda5       619376640   625141759     2882560   82  Linux swap / Solaris   SOLVED after a fashion. There was no power to the drive! Presumably dislodged by replacing case. Ubuntu did not read it when powered up, so loaded drive into a dock on a Windows PC, reformatted it, Ubuntu now reads it OK. Will soon have to ask a new question about how to create a home network sharing Ubuntu and Windows. If only instructions were clear for us oldies! Many thanks for your help on this one.

I have a Toshiba satellite A-200 laptop with a Vista OS on it with 4 NTFS partitions  (C:) Vista  (D:) Entertainment  (E:) Work  (F:) Sources   and I wanted to start using Ubuntu instead. So I tried it first from the live CD and everything was OK and all the partitions were shown and working and so I decided to install Ubuntu to replace Vista on the (C:) drive. After I did that I can no longer find my folders and files on the (D:), (E:), (F:) partitions and the only file system that is shown is one 198 GB although my HDD is 320 GB.  I can't access the lost data on the remaining 120 GB which I hope is still there and not totally lost  I am now working from the live CD but I am unable to install testdisk. Can I recover the Vista partitions by the product recovery CD to get my laptop back to the factory settings? Can I recover the NTFS partitions using a recovery program for Windows or will that make the problem worse?   I need these data badly as I don't have a backup for them.