When proving the law of reflection using huygens construction I do not understand why a tangent is drawn to the semi-circle (i.e the line CD)

I was recently reviewing geometric optics, during which I read about Huygens' Principle and how it could be used to prove the Law of Reflection from the "light is a wave" viewpoint. I'll quote what I read in the book for Huygens' Principle (from Serway and Beichner, Physics for Scientists and Engineers with Modern Physics, 5th Ed., Vol. 2, pg. 1119): "In Huygens' construction, all points on a given wave front are taken as point sources for the production of spherical secondary waves, called wavelets, which propagate outward through a medium with speeds characteristic of waves in that medium. After some time has elapsed, the new position of the wave front is the surface tangent to the wavelets." The authors go on to show that using this principle for a plane wave shows that at any later time a plane wave is still a plane wave. Likewise, Huygens' Principle can be used to show that a spherical wave front remains a spherical wavefront at any later time (again assuming the light is not interacting with any surface). (See, e.g.,  for a couple of figures.) Next, the authors apply Huygens' Principle to prove the Law of Reflection. However, they don't actually draw the wavelets, so I tried it myself (and I failed the first couple of times).  What I've learned by thinking about this for a while boils down to this: to understand reflection via Huygens' Principle, the wavelets you are to use for drawing the tangent wave front must all originate during the reflection process (see Figure 1 below). This seems quite reasonable to me. If I want to know what happens after a reflection, I should use wavelets that form during reflection. However, one thing that feels strange to me is that these secondary wavelets are all formed at different times, and then I'm using information from all of them at the same time to draw a reflected wave front. If, during the reflection process, it's ok to use wavelets that form at different times, then when is it ever not ok to do that? For example, if I try the same trick (of drawing secondary wavelets that originate at different times and then using all of those wavelets at the same time to find a new wave front) with a plane wave, I seem to get a result that makes sense (see Figure 2 below), even though the way I'm using Huygens' Principle in this case does not make sense (I have to have knowledge of how a plane wave propagates to make Figure 2, but the point of Huygens' Principle is to show us how the wave propagates in the first place).      With these examples in mind, if I naively start drawing wavelets that originate at different times (some before and some during reflection), I can get the following figure, which doesn't show me how reflection works. Why is that? I must be missing something fundamental about Huygens' Principle, or maybe it's a problem related to the $180^\circ$ phase change that occurs during reflection (so that wavelets that formed before reflection are out of phase from wavelets that form during reflection)?


If you change your mind about closing a question as a duplicate (maybe because you meant to vote to close, but for a different reason, and just clicked the wrong option in the first dialog) the mobile interface won't easily close.  When you click the big white X in a red ball in the upper right corner, the box flickers, so you know the click was registered, but it doesn't close.  I often find myself repeating this a dozen times before it finally takes.

I can understand how it's useful to see exactly which question you are nominating as the original, non-duplicate one when voting to close a question as an exact duplicate, but this presupposes that you have a screen which is large enough to accommodate this information, and crumbles entirely e.g. on my iPhone.  The content is presented in a JavaScript frame which cannot easily be resized, scaled, zoomed, or otherwise manipulated.  After a while, you get used to just scrolling way, wayyyy down to the Vote button real quickly (and, ideally, check that you really have the right question in a separate browser tab, where you have proper UI controls for scrolling, zooming, etc).  Of course, if both the duplicate and the original question are long, it's very easy to whizz past the button, and end up scrolling back and forth quite a bit just to locate it.  Finding button:   At first, when you paste the URL to nominate the original which this is a duplicate of, if the URL is long enough, you basically only see the tail of the URL, and nothing else:  Nominating:   You have to scroll left to see even the right margin of the actual content.  This further adds to the frustration (but as noted in a comment, there is a workaround for this).  I'm not sure how exactly this should be fixed.  I guess you probably don't want to revert back to the old, less informative design, even though that was much less disruptive on mobile devices.  Maybe a more compact representation would be possible?  Maybe just moving the "Vote to close" button up high would be enough alleviate the aggravation?


I have just installed Ubuntu 12.04 which comes with Python 2.7. I have installed Python 3.3, so now I have both versions. For example, if I type python in the terminal I get version 2.7 and if I type python3.3 I get that version.  I don't see why I would need 2 versions (?) so how do I uninstall Python 2.7? And if I do so, will the "python" command then point to Python 3.3?

I have successfully installed python 3.3 on Ubuntu 12.10. Since I don’t need multiple versions of python, I want to remove the existing python 2.7. When I try to do that, using  sudo apt-get remove python2.7   Ubuntu warns me that there are tons of system dependent components which will also be removed. It looks really scary.  So, is there a way to remove python 2.7 without removing the system dependent components, or can I direct those dependents to use python 3.3?


I am trying to solve problem described in the title. What I've tried I tried to consider simple examples of graph with 0, 1 and 2 vertices and figured out that every edge has start node and end node, so number of edges can be calculated as follows: E - number of edges in graph Nd - degree of node $$E=\frac{\sum Nd}{2}$$ Since number of edges must be integer, $\sum Nd$ must be even. It is only even if there is even number of odd sum components. Questions Is this enough to prove the conjecture? Is there other way to prove that?

I'm having a bit of a trouble with the below question     Given $G$ is an undirected graph, the degree of a vertex $v$, denoted by $\mathrm{deg}(v)$, in graph $G$ is the number of neighbors of $v$.   Prove that the number of vertices of odd degree in any graph $G$ is even.


Is an apostrophe necessary when you are referring to a set of years? Is the correct version 20s or 20's? (Twenties)

When I was in high school back in the 1970s, I was taught that to make a plural of an acronym, a letter, or a number, one should add an apostrophe and "s". Like I would have written this sentence, "... back in the 1970's ..." I would write "one CD, two CD's". Etc. I followed this rule faithfully for years until a co-worker told me it was wrong. Now I can't find any source that agrees with what I was taught.  Is this a rule that has changed over time? Was the convention in the 70s that one should use an apostrophe but this has changed and now we do not? Or were my high school English teachers just confused?


I want to print out a double number using my bisection method. I dont quite know how. I can return the double with up to 4 digits of accuracy after the decimal, but that's the default I take it. How do I print it out with much more accuracy. As much as I want to print at any time idealy.  void bisection(double start, double end, double tol, double (f)(double) ){      double x = (end + start)/2;     double num = f(x);     if( std::abs(num) < tol) {     //  return x;     printf("Our approximation is: %20.10f", x);      }      if( num == 0){         return x;     }      if( num < 0){         std::cout << "f(x) is less than 0" << std::endl;         std::cout << "f(x) = " << num << std::endl;         start = x;         bisection(start,end,tol, f );     }     else if(num > 0){         std:: cout << "f(x) is greater than 0" << std::endl;         std::cout << "f(x) = " << num << std::endl;         end = x;         bisection(start,end,tol, f );     }  }

In my  I was printing a double using cout that got rounded when I wasn't expecting it.  How can I make cout print a double using full precision?


I just renewed my Bajan passport with my new last name (for example "Keith Robert Stone" changed to "Keith Robert Stone Foster"). Do I have to change my US Visa to match my new name? I still have 7 years left on my visa.

I had my US visa about 7 month age, and I had to renew my passport for certain circumstances, so there was a mismatch in the name between both the visa and the new passport, you see they had to put my grand grandfather's name which was not on the old passport nor the visa, the name on old passport and visa is: Abdelrahman Samy Ali Mohammed and the new passport is: Abdelrahman Samy Ali Ibrahim Mohammed. My grand grandfather's name is Ibrahim, so the question is that gonna cause me any troubles concerning my entry to the US? is there any document should I consider taking it while i'm traveling?  Thanks,,


I know this has been asked before () and it seems it is still not possible to get better than district level data as a shapefile, but are there paid services (I am thinking mapmyindia and such) that provide such data?   Has anyone tried this and how accurate will be their data?

I'm looking for block (sub-district) level shapefiles for India. The GADM database only has files for the 2300 Tehsils, whereas I'm looking for the about 5500 Census blocks (sub-districts) for any year possible.


I wrote a code for detecting cycle in graph. The input is given such that there can be several lines with each line of form a # b . It denotes that there is an edge from a to b. My code worked and then I played with it a bit and came across a problem with line a and line c and with line b and line d. When I combine line a and line c and write the declaration and instantiation together as "ArrayList[]" arr=new ArrayList[99999] , similarly line b and line d,then everything is working fine(Assuming I make appropriate changes like passing arr and visited as arguments between DFS and DFSvisit). But If I write it as I have written below then I am getting Null pointer exception. What is the reason for this? class Test {     ArrayList<Integer>[] arr;                // line a     boolean[] visited;                       // line b     public static void main (String[] args) throws java.lang.Exception {         Test obj=new Test();         obj.DFS();     }      public void DFS() {         arr=new ArrayList[99999];            // line c         visited=new boolean[99999];          // line d               for(int i=0;i<99999;i++) {                           arr[i]=new ArrayList<>();    //instantiate each element of "array of Arraylists"         }              boolean[] flag=new boolean[99999];       //a flag array to identify which elements of array are valid elements              Scanner sc=new Scanner(System.in);              while(sc.hasNext()) {             int a=sc.nextInt();       //take first number             sc.next();                //throw away "#" token             int b=sc.nextInt();       //take second number             flag[a]=true;             //means arr[a] is valid             arr[a].add(b);            //add b to adjaceny list of arr[a]         }                   Test obj=new Test();         for(int i=0;i<99999 ;i++) {             if (flag[i]) {              //call DFSvisit only if arr[i] is valid                 obj.DFSvisit(i);             }         }              System.out.println("Cycle does not exist");     }      void DFSvisit(int i) {              // basic DFS implementation         visited[i] = true;         for (int j=0;j<arr[i].size();) {             if (visited[arr[i].get(j)]==true) {                 System.out.println("Cycle exists");                 System.exit(0);             } else {                 DFSvisit(arr[i].get(j));             }                      j++;         }         visited[i] = false;     } }  Error: Exception in thread "main" java.lang.NullPointerException at test.Test.DFSvisit(Test.java:59) at test.Test.DFS(Test.java:49) at test.Test.main(Test.java:18)  P.S. I know that If I try to use reference variable before it is initialised then I will get Null Pointer Exception. But here I am not able to see anywhere where that is happening. I have declared arr and visited as a member of class(outside every method). I am then initialising them after moving from main method to DFS method. In between I haven't tried to use either arr or visited but I am getting NPE anyway. Why is that?

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?


