How do I start computing easy direct limit of groups:  1) $\mathbb{Z} \overset{1}\longrightarrow \mathbb{Z} \overset{2}\longrightarrow \mathbb{Z} \overset{3}\longrightarrow \mathbb{Z} \overset{4}\longrightarrow\mathbb{Z}\longrightarrow\cdots$ where the maps are just multiplication by "above arrow" numbers.   2) $\mathbb{Z}\overset{2}\longrightarrow \mathbb{Z} \overset{2}\longrightarrow \mathbb{Z} \overset{2}\longrightarrow \mathbb{Z} \overset{2}\longrightarrow$$\mathbb{Z}\longrightarrow\cdots $ where the maps are just multiplication by 2.   How do I get intuition for the resulting direct limit?


What is the origin of English plurals and possessives? English plurals look more French plurals, but I am not sure that is where they come from. As for possessives, I don't know where they come from.


How is a Kibble balance used in the new definition of the kilogram, and what's the connection between the balance and Planck's constant?

The BBC News article  says:  How does the new system work? Electromagnets generate a force. Scrap-yards use them on cranes to lift and move large metal objects, such as old cars. The pull of the electromagnet, the force it exerts, is directly related to the amount of electrical current going through its coils. There is, therefore, a direct relationship between electricity and weight. So, in principle, scientists can define a kilogram, or any other weight, in terms of the amount of electricity needed to counteract the weight (gravitational force acting on a mass). Here's the tricky part There is a quantity that relates weight to electrical current, called Planck's constant - named after the German physicist Max Planck and denoted by the symbol h. But h is an incredibly small number and to measure it, the research scientist Dr Bryan Kibble built a super-accurate set of scales. The Kibble balance, as it has become known, has an electromagnet that pulls down on one side of the scales and a weight - say, a kilogram - on the other. The electrical current going through the electromagnet is increased until the two sides are perfectly balanced. By measuring the current running through the electromagnet to incredible precision, the researchers are able to calculate h to an accuracy of 0.000001%. This breakthrough has paved the way for Le Grand K to be deposed by "die kleine h".  I don't understand the importance of Planck's constant to the use of the Kibble balance in new definition of the kilogram, and the way a Kibble balance is portrayed in the article suggests a kilogram-force rather than a kilogram, since the product $GM_{Earth}$ would be needed in the relationship between the force of the electromagnet on one side of the balance, and the gravitational force on the kilogram mass on the other. I'm assuming that the left side measures the force of one winding upon another in series, rather than a slug of permeable iron. This  touches on this topic but here a more specific answer about the balance itself will be appreciated. This  mentions that local acceleration is indeed part of the measurement and can be addressed to a high degree of precision(?) However it doesn't explain how. Here I'm looking for an answer that gives a practical explanation how this will be done, rather than just being convinced that it could be done in principle.


Find average of list + 2 inputs - python

I need to find the average of 5 assignments = two inputs. I'm getting a result, but its no correct. Here is what I have:  def main():    # list of grades    x = []     # count of students     n = 5     # fill list with grades from console input    # using pythonic generator    x = [int(input('Please enter the grade you got on assignment {}: '.format(i+1))) for i in range(n)]     midTermGrade = int(input('Please enter the grade you got on you Mid-Term: '))    finalGrade = int(input('Please enter the grade you got on you Final: '))     average_assignment_grade = sum(x) + midTermGrade + finalGrade / 7      print('Avg grade is ', average_assignment_grade)  main()   As you can see here, the math is wrong, the average suppose to be around 28, not 114


Let $f$ and $g$ be entire functions and $g(z)\neq 0$ for all $z\in \mathbb{C}$. If $|f(z)|\le |g(z)|$, can we say $f$ is constant?  Liouville theorem says that an entire bounded function is constant, but g is not given bounded here. So I think it should be false. What else can we say about $f$?


How can I know how long a long exposure needs to be without relying on the light meter?

The built in light meter for my Canon EOS Rebel T5 doesn't seem very good. It'll tell me that 30 seconds will overexpose my photo every time. I want to be able to do 1-8 minute exposures and have a workable image (not too under or over exposed)


Setting command block with preset commands in Minecraft PE?

