My script needs two arguments. I want to hide the error message if someone calls the script with  script.sh --help   so I tired this:  if [ $# -ne 2 ] ; then   if [ "$1" -ne "--help" ]; then     echo "ERROR: wrong number of parameters"     echo   fi   echo "Syntax: $0 foo bar   exit 1 fi   But I get the error  script.sh: line 10: [: --help: integer expression expected   What is wrong?

I have the following if block in my bash script:  if [ ${PACKAGENAME} -eq kakadu-v6_4-00902C ]; then   echo "successfully entered if block!!" fi   The script execution is not entering my if block even though $PACKAGENAME is equal to kakadu-v6_4-00902C. What am I doing wrong?


Is there a dash like program in lubuntu that can be launched either by single or double Super tap. I would want to search, and be able to see a lit of all my apps, preferably in icon form, like the dash. However, I would be happy if it didn't have all the features of the dash, and was more like the , which is simply an application launcher.  Whenever I switch to my lubuntu machine, I miss the ease of access to all my programs.  If there is not, what is the key to open the "Start" menu?

The only thing I will miss after moving to LXDE from Unity will be the Unity Dash. Its functionality, not the piss-poor performance that is. So here's my question. I know there is synapse but AFAIK it only returns text, without multiple large-sized thumbnails of files etc.  I'm looking for a tool:   that uses relatively large area to present results with thumbnailing capability  with immediate presentation of recently used files and apps, preferably   Hence I do not look for any launcher. Point's no. 1 and 2 make for sufficient replacement. Please don't be afraid to answer 'No, there are none' if there no alternatives similar to Unity Dash or Gnome Shell Activities exist.  Related question:


Looking at any given stock, I can see top ten Sellers (cheapest first) and top ten Buyers (highest first). Question is.. does the top buyer buy down through the seller list until satisfied, then buyer #2 and so on... or is it less ordered than that?

Say a security has been trading at under $20.10, and there are limit orders selling at $20.10 and $20.21. Then Simon issues a limit order to buy at $20.21. According to , Simon would end up buying shares at $20.10.  Why does the exchange favor the buyer here?  I.e., why does the transaction execute at the seller's limit of $20.10 instead of the buyer's limit of $20.21?  (I.e., why don't Inara/River get to sell at $20.21 / above their limit, but Simon gets to buy at $20.10 / below his limit?)  Is the example flawed?  If it makes a difference, I'm mainly curious about NASDAQ and NYSE.  I tried Googling for specs (e.g. ), but couldn't find anything.  Only found that some  implementation executes the average of the buy/ask.  Just curious how the system works.


How do I get the number of "columns" in this multi dim array?  The number of "rows", I can get with x.length (returns 3)  x[0].length is undefined but should return 4. It's probably easy but I don't figure it out.  (3) [{…}, {…}, {…}] 0: {0: "1", 1: "2", 2: "3", 3: "4 "} 1: {0: "5", 1: "6", 2: "7", 3: "8 "} 2: {0: "9", 1: "10", 2: "11", 3: "12 "} length: 3 __proto__: Array(0)

What's the fastest way to count the number of keys/properties of an object?  It it possible to do this without iterating over the object?  i.e. without doing  var count = 0; for (k in myobj) if (myobj.hasOwnProperty(k)) count++;   (Firefox did provide a magic __count__ property, but this was removed somewhere around version 4.)


This may be a dumb question but I wanted to know if there was a different way of writing sin(ab) similar to that of the addition formula or is it unnecessary?

Can we express a trigonometric function for the product of two angles as a function of trigonometric functions of its factors?  For example: Is there a formula for $\sin(xy)$ as a function of $\sin x$ and $\sin y$ or other trigonometric functions of $x$ and $y$.


How come in English we don't put symbols (things) above our letters to change how they are pronounced?  In French for example they have an acute accent ( ´ ) and grave ( ` ) and the cedilla that goes under the "c" and in Spanish they sometimes put ~ over the "n".  Many languages do this so why not English?

It just occured to me that there are words in English that have two different meanings, two different pronunciations and are written exactly the same.  For example "present" can be interpreted as the tense when pronounced   /ˈprezənt/ or as a synonym of "demonstrate" when /priˈzent/  Other examples from the top of my head: "read", "live".  I don't think I have seen that in any other language. In most languages you can't tell the spelling of a word by hearing it, but you call articulate it correcly when you're reading it. It seems that in English you can't do either of those.  Did English ever have accent marks to distinguish between those? How did it end up like that?


"Show that there for an arbitrary positive integer k there exist k consecutive integers none of which is a prime."  How would one go about doing this? It's an exercise in a book on analytic number theory that I am reading. I don't know how I should approach this. Is there a result I could use for this ? Nothing comes to my mind. I've tried for some time now and it's really bugging me that I can't figure it out. A hint or method would be appreciated, thanks.

I need help proving that for every positive integer $n$, there exist $n$ consecutive positive integers, each of which is composite. The hint that came with the problem is: Consider the numbers $2+(n+1)!,3+(n+1)!,...,n+(n+1)!,n+1+(n+1)!$.  I honestly have no idea how to begin here. I am specifically confused about what it means when it says "there exist $n$ consecutive positive integers". Does this mean that if $n = 5$, for example, then somewhere in the positive integers there are 5 consecutive composite integers, and that we want to prove that? I get that composite means that they are not prime, so they have more factors than 1 and themselves.  Any help would be greatly appreciated.  Thank you!


Greenplant proudly sponsors   and     Greenplant are proud sponsors of    (Greenplant is a business name. It consists of two sites and has a number of employees. However, for me the key aspect of this sentence is that the word Greenplant is singular. Is that correct? It would be good to understand the difference between the two sentences, because, I am being told that one way is right and the other is correct.

Here is from an article from the  magazine:     One drug he talks about is an antidepressant called reboxetine (branded as Edronax by   its makers, Pfizer) that he used to prescribe to his patients.   Pfizer is a drug company. It is a singular noun. Why is it described as its makers, which is plural?


Plot line Colonists on a new world are concerned that there don't seem to be many species of plant or animal that they can digest. They finally find one (shrimplike?), but it seems to be rare, and they are not sure if there will be enough local food available to make continuing the colony worth it. The local aliens really want them to stay, so hunted down every last one of the human-edible species to give to the humans for a friendship feast. The humans discovered that in one night they had eaten the one digestible local species to extinction. The local aliens thought that the loss of this species was worth it, as it would bind the colonists to them, meaning they would never leave. Edit: I believe it was in a short story collection, and that I read it at least 10 years ago. Could be a lot older than that, though.

I read this short story a few years ago but I cannot remember the title or author. It was about a human scientist on another planet who was studying the native flora and fauna, trying to find something edible for humans. Does anyone know the title of this story?


I realize the answer to this question will vary, which is why I'm asking it. If you've suffered a DDoS attack before - how long did it last?  Just trying to get an idea of how long we'll have to continue to wage this battle (going on a couple weeks now).

This is a  about DoS and DDoS mitigation.   I found a massive traffic spike on a website that I host today; I am getting thousands of connections a second and I see I'm using all 100Mbps of my available bandwidth.  Nobody can access my site because all the requests time out, and I can't even log into the server because SSH times out too!  This has happened a couple times before, and each time it's lasted a couple hours and gone away on its own.  Occasionally, my website has another distinct but related problem: my server's load average (which is usually around .25) rockets up to 20 or more and nobody can access my site just the same as the other case.  It also goes away after a few hours.  Restarting my server doesn't help; what can I do to make my site accessible again, and what is happening?  Relatedly, I found once that for a day or two, every time I started my service, it got a connection from a particular IP address and then crashed.  As soon as I started it up again, this happened again and it crashed again.  How is that similar, and what can I do about it?


A follow on from , I'm wondering, has JK Rowling ever commented on why she chose to name the school Hogwarts in particular?

Was Hogwarts named 'Hogwarts' because of a connection to warthogs?  Or was it named for hogs and warts separately, or something else entirely?


Let $R$ be an integral domain which is not a field. Then is it true that $\langle f \rangle$ cannot be a maximal ideal of $R[x]$ for any non-constant polynomial $f(x) \in R[x]$ ?    I know that it holds in case of $R=\mathbb Z$ and I can adapt the proof to draw similar conclusion in case $R$ is a UFD with infinitely many mutually  non-associated prime elements. But I don't know what happens in general. If the answer in general is not true then does it at least hold if we also assume $R$ is Noetherian ?

Let $R = \mathbb{Z}_{(2)}$ be the localization of $\mathbb{Z}$ at the prime ideal generated by $2$ in $\mathbb{Z}$. Then prove that the ideal generated by $(2x-1)$ is maximal in $R[x]$.


Recently I found myself needing to stack two small circuit boards on top of each other for a modulation project. The problem is that the areas I want to connect together on the two boards have no components or traces on them, and traditional pin-style stack ups (even machine headers) leave an unwanted gap between boards.  How can I stack the boards flush with on another and have a minimal gap between them?  I have seen  which shows an approach to stack boards permanently flush together, but I need a solution that is removable.

I am attempting to replace an old PLCC32 part that was directly soldered to the board with a new part of undecided form. We will definitely need an adapter as we have not been able to find a PLCC32 part that does what we need. I cannot use a PLCC adapter plug because there are also height restrictions. We are considering building a two-sided adapter board that has pads on the bottom side that match the PLCC32 layout on the current board, with the new layout on top. Theoretically, the adapter board would be soldered directly to the old board and the new chip on top of the adapter.  However, I have not seen any examples of soldering two PCBs directly together in this manner, which makes me think it is a likely to be a bad idea. Can anyone comment on this sort of custom adapter?


I want to make my python program less pirateable. I know it's fruitless to make it entirely secure, but I want it to be at least somewhat easier than copying copying the installer and throwing it on piratebay.  I've looked into verifying the MAC address of the user, but that either requires them to run the software first, or to give me their MAC address to get the software.  I've also looked into spreading out the files after installation, but once again that only works if they don't just copy the installer  It's python, so it's not going to be hard to reverse engineer, and it's a desktop application, so it's going to be pirated. But a tiny amount of security will prevent the average user from just pirating it I hope.

I am developing a piece of software in Python that will be distributed to my employer's customers. My employer wants to limit the usage of the software with a time restricted license file. If we distribute the .py files or even .pyc files it will be easy to (decompile and) remove the code that checks the license file. Another aspect is that my employer does not want the code to be read by our customers, fearing that the code may be stolen or at least the "novel ideas". Is there a good way to handle this problem?


for any $a,b\in R^+$, how to prove that $$a b \leq \frac{a^{3}}{3}+\frac{b^{3 / 2}}{3 / 2}$$ my try: if I can prove that $\frac{a^2+b^2}{2}\leq \frac{a^{3}}{3}+\frac{b^{3 / 2}}{3 / 2}$then this inequality can be proved but it seems that $\frac{a^2+b^2}{2}> \frac{a^{3}}{3}+\frac{b^{3 / 2}}{3 / 2}$  I had no clue then.

states that if $a, b \geq 0$, $p, q > 0$, and $\frac{1}{p} + \frac{1}{q} = 1$, then $$ab\leq \frac{a^p}{p} + \frac{b^q}{q}$$ (with equality only when $a^p = b^q$).  Back when I was in my first course in real analysis, I was assigned this as homework, but I couldn't figure it out.  I kept trying to manipulate the expressions algebraically, and I couldn't get anywhere.  But every proof that I've seen since uses calculus in some way to prove this.  For example, a common proof is based on this  and integration.  The proof on Wikipedia uses the fact that $\log$ is concave, which I believe requires the analytic definition of the logarithm to prove (correct me if I'm wrong).  Can this be proven using just algebraic manipulations?  I know that that is a somewhat vague question, because "algebraic" is not well-defined, but I'm not sure how to make it more rigorous. But for example, the proof when $p = q = 2$ is something I would consider to be "purely algebraic":  $$0 \leq (a - b)^2 = a^2 + b^2 - 2ab,$$ so $$ab \leq \frac{a^2}{2} + \frac{b^2}{2}.$$


I am on a B-1 US visa and have been here for nearly six months. My passport is stamped till 9th November. I am leaving to go home on 8th November at 9:55pm.  Will this be overstaying the visa as it is so close or will it be fine?

I have a valid ESTA.  If my visa waiver 90 days end on August 1, and I have a ticket leaving the US on the same day, would it be OK or should I purchase a ticket a day before?


Let us consider a particle in one spatial dimension $x$ and one temporal dimension $t$. Its Lagrangian $L$ is given by   \begin{eqnarray*} L &=& T- V \\   &=& \frac{1}{2} m\dot{x}^2 - V(x) \\   &=& L(x, \dot{x}) \end{eqnarray*}  But if I write $ L = \frac{1}{2} m [\frac{d}{dt}({x})]^2 - V(x)$, then it seems to me that $L$ depends only on $x$.   So, my question is why it is said that $L$ is a function of $x$ and its derivative $\dot{x}$ ?

In the calculus of variations, particularly Lagrangian mechanics, people often say we vary the position and the velocity independently. But velocity is the derivative of position, so how can you treat them as independent variables?


I don't have a dSLR at the moment but am planning to buy one. Wanted to know the cheaper methods to shoot in macro. Will using macro filters and extension tubes concurrently increase the efficiency of the shot?


What's correct?      a) I was in a meeting      b) I was at a meeting   I saw uses in both of them, but I'm not sure what's correct.

I am always confused with the preposition. Can somebody point me to the material where prepositional phrase is explained?  Here is the problem I am facing currently.     This was discussed (stated/announced/said) at the last meeting when you were not present.    or     This was discussed (stated/announced/said) in the last meeting when you were not present.


Operating System: Ubuntu 16.04. Vagrant Version: Vagrant 1.9.1 Virtual Box Version: 5.1.14 r112924 (Qt5.5.1)  I've setup my development environment and everything works great, but when I try to push all to production server I always get: Unknown collation: 'utf8mb4_unicode_520_ci' (Wordmove::ShellCommandError) for Database Pushig.  I've read somwhere that this might be a problem with mysql version, development server uses: 5.7.16 and live server has 5.5.54 installed.  Has anyone encountered / fixed this issue?

When I Import Mysql from local server to web ser it is showng me error 1115 - Unknown character set: 'utf8mb4' in Creating wordpress wp_comment table CREATE TABLE IF NOT EXISTS  `wp_commentmeta` ( // // ) ENGINE = INNODB DEFAULT CHARSET = utf8mb4 AUTO_INCREMENT =1;  #1115 - Unknown character set: 'utf8mb4'  My mysql version is Version information: 4.0.4, latest stable version: 4.4.10 (local version)  Version information: 4.0.10.7, latest stable version: 4.4.10( server version)  Please help me to solve out the error


So, the Badlock bug (www.badlock.org) that was revealed yesterday, was not as terrible as feared. And yet, it seems prudent to patch samba ASAP.  However, just prior to releasing the bug, the samba developers decided to EOL the 4.1.x-branch and did not release a fix for the bug.  At the same time, the version that is available when using 'aptitude update' on a fairly recently installed Ubuntu 14 LTS, is version 4.1.6-Ubuntu.  Has this version been specifically patched for Badlock? If not, what is the best course of action to get samba upgraded to a non-EOL version on Ubuntu?  In the security updates thread,  , I see an update coming for samba version 4.3.x. But the version I have is the one that was selected by default when I did the installation, 4.1.6-Ubuntu. I ask this question because I am unsure if that fix is going to apply -- and if so, when.

A user on the Ask Ubuntu General Room posted a link to . After some googling around, all I can find is that it is a mysterious security bug, that uses the same website template as Heartbleed.  I manage Linux Servers, a mysterious security bug does not sit well with me. What exactly is it, and how can I protect my servers from it?


I had a discussion with a colleague about using "Home" link in main (top) navigation. I know that I should give more options to users, so, my question is not about I should use "Home" link or logo link (or both), is more related about users consciousness about this feature.  Is there any study made about user consciousness related to clicking logo to navigating to home page?

Is a "home" button on the navigation required if there is a link to the homepage using the company's logo?   Increasingly I have noticed more and more websites using the logo as a link to return to home instead of a clear Home button in the navigation but haven't found any good proof or research to suggest that this is best approach.   Is there a best practice guidelines or some kind of criteria (e.g. advanced users vs beginners) that should aid in making this decision.   Any thoughts or comments would be appreciated. Thanks


I was looking at this  and i can`t understand this part:  QA = dA G = 5 (5,1) = (9,16)  I saw that algorithm used for this was Double-and-add algorithm but i didn't get it. Can anyone explain how can i do this calculation on papir?

Given an elliptical curve e.g. from “Understanding Cryptography” by Parr & Pelzl §9.2 Example 9.5:  $y^2 = x^3 + 2x + 2~~~~ mod~17$   And given a primitive $P = (5, 1)$, the book indicates:     We compute now all the "powers" of P.   They then provide a table:  $2P = (5, 1) + (5, 1) = (6, 3)$  $3P = 2P + P = (10, 6)$  $...$  $18P = (5, 16)$  Unfortunately it is not apparent to me what action they are performing with the addition ($+$), or what they mean by "powers".  What operation is being performed to go from $(5, 1) + (5, 1)$ to $(6, 3)$, and so on?  The obvious operation (i.e. what Wolfram alpha does) of $(5, 1) + (5, 1) = (5 + 5, 1 + 1)$ yields $(10, 2)$.  There are a plethora of other possible combinations of operations that one could try, but I'd just be guessing.  Generally, given the secret, ordinarily labeled $d$, how ought one calculate $dP = P + P~ +~ ... ~+~ P$?  (This presumably computes the public key $X$ & $Y$ points, from $d$ and the $Gx$ and $Gy$ parameters)  While it is a rather core operation, and likely quite basic, I have found no illustrative examples and at-best convoluted implementations.  I'll keep looking, but I thought that a good answer might be a useful for the next person searching.  Edit  This exact example also appears and is discussed at:


I know the i++ means return i and then increase 1, and ++i means increase 1 then return i. In this code:   int isTotalAlphabetical(char word[]){ int i = 0; while (word[i] != '\0') {     printf("The %dth is: %d, the char is %c\n", i,isalpha(word[i]), word[i]);     if (!isalpha(word[i])){         printf("now return 0, because the %c is not alpha, it's the %d char\n", word[i], i);         return 0;     }     i++;  } return 1;   }  In this loop, when I move i++ to "while (word[i++] != '\0')" the output will print out info that   The 2th is: 1, the char is p The 3th is: 1, the char is l The 4th is: 1, the char is e The 5th is: 0, the char is  now return 0, because the  is not alpha, it's the 5 char   When I move ++i to "while (word[++i] != '\0')", the output will ignore the first one char. it shows:  The 1th is: 1, the char is p The 2th is: 1, the char is p The 3th is: 1, the char is l The 4th is: 1, the char is e   How could that happen?

In C, what is the difference between using ++i and i++, and which should be used in the incrementation block of a for loop?


i tried ubuntu last year, all was working fine, there was no lag, and now again i was trying and downloaded official latest lte ubuntu 12.04 there are few problems im facing are,  1. Lagy animations: last year when i installed there wasn’t lag but today i installed again latest version is having lag while animations like minimise,etc..    i even installed latest drivers, my pc config is Intel i5 2310, 8 gb ram ddr3, Ati 6870 1gb ddr5, drivers are installed..   Ubuntu Logo bug(simple text): i installed ubuntu on W7 using Wubi, after install successful, first boot there was logo before login screen, like small UBUNTU with shining etc, i liked it, so, then i updated my Ubuntu it takes hour and after restart i lost that Nice Logo, now there is only a txt written like Ubuntu 12.04 not a pic, these things i dont like about ubuntu... GPU info not correct: i installed my GPU drivers, but when i see Info from settings>Details>Graphics i see there is " VESA: BARTS " written on Drivers and Standard.. there must written Ati 6870 blabla.   These are the problems i am facing, Please help me and give me chance to enjoy Ubuntu xD Thanks in Advance...

My ubuntu boot screen shows up in a strange low resolution, almost text mode, instead the usual and sleek white "ubuntu" over dark background. It's not a big issue because when GDM loads everything becomes ok, but If there's an easy way to fix it I would like to give it a try.


I try to execute this source code for the multiplication but it doesn't work, it's shows error on te return , I want to know if it's possible why that happen, and how I can change my code so that it will work. thanks you  def multiples():       return [lambda x : i * x for i in range(4)]  print (m[2] for m in multiples())

I want to create a list of lambda objects from a list of constants in Python; for instance:  listOfNumbers = [1,2,3,4,5] square = lambda x: x * x listOfLambdas = [lambda: square(i) for i in listOfNumbers]   This will create a list of lambda objects, however, when I run them:  for f in listOfLambdas:     print f(),   I would expect that it would print  1 4 9 16 25   Instead, it prints:  25 25 25 25 25   It seems as though the lambdas have all been given the wrong parameter. Have I done something wrong, and is there a way to fix it? I'm in Python 2.4 I think.  EDIT: a bit more of trying things and such came up with this:  listOfLambdas = [] for num in listOfNumbers:     action = lambda: square(num)     listOfLambdas.append(action)     print action()   Prints the expected squares from 1 to 25, but then using the earlier print statement:  for f in listOfLambdas:     print f(),   still gives me all 25s. How did the existing lambda objects change between those two print calls?  Related question:


I am reading Baby Rudin and stuck at one small point. $A$ is set of all positive rationals $p$ such that $p^2<2$ and $B$ is set of all positive rationals $p$ such that $p^2>2$. We wanted to show $A$ contains no largest element and $B$ contains no smallest element. So for any such $p$ in either set, author associated number $q$ as, $q=p-\frac{p^2-2}{p+2}$, which works fine. I was trying to figure out how to obtain the quantity $\frac{p^2-2}{p+2}$. I did it for set $A$ as follows. So, we have positive rational $p$ such that $p^2<2$. We want some $k>0$ such that $(p+k)^2 <2$ i.e. $p^2+2pk+k^2<2$ As all three quantities are positive, we can say $p^2+2pk<2$, which gives $k<\frac{2-p^2}{2p}$. But as $p^2<2$, we have $p<2 \Rightarrow p+p=2p<p+2$ Therefore, we can choose $k=\frac{2-p^2}{p+2}$. But I am stuck while deriving it for set $B$. I did following. So, we have positive rational $p$ such that $p^2>2$. We want some $k<0$ such that $(p+k)^2 >2$ i.e. $p^2+2pk+k^2>2$. From this point, I can say $p^2+k^2>2$, but not sure how this will take me to the desired result. Any hint or help. Thank you.

First, my apologies if this has already been asked/answered.  I wasn't able to find this question via search.  My question comes from Rudin's "Principles of Mathematical Analysis," or "Baby Rudin," Ch 1, Example 1.1 on p. 2.  In the second version of the proof, showing that sets A and B do not have greatest or lowest elements respectively, he presents a seemingly arbitrary assignment of a number $q$ that satisfies equations (3) and (4), plus other conditions needed to show that $q$ is the right number for the proof.  As an exercise, I tried to derive his choice of $q$ so that I may learn more about the problem.  If we write equations (3) as $q = p - (p^2 - 2)x$, we can write (4) as   $$ q^2 - 2 = (p^2 - 2)[1 - 2px + (p^2 - 2)x^2]. $$  Here, we need a rational $x > 0$, chosen such that the expression in $[...]$ is positive.  Using the quadratic formula and the sign of $(p^2 - 2)$, it can be shown that we need   $$ x \in \left(0, \frac{1}{p + \sqrt{2}}\right) \mbox{ for } p \in A, $$  or, for $p \in B$, $x < 1/\left(p + \sqrt{2}\right)$ or $x > 1/\left(p - \sqrt{2}\right)$.  Notice that there are MANY solutions to these equations! The easiest to see, perhaps, is letting $x = 1/(p + n)$ for $n \geq 2$.  Notice that Rudin chooses $n = 2$ for his answer, but it checks out easily for other $n$.  The Question:  Why does Rudin choose $x = 1/(p + 2)$ specifically?  Is it just to make the expressions work out clearly algebraically?  Why doesn't he comment on his particular choice or the nature of the set of solutions that will work for the proof?  Is there a simpler derivation for the number $q$ that I am missing?


I currently have a problem with creating objects using two-dimensional arrays in Java.  I'ld like to display bricks on a playing board (like in the classic "BreakOut games), therefore I created a class "Stone" for the stone-objects, the constructor of the class is:   public Stone (Position pos, int value){     this.pos = pos;     this.type = type; }   I also created a 2D-array (int) called "stoneTypes" for the pattern of the Stones, in which I saved a matrix from a JSON file.  I ld' now like to create Stone-objects in my class "Level" by using the values of the stoneTypes-matrix, which currently looks like this (I included an if-condition, so Stone-objects are only created for stoneTypes value >= 1):  private Stone[][] stones = new Stone[25][20];  private int[][] stoneTypes;  JSONReader reader = new JSONReader("res/Level" + levelnr +".json"); stoneTypes = reader.getStones2DArray();  for (int w = 0; w < stoneTypes.length; w++) {        for (int h = 0; h < stoneTypes[w].length; h++) {            if (stoneTypes [w][h] >= 1) {               Position pos = new Position(width * w, height * h);               this.stones[w][h] = new Stone(pos, stoneTypes[w][h]);           }          } }   I also included a get-Method for the Stone-array, so I could use it to draw the Stones in my "Field" class:  public Stone[][] getStones(){     return this.stones; }   The method for drawing the Stones in my "Field" class currently looks like this:  private void drawStones(Graphics2D g2) { stones = view.getGame().getLevel().getStones();   for (int i = 0; i < stones.length; i++) {     for (int j = 0; j < stones[i].length; j++) {     ***     int x_position = (int) stones[i][j].getPosition().getX();           ***             int y_position = (int) stones[i][j].getPosition().getY();             g2.fillRoundRect(x_position, y_position,                      (int) ((double)Constants.SCREEN_WIDTH/Constants.SQUARES_X)-2,                      (int) ((double)Constants.SCREEN_HEIGHT/Constants.SQUARES_Y)-2 ,1,1);             System.out.println(x_position);     }   } }   Eclipse doesn't show any syntax errors but I do receive a NullPointerException at the spot I marked with the ***, as soon as I start the programm. I am not sure if my get-Method isn't implemented correctly or if the process of creating new Stone-objects is simply wrong. I tried hundreds of things but couldn't find a solution, I hope you guys can help me.  Thx in advance, Scoopa!

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


I am trying to prove the limit of the following sequence is $\sqrt{x}$. I'm stuck on the hint. I don't how they got to the hint. Problem Suppose that $x>0$. Define a sequence $S_n$ by $s_1 = k$ and $s_{n+1} = \frac{s_n^2 + x}{2 s_n}$ for $n \in \mathbb{N}$. Prove that for any $k>0$, $\lim_{n\to\infty} s_n = \sqrt{x}$. The hint: Show that $(s_{n+1})^2 - x = \frac{(s_n^2 - x)^2} {4s_n^2} \ge 0$, so that $s_n  \ge \sqrt{x}$ for $n \ge 2$. What do I need to do to get to hint? It seems they squared both sides? But, there's an extra $-x$ on the left, and the $+x$ became $-x$ on the right. I am very confused.

Suppose that $S_0$ and A are positive numbers, let $$S_{n+1} = \frac{1}{2}\left(S_n +\frac{A}{S_n}\right)$$ with $n \geq 0 $.      (a)Show that $S_{n+1} \geq \sqrt{A} $ if $n \geq 0$       (b)Show that $S_{n+1} \leq S_n $ , if $n \geq 1$      (c) Show that $s= \lim\limits_{n \rightarrow \infty} S_n$ exists      (d) find s   (a) Show that $S_{n+1} \geq \sqrt{A} $ if $n \geq 0$  Given $$P_n:  S_{n+1} = \frac{1}{2}\left(S_n +\frac{A}{S_n}\right) \geq \sqrt{A}$$  $$P_0: S_{1} = \frac{1}{2}\left(S_0 +\frac{A}{S_0}\right) \geq \sqrt{A}  $$  We assume that $P_n$ is true  $$P_{n+1}: S_{n+2}= \frac{1}{2}\left(S_{n+1} +\frac{A}{S_{n+1}}\right)$$ by assumption $$S_{n+2}= \frac{1}{2}\left(S_{n+1}\left(1 +\frac{A}{(S_{n+1})^2}\right)\right) \geq \frac{1}{2}\left(\sqrt{A}\left(1 +\frac{A}{(\sqrt{A})^2}\right)\right)$$ $$ S_{n+2}= \frac{1}{2}\left(S_{n+1} +\frac{A}{S_{n+1}}\right) \geq \sqrt{A}  $$  It follows that $S_{n+1} \geq \sqrt{A} $    (b) Show that $S_{n+1} \leq S_n $ , if $n \geq 1$  $$S_{n+1} \leq S_n$$ $$\frac{1}{2}\left(S_n +\frac{A}{S_n}\right) \leq S_n $$ Dividing by $S_n$ $$\frac{1}{2}\left(1 +\frac{A}{S_n^2}\right) \leq 1 $$ $$\frac{A}{2S_n^2} \leq \frac{1}{2}$$ $$A \leq S_n^2$$ $$S_n \geq \sqrt{A}$$ As  $S_{n+1} \leq S_n$ yields a true statement, it follows $S_{n+1} \leq S_n$ is true.    (c) Show that $s= \lim\limits_{n \rightarrow \infty} S_n$ exists  Since $S_{n+1} \leq S_n$, the sequence is non-increasing,   using the non-increasing theorem stating that      if $\{S_n\}$ is non-increasing then $$\lim\limits_{n \rightarrow > \infty} S_n = \inf\{S_n\} $$     (d) find s    Is the argumentation in (a) and (b) appropriate? Also, I have to admit I m getting less confident in my argumentation (c) and (d). How to proceed in (c) and (d)?  Much appreciated for your input or help.


I've Downloaded qt-opensource-linux-x64-5.5.0-2.run file and tryed to install it using terminal, so I added execute permission and run it:   ./qt-opensource-linux-x64-5.5.0-2.run   But it shows:   qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method   and nothing happens.  What is the problem and how I can install it?

I am planning to install qt 5.5.1 on my ubuntu 14.04 running on virtual machine. I have downloaded the installer from qt-io and when I try to install the setup, I notice the below warning on my terminal, and then the installer pop up.  qt.network.ssl: QSslSocket: cannot resolve SSLv2_client_method qt.network.ssl: QSslSocket: cannot resolve SSLv2_server_method   Do I need to worry much about this warning ? I dont see any error of this kind when I installed qt 5.3.1 on same machine.   Is there a way to resolve this warning ? Any help is appreciated. Thanks.  This is the current version of openSSL on my machine.  openssl version -v OpenSSL 1.0.1f 6 Jan 2014


I would wondering if using a for loop to determine if an integer is inside of a string would be the best option, but I am not so sure.  Please help thank you!!  This is for Java btw.

I normally use the following idiom to check if a String can be converted to an integer.  public boolean isInteger( String input ) {     try {         Integer.parseInt( input );         return true;     }     catch( Exception e ) {         return false;     } }   Is it just me, or does this seem a bit hackish?  What's a better way?    See my answer (with benchmarks, based on the  by ) to see why I've reversed my position and accepted  to this problem.  I think this original code will be used by most people because it's quicker to implement, and more maintainable, but it's orders of magnitude slower when non-integer data is provided.


Is there a word for a car that always breaks down and may need to be replaced?. It could be an adjective or a noun:  Joe's car is such a {noun}, he really should think about buying a new one Joe's got an {adjective} car, he really should think about buying a better one

I am in need of a word to describe an old, bad conditioned car that is yet still running.   Ragged came to my mind, but it seems to be inappropriate for things not related to clothing. Wrecked is also not what I'd like to use.   However, this shall be used in a work of literature, so a neat paraphrase would be fine.


i am using this example try it   but it is not working can you please help me to resolving this problem.  "java.lang.NullPointerException: Attempt to invoke virtual method 'int java.lang.String.hashCode()' on a null object reference"  this error has been shown


I followed a recipe for cruelers that came out delicious! Unfortunately they didn't puff the way I was expecting them to. Just wondering if Anton might know why or have some tips for getting them to poof.

Last time I tried to make Chocolate eclairs (similar to cream puffs), the choux pastry just sat in the oven and basically fried.  It didn't rise/grow and so I couldn't hollow out the shells.  Any suggestions?  Recipe was from The Australian Women's Weekly Original Cookbook (Golden Press Pty Ltd, 1977) p. 204  It is almost identical to the one published on their website , with the exception that the cookbook recipe used 1C water and 1C plain flour.


I have base class and sub class. Whether i call base constructor in subclass or not, it is always called before subclasses. Can i create a default constructor in subclass that won't call base class default constructor?  public class BaseClass {     public BaseClass()     {         Console.WriteLine("base ctor");     } }  public class SubClass : BaseClass {     public SubClass()     {         Console.WriteLine("subclass ctor");     } }   for var obj = new SubClass(); out is  "base class ctor" "subclass ctor"

I've got a (poorly written) base class that I want to wrap in a proxy object. The base class resembles the following:  public class BaseClass : SomeOtherBase  {    public BaseClass() {}     public BaseClass(int someValue) {}     //...more code, not important here }   and, my proxy resembles:  public BaseClassProxy : BaseClass {   public BaseClassProxy(bool fakeOut){} }   Without the "fakeOut" constructor, the base constructor is expected to be called. However, with it, I expected it to not be called. Either way, I either need a way to not call any base class constructors, or some other way to effectively proxy this (evil) class.


How can I adjust this regex to pick only one match in an alternation phrase please. I'm using the Google Sheets REGEXEXTRACT function to collect parts of a string. I have almost all conditions covered by using alternation - except one, the one in which the source string includes more than one of the alternation matches.  A simple test example, in B1:B4 I have.  =REGEXEXTRACT(A1,"([^\d]*)\s?(?:vs|bc)") =REGEXEXTRACT(A2,"([^\d]*)\s?(?:vs|bc)") =REGEXEXTRACT(A3,"([^\d]*)\s?(?:bc|vs)") =REGEXEXTRACT(A4,"([^\d]*)\s?(?:bc|vs)")   (note the inverted bc|vs alternation in B3 & B4)  In A1:A4 I have  oiu tgi vs ghj bc fgh de nbv the vs ghj fgh ghj YHTF bc fgh iii iii kji bc fgh vs oiu   The results I want in B1:B4  oiu tgi de nbv the ghj YHTF iii iii kji   The problem is the engine (quite correctly) matches both alternation phrases and extracts everything to the left of the last match (rightmost) in the source string. Not what I want.  The various text lengths between the alternation matches is random. Is my whole approach wrong?  The results I actually get in B1:B4 are:  oiu tgi vs ghj  de nbv the  ghj YHTF  iii iii kji bc fgh    As the number of rows in the real data is many thousands I obviously want a universal regex for all variants.

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


In the past I was able to do sudo rm -rf /Applications/<app name>. The following resources indicate that this will no longer work without dealing with System Integration Protection (SIP):       The motivation is that I am not motivated to accept updates for apps that I do not expect to use within the foreseeable future.  Is there an easy way to remove some the built-in apps that I do not wish to update, such as GarageBand, Keynote, Pages, etc., without dealing with the SIP tool?  P.S. (edited): I completely understand that there may not be any easy or even difficult way to remove some built-in apps such as Safari, Siri, System Preferences, etc. This scope of this question is hereby limited to the some apps such as GarageBand, Keynote, Pages, etc.

Backstory:   I am running macOS Sierra and use TextEdit a lot. The problem is that I hate the Versions save schema that causes the universal Save As shortcut of CmdShiftS to instead create a copy of the document. I also hate how Auto-Save makes permanent changes to documents I don't want to modify when I'm tentatively modifying a work-in-progress. Since the introduction of these nuisance features in Lion I have always backed up and then replaced TextEdit.app with the legacy 1.6 version from Snow Leopard.  The problem:  Today when I tried to delete TextEdit.app from my Applications folder using this Terminal command  sudo rm -rf /Applications/TextEdit.app   I got this error  rm: TextEdit.app: Operation not permitted   I was surprised to find that I can't kill it, even with sudo.  How can I actually get rid of an application that is bundled with macOS?  What I've tried so far:  I followed the instructions in , but it didn't work. I also read , which almost accomplishes the same solution by means of disabling Versions and Auto-Save, but then I don't get the benefit of legacy TextEdit's temporary backup saving feature. See the part in the answer stating "This effectively disables the old-style, pre-Lion autosaving completely".   So I think deleting the newer TextEdit v1.12 and replacing it with the legacy v1.6 is still the best option, however I can't get my system to delete it. Any help appreciated.


I am trying to follow this tutorial on auto-login into SSH:  The objective is to make a script so my linux computer can shutdown my windows computer with a single script file, automatically. The issue I'm having is that all the tutorials on internet are oriented of course to a linux-linux environment and the commands asked for configuring the server-side of the configuration, don't work for windows 10. The idea is to use it in the LAN so I don't really mind "security" concerns. So How can I achieve auto-login on windows 10 ssh from a linux terminal? Thanks.

I've set up OpenSSH on various flavors of Linux tons of times.  But I can't for the life of me get it functioning correctly on windows.    There seem to be two sides to the issue.  The permissions and the key used by sshd/ssh-agent.  Permissions  Every page I read has a different answer for the correct permissions.  Some work, and sometimes the program complains about them.    From what I understand the keys should all be owned by SYSTEM, with read access for NT SERVICE\sshd and Full Control for Administrators and SYSTEM?  (As I understand SYSTEM and Administrators represent root in Windows).  I read in the documentation that the read access is only necessary if not using ssh-add/ssh-agent.  I also configured the same permissions for the %USERPROFILE%/.ssh/authorized_keys file and added the .pub the Ed25519 key which is the one I'm using to try and connect, though I've also tried it with my own generated RSA key.  With the permissions set this way the program doesn't complain when adding keys to the agent or running the daemon.  The only option I changed in sshd_config is the ListenAddress which was binding to 0.0.0.0, I set it to the machines local IP as SSH will only be used locally.    Keys  When I run sshd.exe with the -d option, I notice it importing the 4 default keys from %PROGRAMDATA%/ssh.  When I added the ed25519.pub key to authorized_keys it was followed by HOSTNAME@workstation@HOSTNAME, HOSTNAME being my PC's hostname.  Normally I would expected to see user@host.  I tried creating my own key and adding it but when I run sshd.exe -d it never seems to use anything other than the default keys.    In the end, I'm unable to connect to the OpenSSH server, and the logs in %PROGRAMDATA%/ssh/Logs only seem to show the server starting.  To sum up my questions: What are the correct permissions for the key files and authorized_hosts?  Does the annotation in authorized_keys being wrong make a difference?  Should I be adding all of the default keys .pub's into authorized_hosts?  And last, what does sshd mean when it mentions those keys during startup (see log)?  Shouldn't my own generated key just work as long as I add it to authorized_hosts?  debug1: sshd version OpenSSH_for_Windows_7.6, LibreSSL 2.6.4 debug1: private host key #0: ssh-rsa SHA256:and12LVkEqyXJ2gr0SxFEQObaSFF+Czlcnx2uFjZaJQ debug1: private host key #1: ssh-dss SHA256:waeLdy4Sm3NT+zbwEMIhbfl8TLe6WeQ0MuZE07CzFQU debug1: private host key #2: ecdsa-sha2-nistp256 SHA256:G8/7y/04cSE3EezTrcmpK4lRmJ5f5I/CDPcHaPzsv4o debug1: private host key #3: ssh-ed25519 SHA256:Jvn9UjsbdzH54L/yvGYGfCzJQVIMiIWL5RETbaL2ACA debug1: rexec_argv[0]='C:\\WINDOWS\\System32\\OpenSSH\\sshd.exe' debug1: rexec_argv[1]='-d' debug1: Bind to port 22 on 192.168.1.144. Server listening on 192.168.1.144 port 22.


I want to switch between headphones (jack) and internal speakers without having to insert/remove the jack?  Is it possible ? And how ?

I have a set of surround speakers, connected to my iMac through the headphone jack. I use a switch to control what goes to the speaker set (iMac, iPod, or MacBook/aux). So that I don't have to be constantly unplugging and replugging, I leave the audio cable in the iMac's audio port. This means that when I'm listening to something from another source, I can't hear anything from the iMac unless I unplug the cable.  Is there a way to force sound to come out of the internal speakers, even if there's something in the audio out port?


How do I install and use a minecraft mod on ubuntu 18.04.1?  On the internet I have found many descriptions on how to do it (e.g.  and ) but either these instructions are out of date or do not work.   The mod to install is Lucky Blocks which seem to work only for version 1.12. Therefore I already installed a minecraft forge server version 1.12.   But now what? The instruction says to place the mod file (its a zip) into the mod folder. But neither in the client (in ~/.minecraft) nor in the folder where I downloaded the forge version (~/.minecraftForge12) does such a folder exist. So create one? Where? Client or server? And then what to do exactly to use this mod?   I also want other users to be able to join this mod minecraft server from the outside. Do they have to install something? What? Where?   Here are the steps I did:   Installed forge server 12.2 on computer1 Created mods folder inside the forge server 12.2 on computer1 Copied the mod zip file into the mods folder inside the forge server 12.2 on computer1 Launching normal minecraft client. There is no mods to select from.

I'm having a really, really hard time figuring out how to install mods on Minecraft. I've looked everywhere I can think of for help but the information is almost always outdated or unhelpful.  I've seen on several sites about the use of something called Forge. The Mod I want to use requires 1.6.4 Forge and I have both Forge and the Mod folders sitting in my downloads folder.  I haven't installed any kind of mods for any game prior to this and I have little clue to the technical side of Minecraft, so please keep this in mind when you give me an answer please!  Things that might help you figure out how to help me:   I want to play this mod  and am using the 1.6.4 Forge given on a link that website gives


I have a Bitmap list where I store some images. Then I want an Image element on a WPF UserControl to be the first element of that list. For that I tried this:  Image2.Source = myBitmapArray[0].ToBitmapImage();   Where ToBitmapImage is a static function that looks like this:  public static BitmapImage ToBitmapImage(this Bitmap bitmap)     {         BitmapImage bitmapImage = new BitmapImage();          using (MemoryStream memoryStream = new MemoryStream())         {             bitmap.Save(memoryStream, System.Drawing.Imaging.ImageFormat.Bmp);             memoryStream.Position = 0;             bitmapImage.BeginInit();             bitmapImage.StreamSource = memoryStream;             bitmapImage.EndInit();         }          return bitmapImage;     }   But when I assign the BitmapImage to my Image.Source it doesn't show the image. What I'm doing wrong?

I have an instance of a System.Drawing.Bitmap and would like to make it available to my WPF app in the form of a System.Windows.Media.Imaging.BitmapImage.  What would be the best approach for this?


I would like to switch from Dropbox to iCloud drive and wanted to know if there is any way to select specific folders which are going to be downloaded on my Mac? It is possible in Dropbox client. There are some folders that I would like to have in the cloud but not taking space on my local Mac.

So i have one iCloud account and two Macbooks : one mac for work, another for personal use.  I want to use iCloud as cloud backup on both Macbooks, BUT i don't want one Mac to download content of another.   For instance, in work's Mac i have a folder with almost 100GB, that is useless for me on personal Mac. And still, this folder is being downloaded on my personal Mac, making me loose 100GB for nothing.  On Dropbox i had the Selective sync option, where i could select which folders would be synced. But i could not find something similar on Icloud.  Is this possible in iCloud ?


The Ubuntu Server from one moment to another generate this problem. I see that on some forums and YouTube's videos say that live recovery CD can solve the problem: error while loading shared libraries: libcap.so.2

I've followed this tutorial to install Ubuntu 15.10:    After restarting my computer I got to the grub menu and chose Ubuntu. Shortly after that I got this error:  /run/lvm/lvmetad.socket: connect failed: No such file or directory WARNING: Failed to connect to lvmetad. Falling back to internal scanning.   These messages keep adding up on a black screen every second. After a while,  I get access to the initramfs ash console.  what am I doing wrong?


An array is defined to be "maxmin equal" if it contains at least two different elements and the number of times the maximum value occur is the same as the number of times the minimum value occur. So {11, 4, 9, 11, 8, 5 , 4, 10} is maxmin equal, because the max value 11 and min value 4 both appear two times in the array.  Write a function called isMaxMinEqual that accepts an integer array and returns 1 if the array is maxmin equal; otherwise it returns 0.  Note: Please do not use any string methods. No sorting allowed. No additional data structures including arrays allowed.  If the input array is:  {} | isMaxMinEqual should return 0 (array must have at least two different elements)  {2} | 0 (array must have at least two different elements)  {1, 1, 1, 1, 1, 1} | 0 (array must have at least two different elements)  {2, 4, 6, 8, 11} | 1 (Both max value (11) and min value 2 appear exactly one time)  {-2, -4, -6, -8, -11} | 1 (Both max value (-2) and min value -11 appear exactly one time).  Here is my solution. Is it possible to combine the loops?      int max;     int min;     int maxCount = 0;     int minCount = 0;     if (a.length > 2) {         max = a[0];         min = a[0];     } else {         return 0;     }     for (int num : a) {         if (num > max) {             max = num;         }         if (num < min) {             min = num;         }     }     for (int num : a) {         if (max == num) {             maxCount++;         }         if (min == num) {             minCount++;         }     }     if (maxCount == minCount) {         return 1;     }     return 0;

An array is defined to be maxmin equal if it contains at least two different elements and the number of times the maximum value occur is the same as the number of times the minimum value occur. So {11, 4, 9, 11, 8, 5 , 4, 10} is maxmin equal, because the max value 11 and min value 4 both appear two times in the array.   if the input array is {} , isMaxMinEqual should return false (array must have at least two different elements) status = false; if the input array is {2}, isMaxMinEqual should return false (array must have at least two different elements). if the input array is {1,1,1,1,1,1}, isMaxMinEqual should return false (array must have at least two different elements).  if the input array is {2,4,6,8,11}, isMaxMinEqual should return true (Both max value(11) and min value 2 appear exactly one time). if the input array is {-2,-4,-6,-8,-11}, isMaxMinEqual should return true(Both max value(-2) and min value -11 appear exaclty one time).   I wrote the class MaxMin which satisfied the above condition.  public class MaxMin {  public static void main(String args[]) {     System.out.println("The result is: " + isMaxMinEqual(new int[]{2, 2})); }  public static boolean isMaxMinEqual(int[] a) {     boolean status = false;     int count = 0;     if (a.length < 2) {         status = false;         return status;     }     for (int i = 1; i < a.length; i++) {         if (a[i - 1] != a[i]) {             count++;         }     }      int max = a[0];     int min = a[0];     for (int i = 0; i < a.length; i++) {         if (a[i] > max) {             max = a[i];         } else if (a[i] < min) {             min = a[i];         }     }      int maxCount = 0;     for (int j = 0; j < a.length; j++) {         if (a[j] == max) {             maxCount++;         }     }      int minCount = 0;     for (int j = 0; j < a.length; j++) {         if (a[j] == min) {             minCount++;         }     }     System.out.println(count);     System.out.println("max is: " + max);     System.out.println("min is: " + min);     System.out.println("Max Count is: " + maxCount);     System.out.println("Min Count is: " + minCount);      if (maxCount == minCount && count >= 1) {         status = true;     }      return status; } }


How to make a loop cuts all around the object? I can select just one side and I need them all at the same time.    Here is what I need.

why does the loop-cut-and-slide operation ignore certain faces but happily cut others?the model is symmetrical so it is a bit strange to pick 3 faces that won't get cut. I tried applying it to see if it was just a graphics glitch causing the purple line to not display over everything, but it did end up cutting only what the line was selecting, instead of the whole mesh.    as requested,here's a paste of the blend:


After texture painting a mesh, I reopened blender, and I can see the material fully done in the paint slot, but it only shows as black now when selected. Unsure how to fix this.

I was following a  on how to use the Texture Paint feature on blender so I could paint on a terrain I am modeling. I was successful to paint the whole terrain with beautiful, exuberant vegetation, and crystalline water running through the valley.  So I saved my file, and I went to sleep. But now I've reopened the file and everything seems like I left it yesterday, except that I can see no texture in the terrain... The weird thing is that the textures i used are still there... I don't understand, I barely understand the interface, please help. I'm not even sure if the texture is there or if it was never "saved" or something...     I am now going through the second part of the tutorial for possible answers but I (and hopefully many more) will be grateful for your help.


Can someone please describe how the mass of the fermions is generated by the Higgs relative to electroweak symmetry breaking? Or other way around: Why does a breaking of the electroweak symmetry generate a  fermion mass?  Hence, what's the difference to chiral symmetry breaking which causes, e.g., the pion masses?  I found it on  and there is maybe an another question related to:   That are probably very plain questions aiming at a general understanding/access. I'm trying to separate the involving terms and mechanisms from each other..

Wikipedia  that the spontaneous breaking of chiral symmetry "is responsible for the bulk of the mass (over 99%) of the nucleons".  How do the nucleons gain mass from the spontaneous breaking of chiral symmetry? Why don't leptons gains mass from it? What is the role of the Higgs field in this all?


EDIT: The discussion on this issue has been carried to another question:  PLEASE check it out! I did some manipulations (following the android documentation) but still getting same problem.  So here I'm trying to do a simple task of capturing an image with camera and uploading it to my storage database on Firebase. I have the following button to do the job:  b_capture.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View view) {             Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);             startActivityForResult(intent, CAMERA_REQUEST_CODE);         }     });   and the following code for the upload:   @Override protected void onActivityResult(int requestCode, int resultCode, Intent data) {     super.onActivityResult(requestCode, resultCode, data);      if(requestCode == CAMERA_REQUEST_CODE && resultCode == RESULT_OK){         progressDialog.setMessage("Uploading...");         progressDialog.show();         Uri uri = data.getData();         StorageReference filepath = storage.child("Photos").child(uri.getLastPathSegment());         filepath.putFile(uri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {             @Override             public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {                 Toast.makeText(MainActivity.this, "Upload Successful!", Toast.LENGTH_SHORT).show();                 progressDialog.dismiss();             }         }).addOnFailureListener(new OnFailureListener() {             @Override             public void onFailure(@NonNull Exception e) {                 Toast.makeText(MainActivity.this, "Upload Failed!", Toast.LENGTH_SHORT).show();             }         });       }     }   in the app I'm able to take picture, but after I confirm the picture taken the APP CRASHES and I get the following error:  Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String android.net.Uri.getLastPathSegment()' on a null object reference   So, I understand that the "Uri" does not have anything in it, but I'm confused about what can be done. Need help.  And yes, I've checked all permissions, Firebase connections, Gradle sync etc.

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


spinner error when dialog show . my position dialog in adapter   java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.Object android.widget.Spinner.getSelectedItem()' on a null object reference  private void stopDialog(final MyViewHolder holder, int position){      android.app.AlertDialog.Builder dialog = new android.app.AlertDialog.Builder(context);     LayoutInflater inflater = (LayoutInflater) context.getSystemService( Context.LAYOUT_INFLATER_SERVICE );     View dialogView = inflater.inflate(R.layout.dialog_stop, null);     dialog.setView(dialogView);     dialog.setCancelable(false);      final Button dialog_button_positive = (Button) dialogView.findViewById(R.id.dialog_button_positive);     final Button dialog_button_negative = (Button) dialogView.findViewById(R.id.dialog_button_negative);     final Spinner statusstop1 = (Spinner) dialogView.findViewById(R.id.statusstop);     final String valuestatustop = statusstop1.getSelectedItem().toString();         final android.app.AlertDialog alertDialog = dialog.create();     alertDialog.show();      dialog_button_negative.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {               holder.switch_start.setChecked(true);             alertDialog.dismiss();          }     });      dialog_button_positive.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {               Toast.makeText(context,                     valuestatustop,                     Toast.LENGTH_SHORT).show();              alertDialog.dismiss();          }     });     }


I searched for that, and all I could find was how to position the sidebar to the bottom and not to bottom-middle (i.e. like MacOS (bottom+centered)). How do I do that?

I want to get rid of the normal Ubuntu task bar and have a dock displayed at the bottom of my screen. I tried using Cairio Dock but I dont really like it and still could not get rid of the default dock besides putting it on autohide


I've dived into javascript & jquery for the first time and I'm having a little difficulty wrapping my head around a problem.  fieldedit.php
      <form id="edit_field_form"  class="form-horizontal" action="field.php" method="post">
             <input type="text" maxlength="10" class="form-control" name="field_name" id="edit_field" value="" validFieldName/>
     </form>

     <button type="button" class="btn btn-default" onclick="closeEdit()">Close</button>     <button type="button" class="btn btn-primary" id="editsubmit" onclick="submitEdit()">Edit</button>
   editvalidator.js  function submitEdit()  {         var formValidator = $('#edit_field_form').validate();     var success = false;      try      {         formValidator.addMethod("validFieldName", function (value, element)          {             return false;         }, jQuery.validator.format("INVALID."));          success = formValidator.form();     }     catch(err)      {         alert("Error\n\n" + err);     } }   The formValidator.addMethod throws the error "TypeError: Undefined is not a function".  I'm using jquery-1.9.1.min.js and jquery.validate.min.  Any help would be greatly appreciated.

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


$G$ is an infinite group. $H$ is a subgroup of $G$ of finite index and $K$ is a subgroup of $H$ of finite index. Prove that $K$ is a subgroup of $G$ of finite index and $[G:K]=[G:H][H:K]$.  This is a problem from my Algebra book on the topic Cosets. When $G$ is finite this is very easy, but when $G$ is infinite how to show that.

I came across with the following two theorems:  First theorem:     Let $G$ be a finite group so $K\leq H\leq G$. Then $|G\,:\,K|=|H\,:\,K|\cdot|G\,:\,H|$.   Second theorem:     Let $G$ be a group so $K\leq H\leq G$ when both $H$ and $K$ have finite index. Then $|G\,:\,K|=|H\,:\,K|\cdot|G\,:\,H|$.   How the second theorem is different then the first one? If $G$ is finite then $H,K$ are finite and they have finite indexes. Is the second theorem is "sub-theorem" of the first one?  I proved the first one with Lagrange:  $$ \begin{cases} |G|=|H|\cdot|G\,:\,H|\\ |H|=|K|\cdot|H\,:\,K|\\ |G|=|K|\cdot|G\,:\,K| \end{cases}\Rightarrow|G\,:\,K|=|H\,:\,K|\cdot|G\,:\,H| $$  But as I understand I can't use the Lagrange on the second one. So how to prove the second one?  .


We all know that , but I am wondering whether there can be causation without correlation. If there are such cases, could you explain them?  I am asking this question in order to validate my statement that "Correlation is required but not sufficient condition of causation.", but I'd like a broader context, not just yes or no.

Correlation does not imply causation, as there could be many explanations for the correlation. But does causation imply correlation? Intuitively, I would think that the presence of causation means there is necessarily some correlation. But my intuition has not always served me well in statistics. Does causation imply correlation?


How to pick exactly* half of the item of a list with equity**?  (*)Half is n/2, the int part of this is enought.   The number of item in the list is more than 10^9. So n/2-1 is not close enought to n to be a noticable approximation.   (**)The principe of equity and fairness mean that every items of the list have the same probality of beeing pick.   I had a Equity Picker like this:   myList.Where(i => rand.NextDouble() >= 0.5);   but with this I can have more/less than half, with a slight chance of all /none of them.  Disclaimer: this is not an home work more a reflexion and modelisation around Thanos Random Picker. The ability to pick half of every population with equity.

I need a quick algorithm to select 5 random elements from a generic list. For example, I'd like to get 5 random elements from a List<string>.


If you compile and execute an application with the following code in its main() method: In this program why the " s" create the two objects.     String s = new String( "Computer" );     if( s == "Computer" )    System.out.println( "Equal A" );    if( s.equals( "Computer" ) )    System.out.println( "Equal B" );

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


I am having null pointer exception. Could you please assist me? I am having problems with objects in the Array list. I don't know where is the issue.  Main Class public class JavaApplication3 {  public static void main(String[] args) {        ArrayList<user> object=new ArrayList<user>();     user[] obj=new user[3];      obj[0].setName("S");      obj[0].setNumber(5);        obj[1].setName("7");      obj[1].setNumber(6);      object.add(obj[0]);         object.add(obj[1]);     System.out.println(object.get(0).getName());     System.out.println(object.get(1).getName());       }  }  And this is my user class: public class user {  private int no;  private String name;     public int getNo() {      return this.no;  }   public void setNumber(int no) {      this.no = no;  }    public String getName(){   return this.name;  }   public void setName(String S){       this.name=name;   }  }   AND THIS IS MY ERROR: Picked up _JAVA_OPTIONS: -Djava.net.preferIPv4Stack=true Exception in thread "main" java.lang.NullPointerException     at javaapplication3.JavaApplication3.main(JavaApplication3.java:26) C:\Users\User\AppData\Local\NetBeans\Cache\12.3\executor-snippets\run.xml:111: The following error occurred while executing this line: C:\Users\User\AppData\Local\NetBeans\Cache\12.3\executor-snippets\run.xml:68: Java returned: 1 BUILD FAILED (total time: 0 seconds)


Why does $x^0=1$? Also, why does this rule not apply when $x=0$? I understand that math can be difficult to explain, but this subject never seems to be thoroughly explained in simple terms.

Why is any number (other than zero) to the power of zero equal to one? Please include in your answer an explanation of why $0^0$ should be undefined.


Prove that for any square real matrix, the equality $\det (E + h A) = 1 + h \operatorname{tr} A + O(h^2)$ is true for $h \to 0$. What is the geometric meaning (in terms of oriented volumes) of this formula? What will change if we take a complex matrix instead of a real one?

I'm taking a linear algebra course and the professor included the problem that prove $$ \rm{det}(I+\epsilon A) = 1 + \epsilon\,\rm{tr}\,A + o(\epsilon) $$ Since the professor hasn't covered the concept of eigenvalue, we are not recommended to mention eigenvalue in the solution. How to prove the equation by only using Laplace theorem?


Prove that for any sequence $\{x_n\}$ of positive real numbers   $$\lim\text{sup}\sqrt[n]{x_n}\leq \lim\text{sup}\frac{x_{n+1}}{x_n}.$$   My attempt:  Let $A = \lim\text{sup}\frac{x_{n+1}}{x_n}$. Suppose $A<\infty$ and choose $\epsilon >0$, then $\exists$ an integer $N$ so that $N\le n \implies \frac{x_{n+1}}{x_n}\le \epsilon$. But I do not know how to proceed in finishing the proof?

This may have been asked before, however I was unable to find any duplicate. This comes from  of "Mathematical Analysis: An Introduction" by Browder. Problem 14:     If $(a_n)$ is a sequence in $\mathbb R$ and $a_n > 0$ for every $n$. Then show:   $$ \liminf(a_{n+1}/a_n) \le \liminf((a_n)^{(1/n)}) \le \limsup((a_n)^{(1/n)}) \le \limsup(a_{n+1}/a_n)$$   The middle inequality is clear. However I am having a hard time showing the ones on the left and right. (It seems like the approach should be similar for each). This is homework, so it'd be great if someone could give me a hint to get started on at least one of the inequalities.  Thanks.


I'm trying to access setImageVisible() which is in MenuController in BackGroundController.  Here is MenuController   package Final;  import java.io.IOException; import javafx.fxml.FXML; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.scene.image.ImageView;  public class MenuController {      @FXML     private ImageView BackGround;          //load fxml to Stage     @FXML     public void onStartPressed() throws IOException{         Parent     PikaVolley=FXMLLoader.load(getClass().getResource("PikaVolley.fxml"));         Scene PikaVolleyScene=new Scene(PikaVolley);         PikaVolleyScene.getRoot().requestFocus();          Main.currentStage.setScene(PikaVolleyScene); //use setScene() to switch the scene      }          //load fxml to Stage     @FXML     public void onSetBackgroundPressed() throws IOException {         Parent Background=FXMLLoader.load(getClass().getResource("BackGround.fxml"));         Scene BackGroundScene=new Scene(Background);         Main.currentStage.setScene(BackGroundScene); //use setScene() to switch the scene     }           //this method is trying to set BackGround invisible     public void setImageVisible() {         this.BackGround.setVisible(false);      }  }   Here is BackGroundController. BG1 is a checkBox with BG1_selected method written in fxml.  package Final;  import javafx.fxml.FXML; import javafx.scene.image.Image;  public class BackGroundController {     private MenuController menuController;      @FXML     public void BG1_selected() {         menuController.setImageVisible();     }  }   My problem is when I select BG1, I get this Error. How can I deal with it?    Sorry, I forgot to put the Main class. Here it is.    package Final;  import javafx.application.Application; import javafx.fxml.FXMLLoader; import javafx.scene.Parent; import javafx.scene.Scene; import javafx.stage.Stage;   public class Main extends Application {    public static Stage currentStage;  public static Scene MenuScene;         @Override  public void start(Stage primaryStage) throws Exception {   currentStage=primaryStage;   Parent root=FXMLLoader.load(getClass().getResource("Menu.fxml"));   MenuScene = new Scene(root);      currentStage.setTitle("PikaVolley");   currentStage.setScene(MenuScene); //use setScene() to switch the scene   currentStage.show();        }     public static void main(String[] args) {       launch(args);      } }

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


I have just moved into an apartment complex and it has terrible wifi speed.  If I'm using a wired connection it is pretty solid (2 ping with high 180's Mbps up/down) but the wireless is awful, I can barely even scroll through twitter without interruption.  Is there anything I can do to make my wireless faster?

My internet speed as measured on speedtest.net is 10 Mbps from my desktop computer, which is connected via ethernet to the router. When I measure my speed from my laptop (Surface Pro) when on the WiFi network using the same router, however, the measured speed is 3 Mbps. In addition, when I'm transferring files over the wireless network, Windows 8 File Explorer reports the transfer rate to be 3 Mbps as well. When I test the network using my phone (Samsung Focus WP7), I get a speed of 7 Mbps.  Device Manager reports that the drivers for the card on the Surface Pro (Marvell AVASTAR 350N) are up-to-date. How can I get my Surface Pro speed to match the speed of my internet connection?  Here are my Wireless Router settings:    Here are my Security settings on the router:


Sometimes when I search for something, there are plenty of links to sites with no content (those who only have the premade templates which the search terms), spammers, and leechers (as in copying content from other sites, like B r o t h e r s o f t who leeches on SoftPedia.com).  How come they have such a high ranking without any original content (furthermore, why are they not simply banned from the results)?  And also, is there some way of filtering them out? Like for example completely exclude a domain from search results?

I regularly find sites that copy content from elsewhere (mailing lists, etc) while not providing any added value. Quite to the contrary, they are pretty heaped with ads.  I'd like to remove those sites as permanently as possible from my Google search results. Any ideas?


So When I do a Boolean Modifier on the Sphere, and select a torus surrounding that sphere, I expect it to do what it first did in the middle, but it just cuts a hold straight through it.

I'm trying to model an , but it's not going so well when it comes to the magazine of the weapon.   Next to the magazine is a mesh. I want to cut holes in the mag with that mesh. But the magazine just goes invisible or connects with the mesh when trying to execute the Boolean Modifier. I have tested to invert the normals and some other stuff, but it isn't working.


Suppose that $A$, $B$, and $C$ are three points in a plane, such that $AB = AC = BC = 1$. At each point in time, $A$ is moving toward $B$, $B$ is moving toward $C$, and $C$ is moving towards $A$, all with speed $v = 50$.  At what time $T$ will all the points reach the center of the triangle?

For an equilateral triangle ABC of side $a$  vertex A is always moving in the direction of vertex B, which is always moving the direction of vertex C, which is always moving in the direction of vertex A. The modulus of their "velocity" is a constant. When and where do they converge.   Attempt. Found the "when" using a physics style approach by "fixing the frame" on one of the vertices. (From this frame, other two vertex are moving towards origin in a straight line and components of their speed along this line can be used to find when the three meet at origin) For the "where" it is difficult using above approach as this is some kind of rotating and shrinking triangle which is difficult to translate.     @all Apologies for bumping this question. I wished to give an answer the bounty but it wont let me until the next 23 hours. For the record: I am not seeking new answers.  Update: A cool example of  package of $\LaTeX$, for anyone who finds this question later.      to code (a .tex file)  And using Pgf/TikZ


I want to add binding right to content of a control.   <Hyperlink NavigateUri="{Binding Link}" RequestNavigate="Hyperlink_RequestNavigate">                     ???? {Binding Title} ???   </Hyperlink>   But how can I do that? I tried this:   <Hyperlink NavigateUri="{Binding Link}" RequestNavigate="Hyperlink_RequestNavigate" Content="{Binding Title}" />   but it gave me an error because there was no property Content

In WPF, I want to create a hyperlink that navigates to the details of an object, and I want the text of the hyperlink to be the name of the object. Right now, I have this:  <TextBlock><Hyperlink Command="local:MyCommands.ViewDetails" CommandParameter="{Binding}">Object Name</Hyperlink></TextBlock>   But I want "Object Name" to be bound to the actual name of the object. I would like to do something like this:  <TextBlock><Hyperlink Command="local:MyCommands.ViewDetails" CommandParameter="{Binding}" Text="{Binding Path=Name}"/></TextBlock>   However, the Hyperlink class does not have a text or content property that is suitable for data binding (that is, a dependency property).  Any ideas?


If "renovate" is to make new again (re-nova)...why is it not pronounced ree-nove-ate?

It’s hard for me to guess how to pronounce words beginning with re- correctly.   Sometimes it is /rɛ/ as in reference, but sometimes it is /ri/ as in report.  Is there any rule about this?


Is there any part in the 7th book where it is detailed of who personally killed Ariana Dumbledore from the trio's duel?     “And there was an argument . . . and I pulled out my wand, and he   pulled out his, and I had the Cruciatus Curse used on me by my   brother’s best friend — and Albus was trying to stop him, and then      all three of us were dueling, and the flashing lights and the bangs   set her off, she couldn’t stand it —” The color was draining from   Aberforth’s face as though he had suffered a mortal wound. “— and I   think she wanted to help, but she didn’t really know what she was   doing, and I don’t know which of us did it, it could have been any of   us — and she was dead.”   Harry Potter and the Deathly Hallows Chapter 28 Missing Mirror   I don't quite remember if it was mentioned in the books.

I have seen few narrations and some fan made videos on the battle between Dumbledore and Grindelwald. There was some magic that killed Ariana when both Dumbledore and Grindelwald were duelling. What may have killed her? Does the magic bounce off?


I am removing the btn class after I hit it for the first time and adding new class to it. When I hit second time with btn1 class it's not adding any class.  <script type="text/javascript"> $('.btn').click(function(){     $('.fC').addClass('fCr');     $('.sC').addClass('sCr');     $('.btn').addClass('btn1').removeClass('btn'); }); $('.btn1').click(function(){     $('.tC').addClass('tCr');     $('.sC').addClass('fCr'); }); </script>

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


I'm creating a game like bubble shooter, I have a cannon which is in the image bellow:   I want to rotate the cannon based on mouse position.  So far I tried various solutions I found over the web but non of them are working, I know that I only need to rotate the cannon on the Z axis because this is a 2D game, so I don't touch X and Y axis.  Does anybody know how can I rotate the cannon based on mouse position?   Or at least provide me a sample script on where to start.  Thank You.

I want a game object to turn and look towards where the mouse was clicked (in world space).  It works well when considering all 3 dimensions, but I really only care for the plane formed by the x and z axis, not the y.  I've tried to fix this by setting the y of the directionTarget to the y of the object's position, but that gives weird results.  My code looks like this:  Quaternion rotationTarget;     float rotationLerpProgress;     float rotationLerpDuration = 1f;      // Use this for initialization     void Start ()     {      }      // Update is called once per frame     void Update ()     {             if (Input.GetMouseButtonDown (0)) {                     var ray = Camera.main.ScreenPointToRay (Input.mousePosition);                     RaycastHit rayHit;                      if (Physics.Raycast (ray, out rayHit)) {                             var rayHitPoint = rayHit.point;                              var rotationDirection = transform.position - rayHitPoint;                                                            rotationDirection.Normalize ();                             //rotationDirection.y = transform.position.y;                             rotationTarget = Quaternion.LookRotation (rotationDirection);                             rotationLerpProgress = Time.deltaTime;                     }                     //targetPosition = Camera.main.ScreenToWorldPoint (Input.mousePosition);                                     }              if (rotationTarget != transform.rotation) {                      transform.rotation = Quaternion.Lerp (transform.rotation, rotationTarget, rotationLerpProgress / rotationLerpDuration);                     rotationLerpProgress += Time.deltaTime;                       if (rotationLerpProgress >= rotationLerpDuration) {                              transform.rotation = rotationTarget;                     }              }      }   I must be missing something. How do I do this right?


I have this error when I ran this test. For the previous test file, it ran perfectly.  @DataProvider(name = "login") public Object[][] loginData() throws BiffException, IOException {     Object[][] arrayObject = testDataXls.getExcelData(             System.getProperty("user.dir") + "\\src\\test\\resources\\testdata\\Input_TestData.xls",             this.getClass().getSimpleName());     return arrayObject; }   Here the getExcelData I used  public String[][] getExcelData(String fileName, String sheetName)         throws BiffException, IOException {     String[][] arrayExcelData = null;      FileInputStream fs = new FileInputStream(fileName);     Workbook wb = Workbook.getWorkbook(fs);     Sheet sh = wb.getSheet(sheetName);      int totalNoOfCols = sh.getColumns();     int totalNoOfRows = sh.getRows();      arrayExcelData = new String[totalNoOfRows - 1][totalNoOfCols];      for (int i = 1; i < totalNoOfRows; i++) {          for (int j = 0; j < totalNoOfCols; j++) {             arrayExcelData[i - 1][j] = sh.getCell(j, i).getContents();         }      }     return arrayExcelData; }   I don't know why it didn't perform as the previous test file. And the error is highlighting on the Object[][] arrayObject = testDataXls.getExcelData(

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


What I am wishing for is something like the capitalization of word in block in section headings.    How may I have it in normal text mode?  e.g.     I want to further capitalize the B in BLOCK.

I want to know how can I achieve this effect in LaTeX:    Basically it looks like this: {F}IRST {L}ETTER, where the letters in the braces are a little bigger than the other ones but they all the letters are uppercase.  Any suggestions?


In , why is ElementByElement highlighted as a method, but ElementByElement2 isn't?  EDIT: To submit a new issue to Prettify, I'd like to know what version Stack Overflow uses. 21-May-2009? Some other?

I noticed that sometimes my code gets highlighted in different colors when rendered.   What is syntax highlighting? How does it work? Why isn't my code being highlighted correctly? How do I report a bug or request a new language? How do I use syntax highlighting? What languages are currently available on Stack Exchange?


I want to copy a file from drive A to drive B, preserving the file's path.  For instance  /A/x/y/z/file.txt to /B/x/y/z/file.txt   However, you cannot cp a file to a directory that doesn't already exist.  I searched and saw some results for moving whole directories using paths, but in my use case I need to be able to do this by specific individual files.    In my example above assume /B contains no directories currently, and so I would need to create x/y/z before the cp command would be successful.  The string that I have to work with is the full current file path, /A/x/y/z/file.txt

I have a folder structure with a bunch of *.csv files scattered across the folders. Now I want to copy all *.csv files to another destination keeping the folder structure.  It works by doing:  cp --parents *.csv /target cp --parents */*.csv" /target cp --parents */*/*.csv /target cp --parents */*/*/*.csv /target ...   and so on, but I would like to do it using one command.


The official Canon battery for my camera (LP-E17) costs around $55 while third party batteries sell for about $20. Are Canon's official batteries really worth the price or would I be okay getting an aftermarket product?

I've got a 7D with the LP-E6 battery that came with it, but would like to get some spares (along with a battery grip)  With my previous camera (450D) I used generic batteries (and generic grip) and had no issues with charge/usage, but apparently the LP-E6 batteries have a proprietary Canon chip in them, which means that there may be problems charging or using (in terms of battery metering) in a 5D or 7D body.  What are the specific problems? And are there any 3rd party batteries that have the Canon chip or a reverse-engineered chip to avoid these problems?


As the title says, I would like to know if that equality is true if we consider $\mathbb{R^4}$.  I would write down my attempt, but I have no idea how to prove it, or how to choose a counterexample.   $(U^{\perp}\cap V^{\perp})$ are the vectors which are orthogonal to both $U$ and $V$, while $(U+V)^{\perp}$ are the vectors which are orthogonal to the linearly independent vectors of $U$ and $V$

Given $V$ a inner product space and $W_1$, $W_2$ subspaces of $V$  Show $(W_1 + W_2 )^\perp = W_1^\perp \cap W_2^\perp$ and $W_1^\perp + W_2^\perp ⊆ (W_1 \cap W_2 )^\perp$.


Can i upgrade my gingerbread android (v 2.3.6) to icecream sandwish android (v 4.0)

Android 4.0 (Ice Cream Sandwich) was  on October 19, 2011.  (You can review  or the  at the official Android Developer's site.)  Of course, not all devices will get this update right away and others won't get it at all. Each manufacturer and carrier often choose to add their custom modifications which tend to delay the official release.  When will each device get Android 4.0, either officially or unofficially, if ever?  See also:


There are some applications such as notepad and cmd which can be launched by typing their name in run dialogue box, can I just create entrys like that for all applications?

There's suppose any application installed in c:\program files\program.exe  How do I run this program by simply going to Start --> Run --> program.exe  I tried setting environment variable but that didn't help  I know programs like notepad and cmd run from Start --> Run cause they are there in the system32 folder. But how do I run an app which is not there?   EDIT:  This is what I did on windows xp:  Right click My Computer --> Properties --> advanced -->environment variables-->user variables for administrator-->new-->"variable name"&"variable value"`. In variable value I put the path and in variable name I put an alias for the program Is what I did correct?


I've read through the posts  and tried many things suggested in the posts: I looked into my Task Manager and couldn't find any suspicious processes running; I did a full system scan with Windows Defender; I even wiped clean my hard drive and re-installed my Windows 8 OS and applications/programs.   But I just can't get rid of this:    It never appears on "major" websites like www.microsoft.com or www.usnews.com; it most often pops up on forums, like www.cplusplus.com/forum/ or www.linuxforums.org/forum/; it advertises anything (usually obscure) from car rental business to insurance.  When it pops up, I immediately look into Task Manager, but I can't find any new/suspicious processes running; I tried to "inspect element" on Chrome but I don't know where I should look...  I'm suspecting if some existing program is causing this, because I have the exact same programs on my PC before and after I re-installed my OS. But all my programs are developing tools like Eclipse, GitHub, Visual Studio, etc (except for Foxit reader; but again, I'm not running it when I see the pop-up)  I get this pop-up almost daily--Need help!

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


I am wondering how to find the following value of $x$ $$x=\prod_{n=1}^{9}\sin\left(\frac{n\pi}{10}\right)$$ I notice that it has something to do with the de moivre's theorem as the angles are root angles of $1^\frac{1}{10}$ To my surprise, the value of the above product seems to be a rational number. The solution is given as $$x=\frac{10}{2^9}$$ I attempted to solve this product in different ways but none seems to give out such an elegant solution. Thank you for any help!

Using $\text{n}^{\text{th}}$ root of unity  $$\large\left(e^{\frac{2ki\pi}{n}}\right)^{n} = 1$$  Prove that   $$\prod_{k=1}^{n-1}\sin\frac{k \pi}{n} = \frac{n}{2^{n-1}}$$


Let X∼N(6,1) and Y∼N(7,1) be two independent normal variables. Find Pr(X>Y). the answer is 0.2389 but I do not know how to do it.I have tried adding them and subtracting but i am still clueless.

Let  $X\sim \mathcal{N}(6,1)$ and $Y\sim\mathcal{N}(7,1)$ be two independent normal variables. Find $Pr(X>Y)$. the answer is $0.2389$ but I do not know how to do it.


I receive an error when trying to insert the declared variable Ids into another table. How would I correct this?  ALTER PROCEDURE [dbo].[tbl_Update]      @id int,     @description nvarchar(50),     @price decimal(12,7),     @statusId int, AS BEGIN     -- SET NOCOUNT ON added to prevent extra result sets from     -- interfering with SELECT statements.     SET NOCOUNT ON;      Update tbl     set     description=@description,     price=@price,     statusId=@statusId     where id = @id      --Once submitted values will map to adminEdm      if (@statusId = 1)      --Every subform will be created and their ids will be      Declare @generalId table (id int)     insert into tblGeneral      output inserted.id into @generalId(id)     default values      Declare @categoryId table (id int)     insert into tblCategory     output inserted.id into @categoryId(id)     default values      --ERROR when inserting     Insert into tblParent(generalId, categoryId)     values(Select id from @generalId, Select id from @categoryId)  END   Error message "Incorrect syntax near the keyword 'Select'"

I am trying to INSERT INTO a table using the input from another table. Although this is entirely feasible for many database engines, I always seem to struggle to remember the correct syntax for the SQL engine of the day (, , , , and ).  Is there a silver-bullet syntax coming from an SQL standard (for example, ) that would allow me to insert the values without worrying about the underlying database?


I will be travelling through UK (Manchester) from Africa to Paris.   I will pass through border controls since I have to pick up my luggage and check in again in a different terminal but still at Manchester Airport. It is a landside transit.  My flight to Paris is on the same day (7 hours later). I have a Lebanese passport and a 10-year French residence permit (titre de séjour).  It was issued in April 2010 (to April 2020).  It is plastified, pink/purple in color, and has a bull and 5 stars on it. It does not have a chip.  It is a little bit bigger than the "credit-card sized model" (mine is 10.5 cm by 7.5 cm).  Having a common format EEA residence permit allows me to transit via the UK.   Is the residence permit that I have considered a common format residence permit? Even without a chip and not the credit card size?

Do i need a transit visa for a flight that goes from Belgium to Ecuador and has a stop on London? I have a Belgian Residence Permit valid for a year because I'm a student, I have only the Residence Permit card and the visa in my passport is expired.


Is it possible to say "six feet five" (inches are left out here)?  Or is "six foot five" the only correct variant? Does incluing "inches" affect the grammatical form of "foot"?

Why are year, pound and mile in the singular form in the phrases below?   five-year-old children  20 pound note 10 mile run   Is that because they're acting as adjectives, which are always invariable in English?  Is it incorrect to say...   five-years-old children? 20 pounds note? 10 miles run?


Hello I am very new to HTML and CSS and I am trying to do a site for just learning. I just made a header and I put logo in it but I can't set it's vertical-align. Can someone explain it?  Here is HTML file:  <!DOCTYPE html>          <link href="https://fonts.googleapis.com/css?family=Open+Sans&display=swap" rel="stylesheet">     <link rel="stylesheet" type="text/css" href="style.css">     <title>Scienitive</title>

Scienitive

      Here is CSS file:  .header { width: 100%; height: 80px; display: block; background-color: #FF5733; } .logo-container { height: 100%; display: table; float: left; } .logo-container h1{ color: white; height: 100%; display: table-cell; vertical-align: middle; font-family: "Open Sans"; font-size: 48px;  } .logo { display: table; height: 80px; } .logo img{ width: 48px; height: 48px; vertical-align: middle; display: table-cell; }   Here is how site looks like

I have a div with two images and an h1. All of them need to be vertically aligned within the div, next to each other. One of the images needs to be absolute positioned within the div. What is the CSS needed for this to work on all common browsers?

testing...


Total noob here.  I know that electromagnetic waves do not need a medium to travel. I analogize a photon as a single pulse/oscillation in the electromagnetic field and its propagation is the motion of that pulse through the electromagnetic field. Kind of like the pulse that travels through a string if you jerk it.

Reading about photons I hear different explanations like "elementary particle", "probability cloud", "energy quanta" and so forth. Since probably no one has ever seen a photon (if "seen" it supposedly - and rather conveniently - ceases to exist) but many experiments seem to verify its properties (or are they maybe adjusted to fit the experiment). I thus can't help wondering if the "photon" is then just a physical/mathematical tool with inexplicable properties (like zero mass - but affected by gravity fields - and constant speed c in space) invented to explain some otherwise unexplainable phenomem and to supplement the elementary particles and their interactions. In short: Are they real or imaginary!  Does anybody know? Or maybe the answer is "blowing in the wind" because to most physicist it probably just does'nt matter as long as it works (as the alternative healers say). Sorry if I seem a little sarcastic here and there.


Hello i have this login that i am trying to make and when i get to the command screen if i want to exit out of the program i type "exit", but the problem is i have it in a double while loop and don't know how to break out of both. Here is an example of the code:  a = 0 b = 0 loginatt = 0  while a == 0:     if loginatt == 4:         print "Too many tires!"         break     password = raw_input("Password: ")     if password == "test":         b = 1         while b == 1:             command = raw_input("command: ")             if command == "exit":                 break     else:         loginatt += 1         print "error, login failed!"   this part of the code won't break out of the double while loop:  command = raw_input("command: ")             if command == "exit":                 break

Given the following code (that doesn't work):  while True:     #snip: print out current state     while True:         ok = get_input("Is this ok? (y/n)")         if ok.lower() == "y": break 2 #this doesn't work :(         if ok.lower() == "n": break     #do more processing with menus and stuff   Is there a way to make this work? Or do I have do one check to break out of the input loop, then another, more limited, check in the outside loop to break out all together if the user is satisfied?


I am stuck in a command block teleporting loop, and I am far away from the command block. I don't know the coordinates or anything. Please help :c

I set a command block to /tp. It was supposed to activate only if you had 0 time left, and to activate the command block with a hopper clock to keep giving it power.   But it is not checking if you have 0 time left, so it keeps teleporting me. I can't get close enough to the command block to break it, so I'm stuck in a neverending teleport loop.  Any ideas?


Does some of accretion disk light make focal points above the black hole poles?

Do gravitational lenses have a focus point? Could I burn space ants?


For the following bibtex entry  @Article{REF56, author = {E Shamonina and L Solymar}, title = {{Magneto-inductive waves supported by metamaterial elements: components for a one-dimensional waveguide}}, journal = {JOURNAL OF PHYSICS D: APPLIED PHYSICS}, year = {2004}, OPTkey = {•}, volume = {37}, number = {3}, pages = {362–367}, OPTmonth = {•}, OPTnote = {•}, OPTannote = {•} }   the output in the generated PDF file is as follows:  Shamonina, E. & Solymar, L. (2004), ‘Magneto-inductive waves supported by metamaterial elements: components for a one-dimensional waveguide’, JOURNAL OF PHYSICS D: APPLIED PHYSICS 37(3), 362âAS367.   It is evident that the page numbers are garbled. Any idea why? I have other similar entries and none of the page numbers are garbled, as in the case of this one. For a MWE, I am using the following:  \documentclass[11pt]{report}  % all packages as necessary  \begin{document}  ......  \end{document}   P.S The style file I am using is utthesis.sty which can be found at the following link:

Here is my bibliography in latex. The types is "Inprooceedings".  I use WinEdt.    @INPROCEEDINGS{tem_1,   Author         = {Comelli, P, Ferragina, P, Granieri, M.N, and Stabile, F},   Title          = {Optical recognition of motor vehicle license plates},   Year           = {1995},   Volume         = {44},   Series         = {4),   Month          = {November},   Pages          = {790–799},   Publisher      = {Vehicular Technology, IEEE Transactions}    }   But i get this error.   How to solve it?