I have tried this code but it doesn't work:  private void Load_Button_Click(object sender, EventArgs e) {     using (OpenFileDialog ofd = new OpenFileDialog() { Filter = "Excel Workbook|*.xls", ValidateNames = true })     {         if (ofd.ShowDialog() == DialogResult.OK)         {              System.IO.FileStream fs = File.Open(ofd.FileName, System.IO.FileMode.Open, FileAccess.Read);              ExcelDataReader.IExcelDataReader reader = ExcelDataReader.ExcelReaderFactory.CreateBinaryReader(fs);              reader.IsFirstRowAsColumnNames = true;              result = reader.AsDataSet();              cboSheet.Items.Clear();               foreach (DataTable dt in result.Tables)                  cboSheet.Items.Add(dt.TableName);               reader.Close();              }      } }   I can't seem to run this code because the IsFirstRowAsColumnNames and AsDataSet has red underlines.  I found the code here

Is there a free or open source library to read Excel files (.xls) directly from a C# program?   It does not need to be too fancy, just to select a worksheet and read the data as strings. So far, I've been using Export to Unicode text function of Excel, and parsing the resulting (tab-delimited) file, but I'd like to eliminate the manual step.


I'm working as a consultant and would like to keep each client in a completely separate windows 10 VM (will use linux for some clients, but due to requirements in some of the clients toolchains / service structure I will need X amount of windows VMs)  I can't seem to find any good information on how many licenses per VM I'd need. Will I need 1 license per VM or could multiple VMs be on a single license?

We get a lot of questions on Super User about Windows activation and licensing. This question is an attempt to answer the most common questions in one place with a .   When reinstalling Windows, the following questions often come up:   Can I transfer the copy of Windows from my old computer to a new one? Does the license key on the sticker on my computer work on any computer? If I have a 32-bit version, can I install a 64-bit version? I have an OEM version of Windows, but only a retail disk. Can I still use it? I want to install Windows with a different language. Do I need a new license in that language? I changed some hardware. Will I be able to reactivate my computer? Can I back up my activation before doing a reinstall? How many computers can I install my license on? Do I have to deactivate my old installation before transferring a license? If so, how? How does licensing work in Windows ? What are the restrictions on transferring, reinstalling, and changing versions of Windows?


Let $q: X\to Y$ and $r: Y\to Z$ be covering maps; let $p=r\circ q$. Show that if $r^{-1}(z)$ is finite for each $z\in Z$, then $p$ is a covering map.  I've almost completed solving this problem, but am stuck at showing that the open set containing a given $z\in Z$ is evenly covered by $p$. I searched on the web and found a solution to this problem, which uses the same method as mine, except that I'm not sure why the reasoning in the last part of this solution makes sense.   Solution:   My goal is to show that $C$ is evenly covered by $p$. But first, I don't understand the statement in the solution that says $C$ is evenly covered by $r$. Also why is $p^{-1}(C)=\bigcup D_{i_\alpha}$? I've been struggling with this last step for a long time, I would greatly appreciate any help.

This problem was posted before, but not the proof (because the asker knowed the answer), only a counterexample without the hypothesis of finite fibres.  I want to know how to prove this proposition:  Let $q:X\to Y$ and $r:Y\to Z$ be covering maps. Let's suppose that for each $z\in Z$ , the set $ r^{-1}(z)$ is finite, then the composition $p = r\circ q$ is also a covering map. Well I have to consider $z\in Z$ and show that there exist a neighborhood that is evenly covered by $p$, I know that there exist a neighborhood $U$ that is evenly covered by $r$, I think that this will be the desired neighborhood. First of all $ r^{-1}(U) = \cup_{i=1}^{n}  V_i $ (it's easy to see that the unions is finite using the fact that the fibres are finite and this is a local homeomorphism between the $V_i$) Then $ p^{-1}(U)=q^{-1} (r^{-1}(U) ) = q^{-1}(\cup_{i=1}^{n}  V_i)=\cup_{i=1}^{n}  q^{-1}(V_i) $ With $ q^{-1}(V_i) \cong V_i$ under $q$ and so $\cong$ U under $p$ I never used the fact that the preimage is finite, so my proof is obviously not correct, please help me with this


How do I single screen capture with windows 10 for making programming tutorials?

I'd like to get a still image from a digital video I've taken.  A quick search has revealed these two possibilities,     which uses vlc player  which uses Imagegrab   Any suggestions on which might be better or alternatives?    I'd be using Windows OS  Update In the end I used Windows Live Movie Maker


Let $f(x) = x^2 + bx + c$, where $b, c ∈ R$. If f(x) is a factor of both $x^4 + 6x^2 + 25$ and $3x^4 + 4x^2 + 28x + 5$, then find $f(x)$  My approach ,on dividing both quartic equation by $f(x)$ remainder is zero, but not getting the answer

Let $P (x) = x^2 + bx + c$, where $b$ and $c$ are integer.       If $P(x)$ is a factor of both $x^4 + 6x^2 + 25$ and $3x^4 + 4x^2 + 28x  + 5$, find the value of $P(1)$.   I am not being able to solve this.Some hints/suggestions?  Tell me if I can edit to improve this question.I could'nt try much.Got stuck.


Can you get cursed into being stuck in a Hogwarts painting?  Do people in the paintings have feelings? Are they secretly trapped in Hogwarts? Are the Hogwarts paintings actually sinister prisons similar to the horcruxes in that they take the "aura" from the witch or wizard and "contain" it in a "tight cage"?

Does J.K. Rowling address how the interactive portraits work? Would a portrait painted after a Wizard/Witch died become interactive, or does the painting of the portrait have to take place during the Wizard/Witches lifetime?


I'm trying to make a simple game in java with Box2D but it crashes 50% of the time.  Exception in thread "main" java.lang.NullPointerException     at Enemy.<init>(Enemy.java:41)     at Game.<init>(Game.java:27)     at Game.main(Game.java:110)  Process finished with exit code -1   Here's the function:  public Enemy(int size, World world, Player p) {         super(ID.Enemy,size);          Random rand = new Random();         Vec2 pos = new Vec2();         do pos.set(rand.nextInt(Game.width),rand.nextInt(Game.height));         while(pos.sub(p.body.getPosition()).length()<100.0);          BodyDef bodyDef = new BodyDef();         bodyDef.type = BodyType.DYNAMIC;         bodyDef.position.set(pos.x/10f,pos.y/10f);         this.body = world.createBody(bodyDef);         CircleShape shape = new CircleShape();         shape.setRadius(size/10f);         FixtureDef fixtureDef = new FixtureDef();         fixtureDef.density = 1;         fixtureDef.restitution = 0;         fixtureDef.shape = shape;         body.createFixture(fixtureDef);         body.setUserData(this);          this.target = p.body.getPosition();         this.dir = new Vec2();      }   The compiler says the problem is on the line  body.createFixture(fixtureDef);

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?


Today I saw  tagged "hava" and the question was obviously about "java", I fixed the question tag but how can the  be deleted? I think it's a typo and it's useless (0 question tagged with it).

During the re-tagging of questions, tags sometimes become orphaned from existing questions.  Are these zombie tags ever removed from the ?  What if a tag is misspelled and needs to be removed? How do we get rid of it?


Show that $\frac{1}{2} +\frac{1}{2^2} +\frac{1}{2^3} + ... +\frac{1}{2^n} < 1 $ and explain how the picture below is a good representation of this inequality.  I came across this in an Algebra book and I'm really interested in how the proof for this problem looks like. Does anyone know how to go about it ?

Why does the following hold:  \begin{equation*} \displaystyle \sum\limits_{n=0}^{\infty} 0.7^n=\frac{1}{1-0.7} = 10/3\quad ? \end{equation*}  Can we generalize the above to      $\displaystyle \sum_{n=0}^{\infty} x^n = \frac{1}{1-x}$ ?   Are there some values of $x$ for which the above formula is invalid?  What about if we take only a finite number of terms? Is there a simpler formula?     $\displaystyle \sum_{n=0}^{N} x^n$   Is there a name for such a sequence?    This is being repurposed in an effort to cut down on duplicates, see here: Coping with  duplicate questions.  and here: .