I have seen posts of people that are trying to put command blocks in their world with preset commands in the blocks, and they claim to have them work, but I am having trouble doing the same thing in the Pocket Edition of Minecraft. Usually it says that the “{“ character is unknown, creating a syntax error.


Installed Cinnamon on Ubuntu. Is it considered Linux Mint or Ubuntu?

I installed Cinnamon on my Ubuntu OS.  Am I still using Ubuntu or Linux Mint when I use the Cinnamon desktop environment?


I'm trying to figure out the best, least intrusive way of sound proofing the walls of a bathroom. The bathroom shares a wall with my bedroom, and my 3 yea old's bedroom. The main problem is the sound of water running (plus every bump on the counter and everything) echos loud and clear through the wall into my sons room.  I found  and it seems like a good choice. Another option is adding another layer fo drywall with something like  between them. But all the walls and ceilings in the house are textured. So replacing just one or two walls in a room is just not possible.   This is the layout of the two rooms. I've added red box around the wall with the most noise.   Is there anything else I'm missing here that I could do to dampen the noise short of tearing the bathroom apart?


I have this task:  Given an array of integers and a number k, where 1 <= k <= length of the array, compute the maximum values of each subarray of length k. For example, given array = [10, 5, 2, 7, 8, 7] and k = 3, we should get: [10, 7, 8, 8], since:  10 = max(10, 5, 2) 7 = max(5, 2, 7) 8 = max(2, 7, 8) 8 = max(7, 8, 7)   Do this in O(n) time and O(k) space. You can modify the input array in-place and you do not need to store the results. You can simply print them out as you compute them.  What does O(n) time and O(k) space mean?  I got this solution. Does this fulfill the requirements? If not, why not?  def foo(arr, k):     for idx in range(0, len(arr) - k + 1):         maxI = -1         for i in arr[idx:idx + k]:             if i > maxI:                 maxI = i          print(maxI) #3; 3; 3; 5; 5; 5; 10; 22  arr = [0, 1, 3, 1, 2, 5, 5, 4, 10, 22] k = 3  foo(arr, k)


$L=\lim_{x\to\infty}(f(x)+f'(x))$ exists . Which of the following statements is\are correct?

Let $f$ be a continously differentiable function on $\mathbb R$.  Suppose that   $$L=\lim_{x\to\infty}(f(x)+f'(x))$$ exists.  If $0<L<\infty$, then which of the following statements is\are correct?               If $\lim_{x\to\infty} f'(x)$ exists, then it is $0$.     If $\lim_{x\to\infty} f(x)$ exists, then it is $L$.     If $\lim_{x\to\infty} f'(x)$ exists, then $\lim_{x\to\infty}f(x)=0$.     If $\lim_{x\to\infty} f(x)$ exists, then $\lim_{x\to\infty}f'(x)=0$.           My Guess  I could not conclude the answer and prove that properly. But, I guess that it must be 1 and 2. help me.


How to get access to Terminal and Password

I need to access to Terminal. Simply clicking on the icon on the desktop does not work. Ctrl+ALT+F2 works. It asks for login and password. Login is OK. Password, the system seems not to receive my orders. I type my password, but nothing appears on the screen. I have UBUNTU 18.04.2 LTS.


How to remove/hide title bar in Windows 10?

This was possible in XP and Windows 7 (see ) - but I haven't been able to find the settings in Windows 10.  Is this still possible?  Thanks.


is md5 encryption still strong for usage to encrypt admin password

I want to encrypt the admin/members passwords, but I don't know if the MD5 is still strong for that, or became weak. And what is the strong alternatives for encrypting the passwords like MD5 in the past.


Differences between using "Would you" and "Can you" when making requests

Is there a difference between asking a question with "Would you..." and asking the same question with "Can you..."?  For example,     Would you take the trash out?   Can you take the trash out?   Both can be answered with either "Yes/No" or by actually taking the trash out. Are the questions used in different circumstances? Is one more "correct" than the other?


As requested by rand al'thor, a follow-up question to :  How many Hogwarts students changed year from book to film?  In the book series, we know Cho Chang was definitely in the year above Harry, for Wood tells Harry when he is in his third year:     'Harry, I've just found out who Ravenclaw are playing as Seeker. It's Cho Chang. She's a fourth-year, and she's pretty good ...'      Harry Potter and the Prisoner of Azkaban - p.188 - Bloomsbury - Chapter 13, Gryffindor versus Ravenclaw   However, in the film version of Harry Potter and the Deathly Hallows (part 2), she is shown in the Room of Requirement with everybody else when the trio arrive via the secret passageway behind the picture of Ariana Dumbledore. This implies that she was not in the year above Harry (for she would have already left Hogwarts if she were (as per the books)) and was most likely in the same year as him.  says the same, though it does not seem to provide a reference - not needing to, of course, for it is never wrong ... :P  So, did Cho Chang definitely change years in the films and, if so, were there any others?  (Hint: I believe I recall seeing Katie Bell and Romilda Vane in Slughorn's potions class in The Half-Blood Prince so these are two free candidates to get you started. Proper references will garner upvotes :P )


Replacing 700x32c with 700x35c - does it matter?

I need to replace the front tyre and tube on my Ridgeback Motion commuter bike. I accidently asked my helpful shopper to get me 700x35c when what I'm replacing is 700x32c. Does it matter? Will this new tube and tire fit? Will it affect performance in any meaningful way? I don't really understand tires sizing so not sure how much difference there is between 32 and 35 - is this the width? The width of which bit?


I have a confusion regarding the hook and a normal function, So can any one tell me what is the significant difference between a Drupal hook and a normal PHP function in Drupal.


Let $p$ be a prime number I am trying to find an example of group of order $p^3$ that is non abelian.  I know that a group of order $p$ or $p^2$ is abelian, but how to find an example of non abelian group of order $p^3$?  Any insights would be helpful.


I know it's possible to upload videos to Facebook. Is it possible to upload an mp3 to Facebook using their user interface?


Pagefile prioritization on multiple drives

I am managing a Dell R710 server used for some very large non-linear finite element analysis (FEA) computations. Occasionally, these runs will take upwards of 500GB of allocated memory. Since this machine only currently has 132GB of RAM, this additional memory allocation comes through the paging file.  The paging file is current on a spinning HDD array and is causing a huge bottleneck. I have investigated maxing out the memory (288GB) and adding a 400GB Intel 750 NVMe SSD as a dedicated pagefile disk. This should free up some of the pagefile IO bottleneck, but I want to make sure that we don't max out the pagefile and crash a large run.  Short of getting the 800GB Intel 750 for the understood max page file size of 864GB (3x 288GB), can I tell Windows to use the HDD array as a failover for extra pagedisk space? Is there any way to prioritize the SSD as primary for the pagefile? Thanks.


In my model, I find when I set weight decay to 1, and get the best result in validation set and testing set. However, setting high weight decay means keep the weights low, and the most models set it to 1e-4 or smaller. Is it reasonable to set the weight decay value to 1?


Why does 'passwd' fail to change user's pw

** Term-control chars edited out:  Script started on 2017-12-01 06:51:43-0500 /etc/bash.bashrc ~root/.bashrc declare -x PATH="/root/sbin:/usr/local/sbin:/usr/sbin:/sbin:/root/bin:/root/.emacs.d/term-cmd:/usr/local/bin:/usr/bin:/bin:/snap/bin:/root/Scripts" declare -x HOME="/root"  bash # passwd bunky  Current Kerberos password:   New password:   Retype new password:   Current Kerberos password:   Current password:   passwd: Authentication token manipulation error  passwd: password unchanged   bash exit #################################   1) I have never set up Kerberos.  Why is passwd asking for "Current Kerberos password?  2) As root, I should not require to know 's "current password".   3) In fact, an unknown problem with the user's old password is the reason for the whole exercise.


I had UK Visa appointment today and I visited the office. But unfortunately I had some henna tattoo on my hand (was applied 2 weeks back), so the security lady didn't even let me submit my application as I wouldn't be allowed at the biometrics centre.  My scheduled date of trip is 1st week of June. Now I dont think I might be able to get visa on time before that date since this tattoo needs few more days to fade away. None of the beauty salons seem to have a solution too.  So now I want to cancel my entire application. Can anyone please tell me if I am eligible for refund? Because I have only submitted application online. I have not yet submitted my biometrics or had my photo taken.


Why is electric charge quantized? It is said that charge quantization is a consequence of embedding the abelian gauge group in a simple non-abelian group as is done in theories of Grand Unification. Can somebody explain this in detail (show mathematical steps)? Or is there another explanation?


Make it clearer to anonymous / low-rep users that they cannot (yet) add comments

The stack exchange sites chose a unique approach regarding who can post answers vs. who can post comments. This occasionally leads to anonymous / low-rep users leaving answers-which-should-have-been-comments simply because adding answers is easy and accessible while adding comments is unexplained on a question page.  I propose to make it clearer to anonymous and low-rep users visiting just the question page that commenting is only available to registered and higher-rep users.  I'm not quite sure how this could be done; I guess it's a good question for . A couple of ideas I've thought about:   Make the "add comment" visible to these users, but make clicking it show a friendly "you have to be registered and with over X rep to add a comment" message. Add a grey "you must be registered and have over X rep to comment on this answer" line in the comment area of each answer.   Optionally, make one of the above visible only when the user hovers over the question/answer area, in a similar way to how the "useful for me" link is displayed.


Static friction greater than kinetic friction

Please explain why static friction is greater than kinetic friction logically. Speak about it microscopically and tell what does happen on surfaces of objects by considering electromagnetic force between atoms on surface.


How to manage spacing in a document so there are no large gaps

When I'm typing my own documents, it's often the case that an awkwardly placed theorem environment near the end of the page will jump to the next because it's too large to fit in one page. When this happens, a large blank space is created at the end of the first; of course, this looks remarkably ugly.  In particular, consider the following image:    As a stylistic choice, I don't want to allow the theorem boxes to split across pages, which causes the following problem.   On the other hand, I noticed that no author has this problem in their books; they somehow always manage to fit their environments and text in such a way that every page is filled to the brim (so to speak) and no theorem environment is broken across a page. My question is: how do these authors do this? Is there a way to remedy the situation above automatically, or do I have to manually fill in the gap with extra content?   Thanks.  Edit: An example as suggested in the comments:  \documentclass{article} \usepackage{lipsum} \usepackage{amsmath} \usepackage{amssymb} \usepackage[margin=4cm,includefoot]{geometry}  \usepackage{newpxtext} \usepackage{newpxmath}  % theorem styles \usepackage{mdframed} \usepackage{xcolor}  \mdfsetup{skipabove=5pt,skipbelow=5pt,nobreak}  \definecolor{pale}{HTML}{FFB5CE} \definecolor{redbrown}{HTML}{A52A2A}  \mdfdefinestyle{paleStyle}{%     linecolor=pale,     backgroundcolor=pale,     innertopmargin=0pt,     innerbottommargin=10pt,     innerrightmargin=10pt,     innerleftmargin=10pt,     frametitleaboveskip=5pt,     font=\itshape }  \mdtheorem[style=paleStyle, frametitleaboveskip = 10pt, frametitlebelowskip = 10pt, frametitlefont = \normalfont\large\fontfamily{pag}\selectfont, theoremseparator = {\quad}]{MDtheorem}{Theorem}   \newenvironment{theorem}[1][]{     \ifstrempty{#1}{\begin{MDtheorem}}{\begin{MDtheorem}[#1]} }{%     \end{MDtheorem}% }% \newenvironment{theorem*}[1][]{     \ifstrempty{#1}{\begin{MDtheorem*}}{\begin{MDtheorem*}[\normalfont#1]}% }{%     \end{MDtheorem*}% }%   \begin{document}  \lipsum[1-4]  Another strip of text another strip of text Another strip of text another strip of text Another strip of text another strip of text another strip of text another strip of text another strip of text another strip of text   \begin{theorem}[Riemann Hypothesis] \lipsum[2] \end{theorem}  \end{document}   In this case, I have the "nobreak" setting on, so the theorem environment is forced to the next page, leaving a large white space below the text.


im getting Null Pointer Exception, cant find the mistake in here

working on this code since this morning all day, it a demo from a book online  for some reason getting null pointer exception at main() and also logic seems bit not working, can someone spend bit of his time  gosh cant find the problem there thanks for help people  class Currency {     private int amount;      public Currency(int a) {         this.amount = a;     }      public int getAmount() {         return amount;     } }  interface DispenseChain {     public void setNextChain(DispenseChain nextChain);      public void dispense(Currency cur); }     class Dollar50Dispenser implements DispenseChain {     private DispenseChain chain;      @Override     public void setNextChain(DispenseChain nextChain) {         this.chain = nextChain;     }      @Override     public void dispense(Currency cur) {         if (cur.getAmount() >= 50) {             int num = cur.getAmount() / 50;             int remainder = cur.getAmount() % 50;             System.out.println("Dispensing " + num + " 50$ note");             if (remainder != 0) {                 chain.dispense(new Currency(remainder));             } else {                 chain.dispense(cur);             }         }     } }     class Dollar20Dispenser implements DispenseChain {     private DispenseChain chain;      @Override     public void setNextChain(DispenseChain nextChain) {         this.chain = nextChain;     }      @Override     public void dispense(Currency cur) {         if (cur.getAmount() >= 20) {             int num = cur.getAmount() / 20;             int remainder = cur.getAmount() % 20;             System.out.println("Dispensing " + num + " 20$ note");             if (remainder != 0) {                 chain.dispense(new Currency(remainder));             } else {                 chain.dispense(cur);             }         }     } }     class Dollar10Dispenser implements DispenseChain {     private DispenseChain chain;      @Override     public void setNextChain(DispenseChain nextChain) {         this.chain = nextChain;     }      @Override     public void dispense(Currency cur) {         if (cur.getAmount() >= 10) {             int num = cur.getAmount() / 10;             int remainder = cur.getAmount() % 10;             System.out.println("Dispensing " + num + " 10$ note");             if (remainder != 0) {                 chain.dispense(new Currency(remainder));             } else {                 chain.dispense(cur);             }         }     } }     class DemoChainResponsibilityPattern1 {     private DispenseChain c1;     public DemoChainResponsibilityPattern1() {         c1 = new Dollar50Dispenser();         DispenseChain c2 = new Dollar20Dispenser();         DispenseChain c3 = new Dollar10Dispenser();         // set the the chain of responsibility         c1.setNextChain(c2);         c2.setNextChain(c3);     }      public static void main(String[] args) {         DemoChainResponsibilityPattern1 dispenser = new DemoChainResponsibilityPattern1();         while (true) {             int amount = 0;             System.out.println("Enter amount to dispense: ");             Scanner input = new Scanner(System.in);             amount = input.nextInt();             if (amount % 10 != 0) {                 System.out.println("amount must be in multiple of 10s");                 return;             }             // process the request             dispenser.c1.dispense(new Currency(amount));         }     } }


I've got a table with tows that are clickable via:   $(".clickableRow").click(function() {     console.log('Row Clicked');     window.document.location = $(this).attr("href"); });   That works perfectly after the page is loaded. However, we have added a search function that adds rows dynamically after a Ajax call.   After the call is done, the rows aren't clickable any more.   $('#carName').changeOrDelayedKey(function(e) {     var carSearch = $(this).val();     console.log(carSearch);     var carRows = $('#carTable tr[id^="product-"]');     $(carRows).each(function () {             console.log('This:'+this);             $(this).remove();     });       //Get new data     $.post("search.php", {s: carSearch}, function (data) {             console.log(data);             $.each(data, function (index) {             if ($('#product-' + data[index].externalProductId + '').length == 0) {                     $('#carTable').append('
' + data[index].title + '
');             }     });      }, "json");    }, 400, 'keyup');      $(".clickableRow").click(function() {             console.log('Row Clicked');     window.document.location = $(this).attr("href");                     });


Proving $AB = BA$ when $A$ is the Identity matrix times a scalar.

Let $A \in R^{n \times n}$  Show that if $A =\alpha I$ for some $\alpha \in R$, then for all $B \in R^{n \times n}$ we have $AB = BA$  I proved this by:  $$AB = \begin{bmatrix} \alpha & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & \alpha\end{bmatrix}\begin{bmatrix} b_{11} & \cdots & b_{1n} \\ \vdots & \ddots & \vdots \\ b_{n1} & \cdots & b_{nn}\end{bmatrix} = \begin{bmatrix} \alpha b_{11} & \cdots & \alpha b_{1n} \\ \vdots & \ddots & \vdots \\ \alpha b_{n1} & \cdots & \alpha b_{nn}\end{bmatrix}$$  $$BA = \begin{bmatrix} b_{11} & \cdots & b_{1n} \\ \vdots & \ddots & \vdots \\ b_{n1} & \cdots & b_{nn}\end{bmatrix}\begin{bmatrix} \alpha & \cdots & 0 \\ \vdots & \ddots & \vdots \\ 0 & \cdots & \alpha\end{bmatrix} = \begin{bmatrix} \alpha b_{11} & \cdots & \alpha b_{1n} \\ \vdots & \ddots & \vdots \\ \alpha b_{n1} & \cdots & \alpha b_{nn}\end{bmatrix}$$  $$AB = BA$$  How do I prove the opposite case? Show that if $B \in R^{n \times n}$ we have $AB = BA$, then there exists a $\alpha \in R$ such that $A = \alpha I$?


Can a single share of stock be shorted multiple times?

Is it possible for a single share of stock to be shorted multiple times? Concrete example: Imagine we have five people with the following motivations: Person A owns a share of company ABC and wants to lend it out to collect interest.   Person B wants to short one share of company ABC.   Person C wants to own one share of company ABC and lend it out to collect interest.   Person D wants to short one share of company ABC.   Person E wants to own one share of company ABC.    The following then occurs (in order): Person A lends their share to Person B   Person B sells their share to Person C   Person C lends their share to Person D   Person D sells their share to Person E    This would result in 3 long positions of one share each, and 2 short positions of one share each, all based on one "real" share. If the above is allowed, you could imagine this occurring infinitely, allowing unlimited long and unlimited - 1 short positions, so long as the net equaled one long share. Is this possible? Are there any regulatory or procedural systems in place to prevent the above from happening?


The question is: "Maria flip a coin for $6$ times while Davide for $7$ times. What is the probability that Davide obtains more heads than Maria?"  I solved this problem analysing $7$ cases:  $1)$ Maria doesn't obtain  a head, therefore Davide has to obtain at least a head. The probability is: $$P=\frac{2^7-1}{2^7}$$ $2)$ Maria obtains a head, therefore Davide has obtain at least two heads. The probability is: $$P=\frac {2^7-(1+7)}{2^7}$$ (indeed there are $7$ possible dispositions with a only head for example a possible disposition is $TTHTTTT$)  $3)$ Maria obtains two heads, therefore Davide has to obtain at least three heads. The probability is: $$P=\frac {2^7-(1+7+21)}{2^7}$$ (indeed there are $21$ possible dispsitions with two heads and five tails, e.g. $TTTTTHH$  $4)$ Maria obtains three heads, therefore Davide has to obtain at least $4$ heads. The probability is: $$P=\frac {2^7-(1+7+21+35)}{2^7}$$ (in this case there are $35$ possible dispsositions with $3$ heads and $4$ tails).  $5)$Maria obtains $4$ heads, Davide has to obtains at least $5$ heads. The probability is: $$P=\frac {2^7-(1+7+21+35+35)}{2^7}$$  $6)$ maria obtains $5$ heads, Davide has to obtain at least $6$ heads. The probability is: $$P=\frac {2^7-(1+7+21+35+35+21)}{2^7}$$  $7)$ Maria obtains $6$ heads, Davide has to obtain $7$ heads and the probability is: $$P=\frac {2^7-(1+7+21+3535+21+7)}{2^7}=\frac {1}{2^7}$$ (indeed there is an only case:$HHHHHHH$)  Is there a simplest method ?


Getter method must return a double - how to implement DecimalFormat?

I need the getter to return a double to .2 decimal spaces...  public double getPrice () {     double totalPrice = 0.00;    DecimalFormat deciFormat = new DecimalFormat("#.00");   ...  return Double.valueOf(deciFormat.format(totalPrice));   but when I check the result in my .jsp it's still only to 1 decimal space. Any and all insight would be greatly appreciated.


What is the difference between an SLR and a DSLR?

What are the differences between SLRs and DSLRs? (I know that DSLRs are Digital SLRs but are there any actual differences?)  Also, what are the advantages/disadvantages of both?


How to check if the first 2 letters in a sting are a specific value

Edit Thanks for the help guys got it working now.  So I had a question to do to ask a user for first name and last name which I have done no problem but then I thought it's be good to expand the program so that if someone entered a surname like McCabe it would print T McC instead of TM. I'm just not sure about how to compare the first two letters of the secondname string to see if they are "mc".  public class InitialsAlt {    public static void main(String [] args){      Scanner keyboardIn = new Scanner (System.in);     String firstname = new String();     System.out.print (" Enter your first name ");     firstname = keyboardIn.nextLine();     String secondname = new String();     System.out.print (" Enter your second name ");     secondname = keyboardIn.nextLine();     if(secondname.charAt(0, 1)== "mc" ) {       System.out.print("Your initals are " + firstname.charAt(0)+    secondname.charAt(0,1,2));     }     else {    System.out.print("Your initals are " + firstname.charAt(0)+ secondname.charAt(0));    }    } }


AES with a longer key instead of key expansion?

What are the disadvantages of using AES-256 with 240-byte key (which scrypt/bcrypt/argon2/pbkdf2 can easily output) instead of an expanded 256-bit key?  The only disadvantage I can think of is "no more hardware acceleration". This is not important for a fair comparison, are there other disadvantages?  EDIT: This is about replacing round keys.


When should I use an em-dash, an en-dash, and a hyphen?

I generally know how to use a hyphen, but when should I use an en-dash (–) instead of an em-dash, or when should I use a hyphen (-) instead of an em-dash (—)?


Show that $\int_{\partial P}z\frac {f'(z)} {f(z)} dz $ is on the lattice $\Lambda$

Problem: Let $f(z)$ be a meromorphic function on the complex torus $\mathbb C/\Lambda$ that as a function on $\mathbb C$ has no zeros and no poles on $\partial P$, the boundary of the fundamental parallelogram $P$. Show that  \begin{equation}                 \frac{1}{2 \pi i}\int_{\partial P}z\frac {f'(z)} {f(z)} dz \in \Lambda \, . \end{equation}  Thoughts: By the Residue Theorem  \begin{equation} \frac{1}{2 \pi i}\int_{\partial P}z\frac {f'(z)} {f(z)} dz = \sum_{z_0 \in \text{ Int }P} v_{z_0}(f)z_0. \end{equation}  I don't know why the latter is on the lattice.  Thanks!


What is sys.platform used for in python?

I wanted to know what the sys.platform does in python and what it is useful for. What type of projects would i want to use it for?


Why is every second breaker out in my panel?

I have notice that every other circuit breaker in the panel is not working.I also notice after pulling the breakers that they all tested good using a continuity tester!! however inspecting the red wire the bus behind looks burned.The 220 on that line that feeds the washer only has partial power what can be done to fix the problem???


How to displaystyle all the formulas without typing displaystyle everywhere?

How show all the formulas with displaystyle,avoinding typing repeteadly \displaystyle?    \documentclass[10pt,a4paper]{article}   \begin{document} Without any \emph{displaystyle} $   \frac{5+\frac{2}{5+\frac{2}{5}}}{5-\frac{2}{5-\frac{2}{5}}} $  With any \emph{displaystyle} $   \frac{5+\displaystyle{\frac{2}{5+\frac{2}{5}}}}{\displaystyle{5-\frac{2}{5-\frac{2}{5}}}} $  With more \emph{displaystyle} $\displaystyle{   \frac{5+\displaystyle{\frac{2}{5+\frac{2}{5}}}}{\displaystyle{5-\frac{2}{5-\frac{2}{5}}}} }$  \textbf{How to use displaystyle in all the expresion withou typing displaystyle repeteadly in all the fractions/sqrt?}  \end{document}


I am writing a batch job to send an email to a lead owner's manager. I have List<String> mgremails in which I have extracted only the email addresses of the manager.   List<User> mgr = [select Manager.email FROM User where Id in :leadOwnerId];  list<string> mgremails = new list<string>(); for(User u : mgr){     mgremails.add(u.manager.email); }   I now need String[] as parameter for the setToAddresses method of the Messaging class. How do I do this conversion?


Show that for any prime $ p $, there are integers $ x $ and $ y $ such that $ p|(x^{2} + y^{2} + 1) $.

So we obviously we want $ x^{2} + y^{2} + 1 \equiv 0 ~ (\text{mod} ~ p) $.  I haven’t learned much about quadratic congruences, so I don’t really know how to go forward. I suppose you can write it as $ x^{2} \equiv -1 - y^{2} ~ (\text{mod} ~ p) $, but again, I’m not sure where to go. I know about the Legendre symbol and quadratic residues, which I know are involved in this question, but I don’t know how to apply what I know. :(


Recurrences for even and odd indexed of Fibonacci Numbers


How do photons know they can or can't excite electrons in atoms?

This might be a stupid question, but nonetheless, it has been bothering me.  If you take a photon, make it go through some atoms in a solid, liquid or whatever, then you have the chance of this photon being absorbed by an electron, and thereby exciting the electron. This requires the photon to have enough energy to actually excite the electron to another energy level.  My question is then: How does the photon know if it has enough energy or not? Do they interact very quickly to determine if it's okay or not, or is it just something it "knows?"


Hi I just installed ubuntu 16.04 with third party stuff has well but once finished I dont see any option to enable wifi in desktop menu or in settings  Also, i won't be able to connect to ethernet  Any fix for this thanks


Share 2 servers resources within single virtual machine - possible?

I have two physical servers - Dell Power Egde R710. I installed vCenter Server in order to manage both of them, I have created a cluster and added my 2 ESXi (servers) hosts.   I created a virtual machine but Im wondering if its possible that this single machine use resources of both servers? I mean, my servers have 2 CPUs (one server - 2 CPUs, two servers - 4 CPUs). Is it possible to create a virtual machine and if, how) to be able to use 4 CPUs, two from one server + two from the second server?


How I can calculate $\sum_{n=0}^\infty{\frac{n}{3^n}}$?

For more than one series of any search function known not seem to find the sum of this series: $$\sum_{n=0}^\infty{\frac{n}{3^n}}$$ I've found that converges with the quotient criterion.  Could you give me some suggestions for finding the sum of this series? Thanks!


Is there $a,b,c,d\in \mathbb N$ so that $a^2+b^2=c^2$, $b^2+c^2=d^2$?

Question:  Are there $a,b,c,d \in \mathbb N$ such that $$a^2 + b^2 = c^2 \ \ \text{and} \ \ b^2 + c^2 = d^2$$  I'm a bit lost here.


Does anyone know of a near-comprehensive list of grammar rules? (Specifically those which a poor writer of English might violate.)  The most amusing candidate I've found was  but that doesn't count ;)


In a Sci Fi game, how do I keep the team together when one is "netrunning"?

I have a science fiction campaign where one of the characters is a "netrunning" hacker who's skills are based in a virtual world. The rest of the characters are in the real world. I want them to feel part of the same team but the hacking always seem to split up the player group. When the hacker is doing their character's speciality, the rest of the team get a little bored and vice versa. I don't want the whole team to be hackers.  The best I've found so far is to have the hacker attack things that have real world consequences - such as unlocking doors or switching of security. It is a little limited, though. Is there more I can do?  Is there a parallel in another setting where there is a parallel world that a character disappears into? Perhaps I can borrow from that.  How do I keep the team together when one is netrunning?


If I know the GCD of 20 numbers, and know the 20 numbers, is there a formula such that I input the 20 numbers and input their GCD, and it outputs their LCM? I know that $$\frac{\left| a\cdot b\right|}{\gcd(a,b)} = \text{lcm}(a,b).$$ So is it$$\frac{\left| a\cdot b\cdot c\cdot d\cdot e\cdot f\right|}{\gcd(a,b,c,d,e,f)}?$$If not, what is it?


How does comment hiding work on Stack Overflow?

I tried to find an answer to this question on meta. While I found several posts such as the following related to this topic, they do not accurately answer the specific question I have. Also, they are quite old and do not have accepted answers.        My Question:  How does comment hiding mechanism work on Stack Overflow? Until recently, I had the understanding that SO displays only the top five newest comments on a post; a user has to click the link "Show <x> more comments" in order to see all the comments. Based on my more recent observation, it looks like the comment hiding mechanism incorporates not just time stamp but also the comment up-votes. Also, it looks to be working differently depending on the type of user:   Un-logged in user Logged in user who has reputation score of < 10k Logged in user who has reputation score of >= 10k   Consider the following example SO answer post that has eight comments. If I see this post as an un-logged in user, SO shows five comments and hides three. But if I see the same post with my user account having less than 10k points, SO shows only three comments and hides five. I don't understand the logic behind this.    Can someone please explain how SO decides which and how many comments to hide for different types of users?


access to guest for internal drive partitions

In ubuntu guest user can access internal drive partitions only after entering the password of admin but after that guest have access to all drives.  Is their is any way to set system in such a way that guest can access some partitions only not all partition of drive?


Reading a .txt file within a switch case

My assignment requires me to create a noughts and crosses program.  I have managed to get all features working but I wish to add the ability to write to a text file, and call upon said file within a switch case (the switch case is used for the main menu).  Writing the file is not a problem however when it comes to reading it I get 'E0546 transfer of control bypasses initialization of:'.    I have tried containing the switch case {} which allows the program to run but the input is not recognised as being correct.  do    //Do at least once (do loop) - contains the 'game loop' {      mainMenu();      switch (menuChoice)     {     case 1:         cout << "\t\t\t\t\t" << "Please enter your name" << endl;         cout << "\t\t\t\t\t" << ">>" << endl;         cin >> playerNames[1];         init();                                                //Clear the grid and set to player one         do {             playerNames[2] = "Computer";             system("color 03");                                //Change text colour to blue             system("cls");                                     //Clear the screen             DisplayGrid();                                     //Display grid to screen             DisplayInput();                                    //Display input options relevant to single player             CheckInput();                                      //Check player input                                                 CheckStatus();                                     //Checks game status             easyAI();                                          //Computer turn that randomly fills a square             CheckStatus();             system("cls");          } while (toupper(input) != 'F' && toupper(input) != 'M');                              //Checks the player hasn't quit or returned to menu        case 2:         cout << "\t\t\t\t\t" << "Player one please enter your name" << endl;         cout << "\t\t\t\t\t" << " >>";         cin >> playerNames[1];         cout << "\t\t\t\t\t" << "Player two please enter your name" << endl;         cout << "\t\t\t\t\t" << " >>";         cin >> playerNames[2];         init();                                                //Clear the grid and set to player one         do {             system("color 03");                                //Change text colour to blue             system("cls");                                     //Clear the screen             DisplayGrid();                                     //Display grid to screen             DisplayInput();                                    //Display input options relevant to multiplayer             CheckInput();                                      //Check player input             CheckStatus();                                     //Checks game status             system("cls");          } while (toupper(input) != 'F' && toupper(input) != 'M');                              //Checks the player hasn't quit or returned to menu         break;       case 3:         howToplay();         break;      case 4:         runProg = false;         return 0;         break;      case 5:           ifstream reader("score.txt");                                if (!reader)         {             cout << "Error opening file" << endl;         }         default:         cout << "Please use the correct input from the available choices" << endl;         system("pause");     } } while (toupper(input) != 'F');  return 0;  system("pause");  }


Why $\lim_{x \to \infty} (1 + \frac{1}{x})^x = e$?

According to  (and many others):  If $r$ is a positive rational number and $c$ is any real number, then  $$\lim_{x\to \infty} \frac{c}{x^r} = 0$$  Consider some basic limit problem, for example:     $$\lim_{x\to \infty} 5 + \frac{1}{x}$$   If I get this correctly, it solves like this: $$5 + 0 = 5$$  And now coming back to my main question:  $$\lim_{x \to \infty} (1 + \frac{1}{x})^x$$  Since $\lim_{x\to \infty} \frac{1}{x} = 0$, then  $$\lim_{x \to \infty} (1 + \frac{1}{x})^x = (1+0)^{\infty}$$  Now, although I'm not sure what $(1)^{\infty}$ means, but it definitely doesn't look like anything close to 2.71828  So the question is, why $\lim_{x \to \infty} (1 + \frac{1}{x})^x = e$?    I understand that you can just plug large numbers into $(1 + \frac{1}{x})^x$ and see that result approaches ~2.71828, but I'm more interested in mathematical derivation.


i have a directory name with ISO&Emulator having some Important Files. and this directory is in different partition, and partition not showing in my FileManager(Nautilus). so i mount my partition and access it from terminal, but i can't get into directory because of its name.  when i tried to change directory:  cd ISO&Emulator   result:  [1] 1635 bash: Emulator: command not found bash: cd: ISO: No such file or directory [1]+  Exit 1   its taking directory name as a command. any ways for access this directory from terminal?  how to fix this?


python: assign and read out the values of a 2-d list

Here is a snippet of python code:  a = [[0]*3]*4 for i in range(4):     for j in range(3):         a[i][j] = i+j         print(a[i][j]) print(a)   However, the outputs of the two prints are different.  The former one prints what I want. And the second prints all the same for the 4 sublists.  It seems the problem of shallow copying. I really don't understand how and why it happens.  Update:  After I have solved this, I found another problem:  a = [[0]*3]*4 for i in range(4):     a[i] = [i, 2*i, 3*i]   The result is also what I want. I'm once again confused about this.   Who can tell me the difference?


Rotating vector based on the position of another vector?

Sorry for terrible picture but lets say we have a unit vector A and we have vectors B and C. So for vector B I would want to rotate in a positive direction because the vector is "above A" and for vector C i would want to rotate downwards. Is there an easy way of detecting which way to rotate?


Why can we calculate log (base 10) of any natural number?

I am curious to know the concept behind. Let's say y = 10^x  So, y should be a number with zeroes but y is 10 multiplied to 10 x times. But this is not the case.  For eg 10^3.5 = 3162.27766017  So, not a number ending with zeroes. I know the mathematics behind this but I would like to know the concept and reasoning as to how I might explain to a high school student why does 10 to the power something ends up with a number that may not end with zeroes ?  This might be a silly question but I would appreciate if I can get some answer before this question is put on hold/etc.


How come Joe Chill killed Bruce Wayne's parents and he didn't kill Bruce? And why did he kill Bruce's parents?


Do I have to have the actual instructions on a cloning potion to make one?

I'm trying to get the rocket boots, which are apparently in the room in the desert castle that has a chest too high to reach.  I read something online where a guy made clones of himself and then climbed them to get to the chest. I don't have the actual instructions on how to make the cloning potion, but can I still brew it? I don't want to waste candies on something that might not even work.  Also, is there another, easier way to get to the chest? If so, that would really help.


Seemingly locked in console after CTRL+ALT+F1 --- How to quit?

I got into console login page by CTRL+ALT+F1 and I don't want to reset the PC.  ESC or ALT+F4 or CTRL+C weren't enough to get back to the desktop environment. How could I get back to the desktop environment?  Thanks,


How to populate States and Country picklists or achieve similar kind of functionality on lightning form components?

I have created a contact info edit form with lightning component. I intend to provide users a States and country picklist functionality on form like we already have in salesforce. Is there any work around to achieve this?


I have installed Lubuntu 14.04 on my old 15" PowerBook G4, 32-bit laptop, and am now trying to install Wine HQ software so that I can use windows 32-bit programs. I keep getting the following error:  Failed to fetch https://dl.winehq.org/wine-builds/ubuntu/dists/trusty/InRelease Unable to find expected entry 'main/binary-powerpc/Packages' in Release file (Wrong sources.list entry or malformed file) Some index files failed to download. They have been ignored, or old ones used instead.   I am not a developer and this is my first time trying Ubuntu, so it would be great to get clear step-by-step instructions on what I need to do... if a solution is possible? I have managed to install WiFi drivers and resolve a few other errors by reading the Q&As on this site, but have not found a solution to the above error. If the problem could be solved by changing to another version of Lubuntu or another distro, I could also try that. Please give me your recommendations :-)


Command for text in math mode that does not become italicized inside theorem statements

This has probably been answered somewhere, but I can't find it from some searching. I sometimes want to write something like Leb for lebesgue measure, and I would like it to be non-italicized, so I usually use \text{Leb} in math mode, but this has the annoyance that it changes inside of an italicized (ams) theorem environment. I usually just hack this and write \text{\emph{Leb}} but clearly this is not ideal.   Is there a replacement for \text that won't inherit this italicizing? Alternatively, is there a more clever hack, in which I can make my macro detect if its going to be italicized and then automatically put in the \emph hack? Clearly the first would be ideal, but the second would also be acceptable.


Printing out all symbols of a personal style file in ArcGIS?

I need an overview of all symbols saved in a style file. Maybe in form of a list, to see the symbol itself and the name of the symbol. Is there a way to export/create such an overview?  I am using ArcGIS 10.2.  I found an old extension for 9.3 called , but which is sadly .


Unable to log in using Safari or Chrome – SSL Certificate Issues

OS X Mavericks 10.9.2 / Chrome 33.0... / Safari 7.0.2  I am unable to log in to StackOverflow using Chrome or Safari. Clicking the "log in" link displays a login page UN-styled by CSS and where the "Login" button does not respond to mouse clicks. I am, however able to log in using FireFox, which I am using to post this question.  In Chrome I tried disabling all Extensions, but the faulty page display persisted.  Any thoughts?  Edit with Additional Information:  Opening the Developer Consoles while on the Login page [ in both Chrome and Safari, I am seeing certificate issues for cdn.sstatic.net resources:   Failed to load resource: net::ERR_INSECURE_RESPONSE (in Chrome) Failed to load resource: The certificate for this server is invalid. You might be... (in Safari)   While I am able to reach cdn.sstatic.net in all browsers via http, I am blocked in Safari/Chrome when I try to access it via https:   The site's security certificate is not trusted! and Safari can't verify the identify of the website "cdn.sstatic.net"   Safari show me that the certificate ("ssl4121.cloudflare.com") is for cloudflare.com whereas the link is for sstatic.net, thus throwing the error.  My Interim Solution   Visit  in Safari/Chrome Click "Proceed anyway" in Chrome Click "Show Certificate" in Safari, then select "Always Trust" in the "Trust: When using this certificate" dropdown.   Now, visiting the login page correctly displays the correct CSS and allows me to Log In (finally).  Feels like a bit of a hack, but it worked.  Certificate: Unknown Authority  I removed the certificate ("ssl4121.cloudflare.com") from my Keychain in Keychain Access in order to re-test this issue. The results were the same, with an unstyled and unusable Login page.  After I re-imported the certificate into Keychain Access, the message "This certificate was signed by an unknown authority" is displayed in red near the top. When I mark it again as "Trusted", that message disappears.


Struggling to change the value of an element within an array in C++

One of my tasks in this assignment is to add 5 to the maximum value within my array. The professor said to use a void function and to pass a value, which I did. The program adds 5 to the max, 67, to get 72. But, when I printed the array it says 67 is in the array when it should say 72. Is there a way to make it say 72 in the main function, without just adding 5 to the element holding 67 in the main function, but by using void incre(int y)?   Here is the funtion I used to increment the maximum by 5.   void incre(int y){ y+=5; cout << "The new max after 5 is added is " << y << endl;   }  And here is the code I used to print out the array, which outputs   0    21  1    23  2    67  When it should output  0    21  1    23  2    72  cout << "Elements ------ Values\n"; for (int r = 0; r < array_size; r++){ cout << r << " ------------- " << A[r]<< endl; }   Also, how do you pass an array to a function using passing by reference? I'm not so sure if I did passing by value or passing by reference in my code here  void fill_array(int x[], int size){ cout << "Enter in the values 23, then 21 and then 67\n"; for (int z=0;z<size; z++) {     cin >> x[z]; } }   In the main function I put   fill_array(A, array_size);


mysterious file with 3 forward slashes suddenly appeared

I'm using Ubuntu 14.04.5.  A mysterious folder has appeared in my list of places. It's called   x-nautilus-desktop:///   Needless to say, it won't open and I can't delete it.   My system has become fairly unstable recently (locks up, reboots itself occasionally) and possibly that's related.   What is this folder?


How to correctly use cookies? (Twig and cache context)

In my current project I need to alter node templates depending on previously visited landing page. My idea is that, when a visitor visits one of these landing pages, a cookie will be set, and subsequent node templates will be altered depending on that cookie.  I've got three view pages serving as entry points for my visitors: myproject.com/tv myproject.com/mobile myproject.com/infopoint    In theme preprocess I'm checking/setting a cookie and assigning a template variable. The Twig templates do minor modifications depending on that variable:  function MYTHEME_preprocess(array &$variables, $hook) {   $router = \Drupal::routeMatch();    if ($route = $router->getRouteObject()) {     $view_id = $route->getDefault('view_id');     $display_id = $route->getDefault('display_id');     $view_display_plugin = $route->getOption('_view_display_plugin_id');      if ($view_id && $view_display_plugin === 'page') {       if ($view_id == 'slide') {         user_cookie_save(['device' => 'tv']);         $variables['MYTHEME']['device'] = 'tv';       }       elseif ($view_id == 'tile' && $display_id == 'mobile') {         user_cookie_save(['device' => 'mobile']);         $variables['MYTHEME']['device'] = 'mobile';       }       elseif ($view_id == 'tile' && $display_id == 'infopoint') {         user_cookie_save(['device' => 'infopoint']);         $variables['MYTHEME']['device'] = 'infopoint';       }     }   }    // user_cookie_save prefixes all cookie names with 'Drupal.visitor.'   if (isset($_COOKIE['Drupal.visitor.device']) &&      in_array($_COOKIE['Drupal.visitor.device'], ['tv', 'mobile', 'infopoint'])) {          // I'm doing design modifications in my Twig templates depending on this variable         $variables['MYTHEME']['device'] = $_COOKIE['Drupal.visitor.device'];     }   } }   In services.yml I've activated the cookies cache context  parameters:   renderer.config:     required_cache_contexts: ['languages:language_interface', 'theme', 'user.permissions', 'url.site', 'cookies:Drupal.visitor.device']   In my Twig templates I've got multiple code pieces like this:  {% if MYTHEME.device == 'tv' %}    <!-- code here --> {% else %}    <!-- other design here --> {% endif %}   Sadly the code doesn't really work. On the entry pages, the device theme variable is always correct, but the cookie is not updated (seems as if only first uncached hit sets the cookie. I even have the weird situation that cookie and twig variable aren't equal.). On node templates the theme variable isn't set correctly at all.  Any ideas how to get the code above working?  PS: Due slow views with geo-distance calculations disabling cache is not an option, I need to provide cached pages also for anonymous users.


What is the minimal set of parts for a circut with this AVR microcontroller?

My Arduino Uno has a ATMEGA328P-PU microcontroller, and bunch of other stuff on the board. I'd like to program the chip without the Arduino software, and only the minimum of other components.  I want to eventually create things without the cost of Arduino, and I want to learn about the other parts on the board and add them back as as needed.  I'm comfortable with C and gcc, so I can probably figure out the software part. But what, if anything, besides these two products below, do I need to have in the breadboard with the microcontroller?


Is there a way to fly on a cargo plane as a passenger? Any airlines offer such an experience? I know there are some seats at the front of cargo planes, perhaps these can be used?


Why are all "meta.sitenamehere.stackexchange.com" sites HTTP-only?

Why are all meta.sitenamehere.stackexchange.com sites HTTP-only?  For example,  supports HTTPS, but its meta site  does not support HTTPS. Placing HTTPS into the URL just redirects you to the HTTP version.  This does not affect StackExchange sites with their own domains, however.  supports HTTPS, and its meta site  also supports HTTPS, unlike the meta site on a stackexchange.com subdomain like Unix SE.


Acceleration as the second derivative of $e^{-\frac{1}{t^2}}$

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


I read the following sentence on YouTube and initially thought it was grammatically incorrect:     Here are 10 minutes of the movie Black Hawk Down!   I thought "are" should have been "is" but then I realized minutes is plural so the plural form, are, is used correctly. I also thought how most people would naturally say "Here is ten dollars in change" but is the use of the singular form, is, correct since dollars is plural?   Am I misunderstanding a rule?


What is the best way to project this logo on this cup without so much distortions on the and of the logo.  I've tried one tip that I saw here that used lattice and shrinkwrap modifier but the result was not so good.   The idea is to 3d print this model... I would appreciate any help to make this task easy and with good result.        this last picture is the result using the tips that I saw here.


How do I replace linuxmint with 16.04 LTS with flashdrive?

I run dualboot of ubuntu 14.04 and linuxmint. i want to replace linuxmint with the new 16.04LTS. I tried upgrading my 14.04 to 16.04 but i encountered a problem(only some packages could be upgraded) and stopped inbetween. Now my ubuntu software center is not working.   how do i create a bootable flash drive of 16.04 (as CD drive isnt working),using 14.04?


slow boot up and weird interface when entering password for laptop

W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-ubuntu-make-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-ubuntu-make-xenial.list:3 W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-ubuntu-make-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-ubuntu-make-xenial.list:4 W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-ubuntu-make-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-ubuntu-make-xenial.list:3 W: Target Sources (main/source/Sources) is configured multiple times in /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-ubuntu-make-xenial.list:2 and /etc/apt/sources.list.d/ubuntu-desktop-ubuntu-ubuntu-make-xenial.list:4   ...got this after doing grub upgrade


Can someone tell me how many digits would be there in-  $(2.5)^{200}$ and $6^{50}? $  I'm utterly confused where to begin from. Any help would be appreciable.


Python Iterate Through List of Lists of Objects and Call a Method

I am trying to iterate through a list of lists of objects in using for loops. At the end of each iteration when I have isolated one object I am trying to call a method from that object. The problem is that each time I iterate through I am getting the a copy of the 2nd list acting in place of the 1st and 2nd list. I don't get it at all. Here is my code.  from sys import stdout  class Map:      def show(self):         for row in self.grid:             print '' #\n             for room in row:                 stdout.write(' ')#space                 room.show()      def __init__(self, rooms):         x_list, y_list = [],[]         for room in rooms:             x_list.append(room.loc[0])             y_list.append(room.loc[1])         great_x = max(x_list)         great_y = max(y_list)         self.grid = [[None] * (great_x+1)] * (great_y+1)         for room in rooms:             self.grid[room.loc[1]][room.loc[0]] = room   Room is a class that has attributes loc which is the x y location of the room in the form [x,y]. Room also has a method called show() which just prints out the string for that room.  The outcome of the above is: [Red] [Bro] [Red] [Bro]  it's supposed to be: [Bla] [Blu] [Red] [Bro]


I'm really wanting to bind Ctrl + J / I / L / K to the arrow keys to make text editing quicker, but having trouble accomplishing this.  If anyone knows of an easy way to do this, I'd really appreciate it. I'm having trouble figuring out xbindkeys.


How to pass a multiword string as argument in Linux

I am trying to pass a multiword argument in a function an echo the result in a simple fashion.   Currently I am doing this:  function myFunction {      multiWordString=""       for ((i=3; i<=$#; i++)); do              multiwordVariable+=" "${!i}      done      echo "multiwordVariable here => $multiwordSTRING"   }  myFunction "$@" otherArgument1 otherArgument2 I am a multivariable element and yeah is rock   You can see there is several drawback in this approach, the insertion of multiple argument, the usage of a loop, the management of my argument positioning to retrieve my string of characters... that makes it a very approximating solution.   I would do something more simple, like just read my variable's string:  multiWordArgument="here an awesome multiword string"  function file_function {      echo $1  } myFunction $multiWordArgument   maybe someone know a way that is nearer to this process?   thanks


How to limit 1 connect per 5 seconds? (IPTABLES)

I want to limit 1 connect per 5 seconds using IPTABLES for people, which are connecting to port "12871/12881". I was trying to find rule for it, but ineffectively.


Correct settings when it's for both print and screen?

Let's say I'm designing a logo or some other artwork that it's both for printing and screen. How should I set my ai file? CMYK or RGB? Align to grid or not? For instance, when I "save for the web" and my artwork is not align to grid and CMKY, will that affect the result? Do you create separate files for print and screen? Thanks in advance


I'd like to propose a new computer language -- is there an SE forum where I can do so?

I'm working on a new computer language I call Robato. So far, I only have a design document, but I'd like to put it out there and see if anyone would be interested in joining the project. What Stack Exchange site would be the best for doing so? Also, what tag(s) could I use?


Is there an integral domain in which all elements are reducible?  I can't think of a counter example. Some sugestion?


Differentiablilty of function with inequality

Let $f:\mathbb{R}\to\mathbb{R}$ be a function satisfying $$\vert f(x)-f(y)\vert\le\frac{1}{2}\vert x+y\vert$$ for any $x,y\in\mathbb{R}$.   One can easily deduce that $f$ is continuous uniformly on $\mathbb{R}$.  How about the differentiability of $f$ on $\mathbb{R}$ or some subset of $\mathbb{R}$?  Can anyone give some insight or advice? Thank you!


Why $\frac{\log(x)}{\log(y)}$ gives the same value as $\frac{\ln(x)}{\ln(y)}$

If $x=16384$ and $y=2$  $\ln(x)=9.704$ $\ln(y)=0.6931$  $\log(x)=4.2144$ $\log(y)=0.3010$  If we divide $\frac{\ln(x)}{\ln(y)}$ we get $14$ and same answer for $\frac{\log(x)}{\log(y)}$.  So can anyone tell me the concept behind this? Why does dividing $\frac{\ln(x)}{\ln(y)}$ give the same result as $\frac{\log(x)}{\log(y)}$?


I am planning to start studying optimal control, especially the bang-bang problem.   What elementary texts or documents on the subject would you recommend?


Number of elements in the quotient ring $\mathbb{Z}_6 [x]/\langle 2x +4\rangle$

I am confused about this quotient ring.  I know that $\mathbb{Z}_7 [x]/\langle x^2 + 1\rangle =  \{ f(x) + \langle x^2 + 1\rangle \mid f(x) \in \mathbb{Z}_7[x] \}$. Here $x^2 + 1$ is a zero element in $\mathbb{Z}_7 [x]/\langle x^2 + 1\rangle$, so if we replace $x$ by $i$ we get $\mathbb{Z}_7 [x]/\langle x^2 + 1\rangle =\mathbb{Z}_7 (i) $.  I know the distinct element of $ \mathbb{Z}_6 [x]/\langle 2x +4\rangle$ are $\langle 2x +4\rangle,\;x + \langle 2x +4\rangle, \;x^2 + \langle 2x +4\rangle, \ldots$ but I do not  know how to prove this.  Please tell what could we do similar here in case of $ \mathbb{Z}_6 [x]/\langle 2x +4\rangle$? Since $1$ is the zero element of the polynomial $2x +4 $. Why we can not replace here $x$ by $1$?  Any help would be appreciated. Thank you.


Help with doing these arrows on this TikZ picture

I'm trying to draw the following picture with TikZ. The desired output is the following:    The problem is that I can't get a way to do two arrows like the ones I drew manually, departing from the green shapes. How can I do these kind of arrows? (The arrows should be on TikZ format, not like the ones I drew).  My code is the following so far:  \documentclass{article} \usepackage[utf8]{inputenc} \usepackage{tikz} \usetikzlibrary{shapes,geometric,arrows}  \tikzstyle{startstop} = [rectangle, rounded corners, text width=5cm, minimum height=1cm, text centered, draw=black, fill=blue!30] \tikzstyle{process} = [rectangle, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=red!30] \tikzstyle{decision} = [diamond, minimum width=3cm, minimum height=1cm, text centered, draw=black, fill=green!30] \tikzstyle{arrow} = [thick,->,>-stealth]  \begin{document}  \begin{tikzpicture}[node distance=2cm]  \node (start0) [process] {Inicio}; \node (start) [startstop, below of=start0] {Propiedades de la garganta a partir de cámara de combustión:\\ $P_0,T_0,\rho_0 \rightarrow P_t, T_t, \rho_t$}; \node (start1) [startstop, below of=start] {Presión de salida:\\ $P_s \rightarrow T_s, \rho_s, M_s, v_s, \varepsilon$}; \node (start2) [startstop, below of=start1] {Escoger dimensiones garganta y calcular mass flow:\\ $D_t \hspace{1mm} \mathrm{o} \hspace{1mm} A_t \rightarrow \dot{m}, A_s, F$}; \node (dec1) [decision, below of=start2, yshift=-0.75cm] {$ F\geq 500\hspace{1mm} \mathrm{N}?$}; \node (dec2) [decision, below of=dec1, yshift=-1.5cm] {$ P_s \leq P_s (\mathrm{min})$}; \node (end) [process, below of=dec2, yshift=-0.75cm] {Fin};   \draw [arrow] (start0) -- (start); \draw [arrow] (start) -- (start1); \draw [arrow] (start1) -- (start2); \draw [arrow] (start2) -- (dec1); \draw [arrow] (dec1) --  node[anchor=east] {Sí} (dec2); \draw [arrow] (dec2) -- node[anchor=east] {Sí} (end);  \end{tikzpicture}  \end{document}


Number of elements of order $7$ in a group

If $G$ has at least $7$ elements of order $7$, then prove that $G$ has at least $12$ elements of order $7$.   I know that an element having order $7$ means that for any $a$ in $G$, $a^7=e$ where $e$ is the identity element. The inverses also have same order, so I thought maybe of the $7$ elements, $6$ had their inverse as well. However, then this would just mean there had to be $8$ elements, not $12$ for the $7$th element to have it's inverse.


A question about prime and factorization

Find a prime number $p$ and an integer $b < p$ such that $p|(b^{p−1} − 1)$. Need help guys


$\quad$ In group theory class we considered only the group of geometric symmetries(rotation and reflection), but the definition involves that there can be any group and any set as long as the following conditions are met \begin{align} &1. \quad \forall g_1, g_2 \in G, \forall x \in X \quad g_1*(g_2*x) = (g_1*g_2)*x\\ &2. \quad \forall x\in X \quad e*x=x \end{align} $\quad$ Can you provide some more examples with different groups and different sets? In particular, with $\mathbb{Z}_6$ group for instance.


how do i backup my iphone 4 without knowing my passcode ?

i forgot my pass-code and I've never had the change to back it up until now, is there a way to backup without knowing the pass ?


If $(A-\lambda{I})$ is $\lambda$-equivalent to $(B-\lambda{I})$ then $A$ is similar to $B$

When reading the topic about primary and rational canonical form of matrices I stuck myself on this theorem:     The matrices $A,B\in K^{n\times n}$ are similar if and only if their characteristic $\lambda$-matrices $(A-\lambda{I})$ and $(B-\lambda{I})$ are $\lambda$-equivalent; more precisely if $P(\lambda), Q(\lambda) \in K[\lambda]^{n\times n}$ are invertible such that $(B-\lambda{I})=Q(\lambda)(A-\lambda{I})P(\lambda)$ then $P(\lambda)=P$ and $Q(\lambda)=Q$ are constant matrices satisfying $Q=P^{-1}$ and $B=Q A P$.    (in Slovak).   The main point in the proof of this theorem seems to be the assertion: If $P(\lambda), Q(\lambda)$ are invertible and $(B-\lambda{I})=Q(\lambda)(A-\lambda{I})P(\lambda)$ then $P(\lambda)=P$ and $Q(\lambda)=Q$ are constant matrices.  What is the proof of this assertion?


"Waited for * || true but it wasn't there " each time I run apt

Every time I try to install ANYTHING with apt-get,i get this error  E: Waited for /usr/sbin/dpkg-preconfigure --apt || true but it wasn't there      E: Failure running script /usr/sbin/dpkg-preconfigure --apt || true    I have looked at many forums but none of them seem to have any answer.  Any help would be much appreciated at this time!       (everything must be done via command line, 13.04 server)   Tried Braiam's command, this was the output + command:  sudo sh -c "echo 'DPkg::Pre-Install-Pkgs {"/usr/sbin/dpkg-pr econfigure --apt || true";};' >> /etc/apt/apt.conf.d/70debconf"                  [sudo] password for swech:                                                       --apt: 1: --apt: Syntax error: Unterminated quoted string                        -bash: true;};' >> /etc/apt/apt.conf.d/70debconf: No such file or directory


“I met a friend walking down the street.”  Does it mean I was walking, or that my friend was walking, or both are possible?


I have a model in blender that has two uv maps on it. The thing is only one will show up in viewport/render. It only allows me to render one, the other one wont show up anywhere. How do i make it so i can render and see both maps?


Probability that a key open a door after some trials

Suppose we have $n$ keys. We try each key at random to open a door. If   we $\bf discard$ the ones that don't work, what is the probability   that we open the door in the kth try? What if we dont discard the   previously tried keys?   $$\bf \underline{Attempt \; to \; the \; solution}$$  We can call $E_i$ to be event that the ith key opens the door. Clearly, since we have $n$ keys $P(E_i) = \frac{1}{n}$. Here is where I am having trouble trying to express our outcome in terms of events $E_i$. I feel like the answer is just $P(E_k) = \frac{1}{n}$ but perhaps the phrasing of the problem is confusing.  Now, if we dont discard. Suppose we put first key into door. there are $n-1$ possible ways that it wont work cause $1$ of them is the one that works.same holds for the second and third and so forth until we get to the $k-1$th case. The next case the one that opens the door can be done in 1 way of course. Thus,  $$ P = \frac{(n-1)^{k-1} }{n} $$  Is this a correct approach?


Java equivalent of C# generic array declaration?

I have a generic class I'd like to convert from C# to Java.  The class starts off this way:     public class StackImplementationUsingDynamicArray<T>     {         private T[] _array = new T[10];     }   I can't seem to get the equivalent Java code for the declaration.  This code at least compiles (with a warning) but throws a runtime exception:     public class StackImplementationUsingDynamicArray<T>     {         private T[] _array = (T[])Array.newInstance (StackImplementationUsingDynamicArray.class, 10);     }   Is it possible to do this in Java?  What should the code be?  Thanks in advance for any pointers.


Only navigator shows changes in Illustrator CC 2015

Pretty much you can see that this line won't show visual change. When i try to change the stroke it shows only in the navigator bar but o


I would like to pose the following question:  does the expression "without one X"   mean unambiguously "without any X", mean unambiguously "without a(n) X" or can have both meanings and thus is an odd and ambiguous expression which should best be avoided?   To clarify my query, I will provide a practical example: if a legal act provides for a number of conditions, and then goes on saying that, under special circumstances, something can be done "without one condition being respected", how would you understand this last sentence? Meaning 1) "even if NONE of the above conditions is respected" or 2) "even if ONE of the above conditions is not respected"? Or is it 3) grammatically unclear?  Thank you very much in advance for your help!


does derivative of convergent function go to 0?

My question: if $f$ is differentiable and $\lim_{x \to \infty} f(x) = M$, does this imply that $\lim_{x \to \infty} f'(x) = 0$?  My thinking: there exists $X$ such that $\forall x,y>X$, $|f(x)-f(y)|<\epsilon$ by the Cauchy criterion. Thus $\frac{|f(x)-f(y)|}{x-y} = f'(d)< \epsilon$ for $d$ between $x$ and $y$.  I worry this won't hold if $x$ is extremely close to $y$ though.


In my android application,I am downloading images from the internet.  Now I want to store these images in cashe. I also want to display images to users from cashe (not from internet again).  I cant use CacheManager class because its deprecated so i have to do this manually. How can i do this?


Finding the field of fractions of a quotient of a polynomial ring.

This should be very basic but I am having a bit of trouble finding the field of fractions for quotients of polynomial rings over a field. The specific example I am having trouble with is the following:  Let $k$ be a field with characteristic $\neq 2$ and let $f \in k[x_1, \dots , x_n]$ be a polynomial with no repeated factors. I am trying to determine the field of fractions of the ring $$ k[x_1, x_2, \ldots , x_n, z]/\langle z^2 - f\rangle. $$  The usual method I would use for a problem like this is the Chinese remainder theorem, but I don't see any way to apply that here. The other fact I know is that if $A$ is an integral domain with prime ideal $\mathfrak{p}$, then $\text{Frac}(A/\mathfrak{p}) \simeq A_{\mathfrak{p}}/\mathfrak{p}A_{\mathfrak{p}}$. But the problem of finding  $A_{\mathfrak{p}}/\mathfrak{p}A_{\mathfrak{p}}$ seems no easier in this case. Can anyone point me in the right direction? I am fairly certain I know what the result is, but I have no idea how to show it properly.


I am currently using Xubuntu, apparently every time I try to suspend the computer, it turns right back on... Any ideas?


https on any vhosts redirects to vhost with ssl

I have multiple vhosts (apache) and these are all just http. Recently I added an https vhost and found that using https on any of these domains would redirect to the ssl site.  For example, there's:    and the ssl site:    So the issue is that if someone would go to https//example.com it would redirect to https//example4.com  I tried some redirects in the vhosts but that didn't appear to work. Any help would be greatly appreciated. Thanks.


The average velocity of galaxies in a galaxy cluster

On slide 24 of  (Its title is 'worked example, what Zwicky did'), the author says that $\langle\langle v^{2} \rangle\rangle = 3 \langle\langle{v^{2}}_{s}\rangle\rangle$. Can someone please explain why this is the case? The line-of-sight velocity should be the speed of a galaxy relative to the observer. But What is the radial velocity? Also, why do they have such a relation? It would be nice if you can also explain the meaning of spherical symmetry in the context (in the slide). To me it sounds like all member galaxies move in random directions, and this seems to contract the fact that they move along orbits.


My IP adress gone after sometime of getting internet connection...My IPadress is 172.16.91.79 and subnet mask is 255.255.255.128 and default gateway is 172.16.91.129 told by the operator... But evrytime i try to set this, a warning sign come on screen saying "the default gateway is not on the same network segment (subnet) that is defined by the IP adress and subnet mask. Do you want to save this configuration ? "   And with this the internet connection is still off.  I really want a solution what should i do??


Extra alignment tab has been changed to \cr.  \endtemplate


I have experienced that most of the datasets contain missing values, which make our task bit challenging.  Please let me know how to fill up those missing values in an efficient way? and is there any specific techniques to handle missing values?


auto login doesn't work in Safari on Mac

Auto login is not working in Safari browser(Version 8.0.3 (10600.3.18)) on OS X (Yosemite 10.10.2)   ie., it doesn't detect and show 'Welcome back, < user >. You've been logged in. Click here to refresh the page.'  JS and Cookies are enabled. There are no errors in the console as well.  Situation: I am logged in on meta.stackexchange.com, but it doesn't show that I am logged in when I visit stackoverflow.com & other stack exchange sites


I have tried this problem by taking other variables for sum and products of the variables, but I am not able to simplify it. Neither did it help to convert this into a cubic polynomial with roots $x, y, z.$ It is given that $x, y, z \in \Bbb R$. If we are given $x+y+z \geq xyz$, then prove that $x^2 + y^2 + z^2 \geq xyz$


Centering a whole div without centering the text

I have a wrapper with width 80% and I would like to center only this wrapper (class named "content") without centering the whole text in it (for example if I use text-align: center). Can someone please teach me how to do that? I am really struggling with this.


Linear regression best polynomial (or better approach to use)?

Any ideas on other polynomials I could successfully use for applying regression? My goal is a solution that has fit error strictly based on the noise. Is this possible since it is a bell-like curve? The tails can be long, short or non-existent. Am I looking for the impossible? Please note it has been a while since I have plunged this far into linear regression.   Anyway, my data points do not fit the $ax+bx^2+c$ polynomial well enough. I would like a replacement for this polynomial to apply regression (or different approach). In the following example, each point misses the fit curve by $20\%$ of the $Y$ range on average (of the data points). I looked at splines, but I do not know how to apply the regression since they look piece-wise.   Example $Y$ values (evenly spaced in $X$). It looks kind of like a bell curve. I would be applying 5 to 50 data points to determine the polynomial coefficients. Ultimately, I am interested in the best $X$ location for the peak based on the data points.     X      Y -40    -21142.1111111111 -30    -21330.1111111111 -20    -12036.1111111111 -10      7255.3888888889   0     32474.8888888889  10     32474.8888888889  20      9060.8888888889  30    -11628.1111111111  40    -15129.6111111111


Studying groups and subgroups I find this question:     Are there subgroups of order $\mathbf 6 \mathbf 5$ in the additive group $(\Bbb Z$,$+)$?   I would answer no, because a subgroups of $(\Bbb Z,+)$ is the multiple of a Natural number $n $ and it has the form: $n\Bbb Z$={$na|n \in \Bbb N, a \in \Bbb Z$} and they have no finite order.  But I'm not sure of this answer.  Could someone explain if I'm wrong and why?  Thanks.  $\mathbf {edit}:$  My question comes because discussing with a course mate he argued that exist Z/65Z in (Z,+), the group module 65 and it  has order 65 so I'm a bit confused.


Giving 775 permissions to all files in an unix system breaks it, why?

After a failing a command on my Ubuntu virtual machine on Azure and adding a deadly space    sudo chmod -R 775 / ps_democqrshooksusage/   I ended up setting (accidentally) every single file in the system with the permissions 775.  After that I could not SSH to my VM anymore (but the Azure Shell kept working), and I noticed I could not use sudo anymore as well.   From what I understand, permissions 775 means that the owner and the group of the owner can do whatever they want and the others can only read and execute the file.   So why did this break some key functionnalities ?


python parsing a datetime with a timezone

I am trying to parse an string from a log file in the format: 2011-06-27 10:29:56+0200  If I use datetime.datetime.strptime('%Y-%m-%d %H:%M:%S%z') I get ValueError("'z' is a bad directive in format '%Y-%m-%d %H:%M:%S%z'") thrown  How can I parse a date in this format?


Method is not working in Java as I want it to print out my phone number

public class Methods {  public static void main(String[] args) {      int myNum = myNumber();     System.out.println(myNum);  }    static int myNumber(){     return 03233574633; }   }  When I call a method to display my phone number on screen, it display something this 443480475..   Why is this happening in Java Programming.. Please help


Let $V$, a vector space over $\mathbb{F}$ and $W_1,W_2 \subseteq V$ such that $W_1 \oplus W_2 = V$. For $i=1,2$, let $\langle , \rangle $ on $W_i$. Prove that there is a unique inner product on $V$ such that:  $W_2 = W^\perp_1$ For $i=1,2$ and for all $v,u\in W_i$: $\langle v, u \rangle = \langle v, u \rangle _i$   Uniqueness: Let $v = w_1 + w_2$ and $u = w_1' + w_2'$ $$\langle u, v \rangle_V = \langle w_1,w_1' \rangle + \langle w_1,w_2' \rangle + \langle w_2,w_1' \rangle + \langle w_2,w_2' \rangle = \langle w_1,w_1' \rangle  + \langle w_2,w_2' \rangle $$ So the inner product is determined uniquely by $\langle, \rangle_i $ for $i=1,2$. How do I show the existence of such inner product?


How does Delegated Authentication and Federated authentication work in parallel?

This is a follow up question to this . According to the answer to that question, it is possible to use Federated Authentication and Delegated Authentication in parallel. I'd like to understand how does this work in detail. How does Salesforce know which method to use when authenticating users?  Thanks in advance!


How can I use a python code in my android code?

I am making an android application in it I need to run some python code. Is there any way by which I can integrate python code to android? This is the python code.  from py_translator import Translator s = Translator().translate(text='Hello my friend', dest='hi').text print(s)


I've got a custom loop that I'm using to display some Real Estate listings that will be available within 60 days. I'm calling it with the following function:   <?php  $sixtydays = date('Y/m/d', strtotime('+60 days')); $paged = (get_query_var('paged')) ? get_query_var('paged') : 1; $query = new PostsOrderedByMetaQuery(array(   'post_type' => array('post', 'real-estate'),   'meta_key' => 'Time Available',   'meta_compare' => '<=',   'meta_value' => $sixtydays,   'paged' => $paged,   'orderby_meta_key' => 'Price',   'orderby_order'    => 'ASC' )); ?> <?php while ($query->have_posts()) : $query->the_post(); ?>   While the loop works great, I can't get it to paginate. It shows the first 10 (my default) posts but doesn't show the pagination. The only way to display all posts is to show them on one page by adding 'posts_per_page' => -1, I have similar loops on other pages that have no problem paginating. The only difference with this one is that there are two meta keys that are filtering the posts.   I'm using WP Page Navi for this and the rest of my pages. I'm closing the loop and adding the pagination using the following code:   <?php endwhile; // End the loop. Whew. ?> <?php wp_pagenavi(); ?> <?php wp_reset_query(); ?>   How can I go about fixing this?


Can I use Yashica 35-70 and Canon 28-80 lenses on DSLR cameras?

I have two camera lenses; one is a Yashica 35-70 mm lens which I am using on a Yashica FX-7 Super manual 35mm film camera. The other is a Canon 28-80 mm lens which came with the Canon EOS 66 35mm film camera.  Can I use either of these lenses on any of the popular DSLR cameras makes, like Canon, Nikon, Sony, or Panasonic?


Why did I get `[three: command not found` from my Bash script? What to do about it?

I was testing a Bash script that accepts random arguments and noticed that it would say something like   ./Var: line 19: [three: command not found   Here is a minimal working example:  #!/bin/bash $1 $2 $3  echo "The first argument does $1" if [$1 >= 2]; then     echo "$1 has 2 words" else     echo "$1 has unknown amount of words" fi #^First echo "The second argument does $2" if [$2 >= 2]; then     echo "$2 has 2 words" else     echo "$2 has unknown amount of words" fi #^Second echo "The third argument does $3" if [$3 >= 2]; then     echo "$3 has 2 words" fi #^Third   But it would continue to run the script, is there a way i can have it run without the "command not found" appearing? Or is this just an issue within my code that is making it do this?


correct usage of word related and relating

which sentence is correct ? 1.one of the most contentious issues has been the one related to caste-based reservations in education and employment. 2.one of the most contentious issues has been the one relating to caste-based reservations in education and employment.


I saw the following sentence by a contributor at alt.usage.english. I am puzzled by his usage of 'have gone to'. Why didn't he say 'have been to'? I always think 'have been to' is about experience, whereas 'have gone to a place' means someone is in that place and  hasn't returned. But he seems to use 'have gone to' to indicate  experience.     The only place I've ever gone to and had no choice on what I was eating without advanced warning was a family-style Italian restaurant in San Francisco


Classically, an electron can be in any orbit around the nucleus of an atom. Then what determines the typical atomic size? When we talk about atomic size it can be anything from some finite value to infinity as the electrons can be excited to any value in accordance with the conservation of angular momentum?


I am receiving Points in large number from a sensor in real-time. However, I just need 4 categories of points, i.e., top_left, top_right, bottom_left, and bottom_right. I have an if-elif statement in Python 2 as follows:  from random import random, randint  # points below are received from sensor. however,  # here in this post I am creating it randomly. points = [Point(randint(0, i), random(), random(), random()) for i in range(100)]   # 4 categories top_left, top_right, bottom_left, bottom_right = None, None, None, None for p in points:     if p.id == 5:         top_left = p     elif p.id == 7:         top_right = p     elif p.id == 13:         bottom_left = p     elif p.id == 15:         bottom_right = p  print top_left.id, top_left.x, top_left.y, top_left.z # check variable   Each Point has an id and x, y, z parameters. This is an inbuilt class. I am just showing a sample class here.   class Point():     def __init__(self, id, x, y, z):         self.id = id         self.x = x         self.y = y         self.z = z   Is there any efficient way considering runtime of achieving the same.  Answer: I am adding the results which I got from the answers. It seems that  is fastest among all. Below is my test code:  class Point():     def __init__(self, id, x, y, z):         self.id = id         self.x = x         self.y = y         self.z = z  from random import random, randint n = 1000 points = [Point(randint(0, i), random(), random(), random()) for i in range(n)]  def method1():     top_left, top_right, bottom_left, bottom_right = None, None, None, None     for p in points:         if p.id == 5:             top_left = p         elif p.id == 7:             top_right = p         elif p.id == 13:             bottom_left = p         elif p.id == 15:             bottom_right = p     #print top_left.id, top_left.x, top_left.y, top_left.z  def method2():     categories = {         5: None,  # top_left         7: None,  # top_right         13: None,  # bottom_left         15: None  # bottom_right     }      for p in points:         categories[p.id] = p      top_left = categories[5]     #print top_left.id, top_left.x, top_left.y, top_left.z  def method3():     name_to_id = {'top_left': 5, 'top_right': 7, 'bottom_left': 13, 'bottom_right': 15}     ids = [value for value in name_to_id.values()]     bbox = {id: None for id in ids}      for point in points:         try:             bbox[point.id] = Point(point.id, point.x, point.y, point.z)         except KeyError:  # Not an id of interest.             pass      top_left = bbox[name_to_id['top_left']]     #print top_left.id, top_left.x, top_left.y, top_left.z  from timeit import Timer print 'method 1:', Timer(lambda: method1()).timeit(number=n) print 'method 2:', Timer(lambda: method2()).timeit(number=n) print 'method 3:', Timer(lambda: method3()).timeit(number=n)   See Below the returned output:  ravi@home:~/Desktop$ python test.py  method 1: 0.174991846085 method 2: 0.0743980407715 method 3: 0.582262039185


Why is more ram needed if you're running on a VM?

I was reading through the hardware requirements of  and it says:     1 GB of RAM (1.5 GB if running on a virtual machine)   Why does running on a VM require more resources?


Getting a System.Type from type's partial name

I want to get a System.Type given only the type name in a string.  For instance, if I have an object:  MyClass abc = new MyClass();   I can then say:  System.Type type = abc.GetType();   But what if all I have is:  string className = "MyClass";


Confusion regarding factor 2 in uncertainty principle

I have encountered a problem regarding Heisenberg's uncertainty principle. Somewhere I found the expression   $$\Delta (x) \Delta (p) \geq \hbar$$   Whereas in some other places,   $$\Delta (x) \Delta(p) \geq \frac{h}{4\pi}$$  Here the second expression yields different expression than the first one. Why are the two expressions of uncertainty principle different? Which one is the correct form?


Is there any way of treating $\frac{1}{0}$ without breaking maths? I tried just the variable $\lambda$, thinking that it would be easy to manipulate: $$\frac{2}{0} = 2\cdot\frac{1}{0} = 2\lambda$$ But I soon realised that you couldn't divide any numbers by it because $$\frac{2}{\lambda} = \frac{2}{0}^{-1}=\frac{0}{2}=0, \text{ implying that } 2=0\lambda, \text{ or 0.}$$  Is there any system/way of making this work without destroying maths and everything it stands for?


Why can't I see photos from my Nikon camera after upgrading to Windows 10?

I had recently upgraded to windows 10 and now Windows and Lightroom don't "see" the photos on my D5100. I am able to transfer them to the PC through viewNX but this is not a pleasant solution.  When I go to the folder where the photos should be while using Windows Exploror, the folder is void even if the card is shown to have a certain space full. When I right click and try to do "import photos and videos" it just says no photos to import, same stuff in lightroom. NX works fine. How can I solve this?


Avoiding stealing a resource when moving the robber in Catan

Is it allowed to move the robber, but not take a random resource from another player? Avoiding stealing a resource may sound odd. One reason you might want to: you need to play a soldier card to move the robber, both to block another player from getting resources and to remove the robber from a vital hex for yourself. However, you already have seven cards in hand, and gaining one would put you at risk of discarding if a seven is rolled afterwards.  There are a few more related special cases:   Can you move the robber to the hex with no adjacent settlements (no stealing)? What if the only player whose city is adjacent to hex of your choosing has no resources - can you move the robber there? What if there are two cities adjacent from two players, but only one of them has resources - do you have to steal one from him or can you choose to steal from the player with empty hand?


I would like to know how to resize the size of a div according to the width of the text, avoiding this wasted space, leaving the div compressed. Example:    The div should receive a cut such as:    Example code:   .linhaCodigo{   background: #C0C0C0;   position: relative; }

Cap 2 - Title

Title 2:
                 textexttexttexttexttexttexttexttexttexttexttexttext

 print("I like it!")
                 Outup:
                 I like it!


What is meant by the variance of *functions* in *Introduction to Statistical Learning*?

On pg. 34 of Introduction to Statistical Learning: $\newcommand{\Var}{{\rm Var}}$     Though the mathematical proof is beyond the scope of this book, it is possible to show that the expected test MSE, for a given value $x_0$, can always be decomposed into the sum of three fundamental quantities: the variance of $\hat{f}(x_0)$, the squared bias of $\hat{f}(x_0)$ and the variance of the error terms $\varepsilon$. That is,      $$ E\left(y_0 - \hat{f}(x_0)\right)^2 = \Var\big(\hat{f}(x_0)\big) + \Big[{\rm Bias}\big(\hat{f}(x_0)\big)\Big]^2 + \Var(\varepsilon) $$      [...]Variance refers to the amount by which $\hat{f}$ would change if we estimated it using a different training data set.   Question: Since $\Var\big(\hat{f}(x_0)\big)$ seems to denote the variance of functions, what does this mean formally?  That is, I am familiar with the concept of the variance of a random variable $X$, but what about the variance of a set of functions? Can this be thought of as just the variance of another random variable whose values take the form of functions?


I just bought a Ryanair plane ticket except that I did not see the QR code on the boarding pass, is that normal? the message is : this is not a boarding card go to check-in for visa check and boarding card


Why can templates only be implemented in the header file?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


How to color rows based on cell value in OpenOffice and LibreOffice

How do you automatically set the background color of an entire row based on the value of a specific column in that row in OpenOffice and LibreOffice?  There are similar questions for , but this doesn't completely work in LibreOffice.  I can set a conditional formatting rule using a formula to set the color of a specific cell based on the value in that cell (e.g. =$D5), but how do I apply the formatting to the entire row?


Get rid of un-realizable space in hard disk Linux

When the disk utilization is checked I get /dev/vdb2 partition is more than 70% full. This is a partition with total space 84GB and 56GB already used.  # df -h Filesystem      Size  Used Avail Use% Mounted on /dev/vda1        50G   23G   28G  45% / devtmpfs        3.8G     0  3.8G   0% /dev tmpfs           3.9G     0  3.9G   0% /dev/shm tmpfs           3.9G  273M  3.6G   7% /run tmpfs           3.9G     0  3.9G   0% /sys/fs/cgroup /dev/vdb2        84G   58G   23G  72% /log /dev/vdb1       9.8G  4.6G  4.7G  50% /mnt/ /dev/vdb3       4.8G   10M  4.6G   1% /data /dev/vdd1       9.8G  723M  8.5G   8% /var /dev/vdc2       4.8G   11M  4.6G   1% /tmp /dev/vdc3       4.8G  280M  4.3G   7% /var/log /dev/vdc1       4.8G  3.2G  1.4G  71% /home /dev/vdc5       4.8G  757M  3.8G  17% /var/log/audit tmpfs           783M     0  783M   0% /run/user/1003   When I check for the file sizes within /dev/vdb2, I don't see that much(56GB) space is consumed by files.   # du -ah /log | sort -nr | head -9 570M    /log/gateway/repository/logs/http_access_2019-11-30.log 562M    /log/gateway/repository/logs/wso2carbon.log 152K    /log/portal 148K    /log/portal/repository 144K    /log/rsync 144K    /log/portal/repository/logs 140K    /log/rsync/carbon-rsync-logs 20K /log/portal/repository/logs/http_access_2019-11-30.log 16K /log/portal/repository/logs/http_access_2019-11-27.log.gz   It seems to be there is some unrecognizable space consumed. How is it possible to recover this disk space?


When I'm working on MS Office 2011, when I close a document, spreadsheet, presentation, etc., the application stays open. This is confusing (to me anyway) and I find myself having to explicitly quit these apps all the time (to get them out of the way).  Is there a way to quit an app when the last item is closed?  Thanks in advance!


g++ undefined reference with a shared library

I'm trying to compile a file with a shared library using the following command:  g++ -L. -lsubmit main.cpp   It outputs:  /tmp/ccRFpx1v.o: In function `main': main.cpp:(.text+0x5): undefined reference to `Submit_test()' collect2: error: ld returned 1 exit status   I have main.cpp and libsubmit.so in working directory. Here's my main.cpp  void Submit_test(); int main() {     Submit_test(); }   Here's nm -D --demangle libsubmit.so:  ... 0000000000000e0e T Submit_test() ...   How should I compile that code?


I've been wondering what's the difference of using <? and <?php. For example in this lines of code.  function getWallboard() {      $.ajax({     type: "POST", url: "quality_control/qc_ajax.php", data: "action=get_queue_totals&wallboard=<? echo $_REQUEST['wallboard'];?>", success: function(msg){ $("#queue_nav").fadeIn("fast");         $("#queue_nav").html(msg);     } });              $.ajax({     type: "POST", url: "quality_control/qc_ajax.php", data: "action=getQCWallboard&qctype=<?php echo $_REQUEST['qctype'];?>&wallboard=<? echo $_REQUEST['wallboard'];?>", success: function(msg){ $("#wallboard").fadeIn("fast");         $("#wallboard").html(msg);     } }); }   I've been getting error for some instance. Like If I change <? to <?php or <?php to <?, some of my code block doesn't work.   This is my first post. I hope I can get ideas about the use of this.


How do I execute a python program within a python program?

Now Consider the following idea  I'm declaring a if/elif type to run the program Such as :  number=int(input("Enter a number :"))  If number ==0 Run program.py  Elif number ==1 Run Program2.py  Else number ==2 Run Program3.py   Now clearly the command run program.py doesn't work so what should I do to make it execute program.py incase it is selected and close the main program where we are choosing the number?


Mandatory child record when creating parent record

The standard object Account has a master-detail relationship with a child object called Address__c. In the Address__c object we store the various addresses an account might have.   My question is as following:  Can you make the creation of an address mandatory when an account is created by the user in the UI?  Thank you


Proving orthogonal matrices are a subgroup

Recall that the transpose of an $m \times n$ matrix $B = [b_{ij}]$, denoted by $B^\top$,  is the $n \times m$ matrix whose $(i,j)$-entry is $a_{ji}$. Show that    $$ O_n (\mathbb{R}):= \left\{ Q \in GL_n (\mathbb{R}) : Q^\top Q = Q Q^\top = I_n \right\} \leq GL_n (\mathbb{R}), $$   where $I_n$ denotes the $n \times n$ identity matrix.   My I have 3 questions here.  The first being, is I don't really understand  what I am trying to prove. I think I need to prove that $O_{n}(\mathbb{R})$ is a subgroup of all n by n matrixes. And $O_{n}(\mathbb{R})$ is a set of all n by n matrices whose transpose times themselves is the identity matrix. Is my understanding correct? my second question is could I use either the one step subgroup test or the two step subgroup test ? My final question is if I cannot use the subgroup tests to prove this what should I do instead?  My title was horrid, but I could not think of a better one, you any of you can please change my title. Thanks


Load CSS/Javascript in frontend conditionally if block is used

Assuming I have no infinite scroll or anything else going on in my theme: Is there a way to enqueue my custom Gutenberg block styles and scripts so they are only (lazy) loaded in the front-end when the block is really used? Something like is_active_widget, just for blocks?  If I enqueue them inside a enqueue_block_assets function they're added to any site.  On github, I found this  , but it sounds like it's more on bundling than conditional load, so I still hope they didn't leave that optimization opportunity out - otherwise any other site will soon be junked with 20 additional scripts from numerous Gutenberg block plugins people install and only use once on a page (think of large image gallery block scripts for example).  Thanks & Regards!