As I understand it, variance of a random variable is defined as follows:  \begin{equation} \text{Var}(X) = \text{E}[(X-\mu)^2] \end{equation}  $X-\mu$ is obviously the difference between the value of the random variable and the expected value of the random variable.   Why don't we define variance as  \begin{equation} \text{Var}(X) = \text{E}[X-\mu] \end{equation}   To me, this would make more sense because it would express the difference between the expected value and the value it takes...which to me sounds like variation.   Why do we use the $(X-\mu)^2$ instead?

Let's take the numbers 0-10.  Their mean is 5, and the individual deviations from 5 are -5, -4, -3, -2, -1, 0, 1, 2, 3, 4, 5 And so the average (magnitude of) deviation from the mean is $30/11 \approx 2.72$.  However, this is not the standard deviation.  The standard deviation is $\sqrt{10} \approx 3.16$.  The first mean-deviation is a simpler and by far more intuitive definition of the "standard-deviation", so I'm sure it's the first definition statisticians worked with.  However, for some reason they decided to adopt the second definition instead.  What is the reasoning behind that decision?


class Process          {           int PID;         }          Process[] processes = new Process[n];          for(int i=0;i<n;i++)         {             System.out.println("Enter PID for process " + (i+1) );             >>>processes[i].PID = Integer.parseInt(br.readLine());         }   I got the exception in ">>>" What am i doing wrong?

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 copied node.tpl.php and I pasted it to node--my_content_type.tpl.php. In that file I'd like to get the name of user who created a node. That name has to be a string.  Could someone help me, please?

I created file node--my_content_type.tpl.php, where I'd like to print the username as string. I tried the following code, but unfortunately it doesn't work. How can I do it?  <?php    print $name; ?>


The question “” assumes the factors are known. This got me wondering if it is possible to calculate the value of $d$ when being given only the values of $c$, $n$ and $e$… and factors remain secret.   If it’s possible, is there an easy way to do so? If it’s hard/complex, what exactly makes it hard/complex? And in case it’s generally impossible to calculate $d$ using only those values, why?   This may be an amateurish question, but I couldn’t find the answer at Crypto.SE – so, I’m asking.

When given $p = 5, q = 11, N = 55$ and $e = 17$, I'm trying to compute the RSA private key $d$.  I can calculate $\varphi(N) = 40$, but my lecturer then says to use the extended Euclidean algorithm to compute $d$. That's where I get stuck.    Here's my work so far:  First I use the Euclid algorithm to calculate:  40 = 2(17) + 6  17 = 2(6) + 5 6 = 1(5) + 1 = gcd   So I know the GCD is 1. Applying the 'extended' section of the algorithm:  6 = 40-2(17) 5 = 17-2(6) 1 = 6-1(5) 1 = 6-1(17-2(6)) 3(6) = 1 (17) 3(40 - 2(17)) - 1(17) 3(40) - 3(17)   I know the answer is $33$, but I have no idea how to get there using the extended Euclidean algorithm. I can't figure out why I'm getting $3(40) - 3(17)$ when I know the answer should contain $33$.


I am considering the one-to-one homomorphism $\phi:G \rightarrow H$. If I take some element $g$ of $G$ and take its order as $n$ then $n$ is the smallest positive integer such that $x^n=e$. Now I consider the homomorphic image $\phi(g)$ of $g$ and take its order to be $m$ then $(\phi(g))^m=e'$ where $e'$ is the identity element of $H$. Since $\phi$ is a homomorphism, it could be written as $(\phi(g^m))=e'=\phi(e)$ as $\phi$ is $1-1$ as well. Thus gives us $g^m=e$. Now this means that order of $g$ i.e. $n$ divides $m$ which is order of its homomorphic image. But in books, it is given the other way round i.e. order of homomorphic image of an element divides the order of element. So where am I going wrong here? Please suggest.

Let $f:G \to H$ be an injective homomorphism. Show that order of $f(a) \in H$ divides the order of G.  Let the order of $|G|=n$. I'm not sure where to go from here. I've seen examples showing it divides an element $g$ but not $G$.