I'm trying to make a program that checks to see if a string of letters is a text file, for a dictionary type program, but I can't get it to work. My code is:  package main;  import java.io.*; import java.util.Scanner;  public class Test { public static void main(String [] args) {     Scanner Enter = new Scanner(System.in);       System.out.println("Please Enter your word");     String Guess = Enter.next();      // The name of the file to open.     String fileName = "../Dictionary/Resources/wordsA.txt";      // This will reference one line at a time     String line = null;      int i = 0;     int numWords = 0;      String[] wordArray;     wordArray = new String[15000];       try {         // FileReader reads text files in the default encoding.         FileReader fileReader =              new FileReader(fileName);          // Always wrap FileReader in BufferedReader.         BufferedReader bufferedReader =              new BufferedReader(fileReader);          while((line = bufferedReader.readLine()) != null) {             numWords++;              wordArray[numWords] = line;         }          // Always close files.         bufferedReader.close();              }     catch(FileNotFoundException ex) {         System.out.println(             "Unable to open file '" +              fileName + "'");                     }     catch(IOException ex) {         System.out.println(             "Error reading file '"              + fileName + "'");                           // Or we could just do this:          // ex.printStackTrace();     }     for(i = 0; i < 10; i++){         System.out.println(wordArray[i]);         if(Guess == wordArray[i]){             System.out.println("In dictionary");         }         else{             System.out.println("Not in Dictionary");         }     } } }   It runs through my text file and prints the first 10 words in the file and displays whether or not my word given is in the text file dictionary or not. What I don't get is as you can see from my output below, I enter a word like "AA" and it still says not in the dictionary but it should say it is? I can't figure out why.  Example Output:   Please Enter your word AA null Not in Dictionary AA Not in Dictionary AAH Not in Dictionary AAHED Not in Dictionary AAHING Not in Dictionary AAHS Not in Dictionary AAL Not in Dictionary AALII Not in Dictionary AALIIS Not in Dictionary AALS Not in Dictionary

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


I have found an interesting exercise in my introduction to graphs workbook:  Let $\operatorname{ad}(G) = \frac{2\vert E(G)\vert}{\vert V(G) \vert}$ and $\operatorname{mad}(G) = \max\{\operatorname{ad}(H): \text{$H$ is an induced subgraph of $G$}\}$.  Given a graph $G$ and a number $k \geq 3$, prove that if $\chi(G) > k \wedge \operatorname{mad}(G) \leq k \Rightarrow \exists A \subseteq V(G)$ such that $[A]_{G}$ is k - regular.  I believe this can proved by contradiction:  Given a $G$ and $k$ for which the properties hold, we assume that $G$ has no induced subgraph $H$ that is k - regular. We then prove that if $\nexists H$ then at least one of the property is false and thus we contradict ourselves however I can't quite figure out the connection between $H$ and the mentioned properties.  How would you go about solving this?

Let $G = (V, E)$ be a graph and $ad(G) = \frac{2|E|}{|V|}$ the average degree of $G$.  $$ mad(G) = max ( ad(H) : H \le G ) \text{ the maximum average degree of a subgraph of $G$} $$  We know that $\chi(G)\gt k$.  Proof that $G$ has a $k-regular$ subgraph.  I've been chewing this for quite a while. Any pointers that may lead me to a rigorous proof ?  EDIT : $mad(G) \le k$ and $k \ge 3$. I left it out by accident.


Intro: A continuous, differentiable function $F(x,y)$ can be pictured as a surface over the $(x,y)$ plane. At each point in space, we could plot another function $\frac{\partial F}{\partial y}(x,y)$, which would give us another surface. By integrating this derivative in $y$ direction, we get changes in height to the actual function $F$ due to motion in the $y$ direction. However, what do we get by integrating this derivative in the $x$ direction, and why?  Part I Understand: Say at some point $(x_0,y_0)$, we hold $x=x_0$, and compute the integral: $$\int_{y_0}^{y_1}{\frac{\partial F}{\partial y}(x,y)\Bigr\rvert_{x = x_0}dy}$$ This would give us an area under a slice of the graph of $\frac{\partial F}{\partial y}(x,y)$, which would correspond to a change in height in the graph of $F(x,y)$ due to moving solely in the $y$ direction.  Part I'm Having Trouble Understanding: Say that starting at some point $(x_0,y_0)$, we hold $y=y_0$ constant, and compute the integral: $$\int_{x_0}^{x_1}{\frac{\partial F}{\partial y}(x,y)\Bigr\rvert_{y = y_0}dx}$$ This would give us an area under a slice of the graph of $\frac{\partial F}{\partial y}(x,y)$, but an area of a slice taken in the $x$ direction. I'm told that this would correspond to the rate of change of the area given by... $$\int_{x_0}^{x_1}{F(x,y)\Bigr\rvert_{y = y_0}dx}$$ ...with respect to the $y$ direction. However, I'm having trouble intuitively understanding this...or picturing it. Any and all help would be greatly appreciated! Thanks!

let $f(x,y)$ continuous in $[a,b] \times [c,d]$ and $\frac{\partial f}{\partial y} $ continuous in $[a,b] \times [c,d]$, define $$F(y) = \int_a^b f(x,y)dx$$   then $$F'(y) = \int_a^b \frac{\partial f}{\partial y}(x,y) dx$$   Can you explain the intuition behind this rule, in terms of geometry for example, or how did Leibniz  came up with this rule?


Can some one kindly explain me the scenaro in real application when one needs to write equals() and hashcode() method . I heard we do it in hibernate's entity class or in test program. Can some one elaborate this.Thanks in advance

What issues / pitfalls must be considered when overriding equals and hashCode?


I installed Ubuntu with Windows. Before installing, I shrunk the space for Ubuntu. Now I have 3.7GB free in my Ubuntu home.That's not enough for me.  So I shrunk my NTFS partition, it's now unalocated. Then I selected ext4 (Ubuntu home) to resize.   But it is 4GB and GParted not allowed to resize more than 4GB. But my 1GB is unallocated.

I have a dual boot setup with Ubuntu and Windows 7. I need to shrink my root Ubuntu volume in order to get some free space to create a new partition. Are there any Windows based tools that will do this for me? I tried booting up in gparted to do this but I cannot tell which partition is which since I cannot find the size (it displays everything in blocks).


My code isn't compiling the error that is given to me is "non-static method sumArray(double[]) cannot be referenced from a static context". I have tried to figure this out but I'm not sure what I need to change. Please help and let me know what the error is.  import java.util.*; public class Homework5 {  public static void main( String[] args ) {      Scanner key = new Scanner(System.in);     System.out.println("How many numbers would you like in the array?");     int arrayLength = key.nextInt();      Homework5 inst1 = new Homework5();      double[] numbers = new double[arrayLength];     System.out.println("Enter " + arrayLength + " numbers:");      for( int i=0; i < arrayLength; i++ )     {         numbers[i] = key.nextDouble();     }     System.out.println( "The sum is "+sumArray(numbers)); }  public double sumArray( double[] newArray ) {     double total=0;      for( int index = 0; index < newArray.length ; index++ )     {         total = total+newArray[index];     }      return total;   }   }

The very common beginner mistake is when you try to use a class property "statically" without making an instance of that class. It leaves you with the mentioned error message:     You can either make the non static method static or make an instance of that class to use its properties.   Why? I am not asking for solutions. I would be grateful to know what is the reason behind it. The very core reason!  private java.util.List<String> someMethod(){     /* Some Code */     return someList;             }  public static void main(String[] strArgs){                // The following statement causes the error. You know why..     java.util.List<String> someList = someMethod();          }


I need to pass a reference to a string variable to a method that implements (SchedulableContext sc) I tried:   global void execute(SchedulableContext sc, loginstring){   but I'm getting a compile error "Compile Error: unexpected token: ')'" What am I missing here?

Is there a way to pass a parameter into a schedulable class execute method? We were trying to pass a string from another scheduled class into this scheduled class but it looks like we can't do that?  As quick context we have the scheduled date and time as a record in a custom object so we are trying to pass that info into our scheduled class.  global class MturkVSSchedule implements Schedulable{      global void execute(SchedulableContext SC, **String s**){   Putting String S throws a compile error. Is there a different way that I'm missing?


I am trying to insert from textfields data into my database. Insert data to a table compte_utilisateur and I've 2 comboboxes : first for groupe containing names of all groups (alias libelle_groupe) in my database, and second for statut containing all status values (alias valeur) in my database.   I want to insert into my db a user ( alias compte_utilisateur) and to do that i need id_groupe of the name of group selected in the combobox and id_statut of the status selected in my combobox.   I've tried this, but i'm having an exception : java.lang.NullPointerException  the code :  ResultSet valeur1= stmtListeLivre.executeQuery("select id_groupe from groupe where libelle_groupe='"+combo_name.getSelectedItem().toString()+"'");  ResultSet valeur2= stmtListeLivre1.executeQuery("select id_statut from statut where valeur='"+jComboBox1.getSelectedItem().toString()+"'");  Number val1 =  ((Number) valeur1.getObject(1)).intValue();  Number val2 =  ((Number) valeur2.getObject(1)).intValue();   String requete="INSERT INTO compte_utilisateur(Id_compte, Nom, Prenom, Matricule, Id_groupe, Id_statut) VALUES (?,?,?,?,?,?)";       pst=maConnexion.ObtenirConnexion().prepareStatement(requete);     pst.setString(1, jTIdf.getText());     pst.setString(2, jTNom.getText());     pst.setString(3, jTPrenom.getText());     pst.setString(4, jTMatricule.getText());       pst.setString(5, val1.toString());      pst.setString(6, val2.toString());      pst.execute();

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?


class Bar{         int barNum=28;     }      class Foo{         Bar myBar = new Bar();         void changeIt(Bar myBar){   //Here is object's reference is passed or the object is passed?             myBar.barNum = 99;             System.out.println("myBar.barNum in changeIt is " + myBar.barNum);             myBar = new Bar();  //Is the old myBar object destroyed now and new myBar is referring to something new now?             myBar.barNum = 420;             System.out.println("myBar.barNum in changeIt is now "+myBar.barNum);         }         public static void main(String args[]){             Foo f = new Foo();             System.out.println("f.myBar.barNum is "+f.myBar.barNum);    //Explain f.myBar.barNum!             f.changeIt(f.myBar);    //f.myBar refers to the object right? but we need to pass reference of the type Bar in changeIt!?             System.out.println("f.myBar.barNum after changeIt is "+ f.myBar.barNum);    //How do you decide f will call which myBar.barNum?         }     }   Explain the questions mentioned in the comments please     The output of the code is      f.myBar.barNum is 28     myBar.barNum in changeIt is 99     myBar.barNum in changeIt is now  420  f.myBar.barNum after changeIt is 99

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?


I have a select option which is working perfectly but only one time, the request does not executes again.  I think it's because of the 'onchange' event.  This is my ajax code :  jQuery(document).ready(function($) { $('#referenceProduit').change(function(){     //on recupere la valeur de l'attribut value pour afficher tel ou tel resultat     var req=$('#referenceProduit').val();     //requête ajax, appel du fichier function.php     $.ajax({         type: "POST",         url: "include/php.php",         data: "referenceProduit="+req,         dataType : "json",         //affichage de l'erreur en cas de problème         error: function(XMLHttpRequest, textStatus, errorThrown) {             alert(XMLHttpRequest + '--' + textStatus + '--' + errorThrown);         },         //function s'il n'y a pas de probleme         success:function(data){             //On affiche la réponse du serveur             $('.produit').empty();             $('.produit').prepend(data.produit);             $('input[name="designation"]').val(data.resDisplayForm.designation);             $('input[name="prix"]').val(data.resDisplayForm.prix);         }     }); }); });    HTML code :
   Reference
     <select class="form-control" name="referenceProduit" id="referenceProduit">       <option selected="selected" disabled="disabled">Choisir</option>       <?php foreach($lesProduits as $unProduit){?>       <option name="<?php echo $unProduit['id'];?>" value="<?php echo $unProduit['id'];?>"><?php echo $unProduit['reference']?></option>       <?php } ?>     </select>

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I'm trying to replace the image when it encounters error on the initial src by using this... $(".thumbnails").on("error", function () {     if ($(this).attr("src") != "/assets/img/img-error.jpg") {         $(this).attr("src", "/assets/img/img-error.jpg");     } });  It's working fine on images that has been loaded during page load..however when I got images appended in a modal or popover it didn't trigger the function even though I'm using .on() delegation I also tried using this but it didn't do the function even on images during page load.. $(document).on("error", ".thumbnails", function () {     if ($(this).attr("src") != "/assets/img/img-error.jpg") {         $(this).attr("src", "/assets/img/img-error.jpg");     } });


What is the best display to have for the years on a credit card expiry date field for payment. Should you have the whole year 2013, 2014, or is it better to have it displayed the same as on the credit card itself, 13, 14, etc.  Also how many years should you have? Amazon seems to go 16 years, but do some credit cards really have that long an expiry date?

What is the best format for gathering the card expiry data during the checkout process on an eCommerce website?  So we need to collect the month of expiry and the date of expiry (as standard on all web card transactions).  I have seen this done differently on websites so it would be good to know the best practice.


When creating custom objects, in the "Optional Features" section I can optionally check boxes for:   Allow Reports Allow Activities Track Field History Allow in Chatter Groups   All these boxes seem like they add features the object otherwise wouldn't have.    It seems like checking them to get these extra features is a good idea.    But they are not checked by default so I'm wondering if there is any downside to checking them... is there good reason not to check these boxes?

I was hoping that the introduction of "Light Application object" would do something about the data storage of junction objects, but it doesn't seem to do anything about it.  The  seems limited to why I would use a "Light Application object", what are the advantages?


Is there a way to hide & unhide a Trello list?    Or is there another kind of work around?

Does anyone knows how can we hide and show entire tasks lists in Trello, or if not possible, if it will be done nearly?  The problem is, that you have a list of 5 or 6 columns, but some of them need to get out of our sight while working, however, we must be able to check them a few times.  Plus, if you have only 4 for instance, it wouldn't be nice to not have them to narrow for comfortable reading.


This is a minimal working example of my code:  \documentclass[12pt]{article} \usepackage{pstricks-add} \begin{document} test \end{document}   By removing the \usepackage{pstricks-add}, everything works properly. With this line in the code, however, I obtain the error:  ! Paragraph ended before \ProvidesPackageRCS@i was complete.<to be read  again>\par   I have read another thread with the same problem, but there, the answers suggest waiting a few days for the bug to be fixed. The thread, however, was placed a month ago. And I have installed texmaker and MikTex this week.  Also, I can't find older versions of the pstricks-add package to replace the one installed right now.   Has anyone solved this problem yet?   Thank you very much.

Consider the following MWE:  \documentclass{article} \usepackage{pstricks} \begin{document} A \end{document}   It produces the error  Runaway argument? ] {pgffor.code.tex}  ! Paragraph ended before \ProvidesPackageRCS@i was complete. <to be read again>                     \par  l.11   How do I fix this?


Users younger than 13 are deleted immediately once SE is informed about the case. The reason for this is , the US law intended to protect children online.  The guidelines as far as I understand them for me as a moderator are that I should report such users to SE, and they'll use a special deletion procedure to comply with the law.  The  about this topic made me wonder, am I actually required to report such cases to SE? I don't think this specific law serves any useful purpose in the case of SE, and I'm not a US citizen anyway. From that point of view I don't see any reason why I should help to enforce this.  But I am also a moderator, so I'm bound by a few more rules, the main one being the moderator agreement we all have to agree to. I'm acting on behalf of SE to some extent, but not really in a legal way as far as I understand.  Do I as a moderator have an obligation to enforce the minimum age here on SE, do I have to report any user below that age that I notice, or am I free to ignore such cases?

What are the age requirements for using the Stack Exchange network and what should moderators do if they encounter an underage user?


What is the difference between these sentences:  Schools should start to use the computers; Schools should start using the computers.  Thanks in advance.

What is the difference between "gerund" and "infinitive"? I do not understand the differences.Can you explain them?


Consider  - it's from mid January, it has one answer + some comments. The last obvious action is from Jan 19. Who's pushing that question to the front page?

I see the  on the user page.  It seems to edit posts sometimes.  What is it? And why has it downvoted over 1800 times? See also:


I read statements like ‘An LED has a fixed voltage drop regardless of the current running through it’, but looking at the following examples (using arbitrary numbers), can someone confirm that the following are true/correct -   If I had a 12V battery, 500 Ohm resistor and an LED with a forward voltage of 2V, the current in the circuit would be 20mA ((12 – 2)/500). The current-voltage curve of an LED shows a small increase in current would equal a tiny increase in forwarding voltage, so for example if I wanted the current to be 40mA, the LED would have a tiny increase in voltage drop? If I had a 3V battery, no resistor and an LED with a forwarding voltage of 2V, what happens? KVL states that the total voltage drop of the circuit must equal the power source. So in simplistic terms, does the battery just pump out as much current until the LED is forwarding 3V, and the current of the circuit is whatever the current-voltage curve of the LED says is at 3V? If both of the above are true, then is the statement regarding LEDs having a fixed voltage drop, is it more correct to say that an LED has roughly a fixed voltage drop when a similar amount of current is running through it? …and finally, and this may never happen or even be possible, for example a 20V battery and just an LED, apart from the LED disintegrating, would it ever be possible for the power supply to not be able to supply enough current so that the LED can reach a voltage drop of 20V, and therefore breaking KVL, what happens in that situation?   I am fairly new to this stuff, and not looking for a too technical explanation, but really just a confirmation of the above questions, and if they are wrong a simple explanation as to why that is.  Thanks.

If I had a 12V battery and wanted to use an LED that used 2V and 20mA, then I need a resistor that will drop 10V and provide enough resistance to produce a current of 20mA. Therefore I would use R=V/I = R = 10/0.020 = 500 Ohms.  Therefore I would need a 500 Ohm resistor. I believe this is correct so far?  My confusion comes from when we then look at the circuit as a whole. The circuit has a current of 0.020A and a resistance of 500 Ohms, which when looking at V=IR equals 10V (the resistor), not the 12V that it should be there for the whole circuit?  Where am I going wrong? How do I make V = IR work regarding the whole circuit so that V = 12?  I'm pretty new to this sort of thing and no doubt I've probably made a daft mistake but if someone could just help clear up my confusion it would be appreciated.  Thanks.


8:00 pm : I started to drink.  9:00 pm : I finished drinking.  9:02 pm : I was heading out the door.  9:03 pm : I met old friend Suzi and we decided to drink more just two of us.  9:30 pm (now): We drink.  In this situation, I said like     A. I had just finished drinking and just as I was about to leave, I happened to meet old friend from college at the bar, Suzi. So, we decided to drink more and we're here at another bar drinking.   Here, A means B or C ?     B. Only a short while ago from now, I finished drinking and just as I was about to leave, I happened to meet old friend from college at the bar, Suzi. So, we decided to drink more and we're here at another bar drinking.      C. I finished drinking and was about to leave, and only a short while after I finished drinking and was about to leave, I happened to meet old friend from college at the bar, Suzi. So, we decided to drink more and we're here at another bar drinking.   I want to know the meaning of "just" here.

I had just arrived at the hotel, checked in and gotten into my room. Just as I was about to unpack, I noticed that one of my bags was missing. At first I thought I had left it back at the airport, but it turned out that I had left it on the taxi.  Here, what's the meaning and role of "just"?  Why do you guys input the word "just" here?  What exactly does the word do grammatically?   Could you help me?


I am running multinomial logistic regression Model for rating Hotels.  I have a variable called CHAIN ID which is a bunch of numbers but there are too many such IDs, maybe around 1000. I want to include this variable in my model.  I have tried that but R is not responding.  Is there any way to deal with these many levels of that variable?

I have a dataset that consists of only categorical variables and a target variable. I want to predict the (binary) target variable with the categorical variables.  I am trying to do this in Python and sklearn.  The categorical variables have many different values. I was thinking to create dummy variables for each value in all the categorical variables. However, in the end this results in a sparse data set with thousands of variables.  How would you go about to reduce the number of dummy variables? Would you use Chi2 to select useful features?  Or would you not make dummy variables at all?


I have a requirement to audit all the commands run by a user after he logs into root. Can anyone please help me with it. (for Suse-Linux) To explain even more simpler  user alex logs into the server with his username and password switches to root user, runs few commands (I want to know what commands were run by Alex after switching into root user) if possible with timestamps

If I:   [user@notebook ~] sudo echo 123456uu 123456uu [user@notebook ~]    Then I can see that in the logs:  [root@notebook /var/log] grep 123456uu * auth.log:Jan  9 17:01:51 notebook sudo: user : TTY=pts/3 ; PWD=/home/user ; USER=root ; COMMAND=/bin/echo 123456uu [root@notebook /var/log]    but if I:   [user@notebook ~] sudo su - [root@notebook ~] echo 1234567zz 1234567zz [root@notebook ~]    I cannot see it in the logs:   [root@notebook /var/log] grep 1234567zz * [root@notebook /var/log] echo $? 1 [root@notebook /var/log]    My question: How can I turn the logging on for the commands within the "sudo su -"?  OS is an Ubuntu 12.04 but the question is in general.   UPDATE#1:   [user@notebook ~] sudo su - [sudo] password for user:  [root@notebook ~] echo zizizi zizizi [root@notebook ~] cd /var/log [root@notebook /var/log] grep -iIR 'zizizi' * [root@notebook /var/log] grep 'COMMAND=/bin/su -' * auth.log:Jan 10 15:42:42 notebook sudo: user : TTY=pts/1 ; PWD=/home/user ; USER=root ; COMMAND=/bin/su - [root@notebook /var/log]


I am using  for a presentation.  The problem is that I want to be able to specify some colors with xcolor. When I try to do the usual    \usepackage[usenames,dvipsnames]{color}   I get an error:      ! LaTeX Error: Option clash for package color.   Did anyway encounter this before?  Thank you!  Edit: I am using the fancyslides class.

I have an option clash between package xcolor and another package, but I don't know which. Here is my MWE  \documentclass[10pt]{beamer} \setbeamertemplate{navigation symbols}{} \usepackage{caption} \usepackage{subcaption} \usepackage{url} \usepackage{color} \usepackage[usenames]{xcolor}  \author{The author} \title{Package conflicts} \date{October 3rd, 2012}  \begin{document}  This is supposed to be \textcolor{olivegreen}{olivegreen} \end{document}   And the error message is :  This is pdfTeX, Version 3.1415926-1.40.10 (TeX Live 2009/Debian) entering extended mode (./error_xcolor.tex LaTeX2e <2009/09/24> <blablabla> ! LaTeX Error: Option clash for package xcolor.   I hope this is enough log for you guys. At this time of the day, I'm hoping for America to save my french ass ... again : )


In XSD, SOAP and other XML conventions you'll often see things like:  <book>  <title>Harry Potter</title>  <author>J.K. Rowling</author> </book>   Now I'm wondering, what happened to attributes? To me it makes more sense to write this as:  <book title="Harry Potter" author="J.K. Rowling" />   But apparently, for some reason, smarter people than me chose otherwise. Could someone explain why, and what attributes are for then?

At work we are being asked to create XML files to pass data to another offline application that will then create a second XML file to pass back in order to update some of our data. During the process we have been discussing with the team of the other application about the structure of the XML file.   The sample I came up with is essentially something like:  <INVENTORY>    <ITEM serialNumber="something" location="something" barcode="something">       <TYPE modelNumber="something" vendor="something"/>     </ITEM> </INVENTORY>   The other team said that this was not industry standard and that attributes should only be used for meta data. They suggested:  <INVENTORY>    <ITEM>       <SERIALNUMBER>something</SERIALNUMBER>       <LOCATION>something</LOCATION>       <BARCODE>something</BARCODE>       <TYPE>          <MODELNUMBER>something</MODELNUMBER>          <VENDOR>something</VENDOR>       </TYPE>    </ITEM> </INVENTORY>   The reason I suggested the first is that the size of the file created is much smaller. There will be roughly 80000 items that will be in the file during transfer. Their suggestion in reality turns out to be three times larger than the one I suggested. I searched for the mysterious "Industry Standard" that was mentioned, but the closest I could find was that XML attributes should only be used for meta data, but said the debate was about what was actually meta data.  After the long winded explanation (sorry) how do you determine what is meta data, and when designing the structure of an XML document how should you decide when to use an attribute or an element?


Prove the relation $\lim_{n\to \infty}\frac 1 {n^{k+1}}\sum_{i=1}^n i^{k}=\frac 1 {k+1}$ for any non negative integer k.

By considering:  $$\lim_{n\to\infty}\frac{\sum_{k=1}^n k^1}{n^{2}} = \frac 1 2$$ $$\lim_{n\to\infty}\frac{\sum_{k=1}^n k^2}{n^{3}} = \frac 1 3$$ $$\lim_{n\to\infty}\frac{\sum_{k=1}^n k^3}{n^{4}} = \frac 1 4$$  Determine if this is true: $$\lim_{n\to\infty}\frac{\sum_{k=1}^n k^m}{n^{m+1}} = \frac 1 {{m+1}}$$  If it is, prove it.  If it is not, evaluate $\lim\limits_{n\to\infty}\frac{\sum_{k=1}^n k^m}{{m+1}}$.


Commonly, you see questions that state the problem (in very bad, lowercase Engrish) followed (or proceeded) by (lowercase) "c#". Can we do something about this?  Maybe ban C# from titles?  is sufficient to indicate you're working with C#.  It's worth noting that this problem isn't specific to C#. It's just the most common one (from my perspective) at this time. Maybe ban programming languages from being in the title? We don't need "reading xml file php" with a question that screams encoding error. What we need is titles like "Possible encoding error while reading XML file". The tag of  is sufficient to indicate it's for PHP.

So we have lots of questions that are titled like this:  Specifically, questions that have one of their tags in front of their title. Thankfully, these silly users usually use a hyphen or a colon afterwards, which makes it really easy to . Can we clear up this clutter?  Perhaps with a filter that strips off the excess when posting? EDIT: As an added bonus, see  for another style of question title that bugs the heck out of me.


I recently upgraded my Ubuntu partition from 13.10 to 14.04. After the upgrade I rebooted the system and got the following error message whilst booting:  Serious errors were found while checking the disk drive for /.  Press. I to ignore, S to skip mounting, or M for manual recovery.   As I'm not very skilled in manually recovering data in Ubuntu I could not do very much but to skip mounting and to wait for the system to boot, which it did partially but failed to load some kernel packages. Eventually I just get a black screen and am only left with rebooting the system again. Anyone got the same problem or knows how to solve this problem?

I have just set up my new system by creating three partitions on a whole hard disk (/boot, /home, swap and /). I saw  article and now I am getting those errors and the system provide me with some options: (I to ignore, S to skip mounting or M for manual recovery).   I am forced to choose skip mounting because I don't know what manual recovery is. Despite the error I get I think that the system boots okay because I can use the system but this error is very annoying.


I am on Ubuntu:-    No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 18.04.1 LTS Release:    18.04 Codename:   bionic   On terminal, I run this command:-  time -f "\t%E real,\t%U user,\t%S sys" ls -Fs   I get this error:-  zsh: command not found: -f -f "\t%E real,\t%U user,\t%S sys" ls -Fs  0.00s user 0.00s system 76% cpu 0.002 total   I know this has got something to do with my zsh installation (zsh 5.4.2 (x86_64-ubuntu-linux-gnu)).  Can someone solve this issue?

I tried to use time command with -f option to format the output of time, but I get the following error:  -f: command not found   Then I tried to use other options -a, -o, etc and I get the same error. Not even time --version doesn't work (--version: command not found).  Don't tell me to read the man because I already do it by many times... All these options are specified there. So, where could be the problem?


I ran into this sentence written by a student: there are different costs in face-to-face classes, such as the cost of commuting between university and home. Can we replace commuting with commute because commute is also a noun like the gerund 'commuting'? Also, when a noun form exists, when do we use the noun and when the gerund? Is either of them preferable? I couldn't find the answer anywhere I looked. Thanks in advance.

Could anyone explain when to use a noun or a gerund?  Are these sentences correct? What is the difference between usage of gerund and noun there?        I worked on the improvement of the article.   I worked on the article improving.   I worked on the improving of the article.                The investment idea was published.   Investing idea was published.


How to recreate this selected matcap material in Cycles? It's most glossy in the center and has this special coat.

Is it possible to use Matcap materials as an actual material for a model so that I can render with it? There are certain parts that I want to apply specific Matcaps textures to but I want to actually use them to render and not just for sculpting purposes.  Is this at all do-able?


I am currently a under graduate and will be going into my final year of a Computer science course in October.   The final year consists of a large programming project. Over the last 6 months I have been working on ideas for the project. To the point where I have a nearly finished application.   If I was to use large chunks of code that I have written over the last 6 months in the project would this count as Plagiarism? It doesn't feel right been able to just copy and past code to get a head start on the project even though I had written the code in the first place.

I am taking a graduate machine learning course and am working with another student in the class on a final project. In his undergraduate studies, the other student wrote code that accomplished a similar task, and mentioned in our previous meeting that we would be able to leverage much of this code for our current project if we wanted to. I responded that I believe it would constitute textbook cheating and self-plagiarism, but the other student disagrees and believes that re-using the code would not constitute self-plagiarism because he himself wrote it, and it would be redundant to re-write what he had already done.  Now, the course instructors have made it clear that we are not allowed to use any external libraries to perform certain classes of algorithms for this project. This students' prior code would fall under this category of prohibited tools, but he claims that it doesn't qualify because he wrote the code himself (so it is not an "external library"). I believe this is hyperbole, but he disagrees. It is also worth mentioning that this code is licensed under an , though it is not widely used at all.  It has gotten to the point where I am uncomfortable going forward with the project by re-using his old code, and he does not want to do work on the project that he considers to be redundant. My worry is that if it turns out we're not allowed to reuse the code, then using it could cause us to fail the course and severely negatively affect our reputations. Even if we don't get caught, I personally feel that it would be unethical to copy-paste old code and present it as though it's fresh code for this current project.  I am unsure of how to proceed. I have tried reaching out to the professor of the course some time ago (she has been traveling for some conferences recently and will be for a while) but I have not heard back from her. Additionally, the course TAs have been unwilling to weigh-in on the situation.  I have the following questions:   Is the above situation usually considered to be self plagiarism? Why or why not? Is the above act typically allowed in an academic setting? Assuming you are in my position, and consider re-using the code to be cheating and/or unethical, what is the best way to proceed; both in terms of how to make progress on the project, how to compromise with my group mate, and how to protect myself if my group mate refuses to budge.


I am trying to select in my regex only what is between < and -  Regex  <(.*)-   STRING  <SM1-SRVNET-P:Sys   OUTPUT  SM1-SRVNET   Desired Exit  SM1

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


I am interested in getting Children of Morta or similar games to run on Mac or Linux. They are pretty decent machines with dedicated AMD GFX cards.  How to emulate Windows for gaming or get such games to run which are natively NOT supported off Steam. Anybody had any success which such Steam Indie game titles?

Ok, I was kind of surprised that this hadn't been asked here before, but maybe it's too technical for this site. You guys decide.  I've heard lots of different stories about setting up Wine on Ubuntu, WineTricks, PlayOnLinux etc., but never a 'This is the best way to do it for Steam and Steam games' thread.  So has anyone had any real success getting their Steam games to run on Ubuntu through Wine or something similar? If so, could we get some specific steps?


I have a variable. Let's call it toto.  This toto can be set to undefined, null, a string, or an object.  I would like to check if toto is set to a data, which means set to a string or an object, and neither undefined nor null, and set corresponding boolean value in another variable.  I thought of the syntax !!, that would look like this:  var tata = !!toto; // tata would be set to true or false, whatever toto is.   The first ! would be set to false if toto is undefined or null and true else, and the second one would invert it.  But it looks a little bit odd. So is there a clearer way to do this?  I already looked at , but I want to set a value in a variable, not just check it in an if statement.

Can I convert a string representing a boolean value (e.g., 'true', 'false') into a intrinsic type in JavaScript?  I have a hidden form in HTML that is updated based upon a user's selection within a list. This form contains some fields which represent boolean values and are dynamically populated with an intrinsic boolean value. However, once this value is placed into the hidden input field it becomes a string.  The only way I could find to determine the field's boolean value, once it was converted into a string, was to depend upon the literal value of its string representation.  var myValue = document.myForm.IS_TRUE.value; var isTrueSet = myValue == 'true';   Is there a better way to accomplish this?


I need to prepare a tabular where the third and the sixth rows appear only in the second slide, for their elements are the answer of the exercise. I attempted putting a general \onslide<2-> in > but it doesn't work. Can someone fix that for me, please?  \documentclass{beamer} \usepackage{tabu}  \begin{document} \begin{frame} \frametitle{Activity} \begin{center} \renewcommand{\arraystretch}{1.25} \begin{tabu} to \linewidth   {*{3}{>{\bfseries}X[0.2rm]X[lm$]>{\color{Blue}}X[lm$]}} % Exercise 1) & 3x + 6 & 3(x+2) & 2) & 5x+15 & 5(x+3) & 3) & 4x+20 & 4(x+5) \cr \end{tabu} \end{center} \end{frame} \end{document}

I have a table with 7 columns and want to show the first 5 at once, and then  the 6th and 7th on consecutive slides.  This is the code I have for now:  \begin{frame}{Наслов}     \begin{itemize}         \item Ставка.     \end{itemize}         \begin{tabular}{ccccc<{\onslide<2->}c<{\onslide}c}             $p_1$ & $p_2$ & $\ldots$ & $p_{9}$ & $p_{10}$ & $W$  & $D$\\             $1$   & $1$   & $\ldots$ & $1$      & $1$     & $w_1$& $d_1$\\             $1$   & $1$   & $\ldots$ & $1$      & $0$     & $w_2$& $d_2$\\             $1$   & $1$   & $\ldots$ & $0$      & $1$     & $w_3$& $d_3$\\             $1$   & $1$   & $\ldots$ & $0$      & $0$     & $w_4$& $d_4$\\             $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$ & $\vdots$\\             $0$   & $0$   & $\ldots$ & $0$      & $1$     & $w_{1023}$& $d_{1023}$\\             $1$   & $1$   & $\ldots$ & $0$      & $0$     & $w_{1024}$& $d_{1024}$         \end{tabular} \end{frame}   This produces 2 slides: the first one with p1, p2, ..., p9, p10 and D columns, and the second with W added, while I want them to appear in the following order:   1st slide: p1, p2, ..., p9, p10  2nd slide: p1, p2, ..., p9, p10, W 3rd slide: p1, p2, ..., p9, p10, W, D   I looked in the manual and found this example:  \begin{frame}     \begin{tabular}{l!{\vrule}c<{\onslide<2->}c<{\onslide<3->}c<{\onslide<4->}c<{\onslide}c}     Class & A & B & C & D \\     217     X & 1 & 2 & 3 & 4 \\     Y & 3 & 4 & 5 & 6 \\     Z & 5 & 6 & 7 & 8     \end{tabular} \end{frame}   which does what is supposed to. However, I don't seem to be able to apply its logic to my problem. :( Is anyone willing to help?   P.S. What are the meanings of < and ! in columns specification?


I referred  and  and searched even more but I did not get a clear answer. So I decided to ask it here.  Questions   What is the criteria of a question to be put up in "Hot network questions" list? How a particular question is picked up and ranked and that too among different stack communities? How question ranking algorithm works. Clearly, only upvotes does not matter. Can it ever happen that one particular community possess all or more positions in the list? For ex, Currently, I observe only two or maximum three hot questions of a particular community in the list. Suppose, a community B got 10 great questions, is there any possibility that the list will show up more than 4 or 5 questions of community B?

I really like the , where certain questions from the Stack Exchange Network are presented, along with a hotness rating that is described as "arbitrary" in its tooltip. Such questions also appear randomly on the sidebar on sites across the network, under the heading "Hot Network Questions". How do these arbitrary hotness points work, and how are they used to select questions to appear in those lists?


Is it possible to go for a quick visit to Canada while the US before going back to one's home country flying from the US ? Would one be denied re-entry even if the stamp on the passport is still valid ? Cheers, E

I am visiting my brother here in the US, and I am staying for 3 weeks. I used esta in order to come to the US. We want to visit Montreal (Canada) for two days and come back to the US. (We are going there by car)  Will I have problem coming back to the US? I mean esta doesn't expire for at least 2 more months, but if I leave the states, and come back two days later, would esta still be valid? can I come back? Thanks!


I have  a generic class in C# which has 2 data types public class ResolvedChainSubscriber < K, V>, now I have to create an instance of this class, but the data type of one of the arguments will only be known at runtime. I have it stored as "Type Prototype"  public static Object SubsciberTopic(Type ProtoType, Object obj) {     Type[] type={Type.GetType("System.String"),ProtoType};     Type resolve = typeof(ResolvedChainSubscriber <,>).MakeGenericType(type);      Object obj1=Activator.CreateInstance(resolve);      //now i want to typecast the parameter obj and store it in the new variable obj1     obj1=(some statement here)obj;   }

The title is kind of obscure. What I want to know is if this is possible:  string typeName = <read type name from somwhere>; Type myType = Type.GetType(typeName);  MyGenericClass<myType> myGenericClass = new MyGenericClass<myType>();   Obviously, MyGenericClass is described as:  public class MyGenericClass<T>   Right now, the compiler complains that 'The type or namespace 'myType' could not be found." There has got to be a way to do this.


I found the most physics textbooks a lot forgetful, I think that I need a more mathematic/axiomatic approach to physics, could someone list the best ones in those courses?    Electromagnetism Structure of Matter Classical Mechanics Thermodynamics Solid-State Physics Optics Computational Physics General Relativity Statistical Mechanics Quantum Mechanics

Every once in a while, we get a question asking for a book or other educational reference on a particular topic at a particular level. This is a meta-question that collects all those links together. If you're looking for book recommendations, this is probably the place to start.  All the questions linked below, as well as others which deal with more specialized books, can be found under the tag  (formerly ).  If you have a question to add, please edit it in. However, make sure of a few things first:   The question should be tagged  It should be of the form "What are good books to learn/study [subject] at [level]?" It shouldn't duplicate a topic and level that's already on the list   Related Meta:


I have the following crontab:  # m h  dom mon dow   command * *   * * *   /bin/date                >> /tmp/date.log  2>&1 * *   * * *   /bin/date "+%F_%H-%M-%S" >> /tmp/date2.log 2>&1   The first one executes correctly .. writing the current date to /tmp/date.log The second one doesn't work. /tmp/date2.log is never created. The only difference is that the second date command has a formatting string as parameter. Outside of the cronjob the second date command (/bin/date "+%F_%H-%M-%S") works fine.   What could be the reason for this behavior?  My system:  uname -a  Linux corsair 4.15.0-50-generic #54-Ubuntu SMP Mon May 6 18:46:08 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux   lsb_release -a  Distributor ID: LinuxMint Description:    Linux Mint 19.1 Tessa Release:    19.1 Codename:   tessa

This is a  about using cron & crontab.   You have been directed here because the community is fairly sure that the answer to your question can be found below. If your question is not answered below then the answers will help you gather information that will help the community help you. This information should be edited into your original question.  The answer for 'Why is my crontab not working, and how can I troubleshoot it?' can be seen below.  This addresses the cron system with the crontab highlighted.


I have a problem with my face recognition code. Everytime I run the code there will be error of :  Exception in thread "main" java.lang.RuntimeException: Uncompilable source code - cannot find symbol symbol:   variable AppearanceRecognition location: class AppearanceRecognition.EigenFacesRunner at AppearanceRecognition.EigenFacesRunner.main(EigenFacesRunner.java:42) C:\Users\Adila\AppData\Local\NetBeans\Cache\8.2\executor-snippets\run.xml:53: Java returned: 1 BUILD FAILED (total time: 0 seconds)   I copy this code from somewhere but I didn't remember where so I find it very difficult for me to understand the code.  The code is:     package AppearanceRecognition;  import java.net.URISyntaxException;   public class EigenFacesRunner {   private AppearanceRecognition.Visualizer visualizer; private FaceFinder faceFinder; EigenFacesRunner() throws URISyntaxException {     FaceFinder faceFinder = new FaceFinder();     Visualizer visualizer = new Visualizer(faceFinder);     //visualizer.setOkHandler(new AppearanceRecognition.OkHandler(visualizer, faceFinder)); }  //    public static int exponent(int base, int power) { //        int ans = -1; //        if (power >= 0) { //            ans = 1; //            for (int i = 0; i < power; i++){ //                ans *= base; //            } //        } // //        return ans; //    } //  //    public static int exponentRec(int base, int power) { //        if (power == 0) //            return 1; // //        return  base * exponentRec(base, power - 1); //    }  public static void main(String [] args) throws URISyntaxException {     int power = 0;     int base = 3;     //System.out.println(base + "^" + power + " equals " + exponent(base, power));     //System.out.println(base + "^" + power + " equals " + exponentRec(base, power));      AppearanceRecognition.Visualizer visualizer = new AppearanceRecognition.Visualizer();     FaceFinder faceFinder = new FaceFinder();     EigenFacesRunner runner = new EigenFacesRunner();  }    public static void debug(String msg){         System.out.println(msg);     } }

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


I have two tables comments and comments_liked. Users (viewer_id) can like comments written by (UID). Comments are stored in the comments table and comments that are liked are stored in the comments_liked table (as shown in the image attached).   **What Im trying to do:  When a user that has (viewer_id) as their id, found in the comments_liked table, is viewing their profile, they should see any comments that they have liked/given to a user (UID), Only when the comment does not exist in the comments table where uid = uid  Please don't get confused, as I am not trying to show all comments where uid=uid.  Below is my code in php  please note : if we can not say where comments_liked.uid != comments.uid as that would show all other values in the comments table.  $query = "     SELECT * FROM comments_liked      INNER JOIN comments ON uid = comments.uid      WHERE uid = ?      AND viewer_id = ?  ";   but my code only prints the records where commnets_liked.uid = comments.uid which is the opposite of what I want.   so if I am user 1, I need to see the record from comments_liked where viewer_id = 1, as it does not exist in comments table.  THANKS FOR YOUR HELP!


Good evening:  I was looking over some of the classes in the Player's Handbook and found something I must not have noticed when I had first started playing: redundant skill selection for some classes, most notably for those with either arcane or divine power sources. For example, the cleric seems to innately get Religion as a skill, but may also choose Religion from the other skills.  Thus, is that secondary skill (religion) even necessary to be noted as one of the skills able to be selected by a cleric? If I were to take that skill from the class skills, would be it supplemental to the innate bonus? To emphasize this in an example form, would it then be possible to make a cleric that is /not/ trained in religion (every cleric that I have encountered by other players and made by myself has been trained in religion, though).  I do not have my books with me as I type this now, but it is something that came up to me to mull over these past few months.  Thank you in advanced for any help you may provide--please, tell me if and where it is clearly stated in the rules and errata wherein this seeming redundancy is noted.

Consider this example from the Rogue class traits:     Trained Skills: Stealth and Thievery. From the class skills list below, choose four more trained skills at 1st level.       Class Skills: Acrobatics (Dex), Athletics (Str), Bluff (Cha), Dungeoneering (Wis), Insight (Wis), Intimidate (Cha), Perception (Wis), Stealth (Dex), Streetwise (Cha), Thievery (Dex)   The Rogue is trained in Stealth and Thievery. However, they're also included in the Class Skills section, and it invites you to: 'choose four more trained skills' from that list. This seems to be similar for all the classes.  So can you train Stealth and Thievery as a choice as well have it initially trained or the equivalent for other classes?


I'm trying to make data attributes based validation. However, when I'm adding my numeric method, it's not working.      $.validator.addMethod('[data-v-numeric="numeric"]', function(value, element) {         console.log(1);         return !isNaN(parseInt(value));     }, objLanguage['validation_numeric']);   What I found in the documentation: "name Type: String The name of the method used to identify it and referencing it; this must be a valid JavaScript identifier"  So I have 2 elements $('[data-v-numeric="numeric"]') and how I thought [data-v-numeric="numeric"] is valid JavaScript selector. But somehow It's not working. Where I made an error then?

How do you create a simple, custom rule using the jQuery Validate plugin (using ) that doesn't use a regex?  For example, what function would create a rule that validates only if at least one of a group of checkboxes is checked?


How to fix the error  E: Could not get lock /var/lib/dpkg/lock – open (11: Resource temporarily unavailable) E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

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


I need help rationalizing the following expression using a conjugate:  $$\dfrac{1}{\sqrt{3} + \sqrt{2}-\sqrt{5}}$$  I have had no luck rationalizing this expression with a conjugate of the denominator.

I am not sure if one exists but is there a conjugate of the following:  $$\sqrt{3}+\sqrt{2}-\sqrt{5}$$  I attempted it many times but can't get anything.


This question rises immediately if we try to enumerate the number of possible equivalence relations on a set with n elements.

If a set has $n$ elements then what are maximum number of equivalence classes and equivalence relations possible on it?


If two beacons are farther away from each other than others, does this greater travel 'distance' give the rebel fleet more 'advancement' than shorter distances?

I'm just playing my first round of FTL and I'm wondering what can affect the speed of the rebel fleet that is pursuing me.   Does the time I spend in realtime in each system matter, or is only the number of jumps important?  What ways are there to slow down the fleet?


I would like to know if it is possible to put ubuntu on a flashdrive and bootup from that instead of burning a disc? Thanks

I tried to use the usb-creator.exe from Ubuntu 10.10 desktop i386 ISO image and it does create an USB stick that doesn't boot. When I try to boot from it I get:     Operating System not found.   I try to do this from Windows 7 x64. I'm not looking to create a live Ubuntu media, only an installation USB disk.  I repeated the process several times and I even tried to reformat the USB drive (FAT32), no success yet.  The USB stick is a 8GB one.


I'm on Ubuntu 19.04:  Tried:  But it still appears under Activities:  Any idea how to get rid of it?

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


I am trying to determine if a site collection exists, but the SPSite.Exists method always seems to return false regardless if the site collection exists or not.  Snipp:  bool exists; Uri uri = new Uri(mySite);  exists = SPSite.Exists(uri); //exists is always false return exists;   In this case mySite == https...mysite.com/mySupposedSiteCollection. I can browse to the URL described, so why then does the method always return false? Am I trying to check the site collection incorrectly?    UPDATE  Please note that this is being called from a C# console application and is not a solution that is being deployed to the farm. Possibly a limitation i'm running into?

Short story - I have a process that creates some sitecollection, so to test it I keep deleting and recreating the same site over and over. The process includes a check with the istruction SPSite.Exits, done to check if the sitecollection is present or should be created.  Sometime, soon after I delete the site collection, SPSite.Exists will report it as still available. Is this a cache related problem?


The answer to the question is $\frac{\sqrt{2\pi}}e$, although I do not know how to come to this solution. This is a problem from a math contest from the year 2016.

During my calculations I ended up with the following product: $$P=\prod_{n=1}^\infty e\left(\frac{n}{n+1}\right)^{n}\sqrt{\frac{n}{n+1}}$$ I tried to express it in terms of series by taking the logarithm  $$S=\ln P=\sum_{n=1}^\infty \ln\left(e\left(\frac{n}{n+1}\right)^{n}\sqrt{\frac{n}{n+1}}\right)$$ but I also got stuck. Numerical calculation suggests that it is equal to $$P\stackrel{?}=\frac{\sqrt{2\pi}}{e}$$ but I am not able to prove the conjecture. Any idea about how to evaluate the product? Any help would be appreciated. Thanks in advance.


I need to show that $\sqrt{2}$, $\sqrt{2+\sqrt{2}}$, $\sqrt{2+\sqrt{2+\sqrt{2}}},\ldots$ converges and find the limit.   I started by defining the sequence by $x_1=\sqrt{2}$ and then $x_{n+1}=\sqrt{2+x_n}$. Then I proved by induction that the sequence is increasing and that it is bounded. Then I use the Monotone Convergence Theorem to prove that it converges.  Now, I claim that the limit of the sequence is $2$. So I need to show that for all $\epsilon>0$, there exists $N$ such that for all $n\geq N$ we have $|x_n-2| < \epsilon$. This is kind of where I'm stuck. I don't know how to proceed to prove the convergence to $2$.

(Fitzpatrick Advanced Calculus 2e, Sec. 2.4 #12)  For $c \gt 0$, consider the quadratic equation $x^2 - x - c = 0, x > 0$.  Define the sequence $\{x_n\}$ recursively by fixing $|x_1| \lt c$ and then, if $n$ is an index for which $x_n$ has been defined, defining  $$x_{n+1} = \sqrt{c+x_n}$$  Prove that the sequence $\{x_n\}$ converges monotonically to the solution of the above equation.  Note: The answers below might assume $x_1 \gt 0$, but they still work, as we have $x_3 \gt 0$.    This is being repurposed in an effort to cut down on duplicates, see here: .  and here: .


Motivation  After seeing , I read  and .  This gave me the distinct impression that any magic armor with an enhancement bonus of +4 or more is automatically masterwork armor. I found this rather surprising.  The answer to the second question mentions a math fix in regards to AC. My question is focusing on an armor's material. Specifically, I'm trying to determine if the rules as written (and as intended) require that any magic armor over a certain enhancement bonus be of a certain material. Furthermore, I'm curious about the assertion that enchanting a weapon would change its construction material. Obviously, once could just wave one's hands and say that the material of the armor is whatever, but I can't consider that an answer. If I'm houseruling things, I would at least like to know that I'm houseruling things.  Research  I then looked back over the masterwork armor rules in the Player's Handbook, and found that masterwork armor has to be magical, which I was not aware of. However, I found nothing to imply that magic armor would automatically be masterwork, beside a statement that "the cost of masterwork armor is included in the cost of magic armor." That statement simply means that you don't have to pay extra for the armor to be masterwork, not that the magic armor is masterwork.  I then looked in the Rules Compendium, and on page 281 I found a statement directly contradicting magic armor always being masterwork:     ...so a set of +5 black iron plate adds a total of 13 to the wearer's Armor Class (8 from the plate armor and 5 from the enhancement bonus)   If the +5 plate armor was masterwork, it would add 11, not 8.  Wax Eagle has pointed out tables in Heroes of the Forgotten Lands and Heroes of the Fallen Kingdoms for magic armor which specify AC bonuses based on enhancement bonus. These do not match the masterwork armor bonuses, and nothing in that table mentions construction materials.  The Question  So, is magic armor actually automatically masterwork, or are people simply assuming that if you're going to buy magic armor that is eligible to be masterwork that you will opt to get it as such?  Consequences  If it's just an assumption about rational economic behavior, then enchanting mundane armor with a bonus over +4, or increasing the bonus on an existing magic armor past +4, wouldn't cause the armor to become masterwork. It would just add the enhancement bonus. Right?   If so, then this would contradict a statement from the second referenced answer:     If you're allowing players to upgrade the enchantments on a piece of armor, the armor should automatically improve to match the appropriate masterwork quality.

In D&D 4e, there are superior "masterwork" versions of armour types, like "feyleather" for leather armour or "wyrmscale" for scale armour. They have a higher armour bonus, but a minimum enhancement bonus, and a price of "special".  How exactly do masterwork armours work? Does any leather armour of +4 or greater qualify to be feyleather for a free +1 armour bonus? Is all +6 plate armour essentially Godplate?


I tried the following script to give myself convenience in changing directories to different hard disk partitions. But after its execution, the default location does not change, but if I use command line, location change is successful, as shown below. Can anybody help?  john@X61s:~$ pwd /home/john john@X61s:~$ vi chdir  john@X61s:~$ ./chdir c here ... 1 john@X61s:~$ pwd /home/john john@X61s:~$ cd /media/john/90F8-0AAE/ john@X61s:/media/john/90F8-0AAE$    The script chdir is the following  #! /bin/bash dir=$1 if [[ $dir = 'c' ]]; then echo 'here ... 1' cd /media/john/90F8-0AAE/ elif [[ $dir = 'd' ]]; then   echo 'here ... 2'   cd /media/john/E5A9-932C elif [[ $dir = 'e' ]]; then   echo 'here ... 3'   cd /media/john/56de0045-aa0e-4b69-8270-44b4ec866fa2/ else   echo "$dir not defined"   exit fi

I just want to write a script which changes my directory.  I put the below commands in the file /home/alex/pathABC  #!/bin/sh cd /home/alex/Documents/A/B/C echo HelloWorld   I did   chmod +x pathABC   In the Terminal, while in /home/alex, I ran ./pathABC, but the output is just HelloWorld and the current directory is not changed.  So what is wrong?


I am working with data insertion in my sql database. I have a form, through which i am inserting some paragraph. The problem is whenever i try to insert this paragraph   Hi Friend, we will do it for you , we have a very good command on it , as we have been working with it since 3 years.We've done projects like you require, that's why we are excited to work on your project. We will assure you for quality work from our side. Working as a team , we came out with a quality work. I will show you my previouse work as well, Contact us for our professional work.Awaiting your reply.Regards, Team Code Tech  It shows me the follwing error, i guess i have missed something with the datatype of the column or what? The data type of the column is varchar(3000).

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


I am trying to install  to my Ubuntu 19.10 (Eoan Ermine) though Eddy, but I receive the following error message:  com.github.donadigo.eddy Installation Failed The following packages have unmet dependencies:     fahcontrol: Depends python-gnome2 but it is not installable   The package names are the following:  fahclient_7.5.1_amd64.deb fahcontrol_7.5.1-1_all.deb fahviewer_7.5.1_amd64.deb   I'd like to start contributing to the Covid-19 project, but I don't know what to do next. I hope you can help me out!

I'm trying to install folding at home, and running into an issue with FAHControl package  $ sudo dpkg -i fahcontrol_7.5.1-1_all.deb Selecting previously unselected package fahcontrol. (Reading database ... 318495 files and directories currently installed.) Preparing to unpack fahcontrol_7.5.1-1_all.deb ... Unpacking fahcontrol (7.5.1-1) ... dpkg: dependency problems prevent configuration of fahcontrol:  fahcontrol depends on python-gnome2; however:   Package python-gnome2 is not installed.  dpkg: error processing package fahcontrol (--install):  dependency problems - leaving unconfigured Processing triggers for gnome-menus (3.32.0-1ubuntu1) ... Processing triggers for desktop-file-utils (0.24-1ubuntu1) ... Processing triggers for mime-support (3.63ubuntu1) ... Errors were encountered while processing:  fahcontrol   , so what is the best way to proceed?  I see in the  that FAHControl isn't required, but would be nice to get it working.


I've an Intel Celeron N3060 processor with 2 GB RAM and 32 GB of internal storage. Can I install Ubuntu 16.04 on this laptop?

For a given hardware configuration, how do I find out if Ubuntu will run on it? What considerations should I take into account when choosing an Ubuntu version and  such as:    with a lighter desktop than the usual Gnome and Unity  with the even lighter LXDE desktop   Obviously Ubuntu does not run on some processor architectures. So how do I go about choosing the right version and derivate. How can I find out the minmal system requirements?


I am new to Android programming and I try to learn it and take sample sample applications on the git * ub site, I have tried to resolve some errors in the application and after compiling the application is able to run, but the problem that arises when I open the details from the application post, the error is like this      java.lang.RuntimeException: Unable to start activity ComponentInfo{com.app.newsagni/com.app.newsagni.ActivityPostDetails}: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2490)     at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2550)     at android.app.ActivityThread.access$1100(ActivityThread.java:154)     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1401)     at android.os.Handler.dispatchMessage(Handler.java:102)     at android.os.Looper.loop(Looper.java:157)     at android.app.ActivityThread.main(ActivityThread.java:5615)     at java.lang.reflect.Method.invoke(Native Method)     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:774)     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:652) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a null object reference     at com.app.newsagni.ActivityPostDetails.displayPostData(ActivityPostDetails.java:190)     at com.app.newsagni.ActivityPostDetails.onCreate(ActivityPostDetails.java:98)     at android.app.Activity.performCreate(Activity.java:6362)     at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1108)     at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2443)     ... 9 more   The following listings from  ActivityPostDetails.java   activity_post_details.xml   Can you help me overcome this error

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?


