Prove that the function $$f(x) = \begin{cases}  x^2 \quad \text{if $x$ is rational}\\ 0 \quad \text{if $x$ is irrational} \end{cases}$$is differentiable at $x=0$.  For differentiability the following limit $$\lim_{h \to 0}\frac{f(0+h)-f(0)}{h}$$ should must exist. Now proving that the above limit is $0$. As $f(0)=0$, solving the inequality $|\frac{f(h)}{h}|<\epsilon$, we get for all rational $h$ we have to find a $\delta$ such that whenever $|h|<\delta$, $|\frac{f(h)}{h}|=|h|<\epsilon$. So if we choose $\delta=\epsilon$, then we are done. Now for all irrational $x$ we have to find a $\delta$ such that whenever $|h|<\delta$, $|\frac{f(h)}{h}|=0<\epsilon$ which is always true for every $\delta$. So again we are done and the limit exists. So the above given function is differentiable at $x=0$. Am i right ?

Consider a function $f (x) $ such that $f (x)=\begin {cases} x^2 &  \text {x=irrational}     \\ 0   &\text {x=rational} \end {cases}$ Then prove that $f $ is differentiable  at $x=0$ and $f'(0)=0$ $$\text {Attempt} $$ .                  .  Now I consider two sequences $x_n=\frac {\sqrt{2}}{n},y_n=\frac {1}{n} $ one irrational one rational both going to $0$ as $n\to \infty $. But now the problem is how to consider LHD,RHD.Do we have to consider irrational case then rational case and if both limits go to same value then say that function is differentiable.I can easily see the graph on graphical calculator and verify the result but I am more interested in analytical method.


I am currently studying English and as such enjoy reading English books from time to time; for instance I have recently been reading the fifth book of A Song of Ice and Fire since the French version was not to be released anytime soon.  As I read it I often came across a grammatical form I had never encountered previously, this form being the usage of "for" to introduce propositions as per this example:  "We must learn english, for it is one of the most widely-spoken language."  My question if the following: is this form correct (I do think it is), and if it is then is it still used today? I really like this usage of the "for" preposition but still, I'd like to be sure it can be used before actually using it (in class or elsewhere).  Thanks!    EDIT: Upon further searches, now knowing that "for" is in that case a conjunction, I found out that this form is perfectly correct - though it is more of a literary form.

I am not a native speaker. On a previous question of mine, I thanked for an answer by saying:     So the phrase is not an idiom, since it is applied in its literal sense.   I consciously chose since over because, because — well, I like that usage of since, even though I know that some (native speakers) don't like it. Nonetheless, that choice got me thinking for a while, and it occurred to me that I even could have used more alternatives, namely as or for, without changing the meaning.   So, on a general note, here are the alternatives:        Statement A (is true), because statement B (is true).   Statement A (is true), since statement B (is true).   Statement A (is true), as statement B (is true).   Statement A (is true), for statement B (is true).      Are these completely interchangeable? Or interchangeable in certain situations? Or can you point out any (not-so-)subtle differences between any of them? Are there even more synonyms?


i recently picked up a toshiba satellite r15-s829 at my local pawn shop and while i do love this little guy, im hoping that going back to ubuntu will make him better. i need to know which version of ubuntu is the best option and whether or not the tablet functions will work as i got this with the intent of being for my 3d modeling tasks and because i like the old school analog note taking features of the tablet pen function.

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


I am trying to find the particular solution to the $y^{(4)} -2y'' +y = xe^x $ and currently am misunderstanding what to do.   My steps:   the polynomial operator concerned is $p(s)= s^4 -2s^2 + 1 $ which  0 at 1:  $p(1) = 0 $  so now i know that the solution will be something like:  $y_p = (Ax^3 + Bx^2)e^x$  where the parentheses show that it is a linear operator on the last coefficient.   so far I think that my method is to differentiate this four times and collect up the terms of each $y_p$ according to the original equation and see what A and B are equal to.   I assume this is okay to do with linear operators?   $y_p' = (Ax^3 + Bx^2)e^x + (3Ax^2 + 2Bx)e^x$  $y_p'' = (Ax^3 +(6A + B)x^2 + (4B + 6A)x + 2B)e^x$  $y_p''' = (Ax^3 +(9A +B)x^2 + (18A +6B)x + (6A + 6B))e^x$  $y_p'''' = (Ax^3 +(12A +B)x^2 + (36A +8B)x + (24A + 12B))e^x$  which then gives me an equation of $A-2A +A = 1$ which is wrong because this is the equation for the first term of the particular solution. Can anyone please help me take it from here?

I am trying to find the particular solution to the $y^{(4)} -2y'' +y = xe^x $ and currently am misunderstanding what to do.   My steps:   the polynomial operator concerned is $p(s)= s^4 -2s^2 + 1 $ which  0 at 1:  $p(1) = 0 $  so now i know that the solution will be something like:  $y_p = (Ax^3 + Bx^2)e^x$  where the parentheses show that it is a linear operator on the last coefficient.   so far I think that my method is to differentiate this four times and collect up the terms of each $y_p$ according to the original equation and see what A and B are equal to.   I assume this is okay to do with linear operators?   $y_p' = (Ax^3 + Bx^2)e^x + (3Ax^2 + 2Bx)e^x$  $y_p'' = (Ax^3 +(6A + B)x^2 + (4B + 6A)x + 2B)e^x$  can I collect terms from different linear operators like i did with $y_p''$   and I assume that to find the particular solution I must find $y_p''''$ as it is in the original equation


Consider a metallic rod hung by two springs (symmetrically), a magnetic field exists out of the plane of our system. At t = 0, we switch on a battery which produces current in wire (left to right in the rod) so now, a force of magnetic origin acts on the rod to pull it down and extend the springs thus magnetic force appears to do work in this case.  So is the fact that magnetic forces don't do work incorrect? Because I don't think that some other force can do work on the system  Assume the rod and springs to be massless.

Consider a single charge moving only under the influence of Magnetic Field $\vec{B}$. The charged particle moves in a circle and the work done by $\vec{B}$ is 0. Now consider a current element in a uniform magnetic field ($\vec{B`}$). Now the derivation of the expression of force results in the the equation $\vec{F} = i \vec{l} \times \vec{B}$ (for a uniform magnetic field) where $\vec{l}$ is the vector joing the ends of the current element. For simplicity, I will consider a straight conductor. When the two vectors are perpendicular, the current element experiences a net non-zero force which does not cause a torque and causes translational motion. Therefore, in this case the magnetic field does positive work.  How is this contradiction possible? Magnetic field, which did no work on a single charge, now does positive work when the current carrying elements clumped together in a conductor. Is there any implicit assumption in the whole process which causes this? Can someone please give a good explanation?


I want to export a georeferenced PDF from my QGIS project, and I am unable to tick the box as I need GDAL 3.0. However, my colleague is using windows (I am using a mac) and he is able to export as a GeoPDF without any issue, despite him not having GDAL. How can I generate a solution?  I know this question seems to have been asked before, however these questions are related to GDAL. I am not sure why I need GDAL at all, since I know my colleague on Windows doesn't have it (and I tried to install it via homebrew and it didn't work  Edit - I installed QQIS from Qgis.org. I have both 3.10 and 3.12 installed. I am running 10.14.6 (Mojave).

I am trying to take advantage of the new georeferenced PDF export in QGIS 3.10 but the checkbox is grayed out with a message that "GeoPDF creation required GDAL version 3.0 or later".  The answers from  include a workaround for windows as well as claims that the newest releases and nightly builds are now built against GDAL 3.  However, I downloaded the mac nightly from  and it still uses GDAL 2.4.1.  Can anyone tell me how to get the necessary versions on a Mac?


I answered a question, was upvoted, and then edited the question. My badge progress was immediately updated. Then I thought better of my edit and rolled it back. My badge progress remained incremented.  Just confirming this is the expected behavior, as opposed to my badge progress being decremented. Would the behavior be different if someone else had rolled back my edit?

Formerly List of all badges with full descriptions.  What are badge name's requirements? Why didn't I get badge name ? Which badges can I earn multiple times?    Jump to:                    Note: Some badges are awarded based on score. The term score means the total number of upvotes minus the total number of downvotes.  Any badge with a *** next to it is one of 20 badges that count towards the  displayed on a moderator candidate in an election. The candidate score is a total of 40 points: the first 20 are awarded based on the user's rep divided by 1000 and rounded down; the second 20 represents the total number of unique badges earned of the 20 that count. Note that if the same badge is earned multiple times, it will only count once towards the candidate score.  Any badge with a "(retired)" next to it is no longer awarded, but is retained by users who previously earned them. See  for more info on what it means for a badge to be retired.       Visit the  of the  on any site to see a complete list of badges that you can filter by earned, unearned, or type.


I am calling tooling api from my Queueable apex to get information of flow object from my org and scheduling it on daily basis. Now my problem is when I run my code from anonymous window with Authorization header set to 'Bearer '+Userinfo.sessionId(), It works fine. But when i schedule it, it returns error saying :"Session expired or invalid","errorCode":"INVALID_SESSION_ID". I think the reason is scheduler runs in system context and in that case Userinfo.sessionId() is returned as null. So is there any way to make tooling api callouts from scheduler or Queueable? Here is my code-  String endpoint = 'https://lightningwarrior-dev-ed.my.salesforce.com/services/data/v37.0/tooling/query?q=Select+Id,processtype,Description,LastModifiedDate,MasterLabel,Status,LastModifiedById,VersionNumber+From+Flow';  HttpRequest req = new HttpRequest(); req.setEndpoint(endpoint); req.setMethod('GET');  req.setHeader('Content-Type', 'application/json'); req.setHeader('Authorization', 'Bearer ' + UserInfo.getSessionID());  Http httpreq = new Http(); HttpResponse res = httpreq.send(req); String reqresponse = res.getBody(); system.debug('dt'+reqresponse); jsonHelperClass jsonres =  new jsonHelperClass(); jsonres = (jsonHelperClass)JSON.deserialize(reqresponse ,     jsonHelperClass.Class); public List<RecordWrapper> ListrecordsWrap=new List<RecordWrapper>(); ListrecordsWrap=jsonres.records; system.debug('jsonres'+ListrecordsWrap[0].MasterLabel); public class jsonHelperClass {     public List<RecordWrapper> records;     public jsonHelperClass()     {      } } public class RecordWrapper {     Public String Id;     Public String ProcessType;     Public String Description;     Public String MasterLabel;     Public String Status;     Public Integer VersionNumber;     public Id LastModifiedById;     public Datetime LastModifiedDate;     public RecordWrapper()     {     } }   Thanks in advance.

What is the best way to get Session ID or oAuth Access Token, without having to use password in Apex Code (or) in custom settings (or) Named Credentials?  Will one of the oAuth flows work in this case?  (obviously username-password flow cannot be considered since it involves passing the password as part of URL)  Here's the use case i am trying to achieve:   I am trying to call the MetaData api of salesforce using the metadata api wrapper available on . Using this i am trying to find out, metrics like number of custom fields, number of test classes, number of classes etc. This process should run in a scheduled batch apex job. In order to call metadata api, i need to pass the sessionid. I used UserInfo.GetSessionID in my batch apex class but that doesn't work as per my research and also tried it. The other option is to call the login service to get the session id or access token, which i can further use to make subsequent calls to metadata api. All the research i did points mostly to articles where the REST api is called to get access token by using connected app credentials, but all of these involve passing password as an attribute to get the access token. So i figure oauth is better way to go and am basically trying to find out the best way(oAuth flow) to get access token without needing to use a Salesforce User's password. And any helpful articles for the same to build this.


I find a lot of the time users who don't accept answers are usually new(er) users. They don't know  that the accept option is there or they just don't know how to do it. I know this because a lot of the time I'll add a comment as such:     Glad to help! If this answer helped you out you should  it!   And they're comment back telling me they didn't know about it.  A lot of the time I notice they will add comments like:   "Thanks, this helped" "It's working now, thanks!" "Just what I was looking for! Thanks!"    If key words such as those are detected, there should be a small one liner telling them they should consider accepting the answer or maybe even go so far as to add a checkbox or button next to the comment to allow them to accept an answer. Maybe an illustrated example will help:    Or:    I know it seems like a small change but I think it'll help newer users learn about accepting answers.  Also, the accepting link points to

A lot of times I will answer a question, OP will post "Thanks very much!" And then leave, not accepting the answer that fixed their problem. I know I can just give them a gentle reminder (asking them to consider accepting), and on most occasions I do and they do end up accepting, but the site should be intuitive enough for them to do this by themselves. So when they post "Thank you" or "Thanks" the site could display a tool tip saying to "accept the answer if it helped best".    The message on the image could be changed to be less forceful I guess.


Just out of curiosity. Maybe there are some technical reasons why the drivers are not up to date.  14.04 64b In additional drivers I have 331, but at the nvidia website they have 340. I'm coming back now to ubuntu, but before, lets say 6 months or 1 year ago was the same. The repositories were always behind.

Why are packages in the official Ubuntu repositories older than the latest (upstream) versions from Debian Sid, PPAs, the authors, etc.?


I learned this as a kid. The setup is one card laid out at a time in a row. You make stack cards next to each other if they match numbers or suits. You may also stack in the same manner but skipping two cards backward toward the first card played. The object is to get all 52 cards into a single stack. I’ve never heard the name of this solitaire but always referred to it as Satans Solitaire because its easy to play but the devils own time to beat. Anyone else know this game, have a name for it, or variants?

You start flipping cards over one at a time and holding them in one hand. When you have two cards of the same suit that are separated by two other cards (e.g. 4♣ 2♦ 7♥ 10♣), you discard the middle two. When two cards of the same value are separated by two other cards (e.g. 4♣ 2♦ 7♥ 4♥), you discard all four.  This game is neither Accordion nor Royal Marriage, but bears similarities to both. Somebody else  on Yahoo Answers five years ago and the response was unsatisfactory.  If someone can identify this game, I would also like to know what happens when you finish with two cards left: do you win, as in Royal Marriage, or not?


Is it true that given a matrix $A$, $A$ has L.I columns/rows if and only if $\text {det}(A)=0$?   This is my question I think the statement is something like the above but I'm not 100% sure. If anyone could give me the correct statement and maybe some reasoning (not necessarily proof) as to why this would be the case I would appreciate it.  I'm more than willing to give my input but I'm quite stuck at the moment so have not a lot to offer unfortunately.  Thanks.

The determinant of a square matrix is zero if and only if the column vectors are linearly dependent.   I see a lot of references to this all over the web, but I can't find an actual explanation for this anywhere.


I have a points x and y and I need to check the point which intersect within a semi- pie.  I need an algorithm to find the point is intersect in the semi circle. for rectangle we have point contains method to check the point intersect the rectangle, but this doesn't work for semi circle segments with start and end angle.  I have created many semi pie segment, when I touch the pie segment, I need to check the point intersect of which segment.

I have a list of two-dimensional points and I want to obtain which of them fall within a semi-circle.    Originally, the target shape was a rectangle aligned with the x and y axis.  So the current algorithm sorts the pairs by their X coord and binary searches to the first one that could fall within the rectangle.  Then it iterates over each point sequentially. It stops when it hits one that is beyond both the X and Y upper-bound of the target rectangle.    This does not work for a semi-circle as you cannot determine an effective upper/lower x and y bounds for it.  The semi-circle can have any orientation.    Worst case, I will find the least value of a dimension (say x) in the semi-circle, binary search to the first point which is beyond it and then sequentially test the points until I get beyond the upper bound of that dimension.  Basically testing an entire band's worth of points on the grid.  The problem being this will end up checking many points which are not within the bounds.


Recentlly i have installed ubuntu 12.04 and got to used with it ,but suddenly bymistake i deleted few data and files ,so could you please tell me how to recovery the last data with steps .

Are there any tools, methods, incantations to recover recently deleted files on Ubuntu?  If it makes any difference, I want to recover a  2.x database file. But would be better to have a method/tool that works on any kind of file.


I've tried to upgrade 19.04 to 19.10. Now when I start the system, it loads, but is not usable as the only thing I see is "Oh no! Something has gone wrong". I can see activities though and there are "Sorry, Ubuntu 19.10 has experienced an internal error" and "System program problem detected" windows, but I can't get to them -- it goes back to "Oh no!" window.  Upgrade process was not smooth. At some point the messages were displayed:  lvm2-activation-generator: lvmconfig failed lvm2-activation-generator: Activation generator failed.   I fixed this problem, following this advice:   This is similar problem, but for me disabling autologin hasn't helped:

Yesterday I started the upgrade from 12.10 to 13.04, but I interrupted it because it was taking too long. Now if I restart it, it doesn't proceed.  Is there any possibility to clean the mess it left when I interrupted it and make a clean restart of this update?


I have suggested some edits to be reviewed, but I noticed that there is no review button at the topbar. So how does the peer-editing process work on this site?

I have 300+ reputation on Stack Overflow and following image is of my Stack Overflow site,         As we can see that it is showing "Review" link on Stack Overflow site. Now I have 800+ reputation on Meta Site, here is the image,         But on Meta it doesn't show me "Review" link. Do I require more reputation to gain the Review section? When Review link will be available for me on Meta?


I  have a hashset of strings that contain lognames called pidLogsLines. From this hashset I want to filter out logs that only contain strings from another hashset called pidList and put these logs inside a new hashset called filesWithPid. I am doing this with two loops: var filesWithPid = new HashSet<string>(StringComparer.OrdinalIgnoreCase); foreach(var logname in pidLogsLines) {     foreach(var pid in pidList)     {         if (logname.Contains(pid))         {             filesWithPid.Add(logname);         }     }  }  Is this the optimal way to do it? I am new to C# so I am not aware of any elaborate faster ways to do it

For the following block of code:  For I = 0 To listOfStrings.Count - 1     If myString.Contains(lstOfStrings.Item(I)) Then         Return True     End If Next Return False   The output is:  Case 1:  myString: C:\Files\myfile.doc listOfString: C:\Files\, C:\Files2\ Result: True   Case 2:  myString: C:\Files3\myfile.doc listOfString: C:\Files\, C:\Files2\ Result: False   The list (listOfStrings) may contain several items (minimum 20) and it has to be checked against a thousands of strings (like myString).  Is there a better (more efficient) way to write this code?


How can I prove that:$$\frac{\cos\left(x\right)}{1+\sin\left(x\right)} =  \frac{1-\sin\left(x\right)}{\cos\left(x\right)}$$   My attempt:   $$\cos^2(x/2) =\frac{\cos x +1}{2}$$ $$\sin x = 2 \sin(x/2)\cos(x/2)$$  $$\frac{\cos\left(x\right)}{1+\sin\left(x\right)} =\frac{2\cos^2(x/2) -1}{1+2 \sin(x/2)\cos(x/2)}=  \frac{(\sqrt2\cos(x/2) -1)\sqrt2\cos(x/2) +1)}{1+2 \sin(x/2)\cos(x/2)}$$  Can anyone help me to simply this last expression or provide me with tip?

$$\frac {\sin x}{1-\cos x} = \frac {1+\cos x}{\sin x}$$ The only way I can see of doing this is by cross multiplying but isn't that not allowed when trying to prove something?


I was listening to BBC while reading the script and the announcer said...  "Then I heard one of them say his parents were dinosaurs"  Is that correct?  I don't think so.

"Heard me [infinitive]" vs. "heard me [present participle]"             At that time, you wouldn't have heard me talk about it.   At that time, you wouldn't have heard me talking about it.         At that time, you wouldn't have heard me condemn it.   At that time, you wouldn't have heard me condemning it.         Which one of the above sentences are incorrect and why?


The Problem : Let $f:B \subset \mathbb{R} \to \mathbb{R}$ be uniformly continuous on a bounded set $B$. To show that $f(B)$ is bounded.  I have done the simplified case when $B$ is an interval (using Weierstrass' theorem and local boundedness induced by continuity). But what if $B$ is not an interval? Can we always write B as finite union of intervals? Any help will be greatly appreciated. Thank you.

I am trying to prove the following:  If $A\subset\mathbb R$ is bounded and $\,f:A\to \mathbb R\,$ is uniformly continuous, then $f[A]$ is bounded.  Could you check my proof?  Let $A \subseteq [-K,K]\subseteq \mathbb R$. Let $\varepsilon = 1$. If $f$ is uniformly continuous there is $\delta$ wuth $|x-y| <\delta$ imply that $|f(x)-f(y)|<1$ for all $x,y\in A$. Let $a \in A$. Then because $A$ is bounded there is a finite number of balls $B(a_n,\delta)$ that cover $A$. Let the number be $N$. Then $f(a)-N \le f(x) \le f(a) + N$ for all $x\in A$.


How can I change the contents of a variable using a method? Maybe I'm not saying this correctly. What is a way to get the reference to a variable like in C? Example:  // main stuff int gorilla = 29; makeMeABanana(&gorilla);  void makeMeABanana(int *gorilla) { }   How can I do something like this in Ruby?

In Ruby, is it possible to pass by reference a parameter with value-type semantics (e.g. a Fixnum)? I'm looking for something similar to C#'s 'ref' keyword.  Example:  def func(x)      x += 1 end  a = 5 func(a)  #this should be something like func(ref a) puts a   #should read '6'   Btw. I know I could just use:  a = func(a)


I noticed that I can't name my module prn, Cargo refuses to build and I get a rather confusing error message mod prn;  fn main() { }  error[E0583]: file not found for module `prn`  --> src\main.rs:6:1   | 6 | mod prn;   | ^^^^^^^^   |   = help: to create the module `prn`, create file "src\prn.rs"  The file src\prn.rs exists, and it is accessible to the compiler. Changing the name of the module to something/anything else addresses the issue. Why prn is not allowed? Are there any other similar keywords that are forbidden for module names? (I am using rustc 1.46.0-nightly)

I'm not asking about general syntactic rules for file names. I mean gotchas that jump out of nowhere and bite you. For example, trying to name a file "COM<n>" on Windows?


In the definition of the electric field we have a vector field and a force. The vector field $\mathbf{E}(\mathbf{r})$ is a function of $\mathbf{r}$.   What about the force, is it a vector $\mathbf{F}$ (not a function of $\mathbf{r}$) or a vector field $\mathbf{F}(\mathbf{r})$?  The definition is $\mathbf{F}=q\mathbf{E}(\mathbf{r})$, but if we write it explicit, shouldn't it be $\mathbf{F}(\mathbf{r})=q\mathbf{E}(\mathbf{r})$?  I thinking if we have $$ \mathbf{F}=\frac{q}{4\pi\epsilon_0}\sum_{i=1}^N q_i\frac{\mathbf{r}-\mathbf{r}_i}{\vert\mathbf{r}-\mathbf{r}_i\lvert^3} $$ is it the same as  $$ \mathbf{F}(\mathbf{r})=\frac{q}{4\pi\epsilon_0}\sum_{i=1}^N q_i\frac{\mathbf{r}-\mathbf{r}_i}{\vert\mathbf{r}-\mathbf{r}_i\lvert^3} \quad ? $$ Then $$ \frac{\mathbf{F}(\mathbf{r})}{q}= \underbrace{\frac{1}{4\pi\epsilon_0}\sum_{i=1}^N q_i\frac{\mathbf{r}-\mathbf{r}_i}{\vert\mathbf{r}-\mathbf{r}_i\lvert^3}}_{\mathbf{E}(\mathbf{r})}=\mathbf{E}(\mathbf{r}) $$ So $$ \mathbf{F}(\mathbf{r})=q\mathbf{E}(\mathbf{r}) $$ Is this correct or I'm talking rubbish?

The electric force (Coulomb's law) on a point charge $Q_2$ due to $Q_2$: \begin{gather*} \mathbf{F}_{12}=\frac{Q_1Q_2}{4\pi\epsilon_0}\frac{\mathbf{r}_2-\mathbf{r}_1}{|\mathbf{r}_2-\mathbf{r}_1|^3} \end{gather*}  The seperation vector between the charges is $\mathbf{r}_{12}=\mathbf{r}_2-\mathbf{r}_1=(x_2-x_1)\hat{\textbf{i}}+(y_2-y_1)\hat{\textbf{j}}=(z_2-z_1)\hat{\textbf{k}} $.  Does this mean that the force is a vector field or just a vector?   Is the force a function of $\mathbf{r}_{12}$, so $\mathbf{F}_{12}=\mathbf{F}_{12}(\mathbf{r}_{12})$?


Is there a way to make a bootable HDD with Ubuntu setup from Windows?  Basically I want to make the same thing as a bootable USB stick, only on HDD. This might sound a little bit useless, but I don't have any other way to boot up my other machine and any preinstalled OS fails to boot.

Is it possible to mount/burn Ubuntu 10.10 on a clean Drive, so that I can boot using that drive with the ISO image and install the OS on my other internal drive, while currently being in Try Ubuntu state?   My problems is that the DVD drive is corrupted and does not burn ISO properly; after install the hard drive wont boot. The only way is to use that CD to get my computer running in Try Ubuntu state.   Downloaded the new Ubuntu 10.10 ISO and trying to figure out how to make my 2nd internal hard drive become a bootable device so I can choose from to boot in BIOS.


What is Divergence and Curl of Magnetic field?

I have read the most basic and important parts of vector calculus are gradient, divergence and curl. These three things are too important to analyse a vector field and I have gone through the physical meaning of gradient, divergence, and curl.  Gradient indicates the direction of maximum rate of change of a function, and it is defined as $\nabla u(\mathbf{x})\equiv\mathrm{grad} \, u(\mathbf{x})$ where $u(\mathbf{x})$ is a scalar function of the position vector $\mathbf{x}$.   Whereas divergence represents the volume density of the outward flux from an infinitesimal volume around a point and is defined as $\boldsymbol{\nabla} \boldsymbol{\cdot} \mathbf{A}(\mathbf{x})\equiv\mathrm{div} \, \mathbf{A}(\mathbf{x})$  And the curl signifies the infinitesimal rotation around a point and is defined as $\boldsymbol{\nabla} \boldsymbol{\times} \mathbf{A}(\mathbf{x})\equiv \mathrm{curl} \, \mathbf{A}(\mathbf{x})$  And now I have study and also mathematically formulate that $\boldsymbol{\nabla} \boldsymbol{\cdot} \left[\boldsymbol{\nabla} \boldsymbol{\times} \mathbf{A}(\mathbf{x})\right]=\mathrm{div} \left[\mathrm{curl} \mathbf{A}(\mathbf{x})\right]=0$.  And $\boldsymbol{\nabla} \boldsymbol{\times}\left[\nabla u(\mathbf{x})\right] =\mathrm{curl}\left[ \mathrm{grad} \, u(\mathbf{x})\right]= \boldsymbol{0}$ where u is a scalar function  Now my question is how can I interpret those two expressions? I mean, I want the physical significance of these two expressions in the sense of definition of gradient, divergence, curl, and also using graphical representation.


I am an Indian citizen travelling from Chengdu, China to Mumbai, India on Thai Lion Air.  My itinerary is as follows:   Flight SL933 - Chengdu(CTU) to Don Mueang(DMK) - Depart at 03:35 and arrive at 05:50 on November 1 Flight SL218 - Don Mueang(DMK) to Mumbai(BOM) - Depart at 02:25 and arrive at 05:40 on November 2   I have a 20h35m layover at Bangkok's Don Mueang airport (DMK). Do I need a transit visa for Bangkok? The entire itinerary is on a single ticket.

I am traveling from Chennai to Don Mueang International Airport, Bangkok, Thailand, and from there to Mandalay, Myanmar. In Bangkok, the layover time is 8 hours. Do I require transit visa?


While watching the Flash season 3 episode 5, I just saw Felicity Smoak reference “The Incredible Hulk”.  Then, after doing some research, I found out that’s also happened often on other shows of the Arrowverse.  I find it extremely odd with Marvel and DC being kind of rivals in the business. It’s like doing marketing for you competition.  What’s the reason behind those references instead of referencing DC superheroes?

In the CW's series The Flash, we see Cisco Ramon, and in some instances even Felicity Smoak use the references to Marvel characters such as Spider-man, The Incredible Hulk and many others.  On the other hand, in Raimi's Spider-man 2002, we see Peter Parker also call out Shazam! in an attempt to shoot his webbing (reference to DC's Captain Marvel or SHAZAM).  My question is, is there a reason Marvel (or Disney) doesn't sue CW or DC for using their character references? Or is there some sort of mutual coordination between the two.


I upload some csv file and try to printing two columns. There's a problem. In this case my program printing correctly "typ" column, but "data" field is empty.   header = [row for row in i]                     #header  indexoftype = header.index('type')              #type column index typ = [row[indexoftype] for row in reader]      #type column list print typ #printing my field correctly  indexofdata = header.index('data')              #data column index data = [row[indexofdata] for row in reader]     #data column list print data  # printing empty field   If I change their place, the same thing happens, but in different roles:  header = [row for row in i]                     #header  indexofdata = header.index('data')              #data column index data = [row[indexofdata] for row in reader]     #data column list print data          #printing my field correctly  indexoftype = header.index('type')              #type column index typ = [row[indexoftype] for row in reader]      #type column list print typ # printing empty field

When I'm moving through a file with a csv.reader, how do I return to the top of the file.   If I were doing it with a normal file I could just do something like "file.seek(0)".  Is there anything like that for the csv module?  Thanks ahead of time ;)


Compute the limit $\lim\limits_{x\to+\infty}\sqrt{x+\sqrt{x}}-\sqrt{x-1}$  my attempt:  I tried to multiply top and bottom by the conjugate  $$\begin{align} \lim_{x\to+\infty}\sqrt{x+\sqrt{x}}-\sqrt{x-1}&=\lim_{x\to+\infty}\left(\sqrt{x+\sqrt{x}}-\sqrt{x-1}\right)\frac{\sqrt{x+\sqrt{x}}+\sqrt{x-1}}{\sqrt{x+\sqrt{x}}+\sqrt{x-1}}\\ &=\lim_{x\to+\infty}\frac{\left(\sqrt{x+\sqrt{x}}\right)^2-\left(\sqrt{x-1}\right)^2}{\sqrt{x+\sqrt{x}}+\sqrt{x-1}}\\ &=\lim_{x\to+\infty}\frac{(x+\sqrt{x})-(x-1)}{\sqrt{x+\sqrt{x}}+\sqrt{x-1}}\\ &=\lim_{x\to+\infty}\frac{1+\sqrt{x}}{\sqrt{x+\sqrt{x}}+\sqrt{x-1}} \end{align}$$  But I don't know what I can do after this.

I tried to multiply by the conjugate:  $\displaystyle\lim_{x\to\infty} \frac{\left(\sqrt{x+\sqrt{x}}-\sqrt{x}\right)\left(\sqrt{x+\sqrt{x}}+\sqrt{x}\right)}{\sqrt{x+\sqrt{x}}+\sqrt{x}}=\displaystyle\lim_{x\to\infty} \frac{x-x+\sqrt{x}}{\sqrt{x+\sqrt{x}}+\sqrt{x}}=\displaystyle\lim_{x\to\infty} \frac{\sqrt{x}}{\sqrt{x+\sqrt{x}}+\sqrt{x}}$  I don't even know if my rewriting has helped at all. How would I go about doing this?


I have done many exercises of proving limits by using this method, but this one, I don't know how can I prove it.  The definition says:  Prove $\displaystyle\lim_{x \to0}{x\sin\left(\displaystyle\frac{1}{x}\right)} = 0$ by using $\epsilon$-$\delta$ method.  Thank you very much.

Use epsilon-delta definition of limit  To show :  $\displaystyle \lim_{x \to 0}  x\sin \left(\dfrac{1}{x}\right) = 0$   How to explain this in detail with step by step explanations?


I am having trouble with figure captions when I need a manual line break.  \documentclass[A4]{book} \usepackage{subfig} \usepackage[top=35mm, bottom=38mm, inner=40mm, outer=24mm]{geometry} \usepackage[hang,small,it]{caption} \usepackage{showframe} \begin{document}  \begin{figure} \centering \caption{Single line no problem.} \end{figure}  \begin{figure} \centering \caption[Content]{Sketching out variants for a new glass plate based installation.\\% Unless specified, sizes are in cm.} \label{fig:sketches_plate_arrangements} \end{figure}  \end{document}   The second figure caption is left aligned instead of centered. (in my actual setup it is a bit more to the right, and the second line is at least properly indented, but still the caption is way too much left).      Well, since you closed the question for unknown reasons, here is my answer. The idea is to use the margin parameter of captionsetup. If captionsetup is used without "float type" option and inside the \begin{figure} ... \end{figure} block, it only applies the settings for one particular occurrence.  \documentclass[A4]{book} \usepackage[top=35mm, bottom=38mm, inner=40mm, outer=24mm]{geometry} \usepackage[hang,small,it]{caption} \usepackage{subfig} \usepackage{showframe} \usepackage{tikz}  \begin{document}  \begin{figure} \includegraphics[scale=0.2]{dissem_Modell2_hires.png} \captionsetup{%  settings just for this caption   margin = 70pt } \caption[Content]{Sketching out variants for a new glass plate based installation.% Unless specified, sizes are in cm.} \end{figure}  \end{document}

I wish to add a line break to a caption, but I would wish to avoid adding of caption package. Is it possible?  \documentclass{article} \usepackage[format=plain,  justification=raggedright,singlelinecheck=false]{caption} \begin{document} \begin{figure} \caption{This is the caption\\ This is the second line} \end{figure} \end{document}


there an expression  i had to show this function is continuos  $$   f(x) = \begin{cases} x\cdot \sin \frac1x,&x\neq 0 \\ 0,&x = 0 \end{cases} $$  while taking left hand limit or right hand     F(0-h) = $lt_{h→0}$ (0-h)(sin 1/(0-h))   in the next step i divided and multiplied sin function by 1/-h and i got answer 1 as  $lt_{x→o}$sin(x)/x  =1  Now that prove the function is discontinuous as Lhl ≠ limit at the point  Can anyone point where i am being wrong or what's wrong in my method. The question provided it's own answer , I'm just asking what's wrong with my method

I'm doing an exercise that asks me to prove that $f$ is continuous using a $\epsilon$-$\delta$ proof. I have that $$   f(x) = \begin{cases} x\cdot \sin \frac1x,&x\neq 0 \\ 0,&x = 0 \end{cases} $$ I've already managed to show this property for $x=0$. How can I show it for $x \ne 0$, also using a $\epsilon$-$\delta$ proof?  Thank you very much.


I couldn't find a Bijective map from (0,1) to [0,1). Is there any example?

How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &= m(-1)+b \\ 4 = f(2) &= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective.


If $X$ is a continuous random variable with density $g(x)$, can I say that $g(x_0)$ is the probability that $X$ is equal to $x_0$

I understand that the probability mass function of a discrete random-variable X is $y=g(x)$. This means $P(X=x_0) = g(x_0)$.  Now, a probability density function of of a continuous random variable X is $y=f(x)$. Wikipedia defines this function $y$ to mean      In probability theory, a probability density function (pdf), or density of a continuous random variable, is a function that describes the relative likelihood for this random variable to take on a given value.   I am confused about the meaning of 'relative likelihood' because it certainly does not mean probability! The probability $P(X<x_0)$ is given by some integral of the pdf.  So what does $f(x_0)$ indicate? It gives a real number, but isn't the relative likelihood of a specific value for a CRV always zero?


Preamble: In general it's a big no-no, but believe me that are rare cases when space is really needed. For example Express Edition is limited to 10GB. Imagine that you discovered that with a data type conversion (a blob column) you can free up significant amount of space. But after that the DB file still has the same size as we know, and the 10GB limit also didn't change magically. So some kind of SHRINK is needed. That was an example.  In my test environment I performed:  DBCC SHRINKFILE (DBFile, NOTRUNCATE) DBCC SHRINKFILE (DBFile, TRUNCATEONLY)   That did the trick (I know that that minimizes the free space, in real world I would leave free space). it took many-many hours to finish. As we know it's a single threaded process , "it works as a series of very small system transactions so there is nothing to rollback." - Paul Randal . We also know that it messes up the index fragmentation big time  and I can confirm that. I didn't experience log file grow though described in   I issued some INDEX REBUILD and REORGANIZE and those finished within seconds.  My questions:   What's the big deal about shrink if I can just fix the index fragmentation after the shrink within seconds? I don't understand. Here on DBA stackexchange the "shrink" topic () says "Pretty much the worst thing you could do to a SQL Server database. In short: It sacrifices performance to gain space." plus refers to another popular article about it. But index fragmentation can be fixed. Why I didn't experience any log file growth? What if REBUILD the index first after the space free-up operation. Can that substitute the first DBCC SHRINKFILE (DBFile, NOTRUNCATE) so I just need to DBCC SHRINKFILE (DBFile, TRUNCATEONLY)? I have a feeling that the two work on different logical level but I have to ask this.   Bottom line: I promise I won't do shrink regularly or anything. But this is a situation where a cap is hit and shrink is needed.    Answer to my 2nd question: I didn't experience transaction log file growth, because I was fiddling in a developer test environment. The transaction log file would grow in a production environment (assuming Full Recovery Model). You should mimic that in your testing environment too. The tr log file growth is actually bigger than the space you can free up inside the database file. In the end you not only want to shrink the database file, but also the transaction log (how and when to do that depends on the recovery model). Production environments I saw had so screwed up index fragmentation that it can be just better. My script reindexes every index which fragmentation level is above 30%.  To handle the growth, you may have to switch from full recovery to simple while you are doing the once-in-a-lifetime conversion. But that will break the backup chain.    Answer to my 3rd question: do the reindex/index rebuild after the DB file shrink, because the shrink messes up index fragmentation.  I haven't experimented how all of this affects query statistics.    Script for reindexing: see Example D of . An article on incremental shrink, which will lead to other valuable content:

This question is asked in various forms here but the question boils down to:  I know shrinking a database is risky. In this case, I've removed so much data and I'll never use it again.   How can I shrink my database? What files do I shrink?  What should my considerations be while doing this?  Should I do anything after? What if it is a large database? Can I shrink it in smaller increments?


Sometimes my infant falls asleep in my arms and I need to transfer him to a more permanent position. When I try to lay him down in his crib, he wakes up and cries. Is there a good way to make the transfer without waking the little one?

There is a question   already on this site, which has answers partly covering my question. But only partly.  How do I put my newborn (or, later on, infant) to bed without waking her? Can anyone recommend moves or other techniques which will give us a better chance of preserving her sleep?


Tried to make custom ArrayList ,  the first error told me to add Type Tamplate () to  struct ListNode.  But after follow an error instruction , got new error instead.  " Symbols not found for architecture x86_64    #ifndef LINKEDLIST_H  #define LINKEDLIST_H   #include <iostream>  #include <string>   using namespace std;   template<typename T>  struct ListNode<T>{        T value;        ListNode<T>* next;         ListNode(T d,ListNode<T> *n){        value = d;        next = n;      }  };    template<typename T>  class LinkedList  {  public :      LinkedList();      LinkedList(const LinkedList<T>& another);       ~LinkedList();      void copy(const LinkedList<T>& another);      void add(T value);       void remove(int index);       int get(int index) const;       bool isEmpty() const;      int size() const;      string toString() const;      void clear();      LinkedList<T>& operator = (const LinkedList<T>& another);   private :      ListNode<T>* x_front;      int x_size;  };   #endif // LINKEDLIST_H   .CPP   #include "linkedlist.h"  #include "strlib.h"  #include <string>   using namespace std;   template<typename T>  LinkedList<T>::LinkedList(){        x_front = NULL;        x_size =0;  }   template<typename T>  LinkedList<T>::~LinkedList(){      clear();  }   template<typename T>  LinkedList<T>& LinkedList<T>::operator = (const LinkedList<T>& another){      delete x_front;      copy(another);      return *this;  }   template<typename T>  void LinkedList<T>::copy(const LinkedList<T>& another){       ListNode<T>* anotherCurrent = another.x_front;        while(anotherCurrent!=NULL){            this->add(anotherCurrent->value);           anotherCurrent = anotherCurrent->next;        }   }   template<typename T>  void LinkedList<T>::add(T value){      if(x_front == NULL){          x_front = new ListNode<T>(value,NULL);      }      else {          ListNode<T>*current = x_front;          while(current-> next != NULL){              current = current -> next;          }          current->next = new ListNode<T>(value,NULL);      }      x_size++;  }   template<typename T>  void LinkedList<T>::remove(int index){       if(index==0){          x_front = x_front->next;      }    else  {            ListNode<T>* current = x_front;            for(int indexNow = 0 ; indexNow < index -1 ; indexNow++){                                             current = current->next;            }            current -> next = current -> next -> next;     }     x_size--; }   template<typename T> bool LinkedList<T>::isEmpty() const {     if(this->x_size == 0){         return true;     }     else {return false;} }  template<typename T> void LinkedList<T>::clear(){     while(this->isEmpty() ==false){         remove(x_size-1);     } }  template<typename T> string LinkedList<T>::toString() const{     string mystring;     for(ListNode<T>*p = x_front; p!=NULL ;p = p->next){          mystring = mystring + " " + integerToString(p->value);     }     return mystring; }  template<typename T> int LinkedList<T>::size() const{       return (this->x_size); }

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


I am learning homogeneous differential equations, and I tried to answer one of the questions, but I am stuck at integrating the equation above. Are there any easier ways than making the denominator: $$(x-\frac{x}{2})^2+\frac{7}{4}$$?

In this substitution, I tried the method of complete the square, but at the end the answer is not correct. I'm totally sure that the answer is: $\frac{2\sqrt{7}}{7}\arctan(\frac{\sqrt{7}(2x-1)}{7})+C$, and I try different techniques, but I can´t get this result.  This is the Integral:  $\int\frac{dx}{x^2-x+2}$


How do I go about installing Ubunbu 13.10?  I have downloaded the distribution already, after acquiring an ebay computer with Ubuntu 13.04 pre-installed. Please can anyone instruct me?

Having installed Ubuntu 13.04 I've downloaded Ubuntu 13.10 ISO to upgrade from it.  answer doesn't work because there is no cdromupgrade file in the mounted ISO disk.  How can I upgrade 13.04 to 13.10 using the ISO image or CD/DVD media?


So we try to write the strings we get from an fragment to save in an array and to set the text from this array in a textview from another fragment but if you try the application kills himself:  public View onCreateView(final LayoutInflater inflater, @Nullable ViewGroup container, Bundle savedInstanceState) {      View view = inflater.inflate(R.layout.fragment_timetable, container, false);     myTL = view.findViewById(R.id.tableLayoutTage);     MO1 = view.findViewById(R.id.MO1);     VGMO1 = view.findViewById(R.id.MO1);     DI1 = view.findViewById(R.id.DI1);      DI1 = view.findViewById(R.id.DI1);     FachMO1 = (TextView) VGMO1.findViewById(R.id.textViewFach);     LehrerMO1 = (TextView) VGMO1.findViewById(R.id.textViewLehrer);     RaumMO1 = (TextView) VGMO1.findViewById(R.id.textViewRaum);     FachDI1 = (TextView) DI1.findViewById(R.id.textViewFach);     stundeZuweisen = new StundeZuweisen();      DI1.setOnLongClickListener(new View.OnLongClickListener() {         @Override         public boolean onLongClick(View v) {             String a = Montag1[0];             String b = Montag1[1];             String c = Montag1[2];             schreibeInTV(a, b, c);             return true;         }     });       VGMO1.setOnLongClickListener(new View.OnLongClickListener() {         @Override         public boolean onLongClick(View view) {             String ViewID = getResources().getResourceName(view.getId());             IDfinal = cutID(ViewID);               Log.d(TAG, "" + IDfinal);              Intent intent = new Intent(getActivity(), StundeZuweisen.class);             intent.putExtra("ViewID", IDfinal);             startActivity(intent);             return true;         }     });       //arrayToString();       return view; }  private void arrayToString() {     a = Montag1[1];     b = Montag1[2];     c = Montag1[0];     Log.d(TAG, "" + a + b); }   public String cutID(String longID) {     if (longID.length() == 3) {         return longID;     } else if (longID.length() > 3) {         return longID.substring(longID.length() - 3);     }     return longID; }   public void setzeTextViewFachMO1() {     FachMO1.setText(stundeZuweisen.getFachSpinnerText()); }  public void schreibeInArray(String Stunde) {     FachMO1.setText(Stunde); }  public void schreibeInTV(String a, String b, String c) {     FachMO1.setText(a);     LehrerMO1.setText(b);     RaumMO1.setText(c);     String FachMO1Test =  FachMO1.getText().toString();     Log.d(TAG, "schreibeInTV: korrekt" + FachMO1Test); }   }  And we get this error     06-29 08:27:35.233 6311-6311/com.example.jannikokan.timetable   E/AndroidRuntime: FATAL EXCEPTION: main       Process: com.example.jannikokan.timetable, PID: 6311       java.lang.NullPointerException: Attempt to invoke virtual method 'void android.widget.TextView.setText(java.lang.CharSequence)' on a   null object reference           at com.example.jannikokan.timetable.Table.TimeTableFragment.schreibeInTV(TimeTableFragment.java:210)           at com.example.jannikokan.timetable.Table.TimeTableFragment$1.onLongClick(TimeTableFragment.java:154)           at android.view.View.performLongClickInternal(View.java:6374)           at android.view.View.performLongClick(View.java:6332)           at android.view.View.performLongClick(View.java:6350)           at android.view.View$CheckForLongPress.run(View.java:24895)           at android.os.Handler.handleCallback(Handler.java:808)           at android.os.Handler.dispatchMessage(Handler.java:101)           at android.os.Looper.loop(Looper.java:166)           at android.app.ActivityThread.main(ActivityThread.java:7425)           at java.lang.reflect.Method.invoke(Native Method)           at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)           at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)   Can someone help us slove our problem? Thank you

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'm looking for a way to edit some fields from a Connected App using Apex code. Is there a way to do it? For example, I want to add a Profile to the 'Connected App Allowed Profiles List'. Thank you in advance!

Background: I have a requirement to make it so that an SFDC connected app defaults/is super easy to set to Admin Users are Pre-authorized instead of All users may self-authorize. This setting is important to make this app work and we have historically have had problems with admins not configuring this setting correctly.  Here is a quick history on what I have tried to do to get the isAdminApproved set to "true":   Directly, via xml definition (doesn't get honored) Directly via apex code (doesn't get honored)  (ended up being more pain than what it was worth and was told that it wouldn't work in prod because of security restrictions) Indirectly via a connected-app connected service to make a metadata API call: works in a scratch org but not in prod, which I assume is because it is a managed package. This would occur when an Admin clicks on a button, not from a post-install script.   Details on what I mean by it isn't working in prod: When I try to do a readMetadata call on my connectedApp objects that are in my managed package, the response comes back as [{\n    'fullName': None\n}] instead of with the metadata configuration of my connected app.  Here is a sequence diagram of what I am trying to do in #4 right now:    My question is this: Am I on a fool's errand, where this is impossible to do? ...Or is there a way to set a connected app (in a managed package that I publish) to Admin Users are Pre-authorized without making the admin just do it themselves directly in the settings?


My bank's website insists that I use Internet explorer > v7. I have however disabled internet explorer from windows features and use Firefox instead.  How do I get firefox to identify itself as IE for that particular site? I'm running windows 7 with firefox 13 right now.

I have to use a particular web site for work, but this web site checks to see whether I'm using Internet Explorer and, if not, won't allow me to log in.  I can switch my User-Agent header using the  Firefox plugin and the web site works fine, but I really don't want to switch the header every time I go to the site and also don't want my User-Agent header to perpetually say I'm using IE.  I'm on Linux, so actually switching to IE unfortunately isn't an option.  Is there any way to define a particular User-Agent for a particular web site in either Firefox or Chrome?


I'm looking to create a filter in Gmail that will take any email with a certain X-OriginatorOrg header value (e.g., example.com) and move it to a certain label. I've looked at the  list on Google's help pages, but I can't seem to find anything that will enable me to search any value in the message headers, even if Gmail hasn't specifically created a search operator for it.  Is this at all possible with Gmail? If not, is there a third-party Gmail app in existence that offers this functionality?

(Not a dup:  really asks about the DeliveredTo header).  Bugzilla provides a number of headers telling you why you received a mail, such as X-Bugzilla-Reason. How can I filter on arbitrary tags such as this one in Gmail?


I'm trying to create a fairly basic Kiosk type installation for a Visitor Centre, but they need to have a password on the machine to make sure they know when somebody wants to use it (so they can charge them). It seems a password can't be set on the Guest account, (which is the ideal type of account for their requirements), is that the case?  If so, is there an alternative anyone might recommend?  I need to make sure that any user cannot mess up the installation, and also cannot mess up the user account. Thanks in advance.

Want to set a guest session password for login. How do you do this after skipping it at OS install?


Help me, how to add a significant 0 to number variable (int, float, ecc)?  int s = 0; -> 00 int m = 0; -> 00 int h = 0; -> 00

Is there a better way of getting this result? This function fails if num has more digits than digits, and I feel like it should be in the library somewhere (like Integer.toString(x,"%3d") or something)  static String intToString(int num, int digits) {     StringBuffer s = new StringBuffer(digits);     int zeroes = digits - (int) (Math.log(num) / Math.log(10)) - 1;      for (int i = 0; i < zeroes; i++) {         s.append(0);     }     return s.append(num).toString(); }


Saints Row 4 released a patch (to include the workshop only) for Windows only recently and broke cross OS multiplayer. We never hit "turn off automatic updates" because we didn't expect over a month of neglect.  , even though they have the old files available. It also forces updates upon you when launching the game unless in offline mode.  Is there a way to install the older version of Saints Row 4, get it to launch on Steam without updating, and play together?

I want to play a game in an older update, but can't see a way to choose a specific version. Is this possible?


Last night i was thinking about squares and the direct way to get from one corner to the opposite corner. Lets imagine a square with side length of $a$. Also we name one corner $A$ and the opposite corner $B$. The direct way from $A$ to $B$ then is $\sqrt{2} a$.  But lets make it more difficult and go from point $A$ downwards like \begin{pmatrix} 0\\  a \end{pmatrix} and then \begin{pmatrix} a\\  0 \end{pmatrix} so we go a way of length $2a$ absolutely. Then we start to change the direction at the half of the way so the path looks like a stair. (Look at the image) Every time we halfen the size of the "stairs" the absolute length of the way we have to walk stays the same.    Lets create a function $\varphi (n)$ with $n \in \mathbb N $ where for every $n$ we halfen the size of the stairs and double the number of stairs. As mentioned the absolute length of the path stays the same because we have to go all the way to the bottom which is a distance of $a$ and all the way to the right which also is a distance of $a$.  This means that $\lim\limits_{n \rightarrow \infty} \varphi (n) = 2a$. In this case the size of the stairs converges to zero.  What confuses me is that $\varphi (n)$ is a constant function and does not come closer to $\sqrt{2} a$. While the path we go come closer to the diagonal direct connection between $A$ and $B$. When we look at $\lim\limits_{n \rightarrow \infty} \varphi (n)$ then the path of the stairs gets to the diagonal linear path. But the length is pretty different. What do you think?

What is wrong with this proof?    Is $\pi=4?$


Lets say that a foe is 30' away and 20' up in the air.   Using trigonometry, that gives a distance of 30^2 + 20^2 = 1300 sqrt(1300) = 36.06 ...but I don't believe Pathfinder expects folks to use trig to figure out range increments.  Is there a rule that covers this? I can't find it but my impression was that one actually just takes the larger of the two values (so if someone is 100' away and on one dimension and 50' away on another, it's still just a range of 100').

Often while playing Pathfinder, my group will run into problems where rules for 3-dimensional play simply don't exist, so far as we can find. Arguments will come up over things like carrying-capacity, movement speed, area-effects, and a variety of other things.  Simply put, are there rules for 3D play for Pathfinder, and if so where can I find them?


What is the cause of the error on the screen?  public struct  YetkiYapisiListesi {     public bool STOKGUNCELLE =false ;     public bool STOKSIL=false;     public bool STOKLISTELE=false; }      Non-static struct member cannot have initializer

I am surprised that I can't initialize my fields in structs, why is it like that? Like:  struct MyStruct {     private int a = 90; }   but it's a complie time error. I don't know why it's a problem? Please explain this to me.


Let $X_1, X_2, X_3$,and $X_4$ be four mutually independent random   variables, each with p.d.f. $$f(x) = 3(1-x)^2\quad   \mathbb{I}_{(0,1)}(x)$$If $Y$ is the minimum of these four variables,   find the p.d.f. and c.d.f. of $Y$.   So far I have: \begin{align} P(Y \le y) &= P(\min(X_1,X_2,X_3,X_4) \le y)  \\[5pt]     &=1- P(y\le X_1, y\le X_2, y\le X_3, y\le X_4)  \\[5pt]     &=1-P(y\le X_1)P(y\le X_2)P(y\le X_3)P(y\le X_4) \tag{independence}  \\[5pt]     &=1-\bigg(\int^1_y f(x_1)dx\bigg)\bigg(\int^1_y f(x_2)dx\bigg)\bigg(\int^1_y f(x_2)dx\bigg)\bigg(\int^1_y f(x_2)dx\bigg) \end{align} And then I get stuck. I'm not even totally sure that is correct.   If anyone just has a written explanation, that would really help as I'm not entirely sure exactly what my goal is with this problem.


I have this simple XML: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE input[ <!ELEMENT input (#PCDATA)> <!ELEMENT file (#PCDATA)> <!ELEMENT name (#PCDATA)> <!ELEMENT type (#PCDATA)> ]> <input> This is the content <file><name>test.png</name><type>Image</type></file> </input>  I expect this to be valid but some online validators report that it is invalid because the input and file elements contain non-text nodes. If I remove the file element within the input element then the resulting XML is reported to be valid, so I expect the "non-text nodes" are the child elements (file in input and name and type in file). I expect this to be valid because the  specifies that an element is valid if it matches one of a set of conditions, one of which is:  The declaration matches Mixed, and the content (after replacing any entity references with their replacement text) consists of character data (including CDATA sections), comments, PIs and child elements whose types match names in the content model.  Note the "and child elements..." towards the end of that. And the production for mixed is:     Mixed      ::=      '(' S? '#PCDATA' (S? '|' S? Name)* S? ')*'               | '(' S? '#PCDATA' S? ')'   The second case is what I have for input and file: (#PCDATA) The validity requirement for mixed content is that there can be child elements as long as their names match names in the content model, which they do. Am I misunderstanding the specification or are these validators incorrect? If I remove the declarations of the file, name and type elements from the DTD but leave the child elements in the content of the input element, then I get additional validation errors indicating no declaration of those types. I expect these errors because the validation requirement is that the child element names match names in the content model and, with those declarations removed, they don't match names in the content model. But there are other validators that report the XML is valid even without the declarations of the file, name and type elements in the DTD. This too seems to be a fault of the validators as the validation requirement clearly says that the child element names must match names in the content model, which they don't, when those element declarations are removed. I know there are various XML validation implementations and they do not all work the same so they cannot all be strictly correct. I am most interested in having a strictly correct understanding of the specification. In strict conformance to the validity requirements of an element with content (#PCDATA):  Can the content of that element include child elements? If so, must the names of those elements match names of elements in the DTD?  The specification only appears to require that the names of child elements match names of elements in the DTD but I think reasonably the content and attributes of such elements should also match the declarations in the DTD, but the specification doesn't actually say this. So, again, in strict conformance with the validity requirements of the specification, must the content and attributes of a child element of an element with content (#PCDATA) match the declarations of these in the DTD? If so, where in the specification does it say so? Finally, is there any easy to use (online or installable to Linux) XML validator that is strictly correct according to the specification that you can recommend?

I wasn't aware of a difference, but a coworker says there is, although he can't back it up. What's the difference if any?


when I am going to update my Ubuntu 14.04 I get following error:     Signature by key 8BADC1A02FC9C07FB8C20EC0BD11A6AA914BDF7E uses weak   digest algorithm (SHA1)   (this is a plesk package)  through google I found out, that the algorithm SHA1 has been disabled since 1. January 2017.  The problem is, that the apt-get update aborts at this point, so I cannot update my other packages.   How can I solve it without reinstalling plesk?

I started setting up by adding repositories and then went to run a sudo apt-get update again before I started installing other software, and I get the Signature key lines and it stops. So it essentially won't let me update any packages now.  d@EliteBook:~/Downloads$ sudo apt-get update Ign:1 http://dl.google.com/linux/chrome/deb stable InRelease Hit:2 http://dl.google.com/linux/chrome/deb stable Release                      Hit:4 http://security.ubuntu.com/ubuntu xenial-security InRelease               Get:5 http://ca.archive.ubuntu.com/ubuntu xenial InRelease [247 kB] Hit:6 http://ca.archive.ubuntu.com/ubuntu xenial-updates InRelease Hit:7 http://ca.archive.ubuntu.com/ubuntu xenial-backports InRelease Fetched 247 kB in 0s (256 kB/s)                    Reading package lists... Done W: http://dl.google.com/linux/chrome/deb/dists/stable/Release.gpg: Signature by  key 4CCA1EAF950CEE4AB83976DCA040830F7FAC5991 uses weak digest algorithm (SHA1) d@EliteBook:~/Downloads$   I've never seen this before whenever I setup and start installing things in Ubuntu. Is there something else I can do?


move objects (drag & drop) from work window to another on GIMP?

I have two image tabs open and I want to copy one layer from the first image to  the second image keeping dimensions and size.  How would I do that?  Example:  I have this 640px by 400px first image with two layers - the background and a brush    and I want to copy the brush layer to this other image of 1600px by 1200px.


I have list of contacts that get generated by batch process in external System. We want to trigger Journey Interaction Fire Event API , for these list of contacts.We want to invoke API in single batch for these list of contacts Is it possible to use these array of contacts in single message to inject into a Journey instead of calling api for individual contact.

Is it possible to Bulk inject contacts in a journey using API ?  I tried to use the contactEvents method but i have a 500 server error.  contactEventsTest is a DE created using the template "Event DE" from the wizard.  Here is my payload :  {    "eventDefinitionKey": "APIEvent-xxxxxx-xxxxx-xxxxx-xxxx", "data": [{     "name": "contactEventsTest",     "id": "e856d8a7-e7a1-e711-80e3-1402ec819dd8",     "items": [{         "values": [             {             "name": "ContactKey",             "value": "ContactKey1TEST"         },         {             "name": "Gain",             "value": "123"         }]     },     {         "values": [             {             "name": "ContactKey",             "value": "ContactKey2TEST"         },         {             "name": "Gain",             "value": "321"         }]     }] }]}


I have seen a lot of different types of Rear View mirrors. Ideas on which mounting/type is most used and why? ie: sunglass frame mounted, helmet mounting, handle bar mounting, or others. I ride both mountain and road bikes, obviously I don't feel the need as much on my MTB. Ideas and suggestions appreciated

What do you recommend as an optimal point and orientation for mounting a rear-view mirror? I'm open to handlebar-, glasses-, or helmet-mounted.  Some of the considerations, as I understand it, are:   Ease of mounting. View provided. Vibration. Likelihood of breaking. Robustness for repeated off and on (for glasses-mounted).   I've got a hybrid bike with flat handlebars.  I'd also welcome specific product recommendations and recommendations about other aspects to look for in a mirror.


I'm trying to remove an apex form object from my visualforce page. All it does is wrap a commandButton like so:  <apex:form > <apex:commandButton value="customAction" action="{!customAction}"/> </apex:form>   Is there an alternate way to have a button that fires a controller action?

One of my pages was scanned by Checkmarx and it's returning this flag "Multiple Forms In Visualforce Page"  Indeed in my page I have several form tags like so:  <apex:outputPanel rendered="{! $CurrentPage.parameters.show_custom_1 == '1'}">     <apex:form >         <apex:commandButton value="Custom Action 1" action="{!customAction1}"/>     </apex:form> </apex:outputPanel>    <apex:form >     <apex:inputText value="{!customText1}"/><br />     <apex:commandButton value="Update customText1" action="{!updateCustomText1}"/> </apex:form>   One other interesting thing to note is one of these forms is conditional and may or may not appear.  But regardless, it doesn't seem like it should matter? Why is it a problem to have more than one form on a page? That's a very common thing in a modern webpage. I've seen some pages that have 10 forms or more, as long as they are contained to their own area and don't overlap, I don't see why it's a problem?


I struggle to proof that:  $2n+1<2^n$  By using induction.  The base case is for $n\ge3$.  Any help will be appreciated!

I am having trouble and was wondering if someone could go over the steps slowly to show that:  $$2n + 3 < 2^n \ \text{for} \ n \geq 4$$  Any help would be amazing!


I’ve seen that the question has been asked already but this is still confusing to me.   In a digital signature, Alice sends a message M and the hash(M) which is signed by her private key. Bob recomputes hash(M) (that he retrieves with Alice’s public key) and ensures that he finds the same hash value as Alice.  Therefore he knows that the message M is coming from Alice and that M has not been tampered with during the transit. So, it looks like we get both authentication and integrity.   In the HMAC construction (or more generally MAC this is not the subject here), a shared key between Alice and Bob is appended to the hash of data. I agree that it provides also both message authentication and integrity but what does it provide more? In other words, in which situation is HMAC absolutely required?

I know the definitions of both but can't specifically tell how they are different and if one is better than the other.  Please help.


My requirement is that shell script should print the folder name of the file.  For example comp.class is present in D:/Practice/HelloWorldPractice/bin folder, I should get output after executing command is bin.  My command searches a file and prints the full path of that file . After that, it removes the filename from full path. At the end, it remove everything except folder name of file.  code  filesDirName="/D/Practice/HelloWorldSagar" file=comp.class echo $(find "${filesDirName}" -name ${file}) | awk -F '${file}' '{ print $1 }'| awk -F '${filesDirName}' '{ print $2 }'   output     empty output  code  When I am entering below command in terminal it is working fine.... But when I am doing it through variables, I am not able to get output.  echo "$(find "/D/Practice/HelloWorldSagar" -name comp.class)" | awk -F 'comp.class' '{ print $1 }'| awk -F '/D/Practice/HelloWorldSagar' '{ print $2 }'   output  /bin/

I'm used to type strings with quotation marks, but from now and then when I surf through config files and recommendations, I see apostrophes being used.  I often copy apostrophe things into my config files and substitute it with my quotation marks so that the code fits together.  But what is their difference? (I mostly target this for bash. If other Linux-based scripting does it different, that would be an extra.)  For example:  echo "Hello World!" and echo 'Hello World!'  Has it something to do that I maybe can't use (formatted) variables if I use one or the other, or is it simply personal preference?


This a code of timer that save information in pause and reset. every time I start app this information are put to timer. because I don't want start timer from 0. I want start timer from last time. so in the beginning It should retrieve the last time information.  public class TimerActivity extends Activity { private Button startButton; private Button pauseButton; private Button resetButton;  private TextView timerValue;  private long startTime = 0L;  private Handler customHandler = new Handler();  long timeInMilliseconds = 0L; long timeSwapBuff = 0L; long updatedTime = 0L;     @Override public void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.main);     SharedPreferences prefs = this.getSharedPreferences("timer", Context.MODE_PRIVATE);     final SharedPreferences.Editor editor = getPreferences(MODE_PRIVATE).edit();        timeSwapBuff=prefs.getLong("timeSwapBuff", 0);     startTime=prefs.getLong("startTime", 0);     updatedTime=prefs.getLong("updatedTime", 0);        Log.i("timeSwapBuff", ""+timeSwapBuff);     Log.i("startTime", ""+startTime);     Log.i("updatedTime", ""+updatedTime);           timeInMilliseconds = SystemClock.uptimeMillis() - startTime;        updatedTime = timeSwapBuff + timeInMilliseconds;      int secs = (int) (updatedTime / 1000);     int mins = secs / 60;     secs = secs % 60;     int milliseconds = (int) (updatedTime % 1000);       // error at this line for set text       timerValue.setText("" + mins + ":"             + String.format("%02d", secs) + ":"             + String.format("%03d", milliseconds));         timerValue = (TextView) findViewById(R.id.timerValue);      startButton = (Button) findViewById(R.id.start);      resetButton = (Button) findViewById(R.id.reset);      pauseButton = (Button) findViewById(R.id.pause);      startButton.setOnClickListener(new View.OnClickListener() {          public void onClick(View view) {             startTime = SystemClock.uptimeMillis();             customHandler.postDelayed(updateTimerThread, 0);          }     });       pauseButton.setOnClickListener(new View.OnClickListener() {          public void onClick(View view) {              timeSwapBuff += timeInMilliseconds;             customHandler.removeCallbacks(updateTimerThread);              editor.putLong("timeSwapBuff", timeSwapBuff);             editor.putLong("startTime", startTime);             editor.putLong("updatedTime", updatedTime);           }     });       resetButton.setOnClickListener(new View.OnClickListener() {          public void onClick(View view) {               startTime=SystemClock.uptimeMillis();             timeSwapBuff=0;             customHandler.removeCallbacks(updateTimerThread);              timerValue.setText("" + 0 + ":"                     + String.format("%02d", 00) + ":"                     + String.format("%03d", 000));              editor.putLong("timeSwapBuff", timeSwapBuff);             editor.putLong("startTime", startTime);             editor.putLong("updatedTime", updatedTime);          }     });  }  private Runnable updateTimerThread = new Runnable() {      public void run() {           timeInMilliseconds = SystemClock.uptimeMillis() - startTime;            updatedTime = timeSwapBuff + timeInMilliseconds;          int secs = (int) (updatedTime / 1000);         int mins = secs / 60;         secs = secs % 60;         int milliseconds = (int) (updatedTime % 1000);         timerValue.setText("" + mins + ":"                 + String.format("%02d", secs) + ":"                 + String.format("%03d", milliseconds));         customHandler.postDelayed(this, 0);     }  };      }

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


I have tables called Movie, Genre and Keyword, from which I have created a view called 'genkeyword'. The view 'genkeyword' has a lot of tuples, so it can be accessed at .  The following query calculates the frequency of genres that the movies in genkeyword have in common with Harry Potter and the frequency of keywords that the movies in genkeyword have in common with Harry Potter. It then combines the results of the two queries using a full outer join.  SELECT     * FROM     (         SELECT             title,             year,             count(distinct genre) as genre_freq         FROM             genkeyword         where             (                 genre in (                     select                         genre                     from                         genkeyword                     where                         title = 'Harry Potter and the  Deathly Hallows'                 )             )             AND title <> 'Harry Potter and the Deathly Hallows'         group by             title,             year     ) a      FULL OUTER JOIN (         select             title,             year,             count(distinct keyword) as keyword_freq         FROM             genkeyword         where             keyword in (                 select                     keyword                 from                     genkeyword                 where                     title = 'Harry Potter and  the Deathly Hallows'             )             and title <> 'Harry Potter and the Deathly Hallows'         group by             title,             year     ) b ON b.title = a.title;   The output of the above query is the following:  title               |   year    |   genre_freq   |    title    |    year    | keyword_freq  Cinderella              2015         2              Cinderella      2015        2     Enchanted               2007         1              Enchanted       2007        3  How to train your dragon  2010       2               null           null       null The Shape of Water        2017       2        The Shape of Water    2017       1          I know that for two result sets A and B, a full outer join outputs the rows that match in A and B, as well as the rows in A that don't have matching rows in B and the rows in B that don't have matching rows in A.  However, in the third row of the output (where the movie is 'How to train your dragon'), why are there null values for the title and year attribute? I know that the for the keyword_freq the value would be null because the movie does not have any keywords in common with Harry Potter, but wouldn't the title and year attributes have the values 'How to train your dragon' and 2010 respectively?  Any insights are appreciated.

Also how do LEFT JOIN, RIGHT JOIN and FULL JOIN fit in?


Please explain to me the lines commented below :  def readfile(filename):     lines = [line for line in file(filename)]     cols = lines[0].strip().split('\t')[1:] #why [1:] here? what is it doing?     rows = [] #whats the difference between rows = [] and rows = {}     data=[]     for line in lines[1:]: #what lines[1:] is doing?         p=line.strip().split('\t')         rows.append(p[0])         #why we used float below if my file contains only integer numbers?         data.append([float(x) for x in p[1:]])         return rows,cols,data

I need a good explanation (references are a plus) on Python's slice notation.   To me, this notation needs a bit of picking up.   It looks extremely powerful, but I haven't quite got my head around it.


I have to gunzip all the files in folder (say Folder A), which has multiple folder hierarchy with files in each of them. This Folder A is present in thousands of folders in a directory. I need to gunzip all the files in all the folders. I'm trying below command: gunzip -r path/to/Folder/*/Folder_A/  and I get this error: Argument list to long. Please help me with the command to gunzip the files.

I have a folder with 36,348 files gz files. I want to unzip all of them.  Running:   gunzip ./*   results in   -bash: /usr/bin/gunzip: Argument list too long   What's the easiest way to get around this?


I am using Ubuntu 14.04.3 and I am running 64bit and it does not run well on my old laptop, I have downloaded the 32bit version and have made a U.S.B. disk, I just don't know what to do from now. How do I boot it from the U.S.B. drive? I have tried hitting all the Fn keys on boot up but this does nothing.

What are the different ways I can use to upgrade Ubuntu from one release to another?


Presumably, using real cannabis plants would be illegal, but creating huge numbers of fake plastic plants seems expensive, and while I'd imagine they get resold after a shoot, I've never heard of such a thing. So how are scenes featuring pot plants actually filmed?

We see a lot of weed plants in Trailer Park Boys, they look very very real.  What are these plants?  Is there a standard showbiz weed plant look-a-like?


I have a hard time solving the following equation.  $$z^{2} + (1 - i) \cdot z - i = 0$$  I tried factorization and got $z = -1$ or $z = i$, which I suppose are correct.  However, when I try the quadratic formula for solving second degree equations, the results I get don't match with the solutions I get above.

Let $a$, $b$, and $c$ be complex numbers with $a\neq0$. Show that the solutions of $az^2+bz+c=0$ are $z_1,z_2=\frac{-b\pm\sqrt{b^2-4ac}}{2a}$, just as they are in the case when $a$, $b$, and $c$ are real numbers.


We have proved that the universe is expanding by observing distant planets and stars going away from each other.  So can we predict our location in the universe by observing the different propotions of distance of sepration of planets arounds us taking in mind the different distance of those objects, if we are in the center all objects will seperate at the same rate.

If the big bang was the birth of everything, and the big bang was an event in the sense that it had a location and a time (time 0), wouldn't that mean that our universe has a center?  Where was the big bang? What is there now? Are we moving away from the center still? Are these even valid questions?


Prove that if $x_1,x_2,...,x_n$ are positive numbers, then $$\frac{n}{\frac{1}{x_1}+\frac{1}{x_2}+...\frac{1}{x_n}}\leq \sqrt[n]{x_1\cdot x_2\cdot ... \cdot x_n}\leq\frac{x_1+x_2+...+x_n}{n}$$

The arithmetic - geometric mean inequality states that $$\frac{x_1+ \ldots + x_n}{n} \geq \sqrt[n]{x_1 \cdots x_n}$$ I'm looking for some original proofs of this inequality. I can find the usual proofs on the internet but I was wondering if someone knew a proof that is unexpected in some way. e.g. can you link the theorem to some famous theorem, can you find a non-trivial geometric proof (I can find some of those), proofs that use theory that doesn't link to this inequality at first sight (e.g. differential equations …)?  Induction, backward induction, use of Jensen inequality, swapping terms, use of Lagrange multiplier, proof using thermodynamics (yeah, I know, it's rather some physical argument that this theorem might be true, not really a proof), convexity, … are some of the proofs I know.


I studied in Ray Optics that light either reflects, refracts or gets absorbed when it encounters another medium. But what exactly happens at the atomic level during reflection, refraction and absorption? At the macroscopic level, we see that light is reflecting, refracting or getting absorbed. But what happens at the atomic level when these phenomenan occur? Also, how can we decide whether light will reflect, refract or get absorbed when it encounters another medium. When exactly do these phenomenan take place? Please answer these two questions. I have been having these question since Grade 7 and now I am in Grade 12. I am so confused. Would greatly appreciate if someone could answer my above two questions.

This well-observed phenomenon has, besides several others, always been a fascination to me. We are well aware of several theories, experiments, and practical applications of this well-known phenomenon, but is it established what goes on at the grassroots of reflection?  My high school teacher once told me that whenever light is incident on any reflecting surface, its electrons absorb the energy of the photon and release back the same energy. If this is actually true, then I have plenty of questions to continue, but if it is not, then what is reflection, and how and why does it take place?


I'm trying to make a program where Math.random() generated a list of random numbers as ints between the range of 3 and 9. I keep getting long decimals and numbers such as 0, or 1. I'm not sure if it's the output() or is my process right? Or is it something simple like typecasting?  Here's the output i'm getting with this code:      --------------------Configuration: <Default>--------------------      5.855672310088313     5.0287286763569625     5.1257975957882485     3.2283987551436173     0.8364642553235297     3.5005965809506696     3.284959203422762     1.3896135045374878     2.8493705949526733     0.7431149270852646  Process completed.   Im trying to get something more along the lines of a list of 10 random numbers between 3 and 9.  import static java.lang.System.*; import java.util.*;  public class Java1605{     public static void main(String[] args){         new Problem(); }}   class Problem {     int low;     int high;     int range;      public Problem()     {         low = 3;         high = 9;         range = (int)((Math.random() * (high - low )) + low);          output();     }      public void output()     {         out.println(Math.random()* range);         out.println(Math.random()* range);         out.println(Math.random()* range);         out.println(Math.random()* range);         out.println(Math.random()* range);         out.println(Math.random()* range);         out.println(Math.random()* range);         out.println(Math.random()* range);         out.println(Math.random()* range);         out.println(Math.random()* range);       }  }

How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.


By definition,  A group $G$ is a direct product of the subgroups $N_1, N_2, ... , N_k$ if an only if  $i.$ $G=N_1N_2...N_k$  $ii.$ For each $j$, $N_j  \cap(N_1N_2...N_{j-1}N_{j+1}...N_k)=e$, and   $iii.$ Each of $N_1, N_2, ..., N_k $ is normal in $G$.  My question is... Is the second condition the same as saying  $(a)$ $H_i \cap H_j =e$ for $i \neq j$ ?  I am proving something. Now, I'm having difficulty in showing $(ii.)$. However, it will be easier if $(ii.)$ is the same as $(a)$. Thank you.

I was trying to find an example of a group $G$ and normal subgroups $N_1 , \ldots , N_n$ such that $G = N_1\cdots N_n$ and $N_i \cap N_j = \{e\}$ for all $i \neq j$ and yet $G$ is not the internal direct product of  $N_1, \ldots , N_n$ .  It is easy to show that G is the internal direct product of normal subgroups $N_1 , \ldots , N_n$ iff  (i) $G = N_1\cdots N_n$  (ii) $N_i\cap (N_1 \cdots N_{i-1}\cdots N_{i+1} \cdots N_n) = \{e\}$ for $i = 1, 2, \ldots, n$.  So I guess the question boils down to produce an example of a group $G$ and its normal subgroups  $N_1 , \ldots , N_n$ such that   (1) $G = N_1\cdots N_n$  (2) $N_i \cap N_j = \{e\}$ for all $i \neq j$   but     (3) $N_i \cap (N_1 \cdots N_{i-1} N_{i+1} \cdots N_n) \neq \{e\}$ for at least one $1 \le i \le n.$ Thanks in advance for help....


What is another word for a person who likes to talk too much. I was thinking bigmouth, but bigmouth could mean "somebody who likes carrying messages voluntarily".

I'm looking for a single-word term that describes a personality that wants to give out too many unnecessary details in a conversation.  [EDIT] Let me give you guys an example. Suppose you ask your friend, at what time will he reach your place? Instead of saying it directly, he wanders off track by regurgitating unnecessary details like "I'd be catching the bus at 10, then I'll reach place X by this time, then I'll take another bus to your place, and maybe I'll arrive by 12". Is it circumlocution?


Why the "delete" button present on some sites (on the profile page) of SE network, but not on the other?  For example, I have "delete" on , , . But not on other.

How can I delete my Stack Exchange account(s)? Also,  What happens to my content? Can I request it be deleted as well? What if I'm suspended, rate-limited, or banned from posting questions or answers? What will happen to my votes? Will other users be impacted? Why wasn't my account deleted immediately after the timer expiring? What will happen to my pending bounties and close, reopen, delete, or undelete votes? I want my account deleted on all Stack Exchange sites. How do I do this? Will my profile on chat be removed once I delete my site account?   For more information, see "" in the .


So I just installed Ubuntu 14.04 and it won't shut down after updating, I have to manually shut it down by holding the power key, it happens when I either try to restart it or shut it down. Anyone got any idea on how to fix it?

When I issue the following:  sudo shutdown now   ..my newly commissioned Ubuntu 14.04 server doesn't shut down. It stops with the following message:  * Stopping System V runlevel compatibility Give root password for maintenance: (or type Control-D to continue):   If I type in the root password, the machine simply sits there at the shell prompt.


The behavior I'm hoping to find an English word for is characterized by a person saying something bitingly aggressive/hurtful/manipulative, but is then followed by something like "I hope you didn't take that seriously" or "I was only joking", but is in fact supposed to be taken as a serious statement/threat.  Given this example dialog, what word best describes the behavior of Person A:          >     Person A: You know you can come to me for anything, I'm here for you. I know you want to take over the team.          >     Person B: Thank you! I appreciate that, it seems that management finds that I'm a nice fit for the role.          >     Person A: Well you know that I'm in charge, and that if you want to take this new position, you'll have to go through me. I don't like outsiders telling me what to do, and you're nothing special. I'd do anything to get you fired.          >     Person B: *confused and shocked look*          >     Person A: I'm only kidding! Don't take things so seriously! Jeeze some people are so sensitive...

Passive aggressive people will sometimes veil insulting, critical, derogatory or generally aggressive comments with humor. The patina of humor makes the comment seem like a joke, not to be taken seriously, all in good fun, and it safeguards the aggressive person. If someone gets offended, they are being too serious, can't take a joke, and so they cannot voice their upset without seeming to be the one escalating the situation, when in fact it was the aggressor who did that.   This behavior seems to lie on a spectrum. On one side are comments which are simultaneously aggressive and genuinely funny (though of course both, especially the latter, are fairly subjective). On the other side would be lame attempts at the behavior, something like "you are fat!... just joking!" in which nothing in the tone or delivery signals a register of humor. In the middle of the spectrum, I imagine, are aggressive statements genuinely delivered as jokes. Their register signals that they are jokes, but they are aggressive rather than funny. They are aggressive comments masquerading as jokes.      A friend once called this "joking on the square", but I have never heard or seen this phrase. This type of comment is both pervasive and psychologically subtle and in my experience there is often an exact word describing such things. If not a word, is there an astute phrase which cuts to the heart of this?


So I have the following c++ class  class MyClass:  public:       static void InitObject();  private:      static MyObject *myObject;         };   And then in the .cpp file I do  void MyClass::InitObject {     myObject = new MyObject(); }   However, I get a compiler error saying that "myObject" was referenced from InitObject() and then it says Linker command failed with exit code 1.   Why doesn't this work? How do I fix it?

What is the best way to initialize a private, static data member in C++?  I tried this in my header file, but it gives me weird linker errors:  class foo {     private:         static int i; };  int foo::i = 0;   I'm guessing this is because I can't initialize a private member from outside the class.  So what's the best way to do this?


From :    It's been stated that it's not a bug for the same question to appear in both lists. But shouldn't they have the same score?  For the record, it doesn't look like an issue with one being the question score and the other being the answer score, because at the time of this screenshot the question was +26 and the highest-scored answer was +22 (while the screenshot shows +26 and +23).

I was browsing  discussion () and noticed in the related posts lists the following difference in the score on a  question ().        I first noticed the related question be shown in linked nearly 3 minutes after  was left.    Hidden feature-request  Can we please stop displaying the same question from appearing in both lists? If a question is appearing under the linked posts list, it should not appear with the related questions too. Also, the difference in votes makes my eyes sore. It has been there for more than an hour now.


I want to be able to run my Python scripts in one terminal but to print the useful output to another terminal on the same machine. Having the ability to refresh the terminal with the useful output would also be good because then the useful out can be built up incrementally as though its printing out. How can I do this?  I have googled this but most answers relate to using things like 'write' and 'talk'. With 'write' I can send messages to another terminal but there isn’t much control over which window or refreshing/clearing the screen. I am using Ubuntu Trusty Tahr

I want to run a command foo on one terminal and pass the result to another terminal. Is it possible to do this ?


I have a Normal Map problem: I've baked a high-poly sphere to a low-poly, but whatever I try there's always a bad shading on the surface of the low-poly in Rendered display, between the light and the shadow. It disappears if I unplug the Normal Map. What am I doing wrong? Is it inevitable? Am I missing something? Thanks in advance.  Edit: Solved by Serge, it looks like it's the terminator issue, fixed with a bigger light size. Answer also given  by IkariShinji, and as Leander pointed out,  by Crazycourier.  file:

I've been modeling a hermit crab and I don't know why but some areas of the mesh are really dark on some spots, like the legs and the claws.   I hope you can help me fix it.


echo Hello World | nano - | less   I want to modify Hello -> Goodbye while in the the text editor.  It does not have to be with nano. I am stuck with nano reading stdin but requiring me to write to a file (writing to - creates a file named -)

I was just curious if there's a way to get input not from StdIn but from $EDITOR - be it vim, nano, emacs or even a non-command-line-editor (MacVim/TextMate). What are the options/workarounds/bestpractices?  Basically I'd wish for a workflow as with heredoc - but from the $editor instead.   $ sort -nr << FOO | uniq -c  pipe heredoc> foo  pipe heredoc> bar pipe heredoc> baz pipe heredoc> foo pipe heredoc> FOO    2 foo    1 baz    1 bar


For example, in these websites:        In all of these cases, replacing "Do" with "Does" makes it sound more natural, but is "Do" correct?

My non-native English speaking friend just asked me: "Data is..." or "Data are..."?  I said both but that's because I've been desensitized from reading/writing both (especially from writing code and adding quick comments).  My question: Is it acceptable to utilize either for a university paper? Or is one safer than the other (when confronted with stickler professors)?    Related questions:


When we push a box, the box applies an opposite force on my hand, but why does my hand move with the box as I push the box if the net force of is 0?

When we push a box, the box applies an opposite force on my hand, but why does my hand move with the box as I push the box if the net force of my hand is 0? What is happening?


How is possible for the solar system to be stable if has been proved that even the trhee body problem is chaotic with a very small amount of stable solutions?        Do we need to consider the solar system as a very weird and low probabolity solution stable solution of the n body problem?      or if we have a system like that (the mass of one body, the sun, is 99% of the total mass, and Jupiter and Saturn are 90% or more of the resting mass) then the chances to get a solution with stable solution are actually high?

The orbit of the earth seems to be very predictable. But as it is a many-body problem having sun, earth, moon, jupiter and so on, is it really that stable or will it start making strange movements sooner or later?  Are there asteroids or moons in our solar system with obviously chaotic orbits?