This is one of the functions in my ExpendableListAdapter for the listview for the child of a particular list group. groupPosition == 2 means when user expand the third list group, I want to show a different view from the first and second list group which only contain a textview.  public View getChildView(int groupPosition, final int childPosition,                          boolean isLastChild, View convertView, ViewGroup parent) {      if (groupPosition == 2)     {         JSONObject jsonObject = (JSONObject) getItem(childPosition);         Log.d("TestJson rating2", jsonObject.toString()); //line 62 <<<<<<          if (convertView == null) {             LayoutInflater infalInflater = (LayoutInflater) this._context                     .getSystemService(Context.LAYOUT_INFLATER_SERVICE);             convertView = infalInflater.inflate(R.layout.row_detail_review, null);         }          TextView username = (TextView) convertView.findViewById(R.id.username);         RatingBar ratingBar = (RatingBar) convertView.findViewById(R.id.userRating);         TextView review = (TextView) convertView.findViewById(R.id.review);          String username2 = "";         String ratingBar2 = "0";         String review2 = "";          if (jsonObject.has("username"))             username2 = (jsonObject.optString("username"));          if (jsonObject.has("rate"))             ratingBar2 = (jsonObject.optString("rate"));          if (jsonObject.has("comment"))             review2 = (jsonObject.optString("comment"));            username.setText(username2);         ratingBar.setRating(Float.parseFloat(ratingBar2));         review.setText(review2);          return convertView;     }      else     {         final String childText = (String) getChild(groupPosition, childPosition);          if (convertView == null) {             LayoutInflater infalInflater = (LayoutInflater) this._context                     .getSystemService(Context.LAYOUT_INFLATER_SERVICE);             convertView = infalInflater.inflate(R.layout.row_detail_item, null);         }          TextView txtListChild = (TextView) convertView.findViewById(R.id.lblListItem);          txtListChild.setText(childText);         return convertView;     } }   I check the log which shows that there are values in the jsonObject but after that it shows the following NullPointerException error.  04-20 11:14:19.790 1759-1759/com.domain.appname D/TestJson rating2: {"username":"luqman","rate":"5","ratingId":"1","comment":"best","userId":"15"} 04-20 11:14:19.794 1759-1759/com.domain.appname D/TestJson rating2: {"username":"sumak","rate":"4","ratingId":"2","comment":"sedap","userId":"14"} 04-20 11:14:19.798 1759-1759/com.domain.appname D/AndroidRuntime: Shutting down VM 04-20 11:14:19.798 1759-1759/com.domain.appname W/dalvikvm: threadid=1: thread exiting with uncaught exception (group=0xa4cfbb20) 04-20 11:14:19.798 1759-1759/com.domain.appname E/AndroidRuntime: FATAL EXCEPTION: main Process: com.domain.appname, PID: 1759  java.lang.NullPointerException  at com.mycompany.loginregister.ExpandableListAdapter.getChildView(ExpandableListAdapter.java:62)   What cause the error?


Let $G$ be a finite abelian group and $n:=\max\{\text{ord}(g)|g\in G\}$. Now I have to proof that ord$(h)|n$ for all $h\in G$.  My idea was:  Let $g\in G$ with ord$(g)=m<n$. Then because of the euclidean divsion in $\mathbb{Z}$ one can write $n=km+r$ for $k,r\in\mathbb{Z}$ and $r<m$. So what I have to show now is $g^n = g^m = e$. From that follows $m|n$ by the definition of ord, right?  So this gives me $$g^n=g^{km+r}=g^{km}g^r=(g^m)^kg^r=e^kg^r=g^r$$  But from here on I dont know where to go next.

Let $a$ be an element of maximum order from a finite Abelian group $G$. Prove that for any element $b$, $|b|$ divides $|a|$ (order of $b$ divides order of $a$).


I'm trying to make a 2D list where all the items are copies of the same list. The following code just prints "0" five times, but I need a unique index for each item. my_list = [] list_of_lists = []  for i in range(0, 5):     my_list.append(i)  for i in range(0, 5):     list_of_lists.append(my_list)  for l in list_of_lists:     print(list_of_lists.index(l))  I get the same results when I append my_list.copy() instead of my_list. Any help is greatly appreciated.

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


The "Creation" spell states:     You pull wisps of Shadow material from the Shadowfell to create a nonliving object of vegetable matter within range - soft goods, rope, wood, or something similar. You can also use this spell to create mineral Objects such as stone, Crystal, or metal. The object created must be no larger than a 5-foot cube, and the object must be of a form and material that you have seen before.   However, nowhere in the description does it add the restriction of nonmagical items.  Almost everything else that creates objects explicitly states that nonmagical items can be created, e.g. Marvelous Pigments:     When you complete the painting, the object or terrain feature depicted becomes a real, nonmagical object.    or Illusory Reality:     you can choose one inanimate, nonmagical object that is part of the illusion and make that object real.    So, due to Creation not specifying this restriction, can I create magical items using it?

Is there an official ruling or rule that determines whether the spell creation can be used to create a magic item?  I'd like to know if any of the developers have posted a ruling about this, or whether there are other rules somewhere in the game that explicitly specify whether it's possible.


Especially on MathOverflow, I ask much more than I answer. On some sites I haven't answered anything at all yet (mainly because of my subject skill level). Yet I feel this is unfair and I'm taking more than I'm giving, and that I'm not worthwhile to site. Am I right in this thinking, or not?

I have used the websites of SO a lot the past few months because I am busy with a large scale web project. I feel I get better answers here on SO than when I just do a Google search, maybe because I can be more specific here with my problem, and the responses are really fast.  Occasionally when I am not working I try to answer some questions, but the question almost always has an answer which is 'as good as' or 'better' than the answer I would supply.  So my question/answer ratio is about 20/1 something, if not more. When I look at my profile page I see a bucket-load of questions and almost nothing I answered myself.  Is this considered bad behaviour? I can see that this looks a little egoistic.  : One devoted to one's own interests and advancement.


I got an error of unexpected " in the code shown below  Tried to sum columns and then update each row in a SUM-Cell as I run the code.  $QQ = "UPDATE T_IMB19 SET SUM1=$SUMA, SUM2=$SUMB, TOTAL=$SUMTOT WHERE Navn=$rows['Navn']"; mysqli_query($con,$QQ);   I have echo on the SUMA, SUMB and SUMTOT and they act nicely, but the update doesn't work.     Error : "Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING)"

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


Interestingly I couldn't find a similar existing question here, so I'll ask. Why is "pronunciation" spelt thus if the root word is "pronounce", with an "o"? In other words, why is it not "pronounciation", as some people are inclined to write (and say)?

Why is the spelling of pronounce and pronunciation different? If one originally did not know the spelling of pronunciation, one would when hearing it verbally deduce its spelling to be pronounciation, which is the incorrect spelling.  Why is the difference in spelling so? Also, are the two words pronounced differently? (I think I am using the American pronunciation for pronunciation (pro-noun-ciation), but according to , it's pronounced as pro-nun-ciation. Is this just for British English or universally?)


I just can't fathom how terrible edits  get through - all three reviewers approved. All he did was bold (instead of block-quote) the error message, and change one barely comprehensible sentence into something equally incomprehensible, leaving lots of other minor problems there ().  Do we need to introduce some kind of penalty for suggesting terrible edits, and to the approvers who blindly let them pass? Obviously the audits aren't keeping people honest.  This is probably a duplicate, but nothing obvious popped up immediately. I saw  but it seems to deal with the opposite case - most of the problems were fixed but not all. It is also talking about the situation where a user is trying to improve an edit and it is approved right out from under them.

A worryingly high number of bad suggested edits get accepted. For example:             (These are just examples of a few common patterns. The  exists too.)  What can we do to educate reviewers to do a better job?  This is an open question, not a feature request, because I don't have a good answer. Some possibilities:   Provide a way to notify the reviewers (“hey, check that proposed tag wikis aren't plagiarised”). Make the workflow for approval as long as the workflow for rejection, so that people don't blindly approve just because it's less work. (I don't know if some reviewers tend to do that.)


Fairly new to Linux.  I have a nixie clock that runs off of a Raspberry Pi.  I would like to send a random sequence of six digits to it every so often to help prolong the life of the Nixie tubes.    There is a CLITool program I found on GitHub that lets me display any six digits using the command CLITool xxxxxx, where x is any digit 0-9. So I tried creating a bash file with the line  shuf -zer -n6 {0..9}|CLITool.  The shuf command produces a random six digit string of numbers, but it does not seem to get piped to the CLITool.  Like I mentioned, fairly new to Linux, so it could be something basic I am missing.

I've a command that outputs data to stdout (command1 -p=aaa -v=bbb -i=4). The output line can have the following value:  rate (10%) - name: value - 10Kbps   I want to grep that output in order to store that 'rate' (I guess pipe will be useful here). And finally, I would like that rate to be a value of a parameter on a second command (let's say command2 -t=${rate})  It looks to be tricky on my side; I would like to know better how to use pipes, grep, sed and so on.  I've tried lots of combinations like that one but I'm getting confused of these:  $ command1 -p=aaa -v=bbb -i=4 | grep "rate" 2>&1 command2 -t="rate was "${rate}


I want to query two unrelated objects, and I can't create a lookup relationship between them. They have the same global picklist sets in both of them and I want to query the records from one of the objects when the picklists have the same values but the objects are unrelated. Can anyone help?

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, navigate to the  tag. This question and answer is owned by the community! If you can improve it and make it more useful, you're welcome to edit it. I have a collection of records, like a List<sObject> or the Trigger.new context variable. I need to query other records that are related to these records either directly or indirectly, and I want to use the related data to make further updates. When I write a query in a loop, like for (Account a : Trigger.new) {     Account parent = [SELECT Name FROM Account WHERE Id = :a.ParentId];     // ... }  I keep hitting Salesforce query limits, and I know this is not best practice. What can I do to avoid this problem and bulkify my code?


Given the vector field $F = (-y,x,0)$, how can I find a vector potential of this field? I know that we have to find a vector field $G$ such that $F = \nabla \times G$, but I am struggling with finding a right solution.

I have to find a vector potential for $F = -y \hat{i} + x \hat{j}$   This is what I have done:  We know that, if $\nabla \cdot F = 0$, we can construct the following:  $$F= \nabla\times G$$   Where $G$ is the vector potential we want to find out.  We know what F is, so it is just about doing the following:  $$\frac{\partial G_3}{\partial y} - \frac{\partial G_2}{\partial z} = -y$$  $$\frac{\partial G_1}{\partial z} - \frac{\partial G_3}{\partial x} = x$$  Noting that the partial derivatives with respect to $z$ are zero in this case, we get:  $$G = \frac{-x^2-y^2}{2}+C$$  Where $C$ is just the gradient of any scalar.  I am given a whole list of possible vector potentials:    Now I could use the most brute method: Trial and error with each possible vector potential given, using the equation:  $$G_n = \frac{-x^2-y^2}{2}+C$$  Solving for $C$ and seeing whether it holds.  This is pretty tedious; is there any brightest method?  Thanks.  EDIT  $$\frac{\partial G_2}{\partial z} = y$$  $$\frac{\partial G_1}{\partial z} = x$$  $$\frac{\partial G_2}{\partial x} - \frac{\partial G_1}{\partial y} = 0$$  I get:  $$G = <xz,yz,0>$$  Which indeed satisfies:  $$F= \nabla\times G$$   But this option is not in the list...  Now let's set $G_2 = 0$:  $$\frac{\partial G_3}{\partial y} = -y$$  $$\frac{\partial G_1}{\partial z} - \frac{\partial G_3}{\partial x} = x$$  $$\frac{\partial G_1}{\partial y} = 0$$  I get:  $$G = <0,0,\frac{-x^2 - y^2}{2}>$$  Which indeed satisfies:  $$F= \nabla\times G$$


I recent got 60d and EF-S 18-55mm Lens and i want to buy 1 more lens specially for product and fashion(portrait) photography...  I decided EF50mm f/1.4 USM and EF85mm f/1.8 USM? Which one would be best for my requirement or would i need both of them? Please suggest. I will even need another lens for macro shoots later.  thanks

Say you are using a crop body, and you have both 50mm/1.4 USM and 85mm/1.8 USM lens in your bag. Now, you want to take a portrait where there is adequate light and space, and you have decided to take the shot at f/2.2.   Now I want to know which lens will be good to use to take such a shot, and why.


I would like to have that Materials in unity as well, but they are grayed out in there, what should I do?

I have been experiencing an issue that once I have a material created and looking the way I want it, I cannot seem to export it correctly with the textures mixed.  I don't know the correct words to use, but in blender I have the material created using the nodes editor, and I have placed two textures inside of there (one for the rock texture and one for moss, my object is a rock). When I export this model and import to Unity (the game engine I am using), I find a materials folder but the material inside of it does not have the textures assigned, it's just a plain white material?  How can I export my material from blender in a way that it will allow me to import it WITH TEXTURES into Unity?


See .  I didn't like the fact that the suggested edit removed the "useless code and comments", and was going to reject the edit.  But it got approved.  So I was going to yell at whomever approved it and then roll it back.  Except...    No one approved the edit?  Not even Community♦?  I was under the impression that sometimes Community♦ would auto-reject or auto-approve an edit, but at least would still be listed as the Reviewer.  Am I missing something?  2013-07-30 update:  It , how spooky.  I know it's not hurting anything, but I'm genuinely curious how this is happening, since it doesn't seem to be an isolated case.

I've completed 20 suggested edits reviews today. Then, I came across a  and I approved it.   Then, I had a doubt that whether the review count has incremented or not, oh! it's not incrementing. System works fine.  But, take a look at review page,     The edit was already reviewed by one reviewer and then I reviewed it. As I'm the Owner of the post it's enough to approve the edit. But, the review history doesn't show the detail that I had approved it. It's misleading that only one vote of a reviewer who is neither the community user nor the OP nor the moderator, is enough.  So, what should we do in this type of situation?  Is it correct to make OP to review the suggested edit after completing daily limit?  Should we need to display/hide the OP has approved the edit in the review history?


For $n\in \mathbb N$, $n>1$ prove that $$2^n-1 \neq k^y$$ for all $k,y \in \mathbb N_{\geq 2}.$ Assuming for contradiction that there exists $(k,y)$ such that $2^n-1 = k^y$, I succeeded to prove that the pair does not exist for an even k, and for an even y. I need to prove that it does also not exist for an odd y. I need to use in this proof that $$\frac{x^{2k+1}+1}{x+1} = x^{2k} -x^{2k-1}+\cdots+1.$$ Thank you!

I would appreciate if somebody could help me with the following problem:      For a given positive integer $n$, can we find positive integers $a$ and $k$ ($k\geq 2$) such that $2^n-1=a^k$?    The answer would be no, I  guess.  Please give me some ideas!


I am trying to calculate the area of a polygon following the step by step mentioned in all the questions related to this issues in this website. Nonetheless, the result of the area calculation is about 6.1 and of course it is wrong cause I was expecting something more than 50000 km². I don't know if I am mistaking in some point or there is a bug in the qgis version I have. I have:   changed the layer projection to UTM (In this case is UTM 23); changed the project layer projection to UTM; calculated in attributes/field calculator/geometry/$area.   Still the result is something weird. This is the polygon I am working

I am using QGIS 2.12.3 Lyon and I want to calculate the area of my polygon in m2. For that I used the tool provided by QGIS, but the result is not as it should be. I got from QGIS 50 ha, while I got from the TopMaps Viewer 20 ha – I know the result from TopMaps Viewer is right, because I have another area with almost the same size, where I already know the area size.   Then I tried to calculate the area by the field calculator and used the formula $area as explained in other questions in the GIS StackExchange ( or ). When I try this, I can’t click “ok” and I don’t know why.   Probably I should change the KBS of my shapefile, but I really have a big confusion with that. I am using Google maps as background (EPSG: 3857), my shapefile which I created uses WGS 84, EPSG 4326 and the shapefiles I downloaded from public places uses EPSG 31467 Gauss-Kruger zone 3. Is that a problem? I tried to get them on the same KBS, but then they are at the wrong place. Can that be the problem why the calculation of my area size is wrong?


I tried to 3d camera track my footage in blender and my solve error was 1.1846 and I didn't think that was that bad. I set the lens to 14mm because that was the lens I was using with my Panasonic g7, I did the refine K1, K2 thing and I set three points as the floor and set one as the origin so I don't know what went wrong. I was using a Steadicam as well so I think it was pretty stable What it looked like:   I just started blender not long ago so it is probably something obvious lol

Whenever I do camera tracking in Blender the reconstruction is always zooming out or not on the axis. I have a great quality camera, but the end results of the camera tracking always has the model sliding. If you have a solution please tell me.


A common derivation of the Lagrangian of a charged particle in an electromagnetic field starts with the Lorentz force that is rewritten in terms of the electromagnetic potentials $\Phi(\vec{x})$ and $\vec{A}(\vec{x}, t)$. So $\vec{F} = q(\vec{E} + \frac{1}{c}\dot{\vec{x}}\wedge\vec{B})$ becomes \begin{align} \vec{F} & = q(-\nabla\Phi-\frac{1}{c}\frac{d\vec{A}}{dt} + \frac{1}{c}\nabla\cdot(\dot{\vec{x}}\cdot\vec{A})) \notag \\  & = \nabla(-q\Phi+\frac{q}{c}(\dot{\vec{x}}\cdot\vec{A})) - \frac{q}{c}\frac{d\vec{A}}{dt}, \label{u} \end{align} where $q$ is the charge of the particle. The Lagrangian takes the general form $L = T-V$. In this case the kinetic energy is simply $T = \frac{1}{2}m\dot{\vec{x}}^{2}$, where $m$ is the mass of the particle. For the potential energy one sets $V = q(-\Phi+\frac{1}{c}(\dot{\vec{x}}\cdot\vec{A})).$ By the look of the final equation for $\vec{F}$ \eqref{u} this seems like a fairly reasonable choice, except for the fact that the term $- \frac{q}{c}\frac{d\vec{A}}{dt}$ is omitted. I'm aware that this term conveniently reemerges when one computes the Euler-Lagrange equations. I also know that two Lagrangians that only differ by a total time derivative yield the same Euler-Lagrange equations.  However, I do wonder whether there's a reason for omitting this term in the definition of $V$. I'm not suggesting that we simply add it to $V$, that would likely be nonsensical. I just want to understand what motivates the omission because as it stands, it seems like this step is pulled out of thin air.

I was trying to derive Lagrangian for the electromagnetic field from Lorentz's force formula $$\mathbf{F}= q(\mathbf{E} + \mathbf{v}\times \mathbf{B})$$ I have to find the potential by using the line integral of the force. I have written the above equation in terms of scalar and vector potential which is given by. $$F=q(-\nabla\phi-\frac{1}{c}\frac{d\mathbf{A}}{dt}+\frac{1}{c}\nabla(\mathbf{v}\cdot \mathbf{A}))$$ now I have to find potential by using line integral $$V=-\int \mathbf{F}\cdot d\mathbf{r}$$ now I have to show that the integral of the second term is zero so that I can get exact potential which is given by$$V=q(\phi-\frac{1}{c}\mathbf{v}\cdot \mathbf{A})$$ So my question is how to show that the integration of second term is zero?


NOTE: These triangles are being generated en masse so moving the labels manually is not an option.  New to Tikz, trying to label angles of a triangle but am getting some strange (seemingly) inconsistent formatting problems. For example, my latex for one triangle looks like this  \documentclass{article} \usepackage{gensymb} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture}[thick] \coordinate (A) at (0,0); \coordinate (B) at (2,3); \coordinate (C) at (4,0); \draw (A)--(B)--(C)--cycle; \tkzLabelPoints[left=2pt](A) \tkzLabelPoints[above=2pt](B) \tkzLabelPoints[right=2pt](C) \tkzLabelSegment[above=2pt](B,C){\textit{3}} \tkzLabelSegment[above=2pt](A,B){\textit{3}} \tkzMarkAngle[size=1.5cm,opacity=.4,color=red,line width=3pt](C,A,B) \tkzMarkAngle[size=1.5cm,opacity=.4,color=red,line width=3pt](B,C,A) \tkzLabelAngle[size=0.8cm](C,A,B){$x$} \tkzLabelAngle[size=0.8cm](B,C,A){56\degree} \end{tikzpicture} \end{document}   and generates the following triangle     However, another triangle with the following latex  \documentclass{article} \usepackage{gensymb} \usepackage{tkz-euclide} \usetkzobj{all} \begin{document} \begin{tikzpicture}[thick] \coordinate (A) at (0,0); \coordinate (B) at (3,7); \coordinate (C) at (6,3); \draw (A)--(B)--(C)--cycle; \tkzLabelPoints[left=2pt](A) \tkzLabelPoints[above=2pt](B) \tkzLabelPoints[right=2pt](C) \tkzLabelSegment[above=2pt](B,C){\textit{3}} \tkzLabelSegment[above=2pt](A,B){\textit{4}} \tkzMarkAngle[size=2cm,opacity=.4,color=red,line width=3pt](C,A,B) \tkzMarkAngle[size=2cm,opacity=.4,color=red,line width=3pt](B,C,A) \tkzLabelAngle[size=0.8cm](C,A,B){$x$} \tkzLabelAngle[size=0.8cm](B,C,A){83\degree} \end{tikzpicture} \end{document}   looks like this    with the 83 outside of the angle. Is there a way I can force the label to be inside the angle? Why does this happen for seemingly no reason?