Suppose I have a very powerful and durable rocket that is able to reach speed of light minus $10^{-1000^{1000^{1000}}}$ in $10^{-1000^{1000^{1000}}}$ milliseconds. Very instant acceleration. I can also adjust the amount of acceleration. I want my rocket to travel to a location that is 1 light-year far from earth, and turn back. I want my rocket to come back as soon as possible according to my watch.   Is it approximately 2 years?  How much time would pass according to my rocket's watch? Would the result be different if I want my rocket to come back as soon as possible according to its watch?

Suppose I wanted to travel to one of the recently discovered potentially Earth-like planets such as Kepler 186f that is 490 light years away. Assuming I had a powerful rocket and enough fuel, how long would it take me?


I have a simple push button connected to pin 2 on my Arduino. I can read this value and print it to the serial monitor without any trouble:  int pushButton = 2;  void setup() {   Serial.begin(9600);   pinMode(pushButton, INPUT); }  void loop() {   int buttonState = digitalRead(pushButton);   Serial.println(buttonState);   delay(1); // delay in between reads for stability }   This prints a value of 0 when the button is not pressed, and 1 if it is.  In Processing, I want to check if the value is zero or one, and perform some conditional logic. But I can't get the equality right:  Serial myPort; String resultString;  void setup(){   size(640,480);   printArray(Serial.list());   String portName = Serial.list()[2];   myPort = new Serial(this,portName,9600);   myPort.bufferUntil(10); }  void draw() {   // }  void serialEvent(Serial myPort){   String inputString = myPort.readStringUntil(10); //until newline or ("\n");   inputString = trim(inputString);   println(inputString);   if (inputString == "1"){ //this doesn't work, even though println will render ("1") plus the newline if button is pushed.     println("on");   } else {     println("off");   } }   How do I set up this conditional to do one thing if the button is pushed, and another if it is not?  I've tried converting the string to an int using   inputInt = Integer.parseInt(inputString);   and then performing the check, but it didn't work.

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


When I type command like sudo su,su or sudo -i, I get the space to enter the password. But the problem is when I type the password it is not entered in the terminal. I tried pressing Enter then typing the password but no help. In GUI based password dialogs (like unlocking Ubuntu while booting) it is working fine. Is there any alternative for a root access terminal in Ubuntu LTS 18.04.3?

When I'm about to install a program in the terminal it wants the password:  [sudo] password for xxx:   But when I start to type my password nothing happens. What should I do?


Here is the data:  Valid from: Fri Nov 24 12:11:28 EST 2017 until: Sun Nov 24 12:11:28 EST 2019 Valid from: Fri Feb 24 13:21:19 EST 2017 until: Thu Feb 24 13:31:19 EST 2022 Valid from: Tue Dec 20 12:01:19 EST 2016 until: Fri Dec 20 12:11:17 EST 2041   I want to extract only data which is written after 'until:' word.  For example I should get only Sun Nov 24 12:11:28 EST 2019.

So pulling open a file with cat and then using grep to get matching lines only gets me so far when I am working with the particular log set that I am dealing with. It need a way to match lines to a pattern, but only to return the portion of the line after the match. The portion before and after the match will consistently vary. I have played with using sed or awk, but have not been able to figure out how to filter the line to either delete the part before the match, or just return the part after the match, either will work. This is an example of a line that I need to filter:  2011-11-07T05:37:43-08:00 <0.4> isi-udb5-ash4-1(id1) /boot/kernel.amd64/kernel: [gmp_info.c:1758](pid 40370="kt: gmp-drive-updat")(tid=100872) new group: <15,1773>: { 1:0-25,27-34,37-38, 2:0-33,35-36, 3:0-35, 4:0-9,11-14,16-32,34-38, 5:0-35, 6:0-15,17-36, 7:0-16,18-36, 8:0-14,16-32,34-36, 9:0-10,12-36, 10-11:0-35, 12:0-5,7-30,32-35, 13-19:0-35, 20:0,2-35, down: 8:15, soft_failed: 1:27, 8:15, stalled: 12:6,31, 20:1 }   The portion I need is everything after "stalled".  The background behind this is that I can find out how often something stalls:  cat messages | grep stalled | wc -l   What I need to do is find out how many times a certain node has stalled (indicated by the portion before each colon after "stalled". If I just grep for that (ie 20:) it may return lines that have soft fails, but no stalls, which doesn't help me. I need to filter only the stalled portion so I can then grep for a specific node out of those that have stalled.  For all intents and purposes, this is a freebsd system with standard GNU core utils, but I cannot install anything extra to assist.


Many people claim that force is defined by the second axiom of Newtonian Mechanics, which is:  "In an inertial reference frame, the rate of change of momentum of a particle equals the sum of the forces exerted on it"  However, force is a fundamental quantity in Classical Physics and therefore it shouldn't be defined in terms of other (fundamental) quantities. Thus, the second law cannot be a definition for the force.  Is my reasoning wrong? Am I stating something that is incorrect?

If you consider  as laws, then there must be independent definitions of  and  but I don't think there's such definitions.  If you consider them as definitions, then why are they still called laws?


I was installing drupal commons on xampp server i got this error, PHP Max Execution Time 30 Your PHP execution time is too low, please set it greater than or equal to 120 seconds. How do i adjust the php execution time so that i can proceed with the installation?

Getting this error on xampp using drupal commons distribution , by opening localhost/commons  PHP Max Execution Time  30 Your PHP execution time is too low, please set it greater than or equal to 120 seconds.   What to do?


I need help finding all natural numbers n such that $\phi(n)$=12.  My professor told us to use $\phi$(mn)=$\phi$(m)$\phi$(n).  I know that $12$ can be factored into $3 \times 4$,  $12 \times 1$ and  $6 \times 2$.

How do I generalize the equation to be able to plug in any result for $\phi(n)=12$ and find any possible integer that works?


I want to create shortcuts on desktop and panels. Installation is Ubuntu Gnome 14.4 with classic desktop.

Is there an easy way to create a desktop shortcut for an application in Unity? The ability to right click or drag and drop icons to the desktop in Unity does not seem to be there.


Let $A =  \cfrac{1}{\cfrac{1}{2011}+\cfrac{1}{2012}+\cfrac{1}{2013}+\cfrac{1}{2014}+\cfrac{1}{2015}+\cfrac{1}{2016}}$. $B$ is the largest integer so that $B \le A$. Find $B$  I tried to use AM-GM inequality in the denominator but it is impossible


Near the end of Harry Potter and the Goblet of Fire in the chapter "Veritaserum", Barty Crouch Jr. drinks Veritaserum and the rise of Voldemort is now undoubtedly clear and easy to understand. There are no more missing peaces. Dumbledore, Snape, Harry, Professor McGonagall, Sirius (in dog form) and Winky all hear Crouch's testament under Veritaserum. When Fudge arrives with a Dementor for protection, the Dementor kisses Crouch, making him unable to drink Veritaserum again. Fudge does not believe Harry and wants Crouch's proof before he believes that Voldemort has returned. Obviously Harry cannot take Veritaserum as the Ministry thinks he is hallucinating plus he has secrets (Invisibility Cloak, Marauder's Map) so he does not want to get Fred and George into trouble. Dumbledore is also too valuable to take Veritaserum. Snape is a spy and obviously he can't. Sirius is on the run so obviously he cannot show himself. Winky is owned by no one at the end of GoF, but she still works for Hogwarts. Dumbledore could order Winky to drink Veritaserum. Ministry leaders may be biased against Winky because she is a house-elf, but that is proof. If not, McGonagall has no secrets (that's what I think) and she can drink Veritaserum. Of course she will need convincing but I think she will if it is for the convincing of the Ministry. If not Winky is there.

Reading through the books once again, I came to ask myself:  What "truth" is told whilst being affected by veritaserum? Is it the objective truth or what one believes to be true?  Regardless of how the answer is I see many problems arising from this, but also some great ideas.


Consider an $n\times n$ nilpotent complex matrix $A$. Is it true that $A^n=0$ always? If not, is there a minimum $d$ (in terms of $n$) such that $A^d=0$ always?

$A$ is a $n\times n$ matrix such that $ A^m = 0 $ for some positive integer $m$.   Show that $A^n = 0$.   My attempt: For $n > m$, it's obvious since matrix multiplication is associative.  For $n < m$, $A^n\times A^{m-n} = 0$; not sure what to do next. Also I know that $\det A = 0$.


I didn't demonstrate any significant strong personal ties to my home country.

Many of the UK visa refusals we see here share a common pattern and the prevailing reasons refer to V 4.2 (a) and (c).    I do understand that, while the applicants may describe very different individual circumstances, there's a consistent pattern and, broadly, fall into specific categories:    Credibility (lifestyle, lack of ties, visit history, lies & omissions) Funding (insufficient funds, provenance of funds, funds parking) Sponsorship (family, friends, employer)   Question: What most commonly triggers a UK visa refusal where V 4.2 (a) and (c) are given as the grounds?  Secondarily: Given that there is a clear pattern, to what extent are these refusals predictable? Does sponsorship make a difference? Is there a set of personal circumstances, however abstract, where a refusal is all but guaranteed? For example, why do those we see here on TSE who sought entry for the PLAB or British Army appear to be refused with a common theme? Is there a uniform shortcoming or is it just discrimination?   PLAB: What is about applications for a visa, for the purpose of sitting the Professional and Linguistic Assessments Board (PLAB) exam, that seem to invite refusals. After all, the test is given so that international medical graduates can show that they qualify to practise medicine in the UK. The first part, PLAB 1, can be taken in centres outside of the UK. However, PLAB 2 can be taken only in the UK. Why can't you can't get a visa just to sit the exam, promising that you'll leave immediately after?    British Army: Since Commonwealth citizens are eligible to apply online to join, even those who don't reside in the UK, why is it so difficult to get a visa just to attend an interview to see whether you are suitable? Even with an invitation from the Army, such visa applications seem to be unsuccessful. Isn't a career in the British Army a valid reason?     Lastly:  After such a refusal, what approaches would increase the chance of a successful application?


I am using Ubuntu 18.04. I want to install nvidia driver Geforce 930mx in my OS. I using this command:  sudo add-apt-repository ppa:graphics-drivers/ppa   I get the error like this:  Err:2 http://www.getdeb.net/ubuntu xenial-getdeb InRelease 403  Forbidden [IP: 143.95.32.90 80] Reading package lists... Done                       E: Failed to fetch http://archive.getdeb.net/ubuntu/dists/xenial-getdeb/InRelease  403  Forbidden [IP: 143.95.32.90 80] E: The repository 'http://archive.getdeb.net/ubuntu xenial-getdeb InRelease' is not signed. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   Anyone can help me solve this?

I just ordered the Nvidia GTX card. I have a dilemma, though. Should I keep using the driver which is available in "additional drivers" in Ubuntu, or should I install the driver from the Nvidia site?  So which driver is the best for me?


I'm trying to remove virtualbox from pc but I can't remove package.  dpkg can sees it:  dpkg -l 'virtualbox*' | grep ^i in  virtualbox-5.0           <none>       amd64        (no description available)   but when I try to remove:  sudo apt-get remove virtualbox-5.0 Reading package lists... Done Building dependency tree        Reading state information... Done Package 'virtualbox-5.0' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.  sudo apt autoremove --purge virtualbox-5.0 Reading package lists... Done Building dependency tree        Reading state information... Done Package 'virtualbox-5.0' is not installed, so not removed 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   How can I remove this package?

I frequently need to check which packages are installed, and I use the following command:  dpkg -l | grep foo  which gives the following output  Desired=Unknown/Install/Remove/Purge/Hold | Status=Not/Inst/Cfg-files/Unpacked/Failed-cfg/Half-inst/trig-aWait/Trig-pend |/ Err?=(none)/Reinst-required (Status,Err: uppercase=bad) ||/ Name                       Version         Description ii   foo                       <version>         <description>    What does the ii mean?  What other flags are there? How to read the flags? (because the explanation is quite complicated, IMO)   Thanks.


There's an almost 6 year old question about this () that I came across while searching for a solution.  In Acrobat Reader DC (version 2015.020.20042) on a Windows 10 machine. I click on  View | Page Display | Two Page View  and the page look great. But the moment I click on full screen I have a single page filling up the middle of my screen with massive amounts of emptiness on both sides.   Thinking that the problem was the new reader, I uninstalled Acrobat Reader DC and installed (downgraded to?) Adobe Reader XI and still had the same problem. Two pages viewed nicely in "windowed" mode, but the moment I went to full screen I had only a single page showing at a time.  To summarize, I'm on Win 10, I've tried both ARDC and ARXI and both refuse to show 2 pages in full screen mode.   Does anyone have a solution to this?  I swear that sometime in the past, I was able to view 2 pages in full screen mode.

Since i'm using a wide screen, i want to view two page in full screen while reading PDF. I can view two page in Reading Mode or normal view. however, whenever i switch to full screen mode, acrobat show only one page. I guess there must be some way to view two page when you're in full screen mode in Adobe Acrobat?


Problem  I had a problem with one bug in my Stack Overflow account user profile while I wanted to click on next badge.    Solution  Through Ctrl + Shift + I console I selected item boxes and deleted that panel which was before that blue one and after that I could lick on "Let us pick".  Versions/settings   I use Acer Aspire with Windows 10 Pro, 64 bit - all up-to-date I opened Stack Overflow on extended monitor DELL(1280x1024) with correctly working VGA connector Google Chrome Version 69.0.3497.100 (Official Build) (64-bit) in Chrome I have only these extensions installed:   AdBlock Scopus Document Download Manager Google Scholar    Why did this GUI mistake happen? Is it a problem on my site or server site? Can I do something to not repeat it again?

When I visit  I see this:     The "Congratulations! You've earned (badge)" section has dropped down completely beneath the tabs under it. The "You've earned a new privilege!" section has a gap at the bottom:     Shog9 says in comments how to reproduce this:     Gotta have earned a badge, not dismissed the notification, and be looking at your own profile.


I occasionally see an HTML  element whose href attribute is a URI that has just javascript for the scheme, and an empty statement ; for the path.   What is the purpose of this? Is it the same as href="javascript:void(0);"? Is it the same as having no href attribute at all? Is it the same as having no  element at all?   Update  The precise content that I am seeing is . So is this just a way of controlling the cursor graphic?

The following are two methods of building a link that has the sole purpose of running JavaScript code. Which is better, in terms of functionality, page load speed, validation purposes, etc.?    function myJsFunc() {     alert("myJsFunc"); } Run JavaScript Code     or    function myJsFunc() {     alert("myJsFunc"); }  Run JavaScript Code


I have an issue reported by an user which I cannot reproduce. The issue is error:  Exception in thread "main" java.lang.NullPointerException: source         at java.util.Objects.requireNonNull(Unknown Source)         at java.util.Scanner.(Unknown Source)         at cz.autoclient.Main.getVersion()         at cz.autoclient.Main.()         at cz.autoclient.Main.main()   In this code:     private VersionId VERSION = new VersionId("0.0-error");    public final VersionId getVersion() {      if(VERSION.affix.equals("error")) {        InputStream in = Main.class.getResourceAsStream("/version");        Scanner sc = new Scanner(in, "UTF-8"); // LINE 86        VERSION = new VersionId(sc.useDelimiter("\\A").next());      }      return VERSION;    }   What I do here is to parse internal resource which contains version info for the application (including version as variable turned out to be very impractical).  Version file might look something like this:  v3.5-beta   The error seems to be caused by the resource "/version" being unreachable. This error does only seem to happen to the user, so I need help why it even might happen. User's Java version is:  java version "1.8.0_101" Java(TM) SE Runtime Environment (build 1.8.0_101-b13) Java HotSpot(TM) 64-Bit Server VM (build 25.101-b13, mixed mode)   Here is the full . The application is distributed as jar file. The version file is in the root of the jar file.  In case it happened to be unclear the problem is when I run the same release (downloaded from release site, not re-built), I do not encounter the problem. I asked the user to verify that the file is there (by unziping the jar file). He sent it to me, it was intact.

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?


This is an example of a function taking const char * & as a parameter.  #include <iostream> using namespace std;  char test[] = "Test";  void func(const char * & str) {     str = &test[0]; }  int main() {     const char * mytest;      func(mytest);      cout << mytest << endl;      return 0; }   Why does this work? ()  What const means here? Why func() can change str given to this function?  Upd. It's a newbie question, please not minus it.

Why does the following code in C work?  const char* str = NULL; str = "test"; str = "test2";   Since str is a pointer to a constant character, why are we allowed to assign it different string literals?  Further, how can we protect str from being modified?  It seems like this could be a problem if, for example, we later assigned str to a longer string which ended up writing over another portion of memory.  I should add that in my test, I printed out the memory address of str before and after each of my assignments and it never changed.  So, although str is a pointer to a const char, the memory is actually being modified.  I wondered if perhaps this is a legacy issue with C?


In a very concise description, what does a capacitor do for a voltage regulator (for example a 3.3v).  I have used the regulator with and with out the capacitors and no difference (that I can tell).  Also what does a Capacitor do in general?  I understand why most electronics work, but I don't really understand the uses that I have seen for the Capacitors for.    I am hoping others can also use this to understand it a bit more.

Looking at the datasheet I can see that the voltage regulators are not just a zenner diode inside, they are complex devices. I have noticed that there is always a capacitor at the input and another one at the output. An example is the uA7800 series fixed voltage regulators.  I have read that one of them is to "stabilize the circuit operation" while the other is to "reduce ripple on the output". Looking at the datasheet, why do they have this fixed value? And if they do have a fixed value then why not just fabricate them into the voltage regulator itself? e.g for the uA7800 series it is 0.33uF at the input and 0.1uF at the output. It is not explained why they have these values.


VirtualBox allows me to put a shortcut icon for a virtual machine to the Desktop:    I tried to drag it to the Unity launcher but cannot place it there.   Is there any way to add a desktop shortcut icon of a virtual machine to the Unity launcher?

Can I create a shortcut to a virtualbox OS in the unity sidebar without it being on the desktop too.  I tried to right click in virtualbox and create shortcut on desktop then move it. but if i do it then delete the desktop shortcut it renders the unity shortcut useless.  Any ideas?