What exactly is a mathetmatical proof? From  it's clear it doesn't require any special symbols.  From      [Computer] Viruses have no “cure.” It’s been mathematically proven that it is   always possible to write a virus that any existing antivirus program   can’t stop." [0]      [0] Secrets & Lies. Bruce Schneier. Page 154   In these contexts what does it even mean to be mathematically proven? Does it just mean logic was used?

I am just a high school student, and I haven't seen much in mathematics (calculus and abstract algebra).  Mathematics is a system of axioms which you choose yourself for a set of undefined entities, such that those entities satisfy certain basic rules you laid down in the first place on your own.  Now using these laid-down rules and a set of other rules for a subject called logic which was established similarly, you define certain quantities and name them using the undefined entities and then go on to prove certain statements called theorems.  Now what is a proof exactly? Suppose in an exam, I am asked to prove Pythagoras' theorem. Then I prove it using only one certain system of axioms and logic. It isn't proved in all the axiom-systems in which it could possibly hold true, and what stops me from making another set of axioms that have Pythagoras' theorem as an axiom, and then just state in my system/exam "this is an axiom, hence can't be proven".  EDIT : How is the term "wrong" defined in mathematics then ? You can say that proving fermat's last theorem using the number-theory axioms was a difficult task but then it can be taken as an axiom in another set of axioms .  Is mathematics as rigorous and as thought-through as it is believed and expected to be ? It seems to me that there many loopholes in problems as well as the subject in-itself, but there is a false backbone of rigour that seems true until you start questioning the very fundamentals .


So with grep we can use -A to get lines "after" the match, we can use -B to get lines "before" the match. Also we can use -C to get lines both before and after.  I have some data like this  boring data boring data boring data interesting value MARK boring data boring data boring data interesting value MARK   I'd like to get output like this:  interesting value interesting value   With the option -B I get this:  # cat somefile | grep -B 1 MARK  interesting value MARK interesting value MARK   I'd like to exclude the MARK lines entirely.

I need to take the multi-line output of a program, match a string, and return the previous line of all matches.  An example of the output of the program:  $ jack_lsp -p firewire_pcm:analog-1_out         properties: input,physical,terminal, firewire_pcm:analog-2_out         properties: input,physical,terminal, firewire_pcm:analog-1_in         properties: output,physical,terminal, firewire_pcm:analog-2_in         properties: output,physical,terminal, $   I need to match, for example, 'input', and return the previous line of all matches. So in the example, the expected output would be:  firewire_pcm:analog-1_out firewire_pcm:analog-2_out   Here is what I have, but it only returns the first match:  $ jack_lsp -p | grep -B1 input | head -1 firewire_pcm:analog-1_out $   What am I doing wrong?


I trying to insert data to my database using prepare statements but I get Nullpointerexception    My  Database connection code   public class DBConnect {     Connection conn=null;        public static Connection connecrDb(){           try{           Class.forName("org.sqlite.JDBC");           Connection conn = DriverManager.getConnection("jdbc:sqlite:E:\\NetBeansProjects\\Abdo`s Project\\project.sqlite");               System.out.println("connection success");               conn.setAutoCommit(false);           return conn;           }           catch(Exception e){               JOptionPane.showMessageDialog(null, e);               return null;           }       }  }   and my code in Main Class  public class Items extends javax.swing.JFrame {       Connection conn =null;     ResultSet rs = null;     PreparedStatement pst=null;     public Items() {         initComponents();         DBConnect.connecrDb();     }      private void SaveBtnActionPerformed(java.awt.event.ActionEvent evt) {                                                  try{              String sql = "INSERT INTO test (name) values(?)";            pst=conn.prepareStatement(sql);            pst.setString(1,item_name.getText() );            pst.executeUpdate();             conn.commit();         }         catch(Exception e ){                       System.out.println(e);             System.out.println(e.getStackTrace());           }       }    Output is  java.lang.NullPointerException  [Ljava.lang.StackTraceElement;@7da469fe   what is wrong in my code ?


I have a thesis file that has chapters, sections, etc. In the document I make references to previous lemmas, etc. I want to remove the automatic generation in the table of contents of the chapter titles. The reason for this is that there appearance in the document needs to be different from their appearance in the table of contents. I can use the command \addcontentsline{toc}{chapter}{Table Of Contents Chapter Title Style} which appears in the Table of Contents correctly. However it appears right after the chapter title which has the same format as the way it was typed in the command  \chapter{In Body Chapter Title}. Is there a way to suppress the printing of the \chapter{In Body Chapter Title} from the table of contents without using the \chapter* command? I don't want to mess up the references that are throughout the document nor the section numbering. Thanks

Sorry if this question already appears elsewhere, I couldn't find it.  Is there a way to label a section in the text but give it a different name in the table of contents?  I have very long section titles but would like to give them nicknames in the TOC. I tried using \section*{A} then \addcontentsline{toc}{section}{B} but this removes the numbering of the section from the body of the text.  I'm very new to LaTeX so sorry if this is an annoying question!


my have some trouble to call a JavaScript/jQuery 1.9.1 method on dynamic added html-elements.  Here is my JS-code:  $(".download").live("click", function() {     var buttonId = $(this).attr("id");     alert(buttonId); });   My dynamic HTML code:    var html = "";     for(var i = 0; i <daten.length; i++) {        html += "<input id='" + daten[i].pfad + "' class='download' type='image' width='25px' height='25px' src='/download.png'/>";     }   $("#table").append(html);   I get no error message, but the method is besides not calling, what is here not correct?

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.


Typing \frac{W+W^*}{2} gives $\frac{W+W^*}{2}$ in which the denominator appears to the eye to be in the wrong position. Is there a way to correct this, ie place the 2 in under the + (without using arbitrary negative spacing)?

Typing \frac{W+W^*}{2} gives a fraction in which the denominator appears to the eye to be in the wrong position. Is there a way to correct this, i.e. place the 2 in under the + (without using arbitrary negative spacing)?


This is a real situation, but why does the writes use "would" in this sentence instead of "will"? The games is still on. 83 mins: A second goal for United in these closing stages would make things very interesting.

The goal for these negotiations is to reach a mutually-agreed long-term comprehensive solution that would ensure Iranˈs nuclear program will be exclusively peaceful.    what does would imply here? If it implies future, why will has not been used?  A good link teaching would thoroughly would be really appreciated. Specially, distinguishing between the senses of would is not always easy.


I am a little confused about springs. I just wanted to know that if I pull an ideal spring of spring constant $k$ such that the spring has been symmetrically pulled and its elongation (total) comes out to be $x$ then would the force on one side by $$F=kx$$ or $$F=kx/2$$  I am a little bit confused and hence I resorted to ask it here.

Suppose a spring with spring constant 1 N m^-1 is held horizontally. If a pull of 1 N is applied to its left end and a pull of 2 N is applied to its right end, how much longer would the spring be as compared to its unstretched length?  I came up with this question because the spring related qurstions I've seen all have one end fixed some where. I am totally stuck on this one and I really have no idea where to start.   All I can figure out is that the spring will accelerate due to a net force. It seems inappropriate to be taking net forces, since pulling both ends with a larger force makes the spring more elongated.  P.S. this is not homework


I plan to graduate with an honours (four year) degree in philosophy and a general (three year) degree in mathematics. Are there any physics graduate programs that might accept me if I were to apply?  For context: My plan-A is to work in academic philosophy. A physics education might not appear on the resume of most philosophy professors, but I suspect that knowing about physics could improve a philosopher's thinking about a number of questions. Accordingly, it seems worthwhile to study physics during either, a one or two year detour, several years of concurrent distance education, or the summer terms of my philosophy education. Self-study is an option, but I'd prefer to earn a credential in order to improve my future applications to graduate schools and to employers.

Is it possible to apply for a graduate program in theoretical physics without having a bachelor's degree in physics or mathematics?  I'm completely self-taught. I'm half way through Jackson electrodynamics and Peskin QFT. These books are taught to students at a graduate level, let's say that I can pass the GRE exam and graduate level examinations. Is it possible that this would substitute for an undergraduate degree?


I can import from subdirectories with a blank __init__.py file. That works fine. I think that init file in python works like an index file. But I really don't understand why the __init__.py file is blank to import. How do __init__.py file and importing really work?  What have to be __init__.py files content?

What is __init__.py for in a Python source directory?


Show that  the set of non zero rationals is not a cyclic group under multiplication.I know the set of rationals is  not a cyclic group under addition. In an exercise of my book it is given that  the set of non zero rationals is not a cyclic group under multiplication. I do not know how to prove it. Can someone give me a hint?

Are nonzero rationals under multiplication cyclic?   Here's my thinking:   They are not. The generator must be a rational $q = a/b$, $a$, $b$ integers with no common factors. Assume $a/b$ generates $\mathbb Q\setminus \{0\}$, then $q^n = a^n/b^n$ or $(1/q)^n = b^n/a^n$. This is impossible since we can find a prime (there're infinitely many of them) that doesn't divide either $a$ or $b$, which have a finite number of prime factors. Not sure if it proves it though.


Now I'm trying to give an answer of the question. Satellite rotates about earth by the gravitational force of earth. Now if we place the satellite in such an orbit so that it rotate in opposite to earth rotation and having a greater angular rotational speed.   Now there is an existence of earth magnetic field. Though it is very poor but strength of magnetic field is not the major factor of energy conversion. So as in electrical machine rotor rotates and stator gives magnetic field and electricity generates is it not possible to extract gravitational energy by using satellite as rotor and geomagnetic field as stator? how much it is effective?   Edited: OK eventually this question becomes duplicate. Now I am asking how can we store this energy. Can we store this energy? or not.

Since the Earth has a magnetic field, can it, in theory, be run through a conductive metal coil to create electricity?


We have a 2D triangle. It has 3 points. We have a 2D convex polygon. It has N points. Normally when clipping, one wants to produce the polygon or list of triangles inside the convex polygon. I want to do the opposite. I want to get the list of triangles that do not intersect aside from bordering edges, and are NOT within the convex polygon and result from clipping. For example if I had a triangle with a square completely enclosed within, I would want to get the list of triangles representing the triangle with a square missing from the center.

I am looking for an algorithm that can return the number of size of n squares that fit into a a rectangle of a given width and height, maximizing the use of space (thus, leaving the least amount of leftover space for squares that do not fit). Neither the rectangle nor the squares can be rotated.  For example, let's say I have a rectangle that is 5 inches by 7 inches, and I need it to fit 35 squares. The algorithm needs to tell me that the 35 squares fit if they are 1 inch wide/tall (as they could be laid out inside the rectangle in a 5 x 7 grid). Another example is if I need to divide a rectangle 35 inches by 1 inch into 35 squares. It should still tell me that the squares will fit if they are 1-inch wide/tall (as they could be laid out in the rectangle in a 35 x 1 grid).  The tricky part is that sometimes there may be leftover space, as the squares cannot be divided into partial squares. Let's say for either of the two examples above I need to lay out 34 squares and not 35 (in which case the answers would still be 1 inch), or maybe 33, or 7 squares. Or, perhaps the rectangle width and height aren't whole numbers. With the number of squares being a variable I need an algorithm that can tell me the size of the squares for a given rectangle width and height.  Thanks for your help!


I have a package called "particles". In it, I have a class called "Sand". The full path of this class is "particles.Sand"  I also have in the default (or root) package, a class called "Particle". The full path of this class is "Particle".  I want "particles.Sand" to extend "Particle". I have used this class definition for in the Java file for the Sand class:  "public class Brick extends Particle"  The problem is, this doesn't work. I end up getting a compile-time error. From my understanding, Java prohibits importing a class from the default package, in classes that are in a normal package. However, I've never read any documentation that says that Java prohibits extending a class in the default package, using a class in a normal package (and I know that extending is not the same thing as importing). Is this also prohibited? If it's not prohibited, please explain to me how to do it.

I'm working now together with others in a grails project. I have to write some Java-classes. But I need access to an searchable object created with groovy. It seems, that this object has to be placed in the default-package.   My question is: Is there a way to access this object in the default-package from a Java-class in a named package?


Having recently learned about the  I began to wonder about spacetime and the effect of intervening bodies on gravitational forces:  Does a mass have a "shadow" behind it or some sort of "dampening" effect on gravitation from body C as sensed at point A with body B in between?  In relation to the Casimir effect, if there is some sort of "dampening" effect, then gravitational changes (e.g., a pair of rapidly-circling stars) might produce an additional force between two bodies which are close together where the changes are diminished (or possibly amplified?) in between the two bodies.  Has any such force been measured or given research time?

Electromagnetic waves can be shielded by a perfect conductor. What about gravitational fields or waves?


Please help me because I didn't know why. If you know please help me!!

Current has both magnitude and direction. As per the definition of vector , current should be a vector quantity. But, we know that current is a scalar quantity. What is the reason behind it?


I'm trying do some validations based of an object with key-value pairs like below  var map = {'1': ['a','b','c'], '2': ['d','e'], '3': 'f'}  and I want to check if my desired value is in a particular key segment if('a' in map[1])  is there a way where we can check it like above?

What is the most concise and efficient way to find out if a JavaScript array contains a value? This is the only way I know to do it: function contains(a, obj) {     for (var i = 0; i < a.length; i++) {         if (a[i] === obj) {             return true;         }     }     return false; }  Is there a better and more concise way to accomplish this?


I’m currently in my senior year of high-school. I’m planning to major in physics. I really enjoyed basic calculus but I really want to start studying it for real. I know university courses include calculus 1 2 3. I would like to start with calculus 1. I would like a suggestion for a book that would give me a thorough and deep understanding of calculus 1 and that would give me a head start in university, I want a hard book with many practice questions. Calculus is really interesting and I love it, I would really love to be fluent in it so I can easily understand the physics topics when I reach university. Any suggestion to what book is the best?

In his first lesson (transcripted in "Tips on Physics"), Feynman talks about math for physicists in a very cool and practical way. And at the end of the section he talks something like "so the first thing to do is to learn to learn derivative, integral and algebra" (I don't know how much precise I'm being because I've read it in Portuguese). I would to know if there is some book that deals with math as Feynman did it in this lesson (respecting formalities, but teaching how to use the practical rules)? Also, someone have any recommendations for algebra book (college level)?


Say I have 300 samples from a population containing two groups, A and B, and data for several variables. I have 150 from Group A and 150 from Group B. However, I know that Group A makes up roughly 20% of the population and group B makes up 80% and the two groups differ on the variables in question.  Is there a way to weight the PCA by cases to make it more representative of the population?  Would it be enough to just to do a weighted standardization?

After some searching, I find very little on the incorporation of observation weights/measurement errors into principal components analysis. What I do find tends to rely on iterative approaches to include weightings (e.g., ). My question is why is this approach necessary? Why can't we use the eigenvectors of the weighted covariance matrix?


I'm trying to have 3 different domains on my VPS, those are   pd.lsgob.us intranet.lsgob.us  lsgob.us   I have configured them but for some reason I'm getting redirected to the same index.html that the one in lsgob.us  intranet.lsgob.us    lsgob.us    Virtualhost intranet  <VirtualHost *:80>      ServerAdmin soporte@lsgob.us     ServerName intranet.lsgob.us     ServerAlias www.intranet.lsgob.us     DocumentRoot "/var/www/intranet/"      <Directory "/var/www/intranet/">              Options Indexes FollowSymLinks             AllowOverride all             Require all granted      </Directory>      ErrorLog ${APACHE_LOG_DIR}/error.log     CustomLog ${APACHE_LOG_DIR}/access.log combined      RewriteEngine on     RewriteCond %{SERVER_NAME} =www.intranet.lsgob.us [OR]     RewriteCond %{SERVER_NAME} =intranet.lsgob.us     RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>  # vim: syntax=apache ts=4 sw=4 sts=4 sr noet   Virtualhost lsgob  <VirtualHost *:80>      ServerAdmin soporte@lsgob.us     ServerName lsgob.us     ServerAlias www.lsgob.us     DocumentRoot /var/www/lsgob      <Directory /var/www/lsgob>              Options Indexes FollowSymLinks             AllowOverride all             Require all granted      </Directory>      ErrorLog ${APACHE_LOG_DIR}/error.log     CustomLog ${APACHE_LOG_DIR}/access.log combined      RewriteEngine on     RewriteCond %{SERVER_NAME} =www.lsgob.us [OR]     RewriteCond %{SERVER_NAME} =lsgob.us     RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] </VirtualHost>  # vim: syntax=apache ts=4 sw=4 sts=4 sr noet

This is a  about Apache's mod_rewrite.   Changing a request URL or redirecting users to a different URL than the one they originally requested is done using mod_rewrite. This includes such things as:   Changing HTTP to HTTPS (or the other way around) Changing a request to a page which no longer exist to a new replacement. Modifying a URL format (such as ?id=3433 to /id/3433 ) Presenting a different page based on the browser, based on the referrer, based on anything possible under the moon and sun. Anything you want to mess around with URL   Everything You Ever Wanted to Know about Mod_Rewrite Rules but Were Afraid to Ask!  How can I become an expert at writing mod_rewrite rules?   What is the fundamental format and structure of mod_rewrite rules? What form/flavor of regular expressions do I need to have a solid grasp of? What are the most common mistakes/pitfalls when writing rewrite rules? What is a good method for testing and verifying mod_rewrite rules? Are there SEO or performance implications of mod_rewrite rules I should be aware of? Are there common situations where mod_rewrite might seem like the right tool for the job but isn't? What are some common examples?   A place to test your rules  The  web site is a great place to play around with your rules and test them. It even shows the debug output so you can see what matched and what did not.


During Captain America: The Winter Soldier, it's clear that Captain America and the Winter Soldier are able to fight one another on a pretty even level, with Cap's shield frequently negating the advantage Bucky's metallic arm provides.  As I understood it, the super-soldier serum that granted Steve Rogers his powers was one-of-a-kind; major effort went to rediscovering (and failing to find) it.  Did Bucky Barnes receive some off-brand super-soldier serum? Or was the original formula replicated during Cap's time in the ice? How is Bucky able to fight on Cap's level?

I have seen a fair amount of discussion on whether or not Captain American  or if , which got me wondering. If Steve Rogers weren't so weak prior to the SSS (Super Soldier Serum), would he be  stronger post SSS?   For example, Steve could bench the bar (45 lbs, speculation), and Cap can bench around 1100 lbs (see superhuman link above). If Steve could have benched 145 lbs, could Cap have benched 1200 lbs.  This question looks like it may invite some opinions and discussion, but I am looking for something explicitly supported in the comics. Something along the lines of a What-If or examples of other SSS projects who were stonger than Steve before AND stronger than Cap after SSS will be accepted in lieu of explicit support (because I doubt it is out there).


Hi guys this error just popped up in my VirtualBox. After the error screen shows up, I press command+F1(I use a Macbook) and a command line comes to the screen that wants me to login. After logging in, i tried   sudo apt-get autoremove  sudo apt-get autoclear   then press command+F8 but same error still remains.

Note: This is an attempt to create a canonical question that covers all instances of "low-graphics mode" error that occurs to a user, including but not limited to installation of wrong drivers, incorrect or invalid lightdm greeters, low disk space, incorrect installation of graphics card like ATI and Nvidia, incorrect configuration of xorg.conf file while setting up multiple monitors among others. If you are experiencing the "low-graphics mode" error when trying to login but none of the following answers work for you, please do ask a new question and then update the answers of this canonical question as and when your new question gets answered.   When I try to boot into my computer, I am getting this error:  The system is running in low-graphics mode Your screen, graphics cards, and input device settings could not be detected correctly. You will need to configure these yourself.   How do I fix the failsafe X mode and login into my computer?  Answer index:


I want to install Ubuntu 14.04 to a new Acer Aspire E 14 using a bootable pen drive. When I select the ubuntu os iso file from multisystem the PC shows this error:  error:Secure Boot forbids laoding module from  (hd0,msdos1)/boot/grub/x86_64-efi/loopback.mod. error: no server is specified. unaligned pointer 0x6653bd9aeb947c2c Aborted. Press any key to exit._     I have installed Ubuntu in legacy mode and Windows does not appear even in the grub menu. WiFi is not working either.

So, the last time I used my Ubuntu installation was last night. Today, as I booted it up, it told me that booting grubx64.efi is not allowed. Easy enough. I know how to re-enable it from my BIOS.  After re-enabling it, I try booting again and get the following error:     error: Secure Boot forbids loading module from (hd0, gpt7)/boot/grub/normal.mod   And then there's this some kind of 'grub resuce' CL prompt below that error. Never figured it out except that ls is a valid command. Using ls displays various (hdx , *) files/directories/drives.  Note that, as I never got to load Windows 8 from GRUB despite various tutorials, I use rEFInd to switch between loading GRUB (which, in turn, I use to load Ubuntu) and Windows 8.  How do I re-enable GRUB (and get to Ubuntu) and does anyone know what just caused this problem? I remember installing Ubuntu updates last night but I can't remember if there was anything that might relate to something UEFI-specific.


I am trying to Update my server  navin@ubuntu:~$ sudo apt-get dist-upgrade Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies: linux-image-generic : Depends: linux-image-3.2.0-67-generic but it is not installed E: Unmet dependencies. Try using -f.   When i tried with the apt-get -f install  navin@ubuntu:~$ sudo apt-get -f install linux-image-3.2.0-67-generic Reading package lists... Done Building dependency tree Reading state information... Done Suggested packages: fdutils linux-doc-3.2.0 linux-source-3.2.0 linux-tools The following NEW packages will be installed: linux-image-3.2.0-67-generic 0 upgraded, 1 newly installed, 0 to remove and 29 not upgraded. 15 not fully installed or removed. Need to get 0 B/38.8 MB of archives. After this operation, 150 MB of additional disk space will be used. (Reading database ... 147902 files and directories currently installed.) Unpacking linux-image-3.2.0-67-generic (from .../linux-image-3.2.0-67-generic_3.2.0- 67.101_amd64.deb) ... Done. dpkg: error processing /var/cache/apt/archives/linux-image-3.2.0-67-generic_3.2.0-   67.101_amd64.deb (--unpack): failed in write on buffer copy for backend dpkg-deb during `./boot/vmlinuz-3.2.0-67-generic': No space left on device No apport report written because MaxReports is reached already                                                           dpkg-deb: error: subprocess   paste was killed by signal (Broken pipe)   Examining /etc/kernel/postrm.d . run-parts: executing /etc/kernel/postrm.d/initramfs-tools 3.2.0-67-generic /boot/vmlinuz-3.2.0-67-generic run-parts: executing /etc/kernel/postrm.d/zz-update-grub 3.2.0-67-generic /boot/vmlinuz-3.2.0-67-generic  Errors were encountered while processing: /var/cache/apt/archives/linux-image-3.2.0-67-generic_3.2.0-67.101_amd64.deb   E: Sub-process /usr/bin/dpkg returned an error code (1)   When i tried to remove the clean out old kernel files in /boot   root@ubuntu: apt-get autoremove Reading package lists... Done Building dependency tree Reading state information... Done You might want to run 'apt-get -f install' to correct these. The following packages have unmet dependencies:  linux-image-generic : Depends: linux-image-3.2.0-67-generic but it is not installed E: Unmet dependencies. Try using -f.   Please provide some solution for this

My /boot partition is nearly full and I get a warning every time I reboot my system. I already deleted old kernel packages (linux-headers...), actually I did that to install a newer kernel version that came with the automatic updates.  After installing that new version, the partition is nearly full again. So what else can I delete? Are there some other files associated to the old kernel images?  Here is a list of files that are on my /boot partition:  :~$ ls /boot/ abi-2.6.31-21-generic         lost+found abi-2.6.32-25-generic         memtest86+.bin abi-2.6.38-10-generic         memtest86+_multiboot.bin abi-2.6.38-11-generic         System.map-2.6.31-21-generic abi-2.6.38-12-generic         System.map-2.6.32-25-generic abi-2.6.38-8-generic          System.map-2.6.38-10-generic abi-3.0.0-12-generic          System.map-2.6.38-11-generic abi-3.0.0-13-generic          System.map-2.6.38-12-generic abi-3.0.0-14-generic          System.map-2.6.38-8-generic boot                          System.map-3.0.0-12-generic config-2.6.31-21-generic      System.map-3.0.0-13-generic config-2.6.32-25-generic      System.map-3.0.0-14-generic config-2.6.38-10-generic      vmcoreinfo-2.6.31-21-generic config-2.6.38-11-generic      vmcoreinfo-2.6.32-25-generic config-2.6.38-12-generic      vmcoreinfo-2.6.38-10-generic config-2.6.38-8-generic       vmcoreinfo-2.6.38-11-generic config-3.0.0-12-generic       vmcoreinfo-2.6.38-12-generic config-3.0.0-13-generic       vmcoreinfo-2.6.38-8-generic config-3.0.0-14-generic       vmcoreinfo-3.0.0-12-generic extlinux                      vmcoreinfo-3.0.0-13-generic grub                          vmcoreinfo-3.0.0-14-generic initrd.img-2.6.31-21-generic  vmlinuz-2.6.31-21-generic initrd.img-2.6.32-25-generic  vmlinuz-2.6.32-25-generic initrd.img-2.6.38-10-generic  vmlinuz-2.6.38-10-generic initrd.img-2.6.38-11-generic  vmlinuz-2.6.38-11-generic initrd.img-2.6.38-12-generic  vmlinuz-2.6.38-12-generic initrd.img-2.6.38-8-generic   vmlinuz-2.6.38-8-generic initrd.img-3.0.0-12-generic   vmlinuz-3.0.0-12-generic initrd.img-3.0.0-13-generic   vmlinuz-3.0.0-13-generic initrd.img-3.0.0-14-generic   vmlinuz-3.0.0-14-generic   Currently, I'm using the 3.0.0-14-generic kernel.


Let $G$ be a finite group such that $x^2 = e$ for each $x \in G$. I know already that $G$ is abelian and that the order of $G$ is $|G| = 2^n$ for some $n \geq 0$. Now I wish to show that $$G \cong \mathbb{Z}_2 \times ... \times \mathbb{Z}_2$$ where there are $n$ factors (we define the direct product of zero groups as the trivial group $\{e\}$).    So far I have the following partial proof:  Using the fact that $|G| = 2^n$, we prove by induction on $n$. When $n = 0$ we have $|G| = 2^0 = 1$, hence $G \cong \{e\}$, which we said above is isomorphic to the direct product of zero copies of $\mathbb{Z}_2$.  Now suppose for some $n \geq 1$ that the statement holds for all $k$ with $0 \leq k \leq n - 1$. We wish to prove the statement for $n$.  Since $n \geq 1$, the order of $G$ is $|G| = 2^n \geq 2$, hence $G$ is nontrivial. Therefore there is an element $x \in G$ such that $x \neq e$. The element $x$ generates a $2$ element subgroup $H_1 = \langle x \rangle$ which is isomorphic to $\mathbb{Z}_2$. Given any coset $xH_1 \in G/H_1$, we have $$(xH_1)^2 = (x^2)H_1 = eH_1$$ (Why? Or is this false?). Therefore we may apply the inductive hypothesis, i.e., $$G/H_1 \cong (\mathbb{Z}_2)^{n-1}$$ where $(\mathbb{Z}_2)^{n-1}$ is the direct product of $n-1$ copies of $\mathbb{Z}_2$.  What remains to be shown is that there is a subgroup $H_2$ of $G$ isomorphic to $G/H_1$, and that $H_1 \cap H_2 = \{e\}$ and $H_1 \cdot H_2 = G$. If we can show this then $G \cong H_1 \times H_2$ since both $H_1$ and $H_2$ are normal in the abelian group $G$. Then we may just substitute our isomorphic values of $H_1$ and $H_2$ to get the result.

Let $G$ be a group where every non-identity element has order 2.     If |G| is finite then $G$ is isomorphic to the direct product $\mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \ldots  \times \mathbb{Z}_{2}$.  Is the analogous result   $G= \mathbb{Z}_{2} \times \mathbb{Z}_{2} \times \ldots $.  true for the case |G| is infinite?


Solve for k: $$\int_6^{16}\frac{1}{\sqrt{(x^3 + 7x^2 + 8x  -16)}}dx = \frac{\pi}{k}$$  I have factored the denominator to obtain $x^3 + 7x^2 + 8x - 16  =  (x-1)(x+4)^2$ I think that since the answer involves $\pi$, I have to somehow make it look like the derivative of arcsine or something.  Or should I do a trigonometric substitution?  Please help!

I have a calculus II final coming up and this question came up in a past final exam:  $$\int_{6}^{16} \frac{dx}{\sqrt{x^3 + 7x^2 + 8x - 16}} = \frac{\pi}{k},$$  where $k$ is a constant. Find $k$.  My progress so far:  $$\int_{6}^{16} \frac{dx}{\sqrt{(x - 1)}(x + 4)} = \frac{\pi}{k}$$  The answer is: $k = 6\sqrt{5}$  I do not know where to from from this step. Any helps or hints will be greatly appreciated! Thank you.  EDIT: $(x + 4)$ not $(x + 2)$ in the denominator.


explains how to Pin a batch file to the Taskbar in Windows 7.  I was able to do that in Windows 7 and it worked fine.   But I'm unable to make it work in Windows 8. The explanation doesn't make the syntax clear for adding the path and filename of the batch file.  It's been several years since I did it in Windows 7 so I may not have done this part right, but I have tried every combination I can think of.    Here are a few examples I've tried:  "C:\Windows\System32\cmd.exe" "/C" C:\Users\[username]\winbats\dogbones.bat "C:\Windows\System32\cmd.exe" "/C" "C:\Users\[username]\winbats\dogbones.bat" "C:\Windows\System32\cmd.exe" /C C:\Users\[username]\winbats\dogbones.bat C:\Windows\System32\cmd.exe /C C:\Users\[username]\winbats\dogbones.bat C:\Windows\System32\cmd.exe /C "C:\Users\[username]\winbats\dogbones.bat"   They all open a command prompt, but none executed the batch file.   Does anyone know the correct syntax or another way to pin a batch file to the taskbar in Windows 8?

We are having trouble adding our batch scripts to the Windows 7, 8 or 10 taskbar or start menu.  Our batchfiles take some arguments and just execute other application based on those arguments . To keep it simple, we created some shortcuts for our customers which they just need to click in order to get everything running.  The question here is: How can we pin those shortcuts or batch files to the taskbar or start menu?  (The customers aren't supposed to access the file system and that's why they can only see the taskbar)


I use mainly Firefox, but sometimes Chrome, which is why I erase my bookmarks on Chrome sometimes and import them from FF.  How can I reload all bookmarked favicons in Chrome? On Firefox there used to be a tool (that does no longer work). On Chrome I didn't find anything like that at all.  EDIT: This is not a duplicate. I found the linked thread before I asked this question, but the dude there has the problem that his favicons won't refresh because of cache related issues. I don't want to refresh them, I just want to initially load them. The tips he got were some commands that clear his cache and make the browser being able to reload a favicon. This is not the case for me. The problem is that I have a lot of subfolders within my bookmarks and opening every single folder (because "open all bookmarks" isn't recursive) is kind of annying.

I updated favicons for a bunch of my websites.  Refreshing the website does indeed show the updated favicon in the browser tab, however the bookmarks for those websites still have the old favicon.  Short of deleting and re-adding each bookmark, is there any way to get Chrome to refresh the bookmarks of each website? Why doesn't just visiting the website update the bookmark icon too?


I need to prove this inequality that $3^\pi > \pi^3$  How can i start to answer this problem. What concept should I apply?

It's a question of a some time ago test, I've found a way to solve the problem using calculus, but always I've thought that exist a solution with algebra and geometry.  Thank you for your time.


In my code, I have command line arguments, and they are being passed correctly. I am converting a base 2-10 number into base 10 using coefficient base exponent form. it works on many numbers, but many others don't work. It is noticeable with you convert base 10 numbers, 3 digits, to base 10.   This is my function:  int decimal(int inbase, int dig, int argc, char *argv[]) {      int total = 0, place = dig - 1;      for(int i = 0; i < dig; i++)     {         total = total + (argv[2][place] - '0')*pow(inbase, i);         cout<<"Argv: "<<argv[2][place] - '0'<<endl;         cout<<"Power: "<<pow(inbase, i)<<endl;         cout<<"Total After: "<<total<<endl;         place--;     }      return total; }   Argv[2] is being passed as a character sting, an example input at compiling this program is: ./a.exe 10 100 10 Expected output in base 10: 100 What I get: 99

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


I have a script that deals with some servers in an environment where new hosts are added once in a while. I'd like to avoid being asked whether new fingerprint should be accepted but be warned if any previously known fingerprint have been changed. Turning off StrictHostKeyChecking is not an option because it will leave me vulnerable to MITM attacks. What would be the most elegant way to silently accept new servers' fingerprints in this case?

Here's my situation: I'm setting up a test harness that will, from a central client, launch a number of virtual machine instances and then execute commands on them via ssh.  The virtual machines will have previously unused hostnames and IP addresses, so they won't be in the ~/.ssh/known_hosts file on the central client.  The problem I'm  having is that the first ssh command run against a new virtual instance always comes up with an interactive prompt:  The authenticity of host '[hostname] ([IP address])' can't be established. RSA key fingerprint is [key fingerprint]. Are you sure you want to continue connecting (yes/no)?   Is there a way that I can bypass this and get the new host to be already known to the client machine, maybe by using a public key that's already baked into the virtual machine image ?  I'd really like to avoid having to use Expect or whatever to answer the interactive prompt if I can.


Problem. How many ways are there to put $5$ balls in $3$ boxes if the balls are not distinguishable but the boxes are? How many ways are there to put $n$ balls in $k$ boxes if the balls are not distinguishable but the boxes are? Generalize. I don't really get how to deal with these problems, involving Distinguishability. Any solutions?

How to use the  method?  Say I want to find number of combinations I can get with $x_1+x_2+x_3+x_4=22$,  where $x_i\in\mathbb{N}$.  Is this the correct time to apply the method?  This is being repurposed in an effort to cut down on duplicates, see here:     and here:


while inspecting in browser, I am getting this type of array and I am unable to access 0th index of array.  function xyz() { var obj={ name: "abc", age: "20"   var VArr=[]; VArr.push(obj); }    [] 0:Array(1) 0:{name:"abc",age:"20"}

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


In chapter/episode 3 of The Mandalorian before his new armor is built, it is said that the Mandalorian never removes his helmet. In this case, how does the Mandalorian eat?

In episode 3 of The Mandalorian, it is said that Mandalorians never remove their helmets for any reason. Really? Not even to sleep or bathe? Is there any canonical source for this idea? I’m going to assume that the “never” implies “Never removes their helmets in public…” right?  But in flashback scenes to the Mandalorian’s childhood, nobody is really pictured wearing Mandalorian armor let alone helmets. They simply seemed like basic humans who might just be unified by wearing maroon wardrobes all the time.  So what is the deal with this claim? What is the canonical context of the claim?      Looking for in-universe, canonical explanations; not armchair speculation and theories. If none (currently) exist, legends explanation would suffice. Regardless, please provide references and context.


I bought a Razer Blade Stealth a week ago, took windows off and installed Ubuntu 17.10. Used until today when it started saying that my hard disk was write protected while I tried to save simple files. Then I reboot and this happens:  fsck error on boot: /dev/...: UNEXPECTED INCONSISTENCY; RUN fsck MANUALLY   for my root partition. I found several answers here telling me to run fsck. I did and it fixed for some time, but then the error happened again.   I just want to know if this is hardware or software related, and if I should worry, or if this is just a bug in the 17.10 version. I'm downloading 17.04 now.

I've run across (personally or by proxy) a bunch of storage media that exhibited physical problems during their life. Hard disks, solid state drives and other flash storage media all fail after some time. The situation is worse with USB flash drives and flash cards because of the large amount of suppliers with inferior flash cell and flash controller quality.  How can I reliably detect if a storage drive suffers from physical damage?  Note that this question isn't about file system integrity (which can be checked with ).


Let $t$ be a real number such that $t^2 = at + b$ for some positive integers $a$ and $b$. Then for any choice of positive integers $a$ and $b$, $t^3$ is not equal to -  1) $4t+3$  2) $8t+5$  3) $10t+3$  4) $6t+5$  This question is from a prestigious Indian Scholarship exam, and I'm solving it for fun. But I can't get at the bottom of the problem. I'm also a bit shaky on which concept to use in this problem.  My try on this question   $t^2 =at +b$ $t = \sqrt(at+b)$     For $t \in R$ $at+b \ge 0$  Since $a$ and $b$ are positive integers  $at \ge -b$  and  $t \ge \frac{-b}{a}$  I also tried differentiating the function    $t^2 = at + b$ to get  $\frac{d}{dt}(t^2) = a\frac{d}{dt}(t) + 0$  $2t = a$  Alas it leads nowhere. But  $\frac{a}{2} \ge \frac{-b}{a}$  Since $a$ and $2$ are positive integers  $a^2 \ge -2b$  What has to done next? Please help

Let $t$ be a real number such that $t^2=at+b$ for some positive integers $a$ and $b$. Then for any choice of positive integers $a$ and $b$, $t^3$ is never equal to: (A). $4t+3$ (B). $8t+5$ (C). $10t+3$ (D). $6t+5$  We have $t^3 = at^2+bt$ and so for (A) we have $t^3 = 4t+3 = 4(at^2+bt)+3$. I don't see how to continue since this is a cubic equation. Is there an easier way of finding a contradiction?


My younger sister is 28 years old. She lives in my house and I pay for more than 50% of her expenses (food, clothing... everything). Her income in  2018 was $7,000 for the year. She is a waitress.   Can I indicate her as my dependent or not?

My spouse and I own our house (about a decade or so left on the mortgage, will be paid off early). My sibling lives nearby, renting an apartment. Rent is rather high in this area, and we've talked about having them move in with us.  If an adult filing taxes as an independent adult moves in with family filing taxes jointly, how is/can this be classified tax-wise?  My understanding/assumption is there are two options (I'm probably wrong about this):   Sibling is tenant, paying market rate rent: sibling pays rent. Rent is reported as income for me and my spouse, and deductible (in MA) for sibling. Sibling is tenant, paying sub-market rent: difference between paid rent and market rent is a gift to the sibling. Gift tax may be owed depending on dollar amount. No rent is paid. Sibling is dependant. Is sibling eligible for health insurance (and other benefits etc.)?


I'm using the desing view to add components to the JFrame, I create a package "res" and copied the images files and add the image to the JLabel with options, properties/icon/Image with Project/ selecting res package and the file .png, but i don't know why I'm getting this exception:   line 75 exception: jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/icons8customer32px1.png"))); // NOI18N  If I remove the icon it doesn't crash, if any have an idea why this happen? thanks   private void initComponents() {   jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/res/icons8customer32px1.png")));         }// </editor-fold>   I'm using this steps for handling images:

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?


If I was to buy a PSN online membership card and activate it on my brother's PS4, could I play online on my PS4? (It's two different consoles).  And would all account on the ps4 that is activated play online  I have my account on there ps4 but want to know if it would allowed me to play online on mine .

Both myself and my boyfriend have PS4s.  Can I just get a single PSN account and sign both consoles into the same account, or do I need to get two separate accounts?


My icons in LibreOffice 5.3 have disappeared. How can I restore them? I am running Ubuntu 17.04 with Cinnamon, although this problem occurs also when I use unity.

New Ubuntu 16.04.2 installation.  Uninstalled the default libreoffice installation. Then I installed libreoffice 5.4.0.3 from this PPA:  sudo add-apt-repository ppa:libreoffice/ppa   Now all icons are missing from toolbars:    Is this a bug or a funk setting? Any thoughts on how to reset the toolbar to get the typical configuration? I already tried the basic stuff (rebooting, disable/enable toolbars, etc.)


I'm trying to create a function read() and display(). They should read 3 values and print those 3 values using another function which is the display(). I tried doing this: #include<iostream> int read(void); void display(int n1, int n2, int n3); using namespace std; int main() {     int n1, n2, n3;     n1, n2, n3 = read();     print(n1,n2,n3);     reverse(n1,n2,n3);          return 0;     }  int read(void) {     int n1, n2, n3;          cout << "Enter three numbers: ";     cin >> n1;     cin >> n2;     cin >> n3;     return n1, n2, n3; }  void display(int n1, int n2, int n3) {     cout << n1 << " " << n2 << " " << n3 << endl;     return; }  It only stored the n3 value. Is there another way I can go about this?

Is there a preferred way to return multiple values from a C++ function?  For example, imagine a function that divides two integers and returns both the quotient and the remainder.  One way I commonly see is to use reference parameters:  void divide(int dividend, int divisor, int& quotient, int& remainder);   A variation is to return one value and pass the other through a reference parameter:  int divide(int dividend, int divisor, int& remainder);   Another way would be to declare a struct to contain all of the results and return that:  struct divide_result {     int quotient;     int remainder; };  divide_result divide(int dividend, int divisor);   Is one of these ways generally preferred, or are there other suggestions?  Edit: In the real-world code, there may be more than two results.  They may also be of different types.


I created a field field_quantity_description that contains HTML code. I can output the escaped content of this field:  {{ quantity.entity.field_quantity_description.value }}   I want to render HTML inside this field, so I usually use raw filter like this:  {{ quantity.entity.field_quantity_description.value|raw }}   But Drupal 9 tells me that raw is deprecated. But what do I have to use instead to render HTML inside the field?

myfield is a plain text field. {{ content.field_myfield }} renders the field with HTML markup and the field label.  How do I render the raw value of the field? {{ content.field_myfield.value }} doesn't work.


If I have a mass that gets accelerated to a near the speed of light, before it gets I would think its relativistic mass would expand its Schwarzschild radius enough to turn it into a black hole. I have read on the internet that this is not actually the case and that relativistic mass shouldn't actually be interpreted as increasing mass.  the Wikipedia page mentions that relativistic mass is often misunderstood. what is typically misunderstood about this? (I think I am one of the ones that misunderstands it)  I also read that the Schwarzschild radius wont expand due to relativistic mass because if that were the case one observer may see the mass as a BH while a co-moving observer wont, and this cant be?  Why couldn't one observer see a BH while the other doesn't? I feel like that would make sense in relativity.

I'm a big fan of the podcast Astronomy Cast and a while back I was listening to a Q&A episode they did. A listener sent in a question that I found fascinating and have been wondering about ever since.   From the show :      Arunus Gidgowdusk from Lithuania asks: "If you took a one kilogram mass and accelerated it close to the speed of light would it form into a black hole? Would it stay a black hole if you then decreased the speed?"   Dr. Gay, an astrophysicist and one of the hosts, explained that she'd asked a number of her colleagues and that none of them could provide a satisfactory answer. I asked her more recently on Facebook if anyone had come forward with one and she said they had not.  So I thought maybe this would be a good place to ask.


How to show $$1/e=1-1+\frac1{2!}-\frac1{3!}+\frac1{4!}+\dots$$  I have consider the product of the nth partial sums of the expansions for $e$ and $1/e$ but still can't prove there are equal to 1  with the definition $e=1+1+\frac1{2!}+\frac1{3!}+\dots$

Suppose I knew nothing about the function $e^x$. If I wanted to find a power series that was its own derivative, I would logically start with the constant term, and first start by setting it to $1$. Then, the next term should be the antiderivative of the first term, giving me $x$. Doing this again would give me $\frac{x^2}2$. Repeating this process over and over again, I would get $$1+x+\frac{x^2}{2!}+\frac{x^3}{3!}+\frac{x^4}{4!}+\ldots=\sum_{k=0}^{\infty}\frac{x^k}{k!}$$ Graphing a few terms of this, I might notice that this looks more and more like an exponential the more terms I graph. If I prove that this function satisfies the exponential relationship $f(x+y) = f(x)f(y)$, I would be able to prove that this series is an exponential function. How would I prove this? After this, how would I prove that the base of this exponential function is $e$, which is defined as $\displaystyle{\lim_{n \to \infty}} (1+\frac1n)^n$?  Edit: After expanding $(1+x)(1+y)$ and $(1+x+\frac{x^2}2)(1+y+\frac{y^2}2)$, I can see how extra terms get taken care of when the next degree is added. However, my second question still stands.


When you have a plural, it usually ends with an 's'. For example, girls, boys, chickens, bicycles. If you would like to show possession, you add an apostrophe to the end, with no extra 's'. So, we get The girls', boys', chickens' and bicycles' food is iron. However, if you had a singular noun ending with an 's', like Jesus or watercress, would write the possessive form like this "Jesus', watercress'" or like this "Jesus's, watercress's"?

What is the possessive of a noun ending in ‑s?  Are these both right, or is the second one wrong?   the boys' books the boss' car


I used a web safe red and I'm still getting a somewhat distorted output. I'm saving in .png format. I've noticed this happening a lot whenever a red color is used. The output looks HORRIBLE on Faceboook and Instagram. I have it at 300 dpi for printing. I'd like the image that appears on the internet to be just as clear as when I print it. I did a screenshot of it on Facebook and included it with this question.

After uploading an image, Facebook converts it to a new image.  Their conversion process introduces artifacts and mottling to the magenta-ish parts of the image.  Original image:   Facebook's conversion:   Are there ways to preserve the original quality of this image and have the image appearance on Facebook reflect more of the original quality?


I am tired of always trying to guess, if I should escape special characters like '()[]{}|' etc. when using many implementations of regexps.  It is different with, for example, Python, sed, grep, awk, Perl, rename, Apache, find and so on. Is there any rule set which tells when I should, and when I should not, escape special characters? Does it depend on the regexp type, like PCRE, POSIX or extended regexps?


I have the same problem as in    I know the question is not really up-to-date but does someone have an answer?  I've defined a Processing Model in QGIS 2.18 ('Las Palmas') and want to run it in a standalone PyQGIS-Script via command processing.runalg('modeler:[...]'). If I execute the script in the QGIS Python Console it works:    If I try to run the same code in a standalone script it fails with the message 'Algorithm not found'.  Can somebody help?

I want to create a standalone python script using QGIS python API (PYQGIS) for education. First I create a model and export that model to python script.  original python script from the export :  ##=name ##raster=raster ##stat=output html outputs_QGISRASTERLAYERSTATISTICS_1=processing.runalg('qgis:rasterlayerstatistics', raster,stat)   Next I read this  and I tried to follow this tutorial to create my script.  Final script :  import sys from qgis.core import QgsApplication from PyQt4.QtGui import QApplication app = QApplication([]) QgsApplication.setPrefixPath("/usr", True) QgsApplication.initQgis()  # Prepare processing framework  sys.path.append('/home/username/.qgis2/python') from processing.core.Processing import Processing dem='aster.tif' slope='slope.tif' aspect='aspect.tif' outputs_SAGASLOPEASPECTCURVATURE_1=processing.runalg('saga:slopeaspectcurvature', dem,6,1,1,slope,aspect,None,None,None,None,None,None,None,None,None,None) Processing.initialize()  # Exit applications QgsApplication.exitQgis() QApplication.exit()   If I run this script it works fine without error but I don't take some export like aspect and slope (these can't be found?). Any idea why I can't take exports ?  I use Ubuntu and python 2.7 and QGIS 2.18.1.    i try to this script :  import sys from qgis.core import QgsApplication sys.path.append('/usr/share/qgis/python/plugins') import processing a=processing.alglist() print a processing.alghelp("saga:slopeaspectcurvature")   and i take that print any idea why ?  Algorithm not found   but if i use this module in QGIS work fine.


I recently posted an  on unix.stackexchange.com that included someone else's pointful comment. To me the comment was to the point  but was also obvious, and I did not think twice about including it in what ended up being the only posted answer. Along with that I fixed some stylistic programming issues apparent in OP's question. My answer was accepted. The day after this, after reading comments from various upstanding members of the site, I offered the author of the comment to erase my answer so he/she could write his/her own, based on his/her comment. I had no response perhaps because this was deemed both trivial and unimportant. That in a way is also what I think.  Nevertheless I have the nagging feeling that at least the appearance of using a valuable comment in a answer reflects badly on my moral standing in the Community. So I bring this to Meta in the form of the question below. I read somewhere that erasing an accepted answer is not recommended. That policy actually makes sense to me, to not destroy communal value. But I still would like to forfeit whatever bonus points I received for it (frankly I don't care at all for those). How can I do this without erasing my answer wholesale ? Or is it nevertheless my call to erase my answer anyway in this particular case, leaving the initial helpful comment below OP (i.e. not below my answer) ?

I'm trying to go through and provide answers to every unanswered question (search "closed:0 answers:0"), somewhat following the spirit that was blogged about at  .  However, I'm finding this much more difficult than it needs to be, as many of the questions have already been answered without the use of an "answer" - but instead, in the form of a comment by either the OP or another poster. I wouldn't mind reading through and skipping these, as long as there was some appropriate action I could take to at least assist with preventing these questions from being seen again from the same query - either by myself or another SO member.  Is there such an appropriate action?  Should we vote to close?  If so, using what reason? Even if I vote to close, what are the chances that 4 other users will also view the question and also vote to close?  (i.e., will my individual vote even do any good?  Is there any report to show recent close votes, so that others may also review and contribute supporting close votes?) Should we post some sort of an answer - even just something to the effect of "this was already answered by the OP's own comment to his answer (above)"? Would something like this be appropriate to flag for moderator attention, and let the moderators deal with it?  (Or would this be considered too trivial?) Should we rename the question title to something standard that can be used in a search exclusion?  (Maybe "SOLVED:"?)  Basically, how can I help to denote questions as "This question is no longer in active search of an answer - though better answers may still be appreciated."? I've already reviewed , which was closed as a duplicate of  - but this requires effort on part of a user who may very likely no longer be active. Otherwise, is there something I should be doing to improve my search to filter out these types of questions? I've run across this many times, so I don't consider it to be a rare issue.  However, the last question like this I just ran across, prompting this question, was .  In this case, the question was self-answered by the OP in the form of a comment, this question is the OP's only question, the OP has no other visible activity on SO, and the OP hasn't been seen on SO since he registered and posted the question 5 months ago. Another one I just ran across is .  However, here the "answer" comment was posted by a reputable and recently active SO member.  Should I leave a comment directed at him, asking him to re-post his comment as an answer, or should I post my own answer echoing his comment?  (Or something else?) Yet another is .  Interestingly, the OP actually self-edited the question to include the "SOLVED:" prefix on to the question, instead of posting his resolving comment as an answer (and ideally accepting it) as he was asked to do by another comment.  This brings up another good idea - is there a "standard" we should use to rename the titles on these "resolved but unanswered" posts that could be used as a search exclusion?  (Also added to the above list.)


How can I write a line without listing inside a list like below

When using itemize list, I would like to include text which is not part of the bullet points. Is it possible not to indent it the way items are indented?  \begin{itemize} \item One Subsequently, we only want to count the cases... \item Two The subsequent order of the other neighbors... \item Three \end{itemize}


I am a newbie to blender and i found a 'Denoiser' option and decided to use it. I found out its function but it seems to create these 'glitched' areas in one of my  renders. What are they and how do i fix it?

Since the Denoise feature was added to Blender I only use the default setting with it and it really does the work. But sometimes the denoise is noticable on some of my renders. How can I overcome the blurred effect? Denoising for me is a big help because my system is quite aged.


I want Copy data from table to same table and ignore id and change value for 1 column (profile_name)  INSERT INTO profiles  SELECT * FROM profiles where id=1

I'm trying to use a select statement to get all of the columns from a certain MySQL table except one. Is there a simple way to do this?  EDIT: There are 53 columns in this table (NOT MY DESIGN)


I am trying to imagine view from my house window if it was built on the black hole;) .... Of course I am joking.  If time near event horizon slows down with respect to rest of the universe. I could imagine time running faster for rest of the universe which would result in we viewing fast forward expansion of the universe till it tears apart completely. On the other hand we may also view slowed down light imprinted on the event horizon representing the past events of the universe.  I am not sure if I am right. Can someone please help me imagine the view standing on the event horizon of the black hole?

Imagine there is a huge black hole with  so that one doesn't get killed by spaghettification after even nearing the event horizon.   Now imagine a very curious creature wanting to know how the universe would evolve. Even though it isn't sure it will be able to return, it decided to travel just close enough to the event horizon to survive, and stay there until for as long as it can make.  For how far would the creature see the future? Is this even possible? What should one expect?     This question was inspired by Miller's planet from the movie Interstellar.


I tried to download Tumblr and it got stuck on the 'loading' part in the app store and I've tried everything I can think blr

I tried downloading Tumblr yesterday but it never completed. At the moment I have an App icon stuck at 'Loading...'.  I have tried restarting the iPhone (holding down both home and side buttons at the same time) and I have also tried shutting down the iPhone (holding the side button and swiping).  I have also tried deleting it as usual (holding the icon down and choosing delete but it doesn't go away).  Any ideas on what I can do to get rid of this icon?


I've created a button in my package to pass data to a new page.  When I upload the package and install it on another org, the url doesn't work because the server, page name and field id's are different.  How can I create a url that is more 'universal' and will accommodate other org installations?  Here's the url.   https://na17.salesforce.com/a02/e?CF00No0000008adBn={!PI_SFINT__Project__c.Name}&CF00No0000008adBn_lkid={!PI_SFINT__Project__c.Id}&00No000000EGtmZ={!PI_SFINT__Project__c.Name}&retURL=%2Fa00o000000XLyhu

I am looking for a way to get the 15 character entity ID for a custom field on my Lead object in an Apex controller. I have tried this:  private String getEntityIdFor(String fieldName) {         Map<String, Schema.SObjectField> fieldMap = Schema.SObjectType.Lead.fields.getMap();         return fieldMap.get(fieldName).getDescribe().getId();     }    Of course, there is no getId() method, but this is the closest I got.   Thanks for any help.


The problem states: The probability of a man telling the truth is = $3/4$. He rolls a dice and claims he got a six. What is the probability that he actually got a six?  And my textbook solves this using Bayes' theorem and gets $3/8$ as the answer.  The way I'm looking at it is: The probability that he really got what he's claiming (a six) should be equal to the probability of him telling the truth which = $3/4$. Where am I going wrong here?

First, I apologise for the vague title. I couldn't think of a short way to represent the problem. Also, I am aware that a similar question exists, but I have a little bit more insight.  The problem is:      A man is known to speak the truth three out of four times. He throws a   die and reports that it is a six. Find the probability that it   actually is a six.   The answer in the book is $ \frac{3}{8} $, which sounds completely off to me, given the numbers, on first glance. I decided to try it on my own. After some contemplation, it indeed is true that $ \frac{3}{8} $ is correct. But, the question's vagueness makes it interesting. It's sort of a naive answer!  First, here's the book's solution:  Let $ E $ be the event that the man reports that a six occurs, $ S_1 $ be the event that six occurs and $ S_2 $ be the event that six does not occur.  $ P(S_1) $ = Probability that six occurs = $ \frac{1}{6} $  $ P(S_2) $ = Probability that six does not occur = $ \frac{5}{6} $  $ P(E~|S_1) $ = Probability that the man reports that a six occurred when it has actually occurred (truth) = $ \frac{3}{4} $  $ P(E~|S_2) $ = Probability that the man reports that a six occurred when it hasn't actually occurred = $ \frac{1}{4} $  $ P(S_1|E) $ = Probability that a six has actually occurred when the man claims so =  $$ \frac{P(S_1)~P(E~|S1)}{P(S_1)~P(E~|S_1)+P(S_2)~P(E~|S_2)} = \frac{3}{8} $$  Link to original: Page 25 of  (link updated 22/11/2015; tends to break often).  Here's the first of my two solutions:    The question is a little vague and it doesn't tell us what the man says when he doesn't get a six. Assuming he lies every time he doesn't get a six (which is not quite what the question says), would bring up $ P(E~|S_2) $ to $ 1 $, which skyrockets $ P(lie) $ to $ \frac{1}{6} + \frac{1}{6} + \frac{1}{6} + \frac{1}{6} + \frac{1}{6} + \frac{1}{6}.\frac{1}{4} = \frac{7}{8} $.  Also, $ P(E~|S_1) = \frac{3}{4} $ and $ P(E) = \frac{5}{6} + \frac{1}{6}.\frac{3}{4} = \frac{23}{24} $.  This brings us to, $$ P(S_1|E) = \frac{P(S_1)P(E~|S_1)}{P(E)} = \frac{3}{23} = 13.04\% $$  Please note that I don't care about the sixes rolled when he lies about it being a six, because that condition is not applicable to the question.  I'm very skeptical about my calculations! I decided to whip up a simple program and see what the probability distribution is for $$ \frac{Number~of~sixes~rolled~while ~saying~it's~a~six}{Number~of~dice~rolls} $$  Here's the result:    Considering the book says $ P(E~|S_2) = \frac{1}{4} $, which is in essence is contradictory to the question, let's also consider the other possibility:    It's even more vague in this scenario! If the man lies after any given roll, there is a $ \frac{1}{5} $ probability that he will lie about it being any other number. This creates a new branch at each lie, which splits into five. In this case,  $$ P(E) = \frac{1}{6}.\frac{1}{4}.\frac{1}{5}.\frac{5}{1}+\frac{1}{6}.\frac{3}{4} =  \frac{1}{6} $$  $ P(E~|S_1) $ still remains $ \frac{3}{4} $, but $ P(E~|S_2) = \frac{1}{4}.\frac{1}{5} = \frac{1}{20} $.  $$ P(S_1|E) = \frac{P(S_1)P(E~|S_1)}{P(E)} = \frac{3}{4} = 75\% $$  This seems like the more intuitive answer, and it is why I doubted the original answer in the first place. Given a truth probability of $ \frac{3}{4} $, there was no way that the probability of a six was $ 37.5\% $!    The ambiguity of the question is what makes $ \frac{3}{8} $ wrong to me. Entirely out of curiosity, which answer fits best with the question and are these calculations correct or baloney?


When I use a figure command to insert an image , I notice that the image does not go where exactly I want , and even when I want it in a specific subsection I find it before that section  \begin{figure}  \label{fig:f43} \caption{An Example } \includegraphics[width=12cm, height=6cm]{4-12}  \end{figure}

How to influence the position of float environments like figure and table in LaTeX?   This is a general question and should collect useful answers for all users. I hope we can use this as a reference


When i try to update or install any software using the terminal for Ubuntu 18.4 it shows the following:  jean@jean-Latitude-E5550:~$ sudo apt install update [sudo] password for jean:  E: Malformed entry 48 in list file /etc/apt/sources.list (Component) E: The list of sources could not be read. E: Malformed entry 48 in list file /etc/apt/sources.list (Component) E: The list of sources could not be read. jean@jean-Latitude-E5550:~$    And also it shows in color everything, so help me guys, please help me????

I have unistalled and reinstalled the Ubuntu Software Center as per info I found in a similar thread and I got the same response about line 91 or something like that.  I just tried to upload a screen shot but since I'm new it won't allow me to.  I also can not figure out how to cut and paste anything so I have to hand type what the error screen says, both when I attempt to open the software center and nothing happens, when I try to enter commands into the terminal to uninstall, reinstall, whatever I get the same following:  COULD NOT INTITIALIZE THE PACKAGE INFORMATION An unresolvable problem occured while initializing the package information Please report t:his bug against the 'update-manager' package and include the following error message: 'E: Malformed line 91 in source list/etc/apt/sources.list (dist parse)  E: The list of sources could not be read.,  E: The package list of status file could not be parsed or opened.   How do I report bugs?  What can be done about this.  I have searched and everything everyone says to do leads me back to the same line error message.  So, I don't know how to get to line 91 in the source list; to tell you what it says. Sorry, I'm really new to this. That is what I need is to find out how to get there and fix what it says. I would really like to NOT have to re partition my hard drive and start from scratch, so I'm really looking forward to getting this problem solved. I need to be able to install new software.


Textual describes something as being in text form. I can read something that is textual. Something that is visual can be viewed. I can listen to something that is acoustical in nature? I don't think acoustical is the right word. What word am I looking for?

I need help on finding words relating to the senses/perception. I mean this in a neuronic/biological or philosophy-of-mind kind of way.  A word for...   pertaining to the senses (Is it sensory?)  pertaining to vision (ocular?) pertaining to smell (olfactoric?)  pertaining to taste     pertaining to sound  pertaining to touch unable to smell  unable to taste     unable to feel/touch  unable to perceive (unconscious?)  (unable to see: blind) (unable to hear: deaf)


Consider the following  on a bash command line, which is : $ a='hello world    example'  $ echo ${a//+( )/_} hello_world_example  However, that very same parameter expansion no longer works in a bash script. # !/usr/bin/env bash a='hello world    example' echo "${a//+( )/_}"  It results in the unaltered string: hello world    example  I did already learn from a simpler parameter expansion that the double quotes " " after the echo command are required, although I do not know why. However, what more needs to be done for this particular parameter expansion to work in a bash script? And why?

I can run this command from my command line prompt:  cp -r folder/!(exclude-me) ./   To recursively copy all contents of folder except for the subdirectory named exclude-me into the current directory.  This works exactly as intended.  However, I need this to work in a bash script I've written, where I have this:  if [ -d "folder" ]; then   cp -r folder/!(exclude-me) ./   rm -rf folder fi   But when I run the script:  bash my-script.sh   I get this:  my-script.sh: line 30: syntax error near unexpected token `(' my-script.sh: line 30: `  cp -r folder/!(exclude-me) ./'   And I'm at a loss as to why it works from the command prompt, but the exact same line doesn't work in a bash script.


I know that for a decay if the strangeness changes then the decay is a weak decay because strangeness is conserved in both strong decays and electromagnetic decays. However, is it also true that if a weak decay occurs the strangeness must also change? i.e. do we have: $$\text{weak decay} \iff \Delta S\ne0$$ $$\text{or}$$ $$\text{weak decay} \Leftarrow \Delta S\ne0$$ If it is the latter, is their another necessary and sufficient condition (apart from looking at timescales) to see if a decay is weak?

Are there any fundamental rules of thumbs that can be used to identify the type of force interaction (weak, electromagnetic, strong) in a particle decay without drawing the Feynman diagrams at the beginning of the problem. At least to rule out some types of forces from a given decay reaction, before start drawing the Feynman diagrams.


Why is the score of a tag not counted after you get an accepted answer?  If I answer a question with a support tag, why does this not count in the Next tag badge?

My question is specifically for badges in a particular tag. I've heard that the rules have been changed.  How and when can one get bronze, silver and gold badges for a specific tag, say ? What are the new rules governing these badges?


I'm not familiar with the tipping system in the US. One day I'm buying a coffee and i am presented with a machine asking me to tip 15%, 18% and 20% and no tip. I feel like I have to tip at least 15% but i still haven't tasted the coffee and I won't even sit down at the place. I don't mind tipping if I get some sort of service.   What do people do with the tipping for getting a to-go coffee?

When I go to a restaurant in the USA and order food for takeout, am I supposed to tip?


Let $x_i,y_i\in\mathbb{R},\quad i=1,\dots,n$. Show that   $$(\sum_{i=1}^n x_iy_i)^2\leq \sum_{i=1}^n x_i^2\sum_{i=1}^n y_i^2$$   where the equality holds if and only if $x_i=\lambda y_i$ where   $\lambda_i\in\mathbb{R}$   If I think I already saw it in some place but I don't remember how to proof  For $n=1$ $$(x_1y_1)^2=x_1^2y_1^2\leq x_1^2\times y_1^2$$  Assuming that is true for $n=k$ for any $k\in\mathbb{Z}$. Then $$(\sum_{i=1}^k x_iy_i)^2\leq \sum_{i=1}^k x_i^2\sum_{i=1}^k y_i^2$$ Then we need to show that for $n=k+1$ it is true too $$(\sum_{i=1}^{k+1} x_iy_i)^2\leq \sum_{i=1}^{k+1} x_i^2\sum_{i=1}^{k+1} y_i^2$$  I'm stuck now, I thought it was something related to moving the series but I got nowhere.

I ran across this problem in some old notes, and I frustratingly can't figure out how to do it   Let $a_i$ and $b_i$ be sequences of natural numbers, use induction to show  $\sum_{i=1}^n (a_ib_i)^{1/2} \le (\sum_{i=1}^n a_i)^{1/2}(\sum_{i=1}^n b_i)^{1/2} $  Obviously this is trivial to show for n=1. I can't make much progress on n+1. I've tried various tactics, squaring both sides etc.   Any hint or help would be appreciated. Thanks.


I'm running a Node.JS application and need to figure out if something is using a certain port.  How can I do this from the linux command line?

I'd like to be able to find out which process is currently using a certain port in Linux. Is there any way to do this?


I don't understand difference of arguments and parameter in function.Is there anybody who tell me details about arguments and parameters. What is arguments and what is parameter?

When verbally talking about methods, I'm never sure whether to use the word argument or parameter or something else. Either way the other people know what I mean, but what's correct, and what's the history of the terms?  I'm a C# programmer, but I also wonder whether people use different terms in different languages.  For the record I'm self-taught without a background in Computer Science. (Please don't tell me to read  because I'm asking this for the benefit of other people who don't already have a copy of 's marvellous book.)  Summary  The general consensus seems to be that it's OK to use these terms interchangeably in a team environment. Except perhaps when you're defining the precise terminology; then you can also use "formal argument/parameter" and "actual argument/parameter" to disambiguate.


On my laptop I have Ubuntu 11.10 and Windows 7 in dual boot mode.  I made a partition of 30 GB for Ubuntu but now it's too small and I want to increase this disk size from 32 GB to 100 GB.  This is home my disk looks like:  C Drive - 360 GB D Drive - 200 GB E Drive - 80 GB   On the F Drive I installed Ubuntu which contains 30 GB.  How can I increase this partition from 30 GB to 100 GB?  Someone suggested  tool to achiveve this. but there is a risk to lose my Windows or Ubuntu install.

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


Compute the following integral using residues: $$\int_0^{\infty}\frac{\cos x}{x^2+a^2} d x $$  $\int_0^{\infty}\frac{\cos x}{x^2+a^2} dx =\frac{1}{2}\int_{-\infty}^{\infty}\frac{\cos x}{x^2+a^2} dx =\frac{1}{4}\int_{- \infty}^{\infty}\frac{e^{ix}+e^{-ix}}{x^2+a^2} dx$. After the substitutions $z=e^{ix}$ and $\cos(x)=\frac{1}{2}(z+\frac{1}{z})$ I get: $\frac{1}{4}\int_{-\infty}^{\infty}\frac{e^{ix}+e^{-ix}}{x^2+a^2} dx =\frac{1}{4}\int_{-\infty}^{\infty}\frac{z+\frac{1}{z}}{e^{2iz}+a^2}\times{dz}{ie^iz}=\int_{-\infty}^{\infty}\frac{z^2+1}{z(2ie^{3iz}+2a^2ie^{iz})}dz$ In the expression $\frac{z^2+1}{z(2ie^{3iz}+2a^2ie^{iz})}$ I detected only one residue at 0, which is a simple pole. However my computation is giving me the result  $\lim_{z\to 0}\frac{z^2+1}{z(2ie^{3iz}+2a^2ie^{iz})}=\frac{1}{2i+2a^2 i}$ which is wrong according with the solution. Questions: What am I doing wrong? How should I compute this integral? Thanks in advance!

I am interested to compute the following integral  $$I=\int_{0}^{+\infty}\frac{\cos x}{a^2+x^2}dx$$  where $a\in\mathbb{R}^+$. Let me explain my first idea. As the integrand is an even function of $x$ then  $$2I=\int_{-\infty}^{+\infty}\frac{\cos x}{a^2+x^2}dx=\lim_{R\to+\infty}\int_{-R}^{R}\frac{\cos x}{a^2+x^2}dx:=\lim_{R\to+\infty}J$$  So, I first focus on computing the $J$ integral by first modifying it as follows  \begin{align*} J&=\int_{-R}^{R}\frac{\cos x}{a^2+x^2}dx=\int_{-R}^{R}\frac{\cos x}{a^2+x^2}dx+i\int_{-R}^{R}\frac{\sin x}{a^2+x^2}dx \\ &= \int_{-R}^{R}\frac{(\cos x+i\sin x)}{a^2+x^2}dx = \int_{-R}^{R}\frac{\exp(ix)}{a^2+x^2}dx \end{align*}  Then, I use the well-known techniques of complex variable theory. First, I replace the real variable $x$ in $J$ with a complex variable $z$ and consider a contour integral over $C=C_1\cup C_2$  $$K:=\int_{C}\frac{\exp(iz)}{a^2+z^2}dz$$    Then, according to the Cauchy's integral theorem and the Residue theorem, I get  \begin{align*} K=J+\int_{C_2}\frac{\exp(iz)}{a^2+z^2}dz &= \int_{C_3}\frac{\exp(iz)}{a^2+z^2}dz=\int_{C_3}\frac{\exp(iz)}{(z+ia)(z-ia)}dz \\ &=2\pi i \frac{\exp(i^2a)}{2ia}=\frac{\pi}{a}\exp(-a) \end{align*}  Next, taking the limit $R\to+\infty$ from the above relation, we obtain  $$2I+\lim_{R\to+\infty}\int_{C_2}\frac{\exp(iz)}{a^2+z^2}dz=\frac{\pi}{a}\exp(-a)$$  but, we can show that   $$\lim_{R\to+\infty}\int_{C_2}\frac{\exp(iz)}{a^2+z^2}dz=0$$  and then we can obtain the final result  $$I=\frac{\pi}{2a}\exp(-a)$$     First, please check my steps to see the final result is correct or not. Second, is there any other way to compute $I$?


How can I get a list of all files in the current directory and store that to a file named mycurrent using the command-line?

How do I get a list of all files in a folder, including all the files within all the subfolders and put the output in a file?


I found out it is possible to run ubuntu on a USB. So thats what i tried and it worked. I wanted to test an express application but installing node js throws an error everytime. sudo apt install nodejs sudo apt install Nodejs  Error: E: Paket nodejs kann nicht gefunden werden. (German for "Package not found") since today my only experience with linux was a 5€ a month server i bought and played around with Note: Any tipps for asking better questions in the future?

How can I install applications like Google Chrome on Ubuntu?  Are there any commands to install an application?    Index of answers:


I want to include * as mentioned below in double inverted commas, but i am not able to find the file. When i remove the inverted double inverted commas it works.   $CONTROL=/bkp/Test/back/13_Mar_2018/ ls -lrt "$CONTROL\*controlfile";

This will be an easy one, but in my memories, when shell scripting, using double quotes would allow expanding globbing and variables.  But in the following code:  #!/bin/sh  echo *.sh echo "*.sh" echo '*.sh'  echo $LANG echo "$LANG" echo '$LANG'   I get this result:  bob.sh redeployJboss.sh *.sh *.sh en_US.utf8 en_US.utf8 $LANG   So single quoting prevent glob AND variable expansion but double quoting allows only variable expansion and no globbing?  Can I glob in any quoting pattern?


I know this will vary from journal to journal, but I'm working on my first publication and have had little guidance, so any personal experiences would be helpful to me.  When you present your p-values for highly significant data, where do you stop? For example, I have some p-values that are equal to 7 * 10^(-14) (or 7E-14, or 0.00000000000007). In this situation, where do you make the cut-off? Would you just say p < 0.00001? If so, an additional question arises - if I have two tests that are highly significant but are different from each other, say one has p = 2*10^(-10) and the other is p = 5*10^(-30), are they both reported as p < 0.0001 (or whatever the cut-off is)? Does it matter that one is so much smaller (and therefore more significant) than the other?

For some tests in R, there is a lower limit on the  calculations of $2.22 \cdot 10^{-16}$. I'm not sure why it's this number, if there is a good reason for it or if it's just arbitrary. A lot of other stats packages just go to 0.0001, so this is a much higher level of precision. But I haven't seen too many papers reporting $p < 2.22\cdot 10^{-16}$ or $p = 2.22\cdot 10^{-16}$.   Is it a common/best practice to report this computed value or is it more typical to report something else (like p < 0.000000000000001)?


When and why do we need standardization for machine learning? What's the benefit for doing so?   For example,  we replace $y_i$ with $(y_i - u_y)/ \sigma _y $ we also replace $x_i$ with $x_ij - u_j / \sigma_j$  It would be great if someone provides me some intuitions.

In some literature, I have read that a regression with multiple explanatory variables, if in different units, needed to be standardized.  (Standardizing consists in subtracting the mean and dividing by the standard deviation.)  In which other cases do I need to standardize my data?  Are there cases in which I should only center my data (i.e., without dividing by standard deviation)?


When I take a look at the available SE domains, I see some very particular and very specialized ones. There are domains which doesn't need to exist because there is already a super domain for it which encapsulates that topic.  For example, . It has a very low number of questions asked in. The questions related to Poker could be asked in the domain for Games. Same for . Why don't they make a general domain for "Games"; so that, one would like ask something about Poker may label his question with "poker", and one would like to ask something related to RPG may label his question with "role-playing-game".  I don't know much about Poker, but, how many questions can someone ask about Poker? In my opinion, some topics was really not needed to exist. There are tons of topics out there that should have a SE domain. For example, there could be a domain for movies and other TV shows. Why do they open a domain for Latex instead of covering other most general ones first?  How do SE owners decide to create new domains? What logic do they use? Why do they decide to open a small domain like ""?    EDIT: I saw that there was already a domain for , sorry about that. But this doesn't change my question. Please take my question in a general sense, the domain names I used in my question are only examples.

What is the mysterious area 51 link on the right hand menu of the  for?