I want to draw several different triangles ABC with the angles marked and the angle value written in it. Thanks to answers on on another question, I've managed to get this code:  \documentclass{article} \usepackage{tikz} \usepackage{tkz-euclide} \usetkzobj{all} %% om allerhande objecten te gebruiken zoals gradenboog... \usetikzlibrary{calc,intersections,through,backgrounds,snakes} \usepackage{pgfplots} \pgfplotsset{compat=1.8} \usepgfplotslibrary{statistics}   \begin{document}  \makeatletter \newcommand\ddToddmmss[1]{% \pgfmathtruncatemacro\deg@tmp{#1}% \pgfmathsetmacro\min@tmp{(#1-\deg@tmp)*60}% \pgfmathtruncatemacro\Min@tmp{\min@tmp} \pgfmathtruncatemacro\sec@tmp{(\min@tmp-floor(\min@tmp))*60}% \ensuremath{\deg@tmp^\circ \Min@tmp ' \sec@tmp ''}} \makeatother   \begin{tikzpicture} \tkzInit[ymin=0,ymax=9,xmin=0,xmax=15] \tkzClip \tkzGrid \tkzDefPoints{1/3/A, 7/8/B, 12/1/C} \tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,B,C) \tkzLabelPoints(A,B,C)  \tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](C,A,B); \tkzFindAngle(C,A,B) \tkzGetAngle{angleCAB}; %\FPround\angleBAC\angleCAB{2} \tkzLabelAngle[pos = 2.3](C,A,B){\ddToddmmss{\angleCAB}};    \tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](A,B,C); \tkzFindAngle(A,B,C) \tkzGetAngle{angleABC}; %\FPround\angleABC\angleABC{2} \tkzLabelAngle[pos = 2.3](A,B,C){\ddToddmmss{\angleABC}};  \tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](B,C,A); \tkzFindAngle(B,C,A) \tkzGetAngle{angleBCA}; %\FPround\angleBCA\angleBCA{2} \tkzLabelAngle[pos = 2.3](B,C,A){\ddToddmmss{\angleBCA}}; \end{tikzpicture}   \begin{tikzpicture} \tkzInit[ymin=0,ymax=9,xmin=0,xmax=15] \tkzClip \tkzGrid \tkzDefPoints{1/3/A, 7/8/B, 12/5/C} \tkzDrawPolygon(A,B,C) \tkzDrawPoints(A,B,C) \tkzLabelPoints(A,B,C)  \tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](C,A,B); \tkzFindAngle(C,A,B) \tkzGetAngle{angleCAB}; %\FPround\angleBAC\angleCAB{2} \tkzLabelAngle[pos = 2.3](C,A,B){\ddToddmmss{\angleCAB}};    \tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](A,B,C); \tkzFindAngle(A,B,C) \tkzGetAngle{angleABC}; %\FPround\angleABC\angleABC{2} \tkzLabelAngle[pos = 2.3](A,B,C){\ddToddmmss{\angleABC}};  \tkzMarkAngle[fill= red,size=1.5cm, opacity=.4](B,C,A); \tkzFindAngle(B,C,A) \tkzGetAngle{angleBCA}; %\FPround\angleBCA\angleBCA{2} \tkzLabelAngle[pos = 2.3](B,C,A){\ddToddmmss{\angleBCA}}; \end{tikzpicture}  \end{document}     Problem is, in version 2, where point C is higher than point A, he takes the wrong angle.  Any suggestions?


Do I use mens' or men's if I wanted to say:  The swords of the men gleamed in the light.  Is it  The men's swords gleamed in the light.  or  The mens' swords gleamed in the light.

I've been living in Ireland for almost a year now and I start noticing they use the word "mens" a lot. I can see it used in:   Shops, to denote the area where you can find men's clothes In sport, when they talk about "mens team".    My guess is just that they are lazy about the use of quotes, so that mens should actually be men's. However, there may be some rule I'm not aware of. So, is "mens" only limited to Irish English? When I'm allowed to use it?


I noticed that in the books, there's a canon example of a Death Eater attempting to use Accio on the Invisibility Cloak, but to no avail. There's also one where Harry says "Accio Firebolt" and his broom comes flying to him  My understanding is that the spell calls the item with magic, so by all means it should have worked.   My theory is that you cannot use the spell on items not owned by you (for obvious reasons), but that it is possible to Accio literally anything (Exampled by Harry's Accio of a dictionary from Hermione).   I read in  that concentration is absolutely necessary to cast the spell, but what sort of protection is there against a poor wizard plopping into Gringotts and saying "Accio loose Galleons" or other such things provided the wizard was concentrating hard enough, and what rules are there in the Wizarding World for theft and other petty crime from this spell?  Note Slytherincess noted in the answer that rarer items are harder to Accio, but as Galleons seem to be no big deal to some witches and wizard. This doesn't say anything about apparition or other spells though and I suspect the enchantments would be specific counters for specific spells.  Question: What are the forensics the Ministry uses for crimes involving theft with no physical evidence from the thief?  Bonus points if you have canon examples as to the Ministry's forensic techniques regarding magical miscreants!  "Alohomora locked chest with an answer..."  EDIT: I used Accio as an example, as it's the most common, but I also was hoping people would also think apparition, Alohomora, Bombarda, and other spells that a prospective thief would find useful. It's meant to be what forensics does the Ministry use, not limited to a narrow view of a single spell and what it does.  That being said, I did find the answer to the single example given in   EDIT 2: I realized that I'm a bit stupid and tired at this point, and once of the words I used in the actual question was wrong. I apologize to everyone for the miscommunication.  EDIT 3: I'm not sure why the entire question wasn't read by the community, nor the edits. This will be the last edit and I will let the chips fall where they may, simply because this is getting closed votes without a full read-through.  The ENTIRE question doesn't revolve around a SINGLE SPELL. Prevention (Anti-theft devices) is COMPLETELY different from forensics (Where the deed has already been done). In one of my edits, I clarified other spells as well with Alohomora, Apparition, and Bombarda, just to name a few spells that could be used for thievery. I want to know HOW DOES THE MINISTRY CATCH PEOPLE WHO STEAL, not HOW CAN THEY BE PREVENTED.  tldr; THE ACCIO EXAMPLE IS JUST AN EXAMPLE. I will bold other things that are being glossed over. Vote as you must.

It looks like from canon examples, Accio works on:   Summoning things that aren't yours (Hermione summoning books about Horcruxes that Dumbledore took out of the library in DH)     "Well... it was easy," said Hermione in a small voice. "I just did a Summoning Charm. You know – Accio. And – they zoomed out of Dumbledore's study window right into the girls' dormitory."  Summoning things you aren't sure of their exact location (Molly summoning twins' toffees in GoF):     'Accio! Accio! Accio!' she shouted, and toffees zoomed from all sorts of unlikely places, including the lining of George's jacket and the turn-ups of Fred's jeans.  Summoning things that are "nailed down" (Twins summoning their brooms before escaping Hogwarts in OotP)     And before Umbridge could say a word, they raised their wands and said together:   'Accio brooms!'   Harry heard a loud crash somewhere in the distance. Looking to his left, he ducked just in time. Fred and George's broomsticks, one still trailing the heavy chain and iron peg with which Umbridge had fastened them to the wall, were hurtling along the corridor towards their owners; they turned left, streaked down the stairs and stopped sharply in front of the twins, the chain clattering loudly on the flagged stone floor.  Summining things from a fairly big distance (Harry summoning his Broom to the TriWizard tournament's first task from the castle).   As such, is there any canon explanation for why people like Mundungus (or Tom Riddle) who have very little respect for the law or private property don't simply Accio whatevertheheck they want to steal out of people's homes?


I have seen from a  and a  where they said that, temperature can be reduced by reducing the area where the air passes. But what theory can explain it more precisely? I guess this could be an example of Bernoulli's principle, but I failed to related the temperature with it. Will the process work always ? I mean is there any drawback?

describes a device for developing countries which apparently cools the air by 5 °C without electricity. According to , it works by lowering the pressure to drag in the ambient air. Wouldn't the ambient air be at the same temperature?  Does the constriction compress the air and temporarily increase the pressure and so temperature, which then dissipates heat because it is hotter than surroundings; then after passing the constriction, the pressure returns to almost ambient but the temperature drops to below ambient?  How does the Eco-Cooler air conditioner actually work, if at all?


When using a S-column (of the package siunitx) in a table, the numbers are not properly typed when using both engineering (or scientific) notation and uncertainties. However, using the \num command (of the same package) the number is well typed. Is there an option to put in the S-column to correct this problem? I’ve read the documentation, but I don’t think I’ve found anything like it.  \documentclass[12pt]{article} \usepackage{booktabs, siunitx} \parindent=0em \sisetup{separate-uncertainty = true}  \begin{document} \num{91.4(7) e-3}  \begin{tabular}{S[table-format = +2.1(1)e+2]} \toprule 72.3e-3 \\ 91.4(7)e-3 \\ % Should be typeset like "\num{91.4(7) e-3}" -88.8 \\ 4.5 \\ \bottomrule \end{tabular} \end{document}

I would like to format the space reserved for a number shown in a table with separated uncertainty. It seems that when I use the table-format option the brackets around the mantissa disappear. This is illustrated in the example below:  \documentclass{article}     \usepackage{siunitx}  \begin{document}     \begin{table}   \begin{tabular}{                   S[separate-uncertainty = true]                   S[table-format=1.1(1)e1,                   separate-uncertainty = true]                   }     {Header} & {Header}\\     1.0(2)e2 & 1.0(2)e2\\   \end{tabular} \end{table}     \end{document}     I have also tried to use the bracket-numbers and multi-part-units = brackets without solving this issue. Is there any workaround to center the number and keep the brackets like in the first column of the example?


I read a book, and I see that: "Oh - the black hat," I say. "No!" says Shami. "The blue hat is nicer." We watch and wait. In the end, the woman takes the blue hat. "Hurray!" says Shami. ‘Where is she?’ Leon says every day ‘Oh stop it, Leon,’ says Shami. I want to know what is the situation to use "say + S" and "S + say" Thank you

I’ve long wondered how in reported speech, what sort of change in nuance is produced by switching around the normal order of the subject (that is, the speaker) and the “speech-related” verb (such as , ask, or mutter) used for simple declaration of whatever was said.    Assuming that QQQ below stands for any quoted speech, what — if any — subtle shifts of meaning are there between the following three formats?          He said, “QQQ.”     “QQQ,” he said.     “QQQ,” said he.      In particular, in what situations is the “inverted” VS1  order of said he preferred over either or both of the two versions that use he said in the “normal” SV2  order?  Are these nothing more than three equal options that vary by individual writers’ personal tastes?   If not, then what  rules exist for choosing between and distinguishing these three variants?     1.  VS means verb–subject, or with object, VSO or OVS. 2.  SV means subject–verb, or with object, SVO or OSV.


so, I have a corruption world and I want to beat the BOC in terreria.  which means I have to get something that can spread crimsion.  can u guys help me out?

I was reading on the wiki how there is a chance that the Corruption will be replaced with the Crimson.  I am wondering if when you get a world where you have the Crimson is it possible to also have the Corruption if you bring over corruption seeds from another world and use them. Or would these seeds just get you more of the Crimson?


I'll be reviewing a scientific article soon and I've not done this before. It'll be reviewing a popular article on an astrophysical topic. Undergraduate level but I'm open to any level of guidance.  Is there a guide/textbook out there that describes how to write such a review in science?

Someday, as strange as it feels to me right now, I might be asked to review an article for publication. A while ago my advisor and I were talking about this, and it hit me that I don't really know how to be a good reviewer, beyond the basics:   Respond timely to things, Make your report clear and detailed, Have actually read the paper, Etc.   Beyond this, though, I'm completely in the dark. So I'd like to ask:     What's some good advice for a first-time reviewer?   My field is math, but I'm really interested in general advice (although advice specific to math, or another field, would also be interesting and useful).    I'd like to make this question "community wiki" or analogous, but I can't seem to figure out how - if someone can do so, please do, and then I will delete this paragraph.


How do I avoid installing the recommended packages and suggested packages along with upgrading the packages when I apt-get install a particular package?

I use Ubuntu 12.04 64-bit, I did the following: sudo gedit /etc/apt/apt.conf and added  APT::Install-Recommends "false"; APT::Install-Suggests "false";    But it did not work. When I try to install a package, it still wants to install the suggested and recommended packages. How can I solve this?


The position of an electron is often discussed in physics. My question is simple. How does one go about measuring an electron’s position ? It seems like an impossible task.

If I look at the Electron to see it then a Photon must of hit the Electron. So I have no idea of what the Electron was doing before I looked at it.  To find its position again I need to perform a measurement of some sort. This time I decide to make sure my Electron is in a black box so no Photons can get to it. But to measure something is to scale, to grade, to quantify maybe is a better word. So how do you do quantify an Electrons position with out disturbing it in the first place.


So I integrate the holomorphic function $\frac{e^{iz} -1}{iz}$ over the half disk in the upper half plane, let me name it $\Gamma$. By using Cauchy's theorem, it equals 0.  $$0 = \int_{\Gamma} \frac{e^{iz} -1}{iz} = \int_{0}^{\pi}(e^{iRe^{i\theta}}-1)d\theta + \int_{-R}^{R} \frac{e^{it}-1}{it}dt$$  ($Re^{[0, \pi]}$ and $t: [-R, R]$ being the respective parametrizations.)  By splitting the left integral in two, I get $\int_{0}^{\pi} e^{iRe^{i\theta}}d\theta \rightarrow 0$ by dominated convergence, and $\int_{0}^{\pi} -1d\theta = -\pi$. By making $R \rightarrow \infty$, I'm left with  $$\pi = \int_{-\infty}^{\infty} \frac{e^{it} - 1}{it}dt = \int_{-\infty}^{\infty}\frac{\sin t}{t}dt + \int_{-\infty}^{\infty}\frac{\cos t -1}{it}dt.$$  How do I get rid of the integral on the right? I welcome all feedback.

This refers back to $\int_{-\infty}^\infty \frac{\sin x}{x} \mathrm{d}x = \frac\pi2$ already posted. How do I arrive at $\frac\pi2$ using the residue theorem? I'm at the following point: $$\int \frac{e^{iz}}{z} - \int \frac{e^{iz}}{z},$$ and I would appreciate any help.


Do I need to use some kind of formula or just plug in numbers and find the one that works best?   What I tried doing so far is plugging in random numbers but whenever I multiply the four consecutive integers they always give me a square so adding $2$ makes it a non square root number (i.e.: $1 * 2 * 3 * 4 = 24 + 2 = 26$. $26$ does not have a square root.).

I need to prove the following, but I am not able to do it. This is not homework, nor something related to research, but rather something that came up in preparation for an exam.     If $n = 1 + m$, where $m$ is the product of four consecutive positive   integers, prove that $n$ is a perfect square.   Now since $m = p(p+1)(p+2)(p+3)$;     $p = 0, n = 1$ - Perfect Square      $p = 1, n = 25$ - Perfect Square      $p = 2, n = 121$ - Perfect Square   Is there any way to prove the above without induction? My approach was to expand $m = p(p+1)(p+2)(p+3)$ into a 4th degree equation, and then try proving that $n = m + 1$ is a perfect square, but I wasn't able to do it. Any idea if it is possible?


Problem: a) Determine which amounts of postage can be formed using just 4 cent stamps and 11 cent stamps. b) Prove your answers to a using strong induction. My work: (I am only working on part a for now)  I saw that this problem was a variation of this one  but that one came with the initial bounds, "Prove that every amount of postage of 12 cents or more", but here, you have to come with the initial bounds.  I watched a Youtube video on how to do that problem  and here's the author's basis case  Here's my work off that author's basis case 12 = 3(4) + 0(11) 19 = 2(4) + 1(11) 26 = 1(4) + 2(11) 33 = 0(4) + 3(11) And my conclusion is that postage of 12 + multiples of 7 can be formed with just using 4 cent stamps and 11 cent stamps. Is that the correct conclusion to which amounts of postage can be formed using just 4 cent and 11 cent stamps? I wasn't completely sure because 4 can be formed with just using 1 cent stamp but I felt like there was a reason you start from 12 in the other problem, to make the induction step easier? Would you have to include numbers like 4 and 11?

I want to determine the set of natural numbers that can be expressed as the sum of some non-negative number of 3s and 5s.  $$S=\{3k+5j∣k,j∈\mathbb{N}∪\{0\}\}$$  I want to check whether that would be: 0,3, 5, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, and so on.  Meaning that it would include 0, 3, 5, 8. Then from 9 and on, every Natural Number. But how would I explain it as a set? or prove that these are the numbers in the set?


Configuration HP Pavilion g6-2338ee running Windows 8 64 bit Intel CORE i5 2.6 GHz RAM- 4GB HDD- 500GB Supports Direct X 11 Intel HD Graphics 4000

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I need a simple script for JavaScript countdown for quiz preparation.   Initially quiz page loads, countdown timer to be start for 30mins After 30mins over, it shows alert message to user.   Below is the code which am using, but after 30mins it decrementing..  <html> <head> <title>Countdown</title> <script type="text/javascript">  var mins = 30;   var secs = mins * 60; function countdown() {     setTimeout('Decrement()',1000); } function Decrement() {     if (document.getElementById) {         minutes = document.getElementById("minutes");         seconds = document.getElementById("seconds");         if (seconds < 59) {             seconds.value = secs;         } else {             minutes.value = getminutes();             seconds.value = getseconds();         }         secs--;         setTimeout('Decrement()',1000);     } } function getminutes() {     mins = Math.floor(secs / 60);     return mins; } function getseconds() {     return secs-Math.round(mins *60); } </script> </head> <body>  <div id="timer">     This is only valid for the next <input id="minutes" type="text" style="width: 14px; border: none; background-color:none; font-size: 16px; font-weight: bold;">  minutes and <input id="seconds" type="text" style="width: 26px; border: none; background-color:none; font-size: 16px; font-weight: bold;"> seconds. </div> <script> countdown(); </script>   Thanks in Advance.

I have searched the web but all the ones readily available are where you specificy a date and it counts down to that date. What I need is something which will simply count down from "27 minutes and 43 seconds" (in that format) all the way down to 0 from whenever they land on the page, anyone got any snippets available?


Help me find $\hat{B^\dagger}$, when we know that $$\hat{B}=i\frac{d}{dr}$$ with the condition that $\hat{B}$ is defined in spherical coordinates. My approach: $$ \langle\psi|\hat{B}\psi\rangle=\int_{0}^{\infty} \psi^* i\frac{d}{dr} \psi dr=\psi^*\psi|_{0}^{\infty}-\int_{0}^{\infty}\psi i\frac{d}{dr}\psi^*dr=\langle\hat{B}\psi|\psi^*\rangle$$ And so I get $ \hat{B^\dagger} = -i\frac{d}{dr} $. Could someone confirm if this is correct?


I'm new to python, just have one question:  Python don't need to declare variable types. For example, when we use functions, we don't declare which type should be passed in. So sometimes, I can't figure out which type the passed in parameter actually is or do I pass in an invalid parameter.  For example, a parameter named: run_date, Its type can be string or datetime or date. I have to find it from the code...  Is there a way to solve this problem? I think I should do good naming. But howto?  I don't mean to check the type in the code. I just get confused with the function parameters when coding... I always forget which type the parameter is...

What is the best way to check whether a given object is of a given type? How about checking whether the object inherits from a given type?  Let's say I have an object o. How do I check whether it's a str?


$y\frac{\text{d}^2y}{\text{d}x^2}-2\left(\frac{\text{d}y}{\text{d}x}\right)^2+xy^3\frac{\text{d}y}{\text{d}x}=0.$  I want to analyze the above non-linear ODE asymptotically. Do you have an idea?

$y\frac{\text{d}^2y}{\text{d}x^2}-2\left(\frac{\text{d}y}{\text{d}x}\right)^2+xy^3\frac{\text{d}y}{\text{d}x}=0$. I want to get solution in elementary functions in order to do asymptotic analysis. I tried the problem with Mathematica. It did not give any solutions.


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

I have installed Ubuntu alongside Windows 8.1. But the wifi is not working in Ubuntu (perhaps the drivers are not present), which worked fine in windows. Also I cant connect with Ethernet since my laptop does not have an Ethernet port. So is there any way for me to connect to the internet in ubuntu? Edit: Output of the terminal command  lspci -knn | grep Net -A2:  vikram@vikram-Inspiron-11-3148:~$ lspci -knn | grep Net -A2 01:00.0 Network controller [0280]: Broadcom Corporation BCM43142 802.11b/g/n [14e4:4365] (rev 01)     Subsystem: Dell Device [1028:0018]     Kernel driver in use: bcma-pci-bridge vikram@vikram-Inspiron-11-3148:~$    I did what Pilot6 suggested. Here is the output:    vikram@vikram-Inspiron-11-3148:~$ sudo dpkg -i *.deb [sudo] password for vikram:  Selecting previously unselected package bcmwl-kernel-source. (Reading database ... 163804 files and directories currently installed.) Preparing to unpack bcmwl-kernel-source_6.30.223.141+bdcom-0ubuntu2_amd64.deb ... Unpacking bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Selecting previously unselected package dkms. Preparing to unpack dkms_2.2.0.3-1.1ubuntu5.14.04_all.deb ... Unpacking dkms (2.2.0.3-1.1ubuntu5.14.04) ... Setting up dkms (2.2.0.3-1.1ubuntu5.14.04) ... Setting up bcmwl-kernel-source (6.30.223.141+bdcom-0ubuntu2) ... Loading new bcmwl-6.30.223.141+bdcom DKMS files... First Installation: checking all kernels... Building only for 3.16.0-30-generic Building for architecture x86_64 Building initial module for 3.16.0-30-generic ERROR (dkms apport): kernel package linux-headers-3.16.0-30-generic is not supported Error! Bad return status for module build on kernel: 3.16.0-30-generic (x86_64) Consult /var/lib/dkms/bcmwl/6.30.223.141+bdcom/build/make.log for more information. modprobe: FATAL: Module wl not found. update-initramfs: deferring update (trigger activated) Processing triggers for man-db (2.6.7.1-1ubuntu1) ... Processing triggers for initramfs-tools (0.103ubuntu4.2) ... update-initramfs: Generating /boot/initrd.img-3.16.0-30-generic vikram@vikram-Inspiron-11-3148:~$


I saw this identity somewhere and I'm wondering if there's a more intuitive explanation for this: $$\sum_{k=1}^{n} 2k-1 = n^2$$ I know how to verify it algebraically by simplifying the left side but is there another way to think about this? Could the fact that the derivative of $n^2=2n$ has something to do with it? What significance does it have, if any?

I stumbled across this relationship while I was messing around. What's the proof, and how do I understand it intuitively? It doesn't really make sense to me that the sum of odd numbers up to $2x + 1$ should equal $x^2$.


I read a book series about 15 years ago when I was a young kid, and I believe there was at least 7 books in the series. I remembered them being sorta short in length (around the size of an R.L.Stine YA book) and each book was paperback with a glossy photo/image type cover so I believe the series was sort of new, Year 2000+. The first cover book had a blue hue and a kid was laying down with some sort of thick tubing going into his head. The series was in English.  Since I was pretty young when I read it, my memories of it are pretty faint now. But what I do remember is that something was going to happen to the earth so they sent people into space in a ship in hibernation pods to wait out whatever happened.   There were kids and teens, very few adults (if any) and when they woke up they were trying to figure out what happened.   In one of the books I know they somehow got back to earth and it was pretty uninhabitable (I think). What sticks out to me most is that the spaceship's mainframe or central computing system called itself mother. It could rearrange the environment and space inside the craft for super large distances (kinda like mini world).   For some reason Mother was actually bad or something (perhaps not letting them leave the ship/environment) so they plotted a way to kill her or escape. I think the kids on the space ended up splitting into groups at one point, and some of them may have developed some sort of psychic power. One scene I can remember is them running over a grassy field in the simulated world that Mother made.   I know that Alien has a spaceship called Mother, but this definitely isn't it.   Edit      I'm pretty positive the author's name was two initials and a last name. Can't remember the letters or the last name though.

Looking for the name of a book series I read in middle school, 2001-2004 roughly.  All I can remember about it was that there were a handful of teenagers who somehow ended up on an alien planet that they eventually found out to be a ship. They have to fight for survival against multiple different enemies, I think one of the kids could communicate with part of the ship telepathically. Some of the aliens were either blue or I think even transparent. There really isn't too much to work off of, but I figured someone might know what it is.


Calculate the limit of $\sqrt{n^2-3n}-n$ as $n \rightarrow \infty $.  I'm having a hard time trying to simplify this expression in order to be able to get the limit of it.  I have $\sqrt{n^2-3n}-n=\sqrt{n^2(1-\frac{3}{n})}-n=n\sqrt{1-\frac{3}{n}}-n=n(\sqrt{1-\frac{3}{n}}-1)$  Don't think that this gives me anything useful, can anybody give me some hints.

Let $f(x) = \sqrt{x^2-3x}$ and $g(x) = x$. Calculate the following limits, showing all working.  I've done the first two -   $$\lim_{x\to0}f(x)\\ =\lim_{x\to0}\sqrt{x^2-3x}=0$$  $$\lim_{x\to-\infty}\frac{f(x)}{g(x)}\\ =\lim_{x\to-\infty}\frac{\sqrt{x^2-3x}}{x}=\sqrt{1-\frac{3}{x}}=1$$  How do I calculate this one?  $$\lim_{x\to+\infty}(f(x)-g(x))$$


We have just upgraded a PC running Windows 7 Enterprise Edition (32bit) to have 4gb of memory instead of 2gb.  Previously, there was 989mb of usable memory (with 2gb total installed). After upgrading, the computer now shows 4gb of total memory with 989mb usable.  Why has the available memory not increased? How can I make this memory available for usage?  As stated, it is recognizing the memory but not showing it as usable memory.  Thanks.  Update  Looking at Resource Monitor, it appears that the Hardware Reserved Memory is 3gb. So when I inserted the additional 2gb of memory, it was all taken as Hardware Reserved Memory and added not a single MB to Usable Memory.   What could cause this?  My other machines are only reserving roughly 1gb.  Update - Solution Found  It looks like the graphics card was faulty and consuming all RAM except for 989mb regardless of how much RAM was installed. It has been replaced with a different graphics card and Usable Memory is now what was expected (Roughly 3gb).  Thanks for all the answers!

I upgraded my PC to 4 GB RAM and I get only 3 GB. Windows 7 32-Bit consider that I've 4 GB RAM but didn't use more than 3 GB.  Someone told me that MS Windows 32-bit doesn't support RAM larger than 3 GB.  So please is there any way to make my OS "Windows 7 32-Bit" support more than 3 GB RAM ?  *`Note: I can't move to 64-bit because I've many program doesn't work with a 64-bit OS.  Edit::  I tried what Mr. Wonsungi advised me but whenever I check this option:      Enable support for 4 GB of RAM   I get the following error:      'Cannot access to the registry key   HKEY_CLASSES_ROOT\CLSID\{E88DCCE0-11d1-A9F0-00AA0060FA31}.'   There is no "CLSID" in my registry, I don't know why!.


I have one custom content. It contains a multiple collection field.  If I create a new entity (via entity_metadata_wraper), how can I set a new multiple collection field ?   by example :   $new_entity = entity_create('node', array('type'=>'custom content'); $new_entity_w = entity_metadata_wrapper('node',$new_entity); ... $new_entity_w->a_new_multiple_collection_field[0]->some_field->set('...'); //(1) doesn't work //$new_entity_w->a_new_multiple_collection_field[]->some_field->set('...'); //(2)doesn't work   Error for (1) :  Unable to set the data property some_field as the parent data structure is not set  Error for (2) :  PHP Fatal error : Cannot use [] for reading in /var/...  I didn't find...thank you for some help !

I want to create a node entity. This node contain a date field. So, how can I set the date value ? (using entity_metadata_wrapper)  After several google search and code try, I don't find the solution.. My last try :   $date_temp = new DateTime(date('2013-12-01 00:00:00')); $new_devicew->field_top[0]->field_date->set($date_temp->getTimestamp());   But i get this error :   EntityMetadataWrapperException : Unable to set the data property field_date as the parent data structure is not set. in EntityStructureWrapper->setProperty()


When I go to reset my password in root mode and type  passwd lunar  It won't let me type to change my password so I need help here the laptop I'm using is a Lenovo G580 (windows on it got corrupted so I installed Ubuntu Linux on it)

I'm working on a Ubuntu system, and my client has completely forgotten his administrative password. He doesn't even remember entering one; however it is there.  I've tried the suggestions on the website, and I have been unsuccessful in deleting the password so that I can download applets required for running some files. Is there a solution?


So Guys I'm trying to build a website for my school but can be access with no internet cause i will be running it on a virtual host using xampp so if students connect to the router where i run my web server ( Xampp virtual Host ) They can connect and use it for Chatting see latest announcements and share files with others my question is Is Xampp enough for this? and what are the problems i might encounter in the future btw the students enrolled is somewhere 10k - 15k students can a single Xampp Virtual Host handle that? i need tips from you guys to make this work locally offline  btw this is my plan a inforgraph so you guys can understand what I meant,

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I found here a great  regarding the difference between users and visitors in GA, but somehow my stats (image attached) show 7330 New Visitors had 7312 Sessions (visits). How can there be fewer sessions than visitors, when it should be at least 1 session per 1 new visitor?   Excerpt from the relevant explanation I linked to above:     When Google Analytics says "new visitors" or "returning visitors",   they mean "visits by new users", or "visits by returning users". For   example user A has visited your site before today and user B is new.   Each visits 2 times on the same day separated by at least 30 minutes:      User A Visit 1: Returning user, Returning visitor Visit 2: Returning   visitor User B Visit 1: New user, New visitor Visit 2: Returning   visitor You will have:      2 Users 1 New User 1 Returning User 4 Visitors 1 New Visitors 3   Returning visitors New users will always be the same as new visitors,   but each user may may multiple visits so the total number of visitors   may be greater than the total number of users. Similarly, returning   visitors may be greater than the number of returning users.

My Google Analytics page shows almost twice as many Users than Sessions. It really doesn't make sense to me, does anybody know what's the reason for this?  Here is a snapshot from my GA dashboard:


public struct rectangle {    public decimal a; }   that is my struct  and i have a list of struct rectangles  list<rectangle> dataRectangle= new list<rectangle>();   now i have already added some structs into the list now i would like to change the value of a struct present in a list like   dataRectangle[0].a=0;   it says   cannot modify the return value ' list<form4.rectangle>.this[int] ' because it is not a variable   help why is this coming and is there another way to modify

I have a list of structs and I want to change one element. For example :  MyList.Add(new MyStruct("john"); MyList.Add(new MyStruct("peter");   Now I want to change one element:  MyList[1].Name = "bob"   However, whenever I try and do this I get the following error:     Cannot modify the return value of   System.Collections.Generic.List.this[int]‘ because it is not   a variable   If I use a list of classes, the problem doesn't occur.  I guess the answer has to do with structs being a value type.  So, if I have a list of structs should I treat them as read-only? If I need to change elements in a list then I should use classes and not structs?


My Minecraft Server is running perfectly and I can connect. But, if others try, it says "Can't connect: connection refused: connect".  I have a Mac, with 8GB RAM and am using Rcon. I connect using localhost. I can't even connect with telnet!

Similar to  on the bugs in Minecraft, I would like a complete list of what error codes exist in Minecraft and how they occur, as well as how they can be resolved.


Suppose I'm writing an article about topic X. During research I come across a related article in which the author has made statement Y and referenced publication Z. For one reason or another, I haven't read Z. Perhaps it is an expensive textbook or I'm just lazy. Can I in my article also make statement Y and reference Z, bypassing the middle author, or is that wrong?

In my Master's thesis I use a theorem that is recent enough that I could find the article where it is proved, but I've actually learned the theorem and its proof in two books by other authors. Is it necessary to cite the original article, knowing that I haven't actually read it?


how to maintain a foreground thread along with background thread. if i try to add items to the list in do work, it's giving me a cross thread exception.

I have a scenario. (Windows Forms, C#, .NET)   There is a main form which hosts some user control. The user control does some heavy data operation, such that if I directly call the UserControl_Load method the UI become nonresponsive for the duration for load method execution. To overcome this I load data on different thread (trying to change existing code as little as I can)   I used a background worker thread which will be loading the data and when done will notify the application that it has done its work.   Now came a real problem. All the UI (main form and its child usercontrols) was created on the primary main thread. In the LOAD method of the usercontrol I'm fetching data based on the values of some control (like textbox) on userControl.    The pseudocode would look like this:  CODE 1  UserContrl1_LoadDataMethod() {     if (textbox1.text == "MyName") // This gives exception     {         //Load data corresponding to "MyName".         //Populate a globale variable List<string> which will be binded to grid at some later stage.     } }   The Exception it gave was     Cross-thread operation not valid: Control accessed from a thread other than the thread it was created on.   To know more about this I did some googling and a suggestion came up like using the following code  CODE 2  UserContrl1_LoadDataMethod() {     if (InvokeRequired) // Line #1     {         this.Invoke(new MethodInvoker(UserContrl1_LoadDataMethod));         return;     }      if (textbox1.text == "MyName") // Now it wont give an exception     {     //Load data correspondin to "MyName"         //Populate a globale variable List<string> which will be binded to grid at some later stage     } }   BUT BUT BUT... it seems I'm back to square one. The Application again  become nonresponsive. It seems to be due to the execution of line #1 if condition. The loading task is again done by the parent thread and not the third that I spawned.  I don't know whether I perceived this right or wrong. I'm new to threading.  How do I resolve this and also what is the effect of execution of Line#1 if block?  The situation is this: I want to load data into a global variable based on the value of a control. I don't want to change the value of a control from the child thread. I'm not going to do it ever from a child thread.   So only accessing the value so that the corresponding data can be fetched from the database.


I was playing around and came across the following identity: For $0 \leq i \leq l \leq d, \ 1\leq d$ with $l$ and $d$ fixed, we have, for each $i$, $$ \sum_{m=0}^i (-1)^{i-m}\binom{l-m}{l-i}\binom{d}{m} = \binom{d+i-l-1}{i}.$$ Maple experimentally confirms that this identity holds, and I tried (unsuccessfully) to prove it via induction on $i$. I have three questions:  Is there any nice (algebraic) proofs of this fact? Or other proofs}? (This has been answered). Are all of the assumptions $0 \leq i \leq l \leq d, \ d\leq 1$ necessary? I think removing the $d\leq 1$ condition is ok provided that you can say that $\binom{-1}{0}=1$, but I'm unsure if this definition is reasonable. Are there any references to this identity in the literature? And where can I find the identity $\sum_k \binom{r}{m+k}\binom{s}{n-k} = \binom{r+s}{m+n}$ which is used in the linked answer?  Edit: Here is my attempt so far: Clearly the statement holds for $i=0$. So suppose the statement holds for some $i$. For $i+1$, we have \begin{align*} & \sum_{m=0}^{i+1} (-1)^{i+1-m}\binom{l-m}{l-i-1}\binom{d}{m} = \sum_{m=0}^{i} (-1)^{i+1-m}\binom{l-m}{l-i-1}\binom{d}{m} + \binom{d}{i+1} \\  &= \sum_{m=0}^{i} (-1)^{i+1-m}\binom{d}{m}\bigg[\binom{l-m+1}{l-i}-\binom{l-m}{l-i}\bigg] + \binom{d}{i+1} \\  &= \sum_{m=0}^{i} (-1)^{i+1-m}\binom{d}{m}\binom{l-m+1}{l-i} - \sum_{m=0}^{i} (-1)^{i+1-m}\binom{d}{m}\binom{l-m}{l-i} + \binom{d}{i+1} \\  &= \sum_{m=0}^{i} (-1)^{i+1-m}\binom{d}{m}\binom{l-m+1}{l-i} + \sum_{m=0}^{i} (-1)^{i-m}\binom{d}{m}\binom{l-m}{l-i} + \binom{d}{i+1} \\  &= \sum_{m=0}^{i} (-1)^{i+1-m}\binom{d}{m}\binom{l-m+1}{l-i} + \binom{d+i-l-1}{i} + \binom{d}{i+1} \end{align*} where the last equality uses the induction hypothesis. Edit 2: Question 1 has been answered by the linked post. Any responses regarding questions 2 and 3?

I need to show that the following identity holds:  $\sum_{i=0}^k (-1)^{k-i} {{d-i}\choose{k-i}} {{n}\choose{i}}  = {{n-d+k-1}\choose{k}} $  Where $k \leq \frac{d}{2}$ and $n \geq d$.  I have been trying several substitutions but I haven't been able to prove it. Any help would be appreciated.


I have an authority problem with my smartphone. It has this thing about downvoting users without asking for my opinion. So I have to check my downvotes.  But there is a discrepancy on my activity page. It says that I have n downvotes, but when I ask for the actual downvotes, to see what was downvoted, and possibly undo my smartphone initiatives, I find out that there are only m actual downvotes where m < n.  So, where have all the n-m downvotes gone. Is it downvotes of questions that were deleted, and thus disappeared, while remaining on my total count?  The fact is that the same is true for upvotes.

In the users menu on the summary tab we have to lower right the overview of votes:    When I click on "view more":     The vote count differs? I checked that no votes from other stack exchange sites were counted in. This would also lead to different vote counts.


Is it possible to spawn a mob such as a skeleton in front of the player when they right click with an item such as a carrot on a stick?

Is there a way so that I make make it when I left click/right click with a certain item it applies an effect? I know that you can apply attributes to wearing armor and things but I want it so when you use the item it applies an effect on your player.  For example, let's say I want something so that when I right click with a certain item (let's say an iron ingot that was given to me) I'll then have a jump boost for 10 seconds. So kinda like a potion in a way.  Is this possible with command blocks/commands/any mods?


There are 100 passengers with assigned seats. The first two people that boards chooses a seat at random uniformly. The remaining passengers will sit in their assigned seat if it is still open, but if it's not open, they will choose an open seat at random. What is the probability that the last person sits in his assigned seat? The one person variant is posted in  where the solution was found to be $0.5$. I am struggling with adapting that approach to the current problem. My intuition is that in general, the $i$-th person, if their seat was taken by someone who boarded earlier, has exactly $100 - i + 1$ choices. So if there was a person with exactly 2 choices, it must be (a) the 99th person and (b) the 99th person's seat must be taken. (3) Both of the first and second person's seats must not both be seated in already because if they were the 99th seat would be open. (i) If both were not seated, then the 2 choices for the 99th person must be one of these two seats, and the seat assigned to the 100th person must have been taken. (ii) If exactly one of the first two person's assigned seats were not taken, then the 99th person has the other of the 2 seats as a choice and the 100th seat as a choice. So I think maybe the key to the problem is figuring out the probability of (i) and (ii) occuring?

This is a neat little problem that I was discussing today with my lab group out at lunch. Not particularly difficult but interesting implications nonetheless  Imagine there are a 100 people in line to board a plane that seats 100. The first person in line realizes he lost his boarding pass so when he boards he decides to take a random seat instead. Every person that boards the plane after him will either take their "proper" seat, or if that seat is taken, a random seat instead.  Question: What is the probability that the last person that boards will end up in his/her proper seat.  Moreover, and this is the part I'm still pondering about. Can you think of a physical system that would follow this combinatorial statistics? Maybe a spin wave function in a crystal etc...


I am completely stuck on this and need help.  I need to get the value if another value is equal to something.  Lets say my array is:  "people":[     {"name": "David", "age": "30"},      {"name": "Bob", "age": "20"},      {"name": "Bill", "age": "30"} ]   I need to return the age if the name is lets say Bob. I have attempted to do it this way but to no avail.   String People = jsonPart.getString("people"); JSONArray arr = new JSONArray(People);  for (int h = 0; h < arr.length(); h++) {      JSONObject jsonPart = arr.getJSONObject(h);      String name = jsonPart.getString("name");      if (name == "Bob") {          String age = jsonPart.getString("age");          break;      } }

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


I have many numbers in my numbers.csv. I want to display it on the screen, but after every third number it should wait for 5 seconds to show another 3 numbers...  My Code:  with open('numbers.csv', newline='') as csvfile:     reader = csv.DictReader(csvfile)     print(reader.fieldnames)     look_for = reader.fieldnames[1] #since L_name is at index 1     i = 0     for row in reader:         i = i + 1         #print(row['first_name'], row['last_name'])         contact_number =str(i) + ') ' + row[look_for]         print(contact_number)

I would like to know how to put a time delay in a Python script.


I am preparing for the F=ma Physics Test and I was wondering if anyone could recommend a book on Newtonian Mechanics at a college level textbook based on algebra.

What are some good books for learning the concepts of Kinematics, Newton laws, 2D Motion of Object etc.?


I have a UK passport and a Malaysian passport and am traveling to the US, I want to use my UK passport because it has a visa waiver, but to return home (Australia) I want to use my Malaysian passport because it has my citizenship in it. Can I do this?

I am a citizen of two different countries, and have two passports.  How should I use my passports when traveling?


I keep getting this error in my code. Can someone fix it and how is the code written? Can it be improved by maybe using setters and getters only?  Exception in thread "main" java.lang.NullPointerException at Player.attack(Player.java:72) at Main.main(Main.java:15)   My code: Player.java  public class Player { String name; String race; int hp; int power; int armour; Weapon weapon;   public Player (String n, String r, int h, int p, int a) { name = n; race =r; hp =  h; power = p; armour = a;   }  public void setName (String n) {  name = n; }  public String getName() { return name; } public void setRace (String r) { race = r; } public String getRace() { return race; } public void setHP (int h) { hp = h; } public int getHP() { return hp; } public void setPower (int p) { power = p; } public int getPower() { return power; } public void setArmour (int a) { armour = a; } public int getArmour() { return armour; }  public boolean dead() { return hp <= 0; } public boolean equip(Weapon weapon) { this.weapon = weapon; return true; } public boolean receiveDamage(int i) { if ((hp - i) > 0) {     hp = hp - i;     return true;     } hp = 0; return false;  } public boolean attack(Player player) {  return player.receiveDamage(weapon.useWeapon());  } }   Main.java  public class Main { public static void main(String args[]) { Player Mensch = new Player("Mensch", "Mensch", 85, 12, 10); Player Ork = new Player("Shrek", "Ork", 50, 14, 6);  Weapon MenschW = new Weapon("mächtiges Schwert", 15, 100); Weapon OrkW = new Weapon("große Axt", 7, 100);  Mensch.equip(Mensch.weapon); Ork.equip(Ork.weapon);  while (!Mensch.dead() && !Ork.dead() ) {    //Alternativ: for (player hp >=0)      System.out.println("Mensch gegen Ork " + Mensch.attack(Ork));      if (Mensch.dead() || Ork.dead()) {         break;     }      System.out.println("Mensch gegen Ork " + Ork.attack(Mensch)); }  System.out.println("Ork ist tot: " + Ork.dead()); System.out.println("Mensch ist tot: " + Mensch.dead());  }  }   Weapon.java  import java.util.concurrent.ThreadLocalRandom; public class Weapon { String name; int damage; int hp;  public Weapon(String string, int d, int hp) {      // TODO Auto-generated constructor stub }  public void setName (String n) {     name = n; } public String getName() {     return name; } public void setDamage (int d) {     damage = d; } public int getDamage() {     return damage; } public void setWHP (int h) {     hp = h; } public int getWHP() {     return hp; }      public int useWeapon() {      if      (broken())         return 0;     hp = hp - 5;     return (damage / 2) + random(); } private int random() {     return ThreadLocalRandom.current().nextInt(1, damage + 1); }  private boolean broken() {     return hp <= 0; } }   I know its a lot of code but I keep getting the same error, also I'm quite new to java so I would appreciate some tips or suggestions to make my code better or more failsave. The code doesn't do much yet but it will (hopefully) be a simple game soon in which two characters fight eachother with some calculations on damageoutput of each player. In this case a Human and Ork. Feel free to try it out

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


Is it possible, and has it been attempted, to use quantum mechanics to deduce Newtonian, macroscopic level mechanics laws as was the case of statistical mechanics deriving thermodynamic relations?

I have heard that one can recover classical mechanics from quantum mechanics in the limit the $\hbar$ goes to zero.  How can this be done?  (Ideally, I would love to see something like: as $\hbar$ goes to zero, the position wavefunction reduces to a delta function and that the Schrodinger equation/Feynman path integral reduces to the Newtonian/Lagrangian/Hamiltonian equations of motion.)


I am getting error "java.lang.NullPointerException" by setting my adapter in ListFragment activity.  Here is my code:  private List<Music> musicList; public View inflate; ListView searchList; public class SearchFragment extends ListFragment { public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {         context = getActivity().getApplicationContext();         inflate = inflater.inflate(R.layout.search, container, false);         musicList = new ArrayList<Music>();         adapter = new CustomListAdapter(musicList, context);         searchList.setAdapter(adapter); }   I have a NullPointerException in the following code:  The error is at searchList.setAdapter(adapter); so i also try to change to adapter value from new ArrayList<Music>() to new <Music>ArrayList() but no luck.  My Music class looks like this:  public class Music {     private String title, thumbnail, duration, uri, waveform;     private int likes, playbackCount;      public Music() {     }      public Music(String name, String thumbnailUrl, int likes, String rating, int playbackCount) {         this.title = name;         this.thumbnail = thumbnail;         this.likes = likes;         this.duration = rating;         this.playbackCount = playbackCount;     }      public String getTitle() {         return title;     }     public void setTitle(String name) {         this.title = name;     }      public String getThumbnail() {         return thumbnail;     }     public void setThumbnail(String thumbnail) {         this.thumbnail = thumbnail;     }      public int getLikes() {         return likes;     }     public void setLikes(int likes) { this.likes = likes; }      public String getDuration() {         return duration;     }     public void setDuration(String duration) {         this.duration = duration;     }      public int getPlayBackCount() {         return playbackCount;     }     public void setPlayBackCount(int playbackCount) {         this.playbackCount = playbackCount;     }      public String getUri() {         return uri;     }     public void setUri(String uri) {         this.uri = uri;     }      public String getWaveform() {         return waveform;     }     public void setWaveform(String waveform) {         this.waveform = waveform;     } }


I have a user inputting a day (Monday) and a week number in order to search for a value in an array. However, to get the array output, I need the row and column numbers. The row number can be obtained from the user input, 1,2 etc. However, the part where they input Monday, Tuesday etc. is a bit trickier. Is there a way to convert Monday Tuesday etc to an integer (1,2) so that I can use that to find the array element?   I tried this method, but it's not working. The conversion of value to an int obviously doesn't work due to "Monday" not being a number. Is there an alternative way to doing this?  int Value = Convert.ToInt32(value);  DateTime ClockInfoFromSystem = DateTime.Now; Value = (int)ClockInfoFromSystem.DayOfWeek;   This is the rest of the code if you need it  private void AddToArray() {     txtOutput.Text = "Filling the array with user input..." + "\r\n\r\n";      String value;     int num;      for (int week = 0; week < productsArray.GetLength(0); week++)     {         for (int day = 0; day < productsArray.GetLength(1); day++)         {             value = Microsoft.VisualBasic.Interaction.InputBox("Enter Value for Day " + day + " of Week " + week, "Enter Value");             try             {                 while (!(int.TryParse(value, out num)))                 {                     MessageBox.Show("Not a valid number, try again.");                     value = Microsoft.VisualBasic.Interaction.InputBox("Enter a Number", "Enter Number");                  }             }             catch (Exception)             {                 MessageBox.Show("Value entered is not in a valid format");             }              productsArray[week, day] += int.Parse(value);         }     }     txtOutput.Text += "The product allocation is as follows:" + "\r\n\r\n"; }  private void Array() {     txtOutput.Text += "\tMon\tTue\tWed\tThu\tFri\r\n";     for (int week = 0; week < productsArray.GetLength(0); week++)     {         txtOutput.Text += "Week " + (week + 1) + "\t";         for (int day = 0; day < productsArray.GetLength(0); day++)         {             txtOutput.Text += productsArray[week, day] + "\t";         }         txtOutput.Text += "\r\n";     }      txtOutput.Text += "\r\n" + "Retrieve products completed on a specific day." + "\r\n";     String value = Microsoft.VisualBasic.Interaction.InputBox("Enter Day", "Enter Day", "Monday");      int num;      String value2 = Microsoft.VisualBasic.Interaction.InputBox("Enter Week", "Enter Week");     try     {         while (!(int.TryParse(value2, out num)))         {             MessageBox.Show("Not a valid number, try again.");             value2 = Microsoft.VisualBasic.Interaction.InputBox("Enter Week", "Enter Week");         }     }     catch (Exception)     {         MessageBox.Show("Value entered is not in a valid format");     }     int Value2 = Convert.ToInt32(value2);     int Value = Convert.ToInt32(value);      DateTime ClockInfoFromSystem = DateTime.Now;     Value = (int)ClockInfoFromSystem.DayOfWeek;      var output = productsArray[Value2, Value];      txtOutput.Text += "Products completed on that day are: " + output;  }

What's the best way to convert a string to an enumeration value in C#? I have an HTML select tag containing the values of an enumeration. When the page is posted, I want to pick up the value (which will be in the form of a string) and convert it to the corresponding enumeration value. In an ideal world, I could do something like this: StatusEnum MyStatus = StatusEnum.Parse("Active");  but that isn't a valid code.


I'm using DbVisualizer Free 11.0 [Build #3077]  OS: Windows 10  OS Arch: amd64  Java Version: 1.8.0_242  Java VM: OpenJDK 64-Bit Server VM  Trying to create UCanAccess driver using the following theme:    But the current versions are different and now my Driver Manager looks like this:   Seems to be, it's ok, but when I try to connect I see the following message:    Where am I wrong? Quotes or spaces in Path? Jars versions? Jars should be placed in defined place?  Thanks a lot.

I am getting a NoClassDefFoundError when I run my Java application.  What is typically the cause of this?


I'm having trouble with the grub rescue. I am following the tutorial , but I have the following problem.  I have to run the command  set prefix=(X,Y)/path   making (X,Y)/path the path where the .mod files are located. I found that directory to be (hd0,gpt7)/usr/lib/grub/x86_64-efi. When I set that prefix and try to run the insmod commands, I get:  error: file '/usr/lib/grub/x86_64-efi/i386-pc/linux.mod' not found   What I think the problem is here, I have located the linux.mod file in the directory /x86_64-efi, but then GRUB tries to find it at /x86_64-efi/i386-pc, adding that directory that doesn't even exist there (I checked its existence with ls).  I made another test after this. I did:  set prefix=(hd0,gpt7)/usr/lib/grub   But I got the same error:  error: file '/usr/lib/grub/i386-pc/linux.mod' not found   It seems as it always adds the path i386-pc.  How can I force GRUB to look for the files in the directory I want? Or is my problem something else?

Yesterday, I tried to dualboot Ubuntu 16.04 onto my hard drive, creating a new partition for Ubuntu alongside my existing Windows 8. First, I disabled the fast-boot option in Windows 8, and still GRUB did not load, and it went directly to Windows boot-up. Then I did some research and found this article:     Basically, I issued the BCDEdit command in Windows, and entered in the following code:  bcdedit /set {bootmgr} path \EFI\ubuntu\grubx64.efi   When I reboot, I get a basic GRUB2 terminal, and after I type in the exit command, then a second Shell prompt appears, and after typing the exit command again, the GRUB2 menu to select the OS to boot finally appears... with only Ubuntu and Ubuntu memory test as options, not Windows 8.  After booting into Ubuntu, I tried to run the Boot-repair Utility, but that shows this following error:   How do I approach this problem? The Pastebin log is here:   Thanks for the help!


I just installed Ubuntu Gnome 16.10 on my Acer Inspire M laptop but it could not detect the wireless card. I found my earlier post:     but it did not completely help me here.  Upon trying:  sudo dpkg -i *.deb   I get:  dkms depends on gcc; however: Package gcc is not installed. dkms depends on make | build-essential _ dpkg-dev; however Package make ... is not installed.   The results of   sudo lshw -class network   are:      *-network                         description: Network controller        product: BCM4352 802.11ac Wireless Network Adapter        vendor: Broadcom Limited        physical id: 0        bus info: pci@0000:04:00.0        version: 03        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress bus_master cap_list        configuration: driver=bcma-pci-bridge latency=0        resources: irq:18 memory:b0600000-b0607fff memory:b0400000-b05fffff   *-network        description: Ethernet interface        product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller        vendor: Realtek Semiconductor Co., Ltd.        physical id: 0.1        bus info: pci@0000:05:00.1        logical name: enp5s0f1        version: 14        serial: c4:54:44:69:85:14        size: 10Mbit/s        capacity: 1Gbit/s        width: 64 bits        clock: 33MHz        capabilities: pm msi pciexpress msix vpd bus_master cap_list ethernet physical tp mii 10bt 10bt-fd 100bt 100bt-fd 1000bt 1000bt-fd autonegotiation        configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=2.3LK-NAPI duplex=half firmware=rtl8411-2_0.0.1 07/08/13 latency=0 link=no multicast=yes port=MII speed=10Mbit/s        resources: irq:45 ioport:3000(size=256) memory:b0704000-b0704fff memory:b0700000-b0703fff   The results of   lsusb   are:  Bus 001 Device 002: ID 8087:8000 Intel Corp.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 002 Device 011: ID 0781:5575 SanDisk Corp.  Bus 002 Device 010: ID 04f3:0085 Elan Microelectronics Corp.  Bus 002 Device 003: ID 04ca:200a Lite-On Technology Corp.  Bus 002 Device 002: ID 04f2:b3f6 Chicony Electronics Co., Ltd HD WebCam (Acer) Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub   and the results of   lspci   are:  00:00.0 Host bridge: Intel Corporation Haswell-ULT DRAM Controller (rev 09) 00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09) 00:03.0 Audio device: Intel Corporation Haswell-ULT HD Audio Controller (rev 09) 00:14.0 USB controller: Intel Corporation 8 Series USB xHCI HC (rev 04) 00:16.0 Communication controller: Intel Corporation 8 Series HECI #0 (rev 04) 00:1b.0 Audio device: Intel Corporation 8 Series HD Audio Controller (rev 04) 00:1c.0 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 1 (rev e4) 00:1c.2 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 3 (rev e4) 00:1c.3 PCI bridge: Intel Corporation 8 Series PCI Express Root Port 4 (rev e4) 00:1d.0 USB controller: Intel Corporation 8 Series USB EHCI #1 (rev 04) 00:1f.0 ISA bridge: Intel Corporation 8 Series LPC Controller (rev 04) 00:1f.2 SATA controller: Intel Corporation 8 Series SATA Controller 1 [AHCI mode] (rev 04) 00:1f.3 SMBus: Intel Corporation 8 Series SMBus Controller (rev 04) 04:00.0 Network controller: Broadcom Limited BCM4352 802.11ac Wireless Network Adapter (rev 03) 05:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTL8411B PCI Express Card Reader (rev 01) 05:00.1 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 14)

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


Note: This may not be correct mathematical term, so in case of confusion, I mean what division is to multiplication. If not, just poke me in the comments.  I was given this the other day:  $2^x=8$  Which I solved as follows:  $2^x=2^3 \implies x=3$  What did I actually do to solve the equation?  Does this apply for other numbers and is there a general rule? I.e. $n^x$

You know, like addition is the inverse operation of subtraction, vice versa, multiplication is the inverse of division, vice versa , square is the inverse of square root, vice versa.  What's the inverse operation of exponents (exponents: 3^5)


let $f(x)$ is  continuous on $[0,1/2]$, and derivative on $(0,1/2)$,such $$f'(1/2)=0$$ show that  there exsit $c\in(0,1/2)$, such $$f'(c)=2c(f(c)-f(0))$$  My try: let $$F(x)=e^{-x^2}[f(x)-f(0)]\Longrightarrow F'(x)=e^{-x^2}[f'(x)-2x(f(x)-f(0))]$$ then I can't

Let $f:\mathbb{R}\to\mathbb{R}$ be a differentiable function s.t. $f'$ is continuous. Suppose $f'\left(\frac{1}{2}\right)=0$, prove that there is $c\in\left(0,\frac{1}{2}\right)$ s.t.  $$f'(c)=2c(f(c)-f(0))$$


$A$ is a matrix.  $$A^TA=0 \iff A=0$$How can I prove this?  Please help me.

Let $A$ be a $4 \times 4$ matrix. Show that if $A^TA$ or $AA^T$ is the zero matrix, then $A$ is the zero matrix.   I feel very close to solving the problem so far. I have said that  $$[0]_{ij}=\sum_{k=1}^4 [A]_{ik}[A^T]_{kj} =\sum_{k=1}^4 [A]_{ik}[A]_{jk} \qquad \text{for all }i,j \in \{1,2,3,4\} $$  and proven for the case if $i=j$. However, I cannot seem to find a good way to prove it to be true if $i\neq j$.


I remember in The Chamber of Secrets during the flashback scene that while Dumbledore distrusted Riddle, there didn't seem to be any indication that he knew that Tom was the one unleashing the basilisk. That said, we also know Dumbledore is a great chess master and may not have had a reason to show he knew at that time. At the same time, we can't know if Dumbledore could at the time verify Hagrid's innocence (or even knew of it himself). It wasn't until Armando Dippet retired that Dumbledore was able to hire Hagrid, and at that point there may or may not have been several intervening years for Dumbledore to discover the true culprit.  Is there conclusive canon evidence to show if or if not Dumbledore knew the true culprit during the first time the chamber was opened?

While watching Harry Potter and the Half-Blood Prince this morning, my son asked a lot of plot questions, and one of his inquiries about Tom Riddle stumped me. So, here I am, asking all you fine people for help!   Who knew first that Tom Riddle was the Heir of Slytherin: Tom Riddle or Dumbledore?  I would love to see a definitive canon answer to this question, if at all possible.   There were obviously different clues dropped over the years that pointed toward Tom Riddle being the Heir of Slytherin. A few examples:   Tom Riddle disclosed he could speak with snakes to Dumbledore when Tom was eleven and did not yet know the implications of being a Parselmouth. Merope Gaunt's Slytherin lineage.  The diary Horcrux and the Chamber of Secrets. The basilisk and Myrtle's death.   Is it established in canon -- in reference to the Heir of Slytherin, Dumbledore, and Tom Riddle -- who knew what, and when? Who knew first that Tom Riddle was the Heir of Slytherin?  As I already mentioned, I'm looking for an answer grounded in canon -- the books, interviews and/or quotes by J.K. Rowling, or Pottermore. Speculative answers within the spirit of canon are totally fine by me. I did search the site to ensure this question has not been asked already and I didn't find anything -- if this is a duplicate, vote accordingly :)


com.sun.jdi.ClassType.invokeMethod() takes < 1ms on a dummy method with no parameters at all. With 6 parameters, it takes 3-4ms (the method implementation does not change, the parameters are just passed to the method but are not used at all). For 20 params it is like 16-17ms. So it takes 16-17ms to pass these parameters to the method which is huge in my opinion. This is my method which is called: public static void dummy(Object a1, Object a2, Object a3, Object a4, Object a5, Object a6){ //some basic operations which do not depend on the params, can be replaced with Thread.sleep(), or even left empty }  and this is how I call it: List<Value> values = new ArrayList<>(map.values()); long l = System.currentTimeMillis();  invokeMethod(threadRef, dummyMethod, values, ObjectReference.INVOKE_SINGLE_THREADED);     System.out.println("time:"+ (System.currentTimeMillis() - l));  I also tried with Varargs, the result is even worse. Also, is there a workaround so that I can pass all my params to the method without this huge time overhead(for example using some sort of wrapper)? Update:  I ran another benchmark where I call invokeMethod several thousand times and calculate the total time it takes. The difference between the no-param and multi-param version is too large to be because of microbenchmark bias.

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


How can I remove zenmap that I installed using :  bzip2 -cd nmap-7.00.tar.bz2 | tar xvf - cd nmap-7.00 ./configure make sudo make install

I used source code to build one package such as below:  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib --with-package-name="Myplugin" --with-package-origin="http://www.ubuntu.org/" --enable-gtk-doc --disable-static make make install   But unfortunately, i discovered that its the latest version, and has lot of bugs, so i need to remove it/uninstall it. But how can i do so? I tried make clean; make uninstall but still i see it exist:  # pkg-config --list-all | grep Myplugin myplugin-.... $ ls /usr/lib/myplugin/libXYZ.so exist....   How do you remove this now?


I have included a glossary as a separate chapter at the end of my thesis. This chapter lists new terms defined by me. To refer to the glossary in other chapters, I used the \gls command, which creates a hyperlink between an occurence of a given "term" in the text and its corresponding glossary entrie(s).   This hyperlink clearly signals to the reader of a soft copy (PDF) when I'm referring to the glossary.  However, if the reader only has a hard copy, there is no clear indication that a given term is defined in the glossary.  My question is: is there a more explicit way of indicating to the reader that I'm referring to the glossary? I'm thinking along the lines of what the \cite command does when I refer to a bibliography entry...

How do you make it visible to the reader that the printed word/term is an entry in the glossary? In my PDF on the computer, I just see it because I use the hyperref package and there's a red box around it. But when printing it, there's just nothing that makes it visible to the user.  Is there a typographically good and common way of doing this?


After putting credentials laptop stuck in purple screen ... I have AMD driver so I can't install proprietery driver either... need help

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents: