When I checked my system's boot logs, I noticed that each of the dev-loopx.device takes a good 3-5 seconds to boot, and I have a total 20 such loopx devices lines up during my boot, which ultimately slows down my boot.  To get further details on these loopx devices, I ran the following command  $ df -a -h -T  And the most important part of the output was:    Why are some applications (or part of them) is being loaded during boot, which I don't even use in every session?  For example, the gaome-calculator application, the gtk-common-themes, the gnome-system-monitor.  Why are there multiple entries of some of the applications (and each one of takes a good 3-5 seconds, and even more)?  How can I disable and/or remove some of these loopx devices when I don't use the associated application/services very often? This would definitely speed up my boot process!  Any help and guidance are really appreciated.  Abbas.

After booting I ran systemd-analyze blame and here are the results:       21.596s systemd-journal-flush.service      18.658s dev-sda8.device      15.099s dev-loop33.device      15.034s dev-loop19.device      15.012s dev-loop34.device      14.989s dev-loop21.device      14.877s dev-loop15.device      14.866s dev-loop26.device      14.773s dev-loop27.device      14.684s dev-loop30.device      14.677s dev-loop32.device      14.649s dev-loop35.device      14.590s dev-loop25.device      14.267s dev-loop23.device      14.192s dev-loop24.device      14.156s dev-loop29.device      14.133s dev-loop16.device      14.065s dev-loop31.device      14.059s dev-loop28.device      13.821s dev-loop20.device      13.531s dev-loop22.device      13.495s dev-loop14.device      13.364s dev-loop18.device   What are these dev-loopxx.device (xx denotes numbers) services and why are they taking so much time? Are they related to the mounting of snaps? Can I reduce the boot time by disabling them? I'm running Ubuntu 18.04 alongside Windows 10.


I will very grateful if you can help me understand the following issue:  As I understand, the next two sentences are interchangeable and have the same meaning:  1) Acts that are done by humans are not necessarily moral.  2) Acts done by humans are not necessarily moral.  The first option is a standard way of using the passive form of the verb. However, I don't understand why the second option is correct, If "done" this case as passive form of the verb or even if it can be treated as an adjective, I am expecting to see some tense of the "be" verb before.  There are many other similar examples, especially when using verbs like: "shown, suggested, presented, defined and etc." with a reference to a previous sentence of our article/text.  Thank you in advance.

What is the part of speech of 'regarded' in the following?     "a quality of beauty and intensity of emotion regarded as characteristic of poems"    Why isn't it "... [which is] regarded ..."?  And in another case:      "a small lizard with wide feet, found especially in warm countries"     And also:      "Words used to describe writing or speech style"    In all these examples, why shouldn't the verbs be in their passive form (e.g. which is found, words that are used)?   I am a ESL learner and I am very confused by these usages!


Where is the right place to say "thanks" to all those that answered my question? In a comment to my original post, or in a comment to the latest answer or where?

Quite often a number of users will give similar answers to one of my questions. Sometimes someone will give an answer that is interesting, but does not really help with my question.  In all cases, I feel a need to thank the people who answered my question. It isn't always appropriate for me to upvote every answer, and I can only accept one answer. Giving a "thanks" comment on every answer appears to be frowned upon.  So, what's the etiquette?


I'm trying to install the drivers for my AMD RX 460 graphics card but whenever I do so Ubuntu is rendered unbootable. I get an error saying      the system is running in low-graphics mode   and whatever selection I make results in a black screen. Is this an issue with AMD's graphics card driver or am I doing something wrong? The graphics card works fine with windows. Luckily I dual boot.  Can I get the card working in Ubuntu?

I have 14.04.5/16.04 or newer and an AMD GPU. I'm not getting the performance I want, and some programs say they need things like OpenCL.  I've heard about fglrx, but if I try to install it on my machine, it breaks and I have no GUI.  Is there anything I can do to get my AMD card working to its full potential?


I have an array of about 1000 words. I want to transfer them to another array while removing any duplicates. How can I do this in C# ?

I have been working with a string[] array in C# that gets returned from a function call. I could possibly cast to a Generic collection, but I was wondering if there was a better way to do it, possibly by using a temp array.  What is the best way to remove duplicates from a C# array?


When I type in the following code, PyCharm says "Expression can be further simplified". What is the more simplified version to this statement?    if listA == []:   return "yes!"

For example, if passed the following:  a = []   How do I check to see if a is empty?


I am facing issues with linux command execution:  root@PGStaging:/etc# ls Command 'ls' is available in '/bin/ls' The command could not be located because '/bin' is not included in the PATH environment variable. ls: command not found root@PGStaging:~# ps Command 'ps' is available in '/bin/ps' The command could not be located because '/bin' is not included in the PATH environment variable. ps: command not found   How to solve above issues?

I have been using Ubuntu 12.04 for quite a while and have never had a problem come at me out of the blue like this. I'm trying to install python 3.2 on my Ubuntu system and every time I run the code to compile the python source, I get this error:  'Command 'sudo' is available in '/usr/bin/sudo' The command could not be located because '/usr/bin' is not included in the PATH environment variable. sudo: command not found'   I've also tried running gksudo command to view what my environment shows but I pretty much get the same error.


When a question with some upvotes or downvotes but no answer is deleted by the person who posted, the reputation of that person does not change. Why is that?  EDIT: I figured out the answer to a question I asked, and therefore, deleted the question (with no answers) but overall 3 upvotes. I do not remember whether it had any downvotes. But there is no change in my reputation.

With regards to  post about  and the part about retaining reputation earned from deleted posts that have a score of 3 or better and were visible on the site for 60 days, does this also apply to self-deleted posts and will it continue to do so? I culled a few of my own answers over the weekend that were less than stellar, and my reputation dropped 1.8k, but the rep is back today after the changes were announced. I thought it would be useful to clarify that this also applies to self-deleted stuff.


Which is correct  it is not that big a deal  or  it is not that big of a deal  Why does "of" need to be added ?

Is the saying "It's not that big of a deal" incorrect? I would really like an answer to this as my children think it is correct.


I googled this, but couldn't find an answer.  How do I add space inside \textrm{}?  e.g. I want to get "Hello_____World", but what I get is "Hello_World" when I type in \textrm{Hello_____World}. Please note that _ is there just to show spacing size.  Thanks in advance.  p.s. The question is inside \textrm{}. \, \quad, \hspace, etc. don't work inside \textrm{}.

When using some other editors, when you type two spaces with your space bar, two spaces are effectively displayed. This is not the case in LaTeX (btw, that's not the case on these websites ;) ).  My question is barely simple I guess, but I didn't found some information about it on Google.  How to display two consecutive spaces in LaTeX (I mean two spaces horizontally, with the space bar).


In below code, I want to hide the "Lorem Ipsum is a dummy content" by showing the other elements inside the parent container, either by using jquery, javascript or CSS? Solution much appreciated.
      Lorem Ipsum is a dummy content

Text goes here

I would like to get all descendant text nodes of an element, as a jQuery collection. What is the best way to do that?


I got this idea while sitting and studying physics in school but not getting answer please try to answer it.

Why does a bike/bicycle fall when its speed is very low or close to zero and is balanced when going with a high speed?


I am using beamerpost for my poster. I found out how I manage to change the font size of my body. Is it possible to change the font size of title, subtitle, etc. independently  as well? if yes, how?

I want to change the font size of particular frames, and when I use   \fontsize{<font size>}{<value for \baselineskip>}\selectfont   as suggested by , I found it does not change the font size inside nest lists. Is there a way to change those font size accordingly?


Im stuck at this problem  Find an invertible Real Matrix $P$ such that $P^{-1}AP$ and $P^{-1}BP$ are both diagonal where $A$ and $B$ are real matrices.  a)   $A=\begin{bmatrix}   1&2\\ 0&2\\ \end{bmatrix}$ and  $B=\begin{bmatrix} 3&-8\\ 0&-1\\ \end{bmatrix}$  b) $A=\begin{bmatrix}   1&1\\ 1&1\\ \end{bmatrix}$   and $B=\begin{bmatrix} 1&a\\ a&1\\ \end{bmatrix}$  I know that diagonalisable commuting matrices can be simultaneously diagonalised but I'm not able to proceed.Kindly help.

struggling with a question from homework and would appreciate some assistance.  Let $A, B \in M_2^{\mathbb{R}}$ be defined as follows: $$A = \begin{pmatrix} 2 & 1 \\ 1 & 1 \end{pmatrix}, B = \begin{pmatrix} -4 & 1 \\ 1 & 1 \end{pmatrix} $$ Find a regular $P \in M_2^\mathbb{R}$ such that $P^tAP=I$ and $P^tBP$ is diagonal.  I'm familiar with the theorem that states that a simultaneous diagonlization exists if one of the matrices is positive-definite (or negative-definite). I've found an invertible P such that $P^tAP=I$: $$P=\begin{pmatrix}1\over\sqrt{2}&-1\over\sqrt{2}\\0&\sqrt{2}\end{pmatrix}$$ But $P^tBP$ is not diagonal. Would appreciate any assistance / hints. Thanks!


In the following scenario, does a double word premium apply to both words made on the same turn? Player 1 plays the word "book". Player 2 plays the word "shot", placing the "s" on a double word score space, and also forming the word "books".

An example:    O  O?   There is a triple letter tile to the right of the bottom O, indicated with a ?.  If I place an X on it, making the words OX (vertical) and OX (horizontal), do I score 50 points (scoring the tile twice) or 34 (scoring it once)?


I am trying to cd /home/ervin/Downloads/psneuter in order to push psneuter to an android phone in order to root it.  I believe the path to the file and folder is correct, yet I get a message no such file or directory.  Am I doing anything wrong? It worked in Fedora, don't know about here.

I need to know how the directory name in order to type it out in the terminal. How do I access the names of directories?   Windows Explorer used to have a title bar with the full path. Can someone please help me figure out how to see the full path of a certain file?


how to spell in English the amount ? 409383 us dollars  i like to know if it is right: four hundred nine thousand, and three eighty three hundred US Dollars

I know that in order to spell a number you have to insert an "and" between the hundred and units. For instance 301 will be "three hundred and one". But what about larger numbers? 1,301 is "one thousand three hundred and one" or "one thousand and three hundred and one"?  In this case, British an American spelling is the same?


Suppose $A$ is a set, $f:A^2 \mapsto A$. We call $f$ associative iff $\forall x, y, z \in A$ $f(x, f(y, z)) = f(f(x, y), z)$.  Now, suppose $|A| = n$. How many associative functions are there on $A$? I would like to know the asymptotics of their number as $n \to \infty$.  Despite the question seems quite natural, the most relevant thing I was able to find was OEIS A027851 - the number of $n$-element semigroups up to isomorphism. However, it is not what I need, as two different associative functions may nevertheless yield isomorphic semigroups.

I started thinking about the number of associative (binary) operations on a set with $n$ elements today.  Looking online I found  which indicates only $113$ of the possible $19,683$ operations on a three-element set satisfy association.  So, $50\%$ of binary operations on a two-element set satisfy association, and less than $0.6\%$ of all binary operations on a three element set satisfy association.  For an $n$-element set, where $n$ denotes a natural number, is the ratio $R_{n}=A_{n}/B_{n}$, of the number of associative binary operations $A_{n}$ to the number of all binary operations $B_{n}$, in general small?  I don't mean the following questions as equivalent, but since they seem more concretely answerable in principle, does   $$ \lim_{n \to +\infty} \frac{A_{n}}{B_{n}} = 0 ? $$       Also, is $F : n \to R_{n}$ a monotonically decreasing function?  Some Background of the Question: In his Linear Algebra Problem Book 1995 on p. 6 Paul Halmos writes "The commonly accepted attitudes toward the commutative law and the associative law are different.  Many real life operations fail to commute; the mathematical community has learned to live with that fact and even to enjoy it.  Violations of the associative law, on the other hand, are usually considered by specialists only."  For all I know, Halmos might only have written that to motivate the study of Linear Algebra and doesn't quite literally mean what he appears to say.  But, if he means what he appears to say, and if $F : n \to R_{n}$ is monotonically decreasing, or $R_{n}$ is generally small, I think there's something amiss with what Halmos says, since non-associative operations seem so common that one may as well enjoy them.


What is the average time does it take from the time you submit your paper to the time is it published in Physical Review Letters?

We have submitted a paper to an  and now I want to know how much time each stage in article lifecycle take?  There is an  in Elsevier site which describes different status of a paper from submission to publication:   Submitted to Journal Editor Invited (Conditional - this step may not occurs) With Editor Under Review Required Reviews Complete Decision in Process Completed – Accept   It also noted that:     Please Note: Most journals aim to communicate decisions to authors within four months of the start of the review process. There are a number of factors that may influence the actual time taken, most notably the availability and responsiveness of the article's referees. In consequence, peer review times do vary per journal. During the peer review process your article will show a status of ‘Under Review’.   But our paper status is Technical Check In Progress. this status is not mentioned in Elsevier site! I'm confused about this statuses. and now after 40 days the status is still in that stage. I want an estimation about time of this steps to see if I should be concern or not.


Apparently bound states in quantum mechanics require energy states to be discrete. That means energy in such systems is quantized, right? However, say that we have a superposition of energy eigenstates. Using the superposition principle, I say that their average is a possible state, since we also say that there's the same probability that we'll observe each of the two available states. Then since this average is allowed, I can take the average of that and the smaller of the original states, can't I? And if I repeat this an infinite number of times, I should get something which is as good as continuous, right? If I talk about the $n$th energy levels of some system, I won't be able to express the energy each of these allowed states in terms $n$ without making some messy equations. Isn't this a contradiction?

Suppose I have a system say SHO in a superposition of energy eigenstates $|{n_1}\rangle$ and $|{n_2}\rangle $ given by $|{\psi}\rangle = \frac{1}{\sqrt{2}}|{n_1}\rangle + \frac{1}{\sqrt{2}}|{n_2}\rangle $.  If I measure the energy of system there is equal probability of getting $(n_1 + \frac{1}{2})\hbar\omega$ or $(n_2 + \frac{1}{2})\hbar\omega$.  The question then arises where does rest of the energy go or come from? On one good day I measure system to be in state $|{n_1}\rangle$ while on other I measure it to be $|{n_2}\rangle$. It seems to me that it violates the energy conservation. Does this have to do with the measuring device? If yes then why do we never talk about it in formulating states?


I've a Sandisk 64gb class 10 microsd that used to work fine. All of a sudden it has become read-only. I can read all files, but I cannot delete/add any files or format the sdcard in Android, linux or windows.   Every attempt to format sdcard fails (with 10+ tools I tried) on PC (including gparted, fdsik, etc).   Micro-sd has no read-only switch. Is this hardware problem?

I am trying to help a friend who is very concerned that she has just lost all of the data on her 32GB SanDisk microSD card.  I told her I would post this and see if anyone could offer help.  Here are the details:   The SanDisk microSD card is less than two years old.  Probably only about a year old.  The store will take it back, but that doesn't really help.  She wants her data. She used the card in her Samsung Galaxy S4 smartphone for over a month.  The phone was never exposed to water or temperature extremes. Today, her phone suddenly said something like "Your SD card is blank or an unsupported format". Her phone was then unable to read the SanDisk microSD card at all.   Here's what she has tried:   Rebooting her phone.  Had no effect. Taking out the SanDisk microSD card and putting it inside a full-size SD card adapter, and inserting it into a Windows 7 SP1 computer.  The computer did not recognize its presence at all. Putting the SanDisk microSD card into a USB 2.0 external card reader and inserting the card reader into a USB port on a Windows 7 SP1 computer.  The computer recognized the card reader and installed drivers for it.  The card reader shows up as 'Removable Disk' in Windows Explorer.  Clicking on 'Removable Disk' in Windows Explorer results in the error "Insert disk: Please insert a disk into the Removable Disk". After trying #3, tried opening the 'Removable Disk' in FreeCommander.  Doing so results in the error "The device is not ready".   She does not have access to a linux box, but does have access to her Android phone.  What can she do to recover the data on her 32GB SanDisk microSD card?


I am really thinking hard to understand why java has introduced new concept called Lambda Expression in its 8th version.  I mean as far as I understand it is just like a regular function which calculates an expression and returns the value. Is there anything that a lambda expression does beyond this and what exactly happens behind the screen. Please educate me!!!   Thanks in Advance.!!

For a person without a comp-sci background, what is a lambda in the world of Computer Science?


I'm new to Linux and i have encountered a somewhat difficult problem for me. I currently run my system on Windows 10 installed in BIOS mode. I am trying to dual-boot by installing Ubuntu 16.04 x64 (from a USB stick made bootable with Rufus) on a separate partition to the Windows one (i have 4 : 2 for storage, one for Windows and a free one for Ubuntu) I've tried installing it by booting in legacy mode and with CPM enabled in bios but probably due to the fact that my video card has no VGA port, everytime, after the purple ubuntu loading screen, my monitor stays black. I managed to bypass this by disabling CPM and inserting in the grub command window the parameter "nomodeset" before launching the installer but what is bugging me is that by disabling CPM, my installer goes into UEFI mode due to my boot order being resetted and i'm being warned not to force an UEFI install while having the Windows in BIOS. Can you help me, pretty please? ^_^   Motherboard : asrock b85 pro4 Video card : nvidia gtx 970 oc CPU : i5 4460

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


I have a valid two year Established Visa,and I would like to exit the U.S for a month, and then return after one month,  but i was told i needed three months between exit and re entry. Can someone clarify? I am from Australia.

I'm on a New Zealand passport.  From most US Embassy webpages:     The Visa Waiver Program (VWP) enables nationals of certain countries,   including Australia, New Zealand, and the U.K., to travel to the   United States for tourism or business for stays of 90 days or less   without obtaining a visa, if certain requirements are met. Under the   VWP, time spent in Canada, Mexico, and adjacent islands counts towards   the maximum of 90 days stay allowed under the program.   I'll be there on a 1-year working holiday visa starting when I arrive in Vancouver. I'm spending 3 days in Hawaii en route to Vancouver. This seems to imply that 90 days after landing in Hawaii, my time will be up and I won't be able to get back into the US, as my living in Canada will not reset the clock. What if after this time I want to say, pop across the border to Seattle? How can I restart the 90 days, without having to resort to say, flying to Japan and back just to reset it?


I've failed  audit on  question.  The problem is I've seen in my audit window something else as there actually is. The question in audit had  tag, while actually it has no such tag, and I should have never seen that question because of the tag filter in close queue.   I've chosen to close as unclear what you are asking because I couldn't see what that has to do with JavaScript.   Please don't add random tags to audit questions and expect us to take no action.

Just recently the . I've got  this morning which seems to be out of scope for my filtered list. I have filtered my list to only review VBA and Excel-VBA tags while the audit is tagged with perl http pipes which have nothing in common with VBA. I see a problem with the way the system currently works  Since I have a filtered list of tags, once I see a differently tagged question I already know it's an audit. Come on, that's too easy!  Can this please be fixed? update I have ran into  which I decided to edit - the question was tagged VBA and I thought it had nothing to do with VBA so I selected Edit which was the correct action. Now, once the first audit was clearly one to close - nothing to do with VBA and really easy to know that it actually was an audit - the second one was a very good audit. I am just thinking now if this is a proper bug or just a matter of malfunction in the system. I think the first one may have been made an audit for the wrong reason. Let's turn this into a discussion as I can't clearly work the system out.


So, I've read some similar topics and none of them match perfectly;  The book I read has a scientist communicating with trees (possibly on a foreign planet?) and studying them. The trees respond to music (played on the flute, if I remember correctly). The local natives, at one point in the story, don't believe that the "junior" scientist is really showing them a message from the "senior" scientist, because it's on a laptop, and while they had learned to read, they don't understand enough to know that she didn't just type the message herself, and that it's really from the senior scientist. That's about all I can remember.

I am trying to remember the name of a fiction book about a boy that could manipulate plants just by whistling.  I think it's a bit of an older book, but I can't seem to find it by searching for those terms.  If it helps at all I think the title had something about green in it, but I can't be certain.  Does anyone have any idea what it is?  I seem to recall that the book was probably close to 20 years old when I read it and that was nearly 10-12 years ago.  The boy first realized he could manipulate plants by using a toy whistle and moved on to being able to make the noises to control the plants with his tongue.  I remember that there was some kind of conflict with bad people and he used his ability to fight them and I think it was in a jungle. I think he made one of the bad guys bite off his own tongue by hitting him with a vine.  It was in English and a soft cover I believe.


I've read that ICANN is the authority dedicated to assigning IP addresses to individual entities, so that no two separate entities are using the same IP address on the internet. It is my understanding that when assigning an IP address, an autonomous system number is also given to the entity. These autonomous system numbers are used by routers in some way to advertise that they have a route to an IP address.  My question is, how does a router know that a route and autonomous system number that they receive from a BGP peer is authentic? Is there a certificate chain of some kind used to prove that the route does indeed go to the entity that ICANN did assign the IP address to? Since an IP address can be multi homed with two or more routes to it, just because there are two routes known by a router doesn't mean that one of them is not real.  Does ICANN regularly publish a list of autonomous system numbers that routers cache?  Can routers choose to ignore ICANN's assignment of IP addresses, in the event that ICANN goes rogue? What's stopping an alt_ICANN from being created and the internet choosing to trust it instead?

On a personal network (LAN) one can simply grab an . If you choose the same IP address as an existing client, you get problems. There are companies like IANA and ICANN that are in charge of IP address bulks and sells them. But what stops you from just grabbing a random IP address? Is this built on trust? What if somebody were to grab an IP address and conflicting would occur. Is there any way of tracing that IP address to the location of the server using it?  Are companies that actually maintain the physical internet cables checking whether or not the clients connecting are using bought IP address blocks?


Let $D, E$ be triangulated categories and for my setting I take the shift functors to be auto-equivalence, and let me use the same notation $\Sigma$ for the shift. Let $F: D \to E$  be an equivalence of categories. Since $D,E$ are additive categories, so $F$ is an additive functor. My question is: Is $F$ an exact functor? i.e. do we have a natural isomorphism of functors $F\Sigma \to \Sigma F$ such that $F$ takes every exact triangle $X \to Y \to Z \to \Sigma X$  in $D$ to an exact triangle $F(X) \to F(Y) \to F(Z) \to \Sigma F(X)$ in $E$?

I have a problem: Is it true that every equivalence between derived categories preserve their distinguished triangles? Thanks very much!


I have the following question:  Let $f$ be a holomorphic function on $\mathbb{D}$. Assume $f(0) = 0$ and $\Re f ≤ A$ on $\mathbb{D}$ for some constant $A > 0$. Show that $|f(z)| ≤ \frac{2A|z|} {1 − |z|}$ for all $z ∈ \mathbb{D}$.  The $f(0)$ hypothesis and the fact that $f$ is defined on $\mathbb{D}$ makes me think that this could involve some type of Schwartz Lemma. But, the there is no reason to think that the function is bounded by $1$. I also do not know how to dissect the $\Re f \leq A$ part. Any help would be greatly appreciated.

I'm having trouble proving the following:  Let $f$ be analytic on $D(0,R)$ and suppose there is a real constant A for which $\operatorname{Re}f(z) < A$ for all $z \in D(0,R)$. If $f(0) = 0$, show that $|f(z)| \leq \frac{2A|z|}{R-|z|}$.   I was told to first start by showing that $|\frac{f(z)}{2A-f(z)}| \leq 1$ and also use the following result, which I was able to prove:  Let $f$ be analytic on $D(0,R)$ and let $f(0)=0$. If $|f(z)| \leq M$ for all $z \in D(0,R)$, then $|f(z)| \leq M|z|/R$ for all $z\in D(0,R)$.  Thanks in advance!


We are given two numbers $a,b$ and  a range of numbers from $[b,a+b-1]$ where $b\geq1$ and $a\gt2 $. We can add any two numbers $p,q$ (not necessarily distinct) in the range to form more numbers and add them to the set. How many numbers cannot be formed even after performing these operations infinite number of times.  My Approach is this:  Two cases arise when $a\geq b$  and  $a\lt b$ 1.) $a\geq b$ , here the answer is simply $b-1$. 2.)$a\lt b$ is where I have found a series but it may always not satisfy every case.  The series is an Arithmetic progression with last term as $ b-1 $ , common difference as $ a-1 $ and number of terms  as $b-1/a-1$ .  I am not sure about this formula and hence would appreciate a mathematical proof.  3.) There is also a special case when $a=2$ , then for some $b$ the number of values which are cannot be formed gives us the the triangular number series i.e $(1,3,6,10,...)$ but this would be handled by a generalised formula , which i am still doubtful about.   Any proofs or suggestions ?

We are given two numbers $a,b$ such that $a<b$. Now we have a set $\{a,a+1,a+2,\ldots, b\}$ (all number between a and b including them). Then, we have to find how many numbers cannot be formed from the above set. The only operation allowed on the set elements is addition.    Note : We can add these number as many times we want. Only addition allowed on these numbers.  Eg : If numbers are 3 and 5, the set is $\{3,4,5\}$ using these we only cannot make $1,2$.  Can anyone help me with that?  I am not getting any idea. I tried the cases when $b-a = 1$.


One of my questions had  added with no comment from the developers or anything. ; if I weren’t paying attention to the question, I wouldn’t know at all that my feature request were being worked on. Can this be changed so that there is a notification if moderator-only tags are added to or removed from a post?

Note: I'm not requesting that this be changed; I'm asking a neutral question as well as starting a discussion.  I'm aware that in order for users to be notified upon their question being edited, the edit has to be substantive enough, and that simply editing the tags of a question won't result in a notification.  Occasionally, I've seen staff members here add in a status tag without making any answer or comment, or substantive edit. As such an edit is tag-only, users aren't notified of the decision of their bug report or feature request if the staff member or moderator opts to go this route.  Is there a reason why this is the case? Was this considered when the decision was made to not notify in any case if the only edit is a retag, even if it involves moderator-only tags? If so, why was it decided to not notify the user regarding the decision of their request in this case?  If not, should users be notified if a moderator edits a status tag without providing an answer, comment, or substantive edit?


I am running my own Terraria server (currently the included one, but also want to test TShock) in my network and play with a friend.  Is there a way to for our characters to see parts of the map that the other has uncovered?  Since we can not always play together, it would be great if the characters could exchange about the parts of the world they visited.  To do this seems quite logical to me. Especially since the member also sees the information provided by the equipment (Compass, Depth Gauge, Lifeform Analyzer...) of nearby team members.  I found map files in the characters sub folder. I guess these contain exactly this information.  As a last resort one could merge this files offline if the format is understood (I am not afraid of binary data and programming ;) but the optimal solution would be server side.

If I play multiplayer with a friend and we go into separate caves for example, will my map then update with what he sees as well?  Is there a way to make it do this?


I am trying to connect my Ubuntu 17.04 laptop to Bluetooth speakers (visibility is on), but it keeps on searching and searching, it's not even able to find any other Bluetooth devices.  I tried to find laptop through my smartphone, but my smartphone is able to find everything except Ubuntu laptop.  Can anybody help me with this?    Here are the details.  output rfkill   0: phy0: Wireless LAN     Soft blocked: no     Hard blocked: no 1: brcmwl-0: Wireless LAN     Soft blocked: no     Hard blocked: no 2: hci0: Bluetooth     Soft blocked: no     Hard blocked: no   Output of dmesg | grep Blue  [   21.833554] Bluetooth: Core ver 2.22 [   21.833595] Bluetooth: HCI device and connection manager initialized [   21.833601] Bluetooth: HCI socket layer initialized [   21.833605] Bluetooth: L2CAP socket layer initialized [   21.833614] Bluetooth: SCO socket layer initialized [   21.960162] Bluetooth: hci0: BCM: chip id 70 [   21.976142] Bluetooth: hci0: BCM43142A [   21.976147] Bluetooth: hci0: BCM (001.001.011) build 0000 [   22.029898] Bluetooth: hci0: BCM: Patch brcm/BCM.hcd not found [   24.033855] Bluetooth: hci0 command 0x1003 tx timeout [   25.592338] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [   25.592340] Bluetooth: BNEP filters: protocol multicast [   25.592346] Bluetooth: BNEP socket layer initialized [   33.864100] Bluetooth: RFCOMM TTY layer initialized [   33.864111] Bluetooth: RFCOMM socket layer initialized [   33.864117] Bluetooth: RFCOMM ver 1.11   Output of lspci -knn | grep Net -A2; lsusb  02:00.0 Network controller [0280]: Broadcom Limited BCM43142 802.11b/g/n [14e4:4365] (rev 01)     DeviceName: NAMI     Subsystem: Hewlett-Packard Company BCM43142 802.11b/g/n [103c:804a] Bus 002 Device 003: ID 04f2:b50a Chicony Electronics Co., Ltd  Bus 002 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.  Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 003: ID 0a5c:216d Broadcom Corp.  Bus 001 Device 005: ID 1c9e:9ba1 OMEGA TECHNOLOGY  Bus 001 Device 002: ID 0438:7900 Advanced Micro Devices, Inc.  Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Bluetooth is on but can't find or be found by any other devices.  Output of sudo service bluetooth status:  ● bluetooth.service - Bluetooth service    Loaded: loaded (/lib/systemd/system/bluetooth.service; enabled; vendor preset: enabled)    Active: active (running) since ხუთ 2015-06-04 22:33:18 GET; 13min ago  Main PID: 26678 (bluetoothd)    CGroup: /system.slice/bluetooth.service            └─26678 /usr/sbin/bluetoothd -n  ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPAG ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/HFPHS ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSource ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Endpoint registered: sender=:1.63 path=/MediaEndpoint/BlueZ4/A2DPSink ივნ 04 22:39:14 Rangoo bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled ივნ 04 22:39:14 Rangoo bluetoothd[26678]: bluetoothd[26678]: Adapter /org/bluez/26678/hci0 has been enabled   Output of lsusb:  Bus 003 Device 005: ID 0a5c:21d7 Broadcom Corp. BCM43142 Bluetooth 4.0   How can I fix it?


I am currently watching Falcon and the Winter Soldier in English and as a German native speaker I stumbled a fair bit about the terrible German spoken by the supposedly German extras. They sound like English native speakers who don't know a word of German and are just trying to phonetically repeat German sentences. I also noticed that Daniel Brühl, who is from Germany, often tries to speak Russian, which I am sure doesn't sound any better than the "German" extras. And I am also pretty sure that all other "native" extras for other languages don't sound any better. Now, I am quite sure that getting someone who actually speaks the language to at least dub the scene later (if you can't actually find an actor who can speak the language) is neither too expensive or too hard in a production like this with a budget of $150m. So I don't think it's about laziness or money. Also, since there was at least one German actor on the production (and I am sure more than enough people who natively speek one of the other languages), I can't believe no one noticed. And Falcon and the Winter Soldier is not at all alone with that issue. Almost all native English productions have that issue. So there must be some other reason this is so common? Are native English speakers so used to bad fake movie accents that they wouldn't recognize the real accents/languages? What am I missing here?

Is there a reason why in so many English-language movies and TV series, whenever someone is speaking "German", they (actors, writers etc.) just don't care about if what they say is right or wrong? This can range from:    just minor grammatical errors e.g. "Schieß dem Fenster" in "Die Hard":                                rambling some made-up words and claiming them to be German e.g. "Lebenslangeschicksalssatz" in "How I met your mother"                                wrong German paired with a bad accent e.g. in "Scrubs"                                up to native German speakers talking complete nonsense e.g. Heidi Klum in HIMYM                                  I don't know if this is the same with other languages (for example there is a scene in Scrubs where the cast speaks Spanish, but there might be similar mistakes:                                 Do the creators and actors just not want to speak correct German and at least use correct German words, or is there simply no money in a $100,000,000 movie production to ask a native speaker to look over your script and maybe correct some of the lines?


I deleted a commit accidentally using:  git reset --hard HEAD~1   I want to know if there is a way I can revert this and recover my commit. Thanks for your help.

Is it possible to undo the changes caused by the following command? If so, how?  git reset --hard HEAD~1


Is there perhaps open-source software for managing labelled objects?  I am looking for a BibDesk for theorems basically because I have rather many propositions and theorems floating around that I would like to reference. I am currently using an Excel spreadsheet to keep track of their labels, names but I am sure there must be some software, no?  Perhaps there exist general packages as well?  At the moment I am using TexShop which is an otherwise very good piece of software.  Thanks so much!

How to verify all the references used in the article or not from the auxiliary file?   Or is there any other file to check it?   If any one reference not included in the article, whether that reference highlighted by red colour?


From APUE     There are  rules for who can change the IDs. Let’s consider only the   user ID for now. (Everything we describe for the user ID also applies   to the group ID.)         If the process has superuser privileges, the setuid function sets the real user ID, effective user ID, and saved set-user-ID to uid.   If the process does not have superuser privileges, but uid equals either the real user ID or the saved set-user-ID, setuid sets only the   effective user ID to uid. The real user ID and the saved set-user-ID   are not changed.   If neither  of  these  two  conditions  is  true, errno is  set  to EPERM and -1 is returned.      What does it mean by "a process have or does not have superuser privileges"?  Is it defined as whether the real user ID of the process is root or not?

Real UID, effective UID, and some systems even have a "saved UID". What's the purpose of all these, especially the last one?


Unfortunately, I think I already know the answer to this but I'm hoping I'm just missing a trick:   On a sunny day, is it possible to compensate for a 2 second shutter speed so the photo doesn't come out completely white?   When I was out yesterday, I set my camera to f/29 ISO 100 (the lowest I could go) to try to get a slow shutter speed photo of a river. The problem was, though, the sun came out and I ended up with several areas of the photo that were overexposed beyond repair. In manual mode, the exposure compensation feature on my camera does nothing. Is there a way to prevent the whiteout or am I just out of luck?   Also, would it be better to take the slow shutter photo, take a quick duplicate using aperture priority, and then compile the two?   Any suggestions are greatly appreciated. Btw, I'm using a Nikon D5600.

I've seen a few related posts on the site but nothing specifically on this point:  I'd like to be able to take long exposure photos during daylight (like the examples in ). I'm told that you can do this by using a neutral density filter. So my question is: what is a neutral density filter exactly, and how is it used to achieve that smooth long exposure effect?


I am looking for a title of a book, The main character could send out a "strand, stream?" of magic to retrieve whatever he wished.  If he wanted a beer he would get it and one would disappear elsewhere in the world. I know I read the book as a paperback, maybe in the mid to late 90's.

This book was written in the 80's possibly. The book opened with the male antagonist having amnesia and a broken leg. The family can travel upon the "road" and it changes. They can contact each-other using cards, like the ace or the queen. Who wrote this, I must know.


I'd like to search using invoice number but it's give an error in Invoice no how to solve it. here is my filter method & error is:     java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.String java.lang.String.toLowerCase(java.util.Locale)' on a null object reference   public void filter(String charText) { charText = charText.toLowerCase(Locale.getDefault()); billmod.clear(); if (charText.length() == 0) {     billmod.addAll(arraylist);  } else {     for (BillModel st : arraylist) {         if (st.getBill_tableno().toLowerCase(Locale.getDefault()).contains(charText)) {             billmod.add(st);          }         else if(st.getBill_date().toLowerCase(Locale.getDefault()).contains(charText)) {             billmod.add(st);          } else if(st.getBill_amount().toLowerCase(Locale.getDefault()).contains(charText)) {             billmod.add(st);         }         else if(st.getIncvoice_no().toLowerCase(Locale.getDefault()).contains(charText)) {             billmod.add(st);         }      } } notifyDataSetChanged(); }

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've been having an terrible experience when ever I'm descending to Barcelona. My ears would clog so bad that it would even hurt for a couple of seconds. That it self doesn't cause a problem. The thing that irritates me is that it takes a couple of days to regain my original hearing level, which is often followed with a headache (I don't have any hearing problem, nor any health issue).  I've descended to multiple cities and only experienced this while landing to Barcelona. I've landed to other cities which stand at sea-level and didn't experience such issues.  On my ultimate landing, I tried the valsalva maneuver, as well as chewing, swallowing and other things that could possibly unclog the ears. None of it was efficient.   Are there any preventives for this case? It's really annoying to deal with if every time after the specific flight. Furthermore I'm scared that it can damage my hearing in a long time.

What is the best way to make my ears pop when landing on a plane? The hold-your-nose-and-pitch method is very painful; are there any other methods to pop ears?


For a few months now I was using both Linux Mint and Windows 10 through a dual boot setup and a grub loader on startup. Suddenly this morning I can no longer see my grub loader or any boot options and am automatically booting into Windows.   I have checked the UEFI boot options and I can no longer see a grub/Linux option. I currently do not have access to the USB I used to initially install Linux. I am wondering what the best course of action is to recover the grub loader and boot into my Linux partition. I am also concerned that the Data may be corrupted or lost.   Any insight on what to try/how to proceed would be very helpfull. I have read a little about using bootrepair after booting using a USB, but I currently don't have access as I mentioned and would like to see if there are alternatives as I require access asap.

I've been reading a lot about dual-booting, and it seems as easy as loading Windows and then loading Linux with GRUB, but everybody says that Windows loves to trash GRUB when it gets the opportunity. What are some steps I can take to prevent this from happening (other than using Windows' bootloader, I want to keep this as simple as possible)?


As is often the case, I can recall only some details about the book, not the main plot itself.   There were several sets of children on Earth in the near future, separated from their parents for a long time.  The parents had jobs in space/another planet.   The children wanted to see them. They built a ship - forged a purchase order or something for an asteroid what had been captured and was on earth, then more hacking/forging for laser time to hollow it out, outfit it, and so on. They went off and found their parents, but there was another threat and they had to leave. The parents' base(?) was isolated and armed with 10 laser weapons of some kind, called, I think "p.o.w's" which fired a targeting laser and would then fire if the targeting laser detected something. The children stole/were given three of them and attached them to the asteroid ship. They when went off and...that's all I remember.   This would have been read as a library book in the middle to late 80's.   I've a vague feeling it might have been a short series of possibly three books.   Equally likely to just have been one, though.  Been trying to remember what it was for a few years now.

There were a group of kids (3 or 4) and they were joined by a Chinese girl from a well off family. I remember they visited a plant and something about flies buzzing in their brains at the end where she betrayed her shipmates or something. There was something about having 'encoded cards' that they got on the black market.


She: "Don't forget to bring washing powder.      I: Okay, I don't. (or I will not?)   I know the rule of thumb that in interrogative sentences we always have to answer in the same tense that we were asked. (For example: Are you there? Yes, I am.  or "Do you like it? Yes, I do.) But in this case which is not interrogative sentence but an order, I'm not sure what would be correct.

Our textbook says,     A: "I have to go shopping this afternoon."   B: "Don't forget the bread."   A: "No, I won't."   About the last sentence, why can't you say "No, I don't."?  i.e. Why is "No, I don't." not acceptable in this case:


I am making a basic syntax checker for a language i am trying to make. The lexical analyzer passes something to the function isIfStmt() to check if its valid like:  #IF#RPAREN...#LPAREN#NEWLINE...#VAR#ASSTOP#RPAREN...#LPAREN#NEWLINE...#END#SPACE#IF   This is the python code i wrote:  def isIfStmt(ifStmt):     ifObj = re.match(r'\#IF\#LPAREN(.*)\#RPAREN(.*)\#END\#SPACE\#IF', ifStmt)     print(ifObj) if not isLogicExp(ifObj.group(1)):     return False if not isStmtList(ifObj.group(2)):     return False if ifObj==None:     return False return True   The isLogicExp function checks if the logical expression supplied is correct. and isStmtList checks if the code inside is a valid set of simple statements that might include another if. The problem is that this regular expression matches the last #LPAREN and I want it to match the one that is for the first left parenthesis in the if stmt line. But it matches the last one in the argument supplied. if() a=(10)  if i change the regex tor'\#IF\#LPAREN[^\NEWLINE]\#RPAREN(.*)\#END\#SPACE\#IF'it doesn't work either.  If I try to use the non-greedy approach with #RPAREN, it has a problem that between the parenthesis, there can be more in the logicalExp inside. I tries using the non-greedy approach with #NEWLINE as,  r'\#IF\#LPAREN(.*)\#RPAREN?(#NEWLINE)(.*)\#END\#SPACE\#IF'   But it's not working either. I still match the last #RPAREN

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


I want to type Arabic text in Photoshop cs3, but the text appears disjointed and the letters do not connect at all. For example محمد appears as م ح م د.

I want to type Arabic text in Photoshop, but the text appears disjointed and the letters do not connect at all. For example محمد appears as م ح م د.   I'm using Photoshop CS6 on OSX Mountain Lion.


I'm trying to initialize a bi-dimentional (3x3) list without typing all elements, since they are all the same.   However, it seems that only the first line of this matrix is really created as a new object, and the subsequent lines are just references to the first line.  How could I create all lines are independent objects?  Here's an example to illustrate this:  # Create a bi-dimentional list a=[[''] * 3] * 3 print a >>>[['', '', ''], ['', '', ''], ['', '', '']]  # change a single element, on first line # notice that it will change also the elements at other lines a[0][1] = 'x' print a [['', 'x', ''], ['', 'x', ''], ['', 'x', '']]

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


What is the experimental value of the ratio between the proton and the electron charge? Or more generally, is there a table that lists the ratio of the different nuclei charges to that of the electron?

Followup to "".  It is argued that even a tiny residual charge would result in huge amounts of electricity in bulk matter, everything would be different, etc. I do not find that a convincing answer: suppose $n$ protons plus $n+1$ electrons are neutral. Why wouldn't we also expect there to be $n$ protons to every $n+1$ electrons? That is, there is no bulk matter problem if every $n$'th atom is a negative ion (for hydrogen).  Now, what empirical lower bound can we give for $n$ in that kind of scenario?


I recently voted to close a question as "too broad;" several others chose "primarily opinion-based." When the question was put on hold, the message shown was:     put on hold as primarily opinion-based by user1, user2, T.J. Crowder, user3, user4   This has always bothered me: Could we please make that message accurate?     put on hold as         primarily opinion-based by user1, user2, user4   too broad by T.J. Crowder, user3      I don't see it reducing comprehension (to the extent people read it at all), and may well give some useful additional feedback to the OP (to the extent people read it at all).  This particular example is a "meh" (e.g., the question was probably both), but I've sometimes felt the need to actually add a comment disassociating myself from a close reason that made no sense (but was the one the majority picked).

Do not give the impression that all votes are unanimously in favor of the winning close-reason. I closed for "belongs on superuser," yet SO claims I closed for a completely different reason.  Source:


I'm doing a codefights linkedlist question and I just can't seem to understand why my code is throwing a NullPointerException.   The way I wrote it was that once you hit a position like the third index, it would make the insert's next be the current node's next and then making the new current's next be the insert so that we can insert the node in. I did counter+1 to avoid Null issues but it looks like I failed :/  /*   Insert Node at a given position in a linked list    head can be NULL    First element in the linked list is at position 0   Node is defined as    class Node {     int data;      Node next;   } */   Node InsertNth(Node head, int data, int position) {    // This is a "method-only" submission.      // You only need to complete this method.      Node curr = head;     Node insert = new Node();     insert.data = data;     insert.next = null;      if (curr == null)         return insert;      if (position == 0) {         insert.next = curr;         return insert;     }      int counter = 0;     while (curr != null) {         if (counter+1 == position) {         insert.next = curr.next;         curr.next = insert;               }     curr = curr.next;     counter++;     }     return curr;  }

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?


Good evening everyone. Following BlenderGuru´s donut tutorial, i´ve repeatedly found the same error. These spikes appear around the time i start sculpting. My guess is that it has to do with the subdivision surface modifier (solidify is the only other one), either the values used or the place in the workflow- whether i used/applied it too soon or too late. Could anyone please clarify for me? Thanks a lot!

I tried to follow the new Blender 2.8 tutorial from Blender Guru.   When entering "Sculpting" with the icing there were suddenly alot of holes in it. Why is this?


I'm a hobbyist solderer using tin lead solder to occasionally repair broken electronics. As I don't solder all day every day, I use my normal writing desk in my bedroom, which stands next to my bed, for soldering, cleaning it afterwards with soap and water to remove flux residue, etc. As solder pops and splashes, there may be some little solder leftovers lying around in the room.  Is this safe?

I'd like to do some hobbyist soldering at home, and would like to make sure I don't poison those living with me (especially small children).  Lead-free seems necessary - what other features should I look for in solder?  Are the different types of solder roughly the same in terms of safety (breathing the fumes, vapor fallout, etc.)?  Is there more I should do to keep the place clean besides having a filter fan and wiping down the work surface when finished?


I have the following class:  class MyClass{     string field1, field2; }   And I have List<MyClass> thats contains the following:  list.Add(new MyClass("1","1")); list.Add(new MyClass("1","2")); list.Add(new MyClass("1","3")); list.Add(new MyClass("2","2")); list.Add(new MyClass("3","2"));   I want to find the most frequent value of field1, this case I have three times the value "1", one time the value "2" and one time the value "3", How can I get the maximum count value of field1 (this case is "1")?

Is there a quick and nice way using linq?


The wall box is from the mid-1950's and my multimeter shows that it is grounded. There are a solid 120 volts when testing between live and ground. I noticed a bare copper wire coming from the cloth wiring in the back tied to a screw connected to the box. I looked around for usable screw holes in the box to screw a ground screw into but they were all way too large. Does this look okay? I get good continuity here between the green insulated copper ground wire I added and the rest of the box.  The green wire will go to the grounding screw on the outlet.

The receptacle is from the mid-1950's and my multimeter shows that it is grounded. There are a solid 120 volts when testing between live and ground. I noticed a bare copper wire coming from the cloth wiring in the back tied to a screw connected to the box. I looked around for usable screw holes in the box to screw a ground screw into but they were all way too large. Does this look okay? I get good continuity here between the green insulated copper ground wire I added and the rest of the box.  The green wire goes to the ground screw on the new outlet in this case.


Due to an argument, I must ask: Is it "two-drink minimum" or "two drink minimum"? Are both valid?   To me, the latter feels wrong because it has neither plural on "drink" nor the dash/hyphen to imply they are linked; am I right?  EDIT: Taking the examples given below, would the correct way to say be "Three-bedroom house"? I do agree about the plural, but I thought that kind of required the usage of a hyphen.

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


It's alright that users aren't allowed to upvote their own posts. But, what about downvote?  Users can mis-use upvote, but users can't mis-use downvote.  Add this feature.. With it, a user can downvote his question/answer at later point of time when he finds that it's poor. Today, I was trying to do that, but failed.

Once in a blue moon, I've wanted the ability to downvote my own answer to some question.  ()  Obviously upvoting one's own posts is out of the question.  But down is different.  Voting my own answer down can help me improve the site by pushing my answer lower in the ranking than another answer with a better or more situation-appropriate alternative.  It's not something I'd do often, but I would use this feature if it were available.  If implemented, I'd expect this feature to operate just like downvotes on other user's posts.  That is:   I get a few seconds to undo the downvote;  I get to remove the downvote after an edit to the post;  I lose a point for placing the downvote (CW excepted); I lose two points for receiving the downvote (CW excepted).   If you're noticing that I'd lose 3 points for downvoting my own non-CW post, congratulations! You can add!  I can think of a couple of potential downsides to this change.  The first one may be a dealbreaker; the second is probably not that big a deal.   Strategic downvoting of oneself: since you can undo the vote after an edit, and you can always edit your own posts, someone could downvote themselves soon after posting (especially on a FGITW answer) to garner extra sympathy upvotes. Badge collecting: the Peer Pressure badge just got easier, because if you have a -2 score on an answer, just downvote and delete for an instant badge.


I thought a bit about this, and got confused as to why we always claim the Sun is at the centre of the solar system since relativity tells us that there is no preferred frame of reference. A person sitting on a train is as justified in claiming that he is stationary as a person "standing still" outside the train. If they agree to measure things from the Earth's F.R then, yes, the train observer is the one who is really moving. Now who in the world agreed to measure orbits relative to the Sun and quote it as objective fact? I think circular motion about one's own axis (spin) is not relative but this is circular motion about an axis outside the body. We could make things much easier for ourselves and treat each planet as a person who has 360 degree vision (so that we can ignore the need of spinning motion in comparing relative speeds). I haven't done general relativity yet or slightly more advanced topics so it might turn out that accelerating frames of references are objective and unique in that sense when it comes to motion. Not sure!

In history we are taught that the Catholic Church was wrong, because the Sun does not move around the Earth, instead the Earth moves around the Sun.  But then in physics we learn that movement is relative, and it depends on the reference point that we choose.  Wouldn't the Sun (and the whole universe) move around the Earth if I place my reference point on Earth?  Was movement considered absolute in physics back then?


I just want to raise the problem again. The issue with loading static resources using REQUIRESCRIPT in list onclick javascript button can be reproduced again in Summer 15 preview. Anyone else can reproduce? Any ideas/comments?  Please, refer to the last comments of .  Thanks

We're using list view and details OnClick Javascript buttons which reference custom js ans css files stored in static resources and containing some shared logic/styles. The sample code below demonstrates how they are referenced.  {!REQUIRESCRIPT('/resource/CustomJQuery/js/jquery-1.10.2.js')}  {!REQUIRESCRIPT('/resource/CustomLib')}  $("head").append($("<link rel='stylesheet' href='/resource/CustomJQuery/css/smoothness/jquery-ui-1.10.4.custom.css' type='text/css' media='screen' />"));   These files are also referenced in Visualforce pages.  Introduction of "Serve Static Resources from force.com domain" critical update breaking this way of using static resources in OnClick Javascript buttons - there is also Known Issue created for this .  So, my questions are:  1) Are there any ways to make it work with "Serve Static Resources from force.com domain" critical update activated. My assumptions for now are below, but they seem to be risky and may require significant changes:   hosting these js and css files on own server and referencing them in OnClick Javascript buttons and all other places; move to custom visualforce pages;   2) Does anyone know what's going on with "Serve Static Resources from force.com domain" critical update right now? It was scheduled in Winter 15 first, then it was postponed to Summer 15. Now it can't be found in any org in list of all critical updates at all. It has even disappeared from the list in orgs where it used to be 1-2 weeks ago.  3) How long Known Issue can be "In review" status, since related one has this status for more than 2 months?  Thank you


Why is it inversion? We use DID after the word LITTLE. If I see another example,I'll understand .So-Not until we saw our kids with our own eyes did we believe they were really safe and sound- in that case DID stay after -we saw...And It's wrong.

I have seen this construction quite often:      Online ads have been around since the dawn of the Web, but only in   recent years have they become the rapturous life dream of Silicon   Valley.   What is the rule there?. When your sentence doesn't start with pronoun + verb, invert them as verb + pronoun?. I know it sounds awkward but is it possible (grammatically correct) to use something similar to:      Online ads have been around since the dawn of the Web, but only in   recent years they have become...   And in any case, does this only work with have (or has)? Maybe it works fine with 'had' but I can't think of an example right now.


On Windows 7, how can I identify any folders that contain files that have not been updated in x years? I would like to clean up unused files/folders on network drives. Initially, I just need a list of "old" folders / directories to be reviewed by others to ok deletion.  Thanks!

I want to delete folders and its files were created longer than 7 days using the command line.


Say I want to predict the cancer rate(regression)/predict the whether a person has cancer or not(classification). The data intrinsically has few cancer patients/low cancer rate, say 1/200. And the data set is good and large enough, say more than 100,000.  Now the question is: should I use certain sampling strategy to balance the data before I apply any regression/classification algorithm?  From my perspective, the reason we need to balance the data is because the data we get doesn't follow the natural distribution, it's bad, like a 10/90 male/female. But right now, we have a good data which follows the natural distribution, should we balance the data?  I'm also wondering if things are different for classification versus regression. Though low cancer rate, is it still okay to do the regression without sampling?  Any high-level/detailed ideas are appreciated:)

Okay, so I think I have a decent enough sample, taking into account the 20:1 rule of thumb: a fairly large sample (N=374) for a total of 7 candidate predictor variables.   My problem is the following: whatever set of predictor variables I use, the classifications never get better than a specificity of 100% and a sensitivity of 0%. However unsatisfactory, this could actually be the best possible result, given the set of candidate predictor variables (from which I can't deviate).   But, I couldn't help but think I could do better, so I noticed that the categories of the dependent variable were quite unevenly balanced, almost 4:1. Could a more balanced subsample improve classifications?


In a group of 101 people, for every 50 people, there is another person who is friends with all of these 50 people. Prove that there exists a person who is friends with the other 100 people. My first thoughts were pigeonhole, but this didn't allow me to prove the last part. I additionally tried to use some smaller examples, but could not generate any proof from it. Any help greatly appreciated.

I have a following problem.     There are $2n+1$ people in the room. For any group of $n$ people there is a person (different from them) who is friends with each person in this group. Prove that there is a person, who knows all $2n$ other people.   One can easily see, that $\min_v \deg v = n$. From this we can get a lower bound for number of edges $N_e$: $$ N_e = \frac{1}{2}\sum_v \deg v \geq \frac{(2n+1) \cdot n}{2} $$ I do not know where to move from this point (and do not think, that this is the right direction) and pretty stuck right now. Can you give a hint?


I have a javascript debug code that I need to run from time to time on specific website.  The site has several iframes.  When I use Chrome's debug console I can choose which iFrame to run the code.  I created a bookmark with the code javascript:my_debug_code() - but how can I tell it to run on the iFrame I need?  Edit  This is not a duplicate of  as was suggested.  Since I wasn't trying to run the code from the page itself.  My question is different - I want to run the code from a bookmark.  Answer  I can't post a new answer, because question is marked is duplicated.  But taken from @Gothdo answer, apparently all it took for me was to add to my bookmark:  javascript:window.frames[0].my_debug_code()

Basically, I have an iframe embedded in a page and the iframe has some  routines I need to invoke from the parent page.  Now the opposite is quite simple as you only need to call parent.functionName(), but unfortunately, I need exactly the opposite of that.  Please note that my problem is not changing the source  of the iframe, but invoking a function defined in the iframe.


Quick question - if $A$ and $B$ are independent continuous random variables, does that imply $A$ and $\cos B$ are also independent?

Knowing that if you have two independent $X$ and $Y$, and $ f $ and $ g $ measurable functions, how to show that then $ U = f (X) $ and $ V = g (Y) $ are still independent.


Why am I getting the following error?  # whoami root  # ls -l seamonkey -rwxr-xr-x 1 root root 127044 Dec 13 22:11 seamonkey  # ./seamonkey bash: ./seamonkey: No such file or directory   # LC_ALL=C find -type f -iname "*seamonkey*" -printf "'%P'\n" 'seamonkey' 'seamonkey-bin' 'chrome/icons/default/seamonkey.png'    # readelf -l seamonkey Elf file type is EXEC (Executable file) Entry point 0x804c278 There are 9 program headers, starting at offset 52  Program Headers:   Type           Offset   VirtAddr   PhysAddr   FileSiz MemSiz  Flg Align   PHDR           0x000034 0x08048034 0x08048034 0x00120 0x00120 R E 0x4   INTERP         0x000154 0x08048154 0x08048154 0x00013 0x00013 R   0x1       [Requesting program interpreter: /lib/ld-linux.so.2]   LOAD           0x000000 0x08048000 0x08048000 0x1e610 0x1e610 R E 0x1000   LOAD           0x01e610 0x08067610 0x08067610 0x003cc 0x0067c RW  0x1000   DYNAMIC        0x01e6fc 0x080676fc 0x080676fc 0x00110 0x00110 RW  0x4   NOTE           0x000168 0x08048168 0x08048168 0x00044 0x00044 R   0x4   TLS            0x01e610 0x08067610 0x08067610 0x00000 0x00004 R   0x4   GNU_EH_FRAME   0x019490 0x08061490 0x08061490 0x00d2c 0x00d2c R   0x4   GNU_STACK      0x000000 0x00000000 0x00000000 0x00000 0x00000 RW  0x10   Section to Segment mapping:   Segment Sections...    00         01     .interp     02     .interp .note.ABI-tag .note.gnu.build-id .hash .dynsym .dynstr .gnu.version .gnu.version_r .rel.dyn .rel.plt .init .plt .text .fini .rodata .eh_frame_hdr .eh_frame     03     .init_array .ctors .dtors .jcr .data.rel.ro .dynamic .got .got.plt .data .bss     04     .dynamic     05     .note.ABI-tag .note.gnu.build-id     06     .tbss     07     .eh_frame_hdr     08       $ ldd ./seamonkey not a dynamic executable

I've downloaded a game (Shank) but the bin file doesn't run. The error that is shown when I try to launch the executable is:  bash: ./shank-linux-120720110-1-bin: No such file or directory


I Have been doing some reading on google drive clients (that sync). Most applications / posts are outdated or very inactive. After comparing some i went for odrive & vgrive but both don't work.  odrive:  On first start pops up login for google but it complains that the browser is not secure enough (it is a web browser in the pop up itself)  vgrive:  I get it up and running and it seems to start syncing, but when i look at the files content its some error message that their are to many queries to the google api's and that for security reasons its blocked. Does anyone know how i can get them up and running or has a good and secure and free alternative? Also some alternative idea i had: Ubuntu has a build in mapping to google drive (not syncing) could i use a normal syncing tool that syncs this mapped folder with a normal folder? I would prefer to have a client software that does all the work.

I'm running Ubuntu MATE 16.04.6 LTS on about 5 different machines.  I need to have sync for Google Drive folders to cooperate with my colleagues.  Until recently I was able to use  for syncing my Google Drive. But currently there are OAuth2 security-related problems with grive2 (for details see ). Fixing them by end-user is a bit difficult and time-wasting for 2+ simultaneous installs.  Do we have any alternative to get Google Drive working on Ubuntu MATE 16.04 LTS?


There is an error in the code saying cannot create a generic array of E.  Could anyone help me in this thanks      **Q = new E[N];**   Here is the full code;  package org.circular;  public class CircularArrayQueue<E> implements QueueADT<E> {  private static final int capacity = 5; private E[] Q; private final int N; // capacity private int f = 0; private int r = 0;  public CircularArrayQueue() {     this(capacity); }  public CircularArrayQueue(int capacity) {     N = capacity;     Q = new E[N]; }  public int size() {     if (r > f)         return r - f;     return N - f + r; }  public boolean isEmpty() {     return (r == f) ? true : false; }  public boolean isFull() {     int diff = r - f;     if (diff == -1 || diff == (N - 1))         return true;     return false; }  public void enqueue(E element) throws FullQueueException {     if (isFull()) {         throw new FullQueueException("Full");     } else {         Q[r] = element;         r = (r + 1) % N;     } }  public E dequeue() throws EmptyQueueException {     E item;     if (isEmpty()) {         throw new EmptyQueueException("Empty");     } else {         item = Q[f];         Q[f] = null;         f = (f + 1) % N;     }     return item; }  @Override public E front() throws EmptyQueueException {     if (isEmpty()) {         throw new EmptyQueueException("Empty");      }     return null; }  }

Due to the implementation of Java generics, you can't have code like this:   public class GenSet<E> {     private E a[];      public GenSet() {         a = new E[INITIAL_ARRAY_LENGTH]; // error: generic array creation     } }   How can I implement this while maintaining type safety?  I saw a solution on the Java forums that goes like this:  import java.lang.reflect.Array;  class Stack<T> {     public Stack(Class<T> clazz, int capacity) {         array = (T[])Array.newInstance(clazz, capacity);     }      private final T[] array; }   But I really don't get what's going on.


I came across this in the lecture notes of quantum field theory by David Tong. Inside time ordering interactions aren’t taken to be normal ordered. Interaction hamiltonian should be normal ordered otherwise it is not well defined (due to ordering ambiguity and related singularities). Most standard QFT textbooks don’t address this issue. Am i missing something here or normal ordering was assumed?

Why is  even a valid operation in the first place? I mean it can give us some nice results, but why can we do the ordering for the operators like that?  Is its definition motivated by the relation between the normal ordering and the time-ordered product, which is basically the content of Wick's theorem?


I have a bunch of files named:  Brooklyn Nine-Nine S01 E01 [H264].mkv Brooklyn Nine-Nine S01 E02 [H264].mkv Brooklyn Nine-Nine S01 E03 [H264].mkv Brooklyn Nine-Nine S01 E04 [H264].mkv Brooklyn Nine-Nine S01 E05 [H264].mkv Brooklyn Nine-Nine S01 E06 [H264].mkv Brooklyn Nine-Nine S01 E07 [H264].mkv Brooklyn Nine-Nine S01 E08 [H264].mkv ...   I want to rename them so that the space Between S01 and E08 is removed. example   Brooklyn Nine-Nine S01E08 [H264].mkv   I already found a command to remove all spaces:  IFS="\n" for file in *.mkv; do     mv "$file" "${file/[[:space:]]}" done   but I only want to remove space between Sxx and Exx.

I have a directory full of images:  image0001.png image0002.png image0003.png ...   And I would like a one-liner to rename them to (say).  0001.png 0002.png 0003.png ...   How do I do this?


Map<String,Object> params = ...; // postgis params DataStore dataStore = DataStoreFinder.getDataStore(params); SimpleFeatureCollection collection=...;// collection to save SimpleFeatureType schema = collection.getSchema(); dataStore.createSchema(schema); // but it creates with name "polygon" MyUtils.save(collection,dataStore);  // saves to database   schema before save: collection.getSchema().getCoordinateReferenceSystem().getCoordinateSystem().toString() :  EllipsoidalCS["GCS_WGS_1984",  AXIS["longitude", EAST],  AXIS["latitude", NORTH]]   postgresql table column definition:   fid          serial NOT NULL the_geom     geometry(Point,4326) Name         character varying(93)   But when I read a collection from the same source, I face: schema after read: collection.getSchema().getCoordinateReferenceSystem().getCoordinateSystem().toString():    EllipsoidalCS["Ellipsoidal 2D CS. Axes: latitude, longitude. Orientation: north, east. UoM: degree",  AXIS["Geodetic latitude", NORTH],  AXIS["Geodetic longitude", EAST],  AUTHORITY["EPSG","6422"]]   The problem is that the x y coordinates are displaced in the schema but the point values are not. I gues geotools cannot decode "EPSG:4326" correctly. CRS.decode(string,boolean longitudeFirst) guides to solution and a related question answered , but we can't change the collection.getSchema(). Problem of that question was creating a CRS with corrent axis order, but my problem is reading a feature collection with correct CRS.

All is in the title, with GeoTools if I do :  AxisOrder order = CRS.getAxisOrder(CRS.getAxisOrder("EPSG:4326"));   It returns EAST_NORTH (= LON_LAT), but EPSG:4326 is defined as ordering latitude first and then longitude, as stated here :   So, what is happening here ? Am I doing something wrong ?


I want to get the wireless signal on a terminal, but only the signal. So no extra info, just the connection speed.  It would help a lot!  Edit:  iwconfig Returns this:  lo        no wireless extensions.  eth0      no wireless extensions.  eth1      IEEE 802.11abg  ESSID:"Goeggies"             Mode:Managed  Frequency:2.437 GHz  Access Point: B4:82:FE:93:DA:BC              Retry  long limit:7   RTS thr:off   Fragment thr:off           Power Management:off

I want to know if there exists any command line option or GUI tool (Ubuntu 11.10) so that I can measure the strength of wireless signal at a given location. I have a house where the wireless is not easily accessible at all corners I want to know at which corners or rooms the signal is weak.


I don't want to use the Super for that, I want to use Alt+Space instead.

I want Ctrl+Alt+B bring up a browser.  Ctrl+Alt+Delete is handy.  Can I set up Ctrl+Alt+B to bring up a browser (either default or specific)?


Ends in narrator concluding it's some kind of alien zoo and they're a new addition. I recall a line about speculating about an identification plaque for visitors labeled something like "Earth Man - Sol III".

I would like to know the title and author of a short story I read a long time ago. It's about 3 men in space. They were sent to different planets to catch other organisms on different planets. Presumably to bring back to Earth and put in zoos. The ship they are on breaks down. They notice that the animals on the planet, instead of running away, curiously walk up to them. The animals are too friendly and easy to capture. They cannot fix the spaceship and after a few days, one of the men attempts suicide by slitting his wrists. His attempt fails. They look outside on the planet and they find their homes that they had on earth. The men realize that they were captured by aliens and that they were meant to live on this "alien zoo."


I tried to do a change of variable with $t=\frac{1}{n}$ in order to use Taylor expansion but the factor $n!$ becomes a fractional number (during the lesson it was define only for $\mathbb{Z}$ set number).  Another attempt I made was to write the limit as $\lim_{n \to \infty} \sqrt[n]{\frac{n!}{n^n}} \rightarrow e^{\frac{1}{n}log{\frac{n!}{n^n}}}$ but it doesn't work. After that I tried to use the Stirling formula and yes... it works! But I would find something that doesn't use this formula. Some advice?

Show:$$\lim_{n\to\infty}\frac{\sqrt[n]{n!}}{n}= \frac{1}{e}$$  So I can expand the numerator by geometric mean. Letting $C_{n}=\left(\ln(a_{1})+...+\ln(a_{n})\right)/n$. Let the numerator be called $a_{n}$ and the denominator be $b_{n}$ Is there a way to use this statement so that I could force the original sequence into the form of $1/\left(1+\frac{1}{n}\right)^n$


I have been trying to solve this question but reaching nowhere  Starting from a countable basis of $\mathbb R$ ,I am asked to construct a Borel set such that $0<m(E \cap I)<m(I)$ for every non empty segment I.  And then must $E$ be of infinite measure?  Here $m$ denotes the Lebesgue measure

I was wondering how one can construct a Borel set that doesn't have full measure on any interval of the real line but does have positive measure everywhere.   To be precise, if $\mu$ denotes Lebesgue measure, how would one construct a Borel set $A \subset \mathbb{R}$ such that $$0 < \mu(A \cap I) < \mu(I)$$ for every interval $I$ in $\mathbb{R}$?   Moreover, would such a set necessarily have to contain infinite measure?


In the Harry Potter saga it is said that Harry's only family left are the Dudleys. However there is nothing said about his family on the parent side (at least not that I can recall), so the question is what is known about the James Potter parents (Harry's grand parents)? Are they alive? wasn't there any uncle, cousin, something/someone Harry could count on on the father family side?

You'd think that as soon as Harry met someone who was friends with his dad, he'd have asked about his family.  Certainly Lupin or Sirius could have told him something of his family, given that they were James' closest friends, and Sirius was "always welcome at the Potters".  Obviously there's nothing in the books, but did J.K. Rowling ever explain why there was no mention of any living relative other than Aunt Petunia, or even what happened to Harry's grandparents?


In Edit mode, the object looks normal. but in Object mode, the wireframe is not visible and only the outline is visible. I downgraded the graphics card because I thought it might be a problem, but there is still a problem. By the way, rendering works normally. I tried reinstalling the blender and graphics driver, but the problem remains the same. Now version is 'RadeonSoftwareAdrenalin2020 20.11.2' Upgraded version is '20.12.1'

I don't know why but now, when i go in material preview or rendered (in solid mode it works fine), my object is entirely gray, or invisible idk, because it has the same color of the background. I've been working for days on this project without having this issue, it suddenly showed up. I tried opening other old projects and suddenly they all do the same so i guess it is some blender program setting that applies for all the projects, but idk how it happened cuz i didn't change anything :/, anyone got any tips?


Let $\varphi:A\rightarrow B$ be a homomorphism of finitely generated $k$-algebras, and let $\mathfrak{m}$ be a maximal ideal of $B$. We have the injective homomorphism $$ \overline{\varphi}:A/\varphi^{-1}(\mathfrak{m})\rightarrow B/\mathfrak{m}, a+\varphi^{-1}(\mathfrak{m})\mapsto \varphi(a)+\mathfrak{m}. $$ Is $A/\varphi^{-1}(\mathfrak{m})\subseteq B/\mathfrak{m}$ an integral extension?

Suppose that $A$ and $B$ are commutative rings containing a field $k$, and $B$ is finitely generated $k$-algebra. Let $\phi: A\rightarrow B$ be a ring homomorphism with $\phi|_k =\mathrm{Id}$. I am trying to prove that if $M\subset B$ is a maximal ideal, then $\phi^{-1}(M)$ is a maximal ideal of $A$.    The case when $A \subset B$ is an integral extension of rings is well-known. I think I can also prove the result when $\phi$ is surjective.    discusses the case when $B$ is a finitely generated $\mathbb{Z}$-algebra but I am not sure how to generalize this.


I'm trying to run Ubuntu 14.04 from ram.  There are several articles that show how to do this with older ubuntu versions (using casper scripts and toram option), but none are applicable to 14.04. Anyone know how to do this?

I have used  to create an installable / live bootable flash drive from Ubuntu 12.04. However that didn't preserve the normal Ubuntu boot menu which allows to me to enter advanced options. It has a custom menu that I can pick from predefined choices like "Install Ubuntu" and "Try Ubuntu without installing". What I would like is to be able to boot from the USB flash drive, but then be able to remove it from the computer once the desktop has loaded. The laptop I would like to use this on does not have an optical (CD/DVD) drive - nor do I have a USB version available.  What do I need to modify on the flash drive to add an option to "Try Ubuntu (RAM)" that passes the TORAM=yes parameter to the initrd options? Are their other things I need to touch/change as well? Is it even possible? I am not restricted to version 12.04 if that makes a difference.  Bonus: I would guess the answer would also allow for other options like acpi=off as well, but if it is different I would appreciate having that answer too.


How can I model the grooves of a ventilation pipe?  Thanks

The picture show the threads I want to create on the highlighted object. Problem is I don't know how and tutorials really haven't helped much as most of them seem to be about creating a bolt. So I was hoping I could get some help on how to do this efficiently.While keeping the top flat like a water bottle. The picture shows the threads I'm after.


Would you consider buying a used canon 5d Mark II in mint condition with 120 000 shutter actuations for 500$? The seller is a nice lady, she is a professional phototographer. Here are some photos of the camera that she has sent me.

When looking at used camera bodies, a question that comes up a lot, is "how many shutter actuations, or clicks, does it have?"   What I am wondering is, how many is too many. In other words, is there a reference for knowing when a sensor is more likely to go? How should I judge a camera body with 20000 vs 5000? Is that a significant difference, or is that not even relevant.  Obviously this might something that is dependent on model, so if there is some information based on model that would be even more interesting.  One of the guys at Canon Tech Support said that this is completely irrelevant for the Rebel series cameras, but he is obviously slightly biased. :)


Is it possible to get an enum with its ordinal?   enum SimpleJackCards {     As(11), König(10), Dame(10), Bube(10), Zehn(10), Neun(9), Acht(8),     Sieben(7), Sechs(6), Fünf(5), Vier(4), Drei(3),Zwei(2), Yolly (1);     private int value;     SimpleJackCards(int val) {         value = val;     }     int getValue (){         return value;     } }   For example  I want to write a method that gives me a random card ... I would randomize an integer.  And want to get that enum with the generated ordinal number.  i.e.: ordinal value 0 would be enum As with value 11.

I've the enum type ReportTypeEnum that get passed between methods in all my classes but I then need to pass this on the URL so I use the ordinal method to get the int value. After I get it in my other JSP page, I need to convert it to back to an ReportTypeEnum so that I can continue passing it.   How can I convert ordinal to the ReportTypeEnum?  Using Java 6 SE.


Just as the title suggests, I'm trying to create a card game here but am currently having trouble with a discard function in which, I select a card from my hand and discard it into a stack. Each card has a value from 0 to 12. But the problem is that at times I get a NullPointerException from getting a card with a null value (which should not exist). I've traced the code and determined that somehow. On top of discarding a normal card, a card with a null value is discarded as well, given that after testing some code to print the card values of each card in the stack (from top to bottom), the exception appears after the card I've discarded is printed. Here's the action listener or a button that I click in order to discard a card: pDiscard1.addActionListener(new ActionListener() {                     @Override                     public void actionPerformed(ActionEvent e) {                         try {                             if (cardSelected && (dPile == null && sPile == null)) {                                 game.pdc[0].discard(card);                                 for (int i = 0; i < game.playerHand.size(); i++) {                                     if (game.playerHand.get(i) == card) {                                         game.playerHand.remove(i);                                         break;                                     }                                 }                                  cardSelected = false;                                 discarded = true;                                 display();                         } catch (Exception exception) {                             System.out.println("The card you have attempted to discard is invalid. You can only discard cards from your hand.");                         }                     }                 });  And down here is the code for the discard: void discard(SkipBoCard card) {         dPile.push(card);     }  If any other information is needed, please do let me know. Any help regarding this problem would be greatly appreciated. EDIT: Here's the stack trace: Exception in thread "main" java.lang.NullPointerException     at SkipBo.SkipBoGUI.display(SkipBoGUI.java:618)     at SkipBo.SkipBoGUI.<init>(SkipBoGUI.java:507)     at SkipBo.SkipBoMain.main(SkipBoMain.java:5)  Line 507 is the call for the display method (which updates the visuals of the GUI), and 618 is a part of an if-statement that changes the text of the cards in the buttons/panels for a card. This is because it doesn't have a try-catch exception handler because I'm try to get to the bottom of why this problem is happening (thus far no luck). This information certainly feels like a dead end, but I hope this can help in any way.

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 saw this sentence online and it has been bothering me:  "Tomorrow is me and my girlfriend's anniversary."  I immediately had an aversion to this sentence after reading it but then I quickly had an aversion to my own corrections in my head:  "My girlfriend's and my anniversary is tomorrow."  "The anniversary of my girlfriend and me is tomorrow."  The original author's sentence plus my two corrections all "sound" incorrect despite one having a better chance at being grammatically correct.    The original author I think confused the adverb "Tomorrow" as being the subject since he or she (I don't want to assume the author is heterosexual) chose to begin the sentence with it.  However, in my estimation the subject of a sentence will remain so no matter where it's placed within the sentence; thus, "tomorrow" cannot be the subject but rather "anniversary" is which led me to use the options I listed above.  Which of these "corrections" is correct and why?  Both?  Neither?    Thank You     Edit: Thank you all for the replies. Basically, I'm having a crisis of what sounds good to the ear and is standard versus what can   sound incorrect/complex/clumsy to the ear but still be viewed as   grammatically viable. Yes, adding a verb to describe what the couple   would do on their anniversary and/or replacing "me and my girlfriend"   with a standard possessive adjective "our" would easily solve the   issue. But I guess my question was more about how irritatingly close   can a speaker get to "bad grammar" or "broken English" without it   being so? That's why I tried to use the OA's words at my disposal.

I just stumbled upon a :     My wife and I's seafood collaboration dinner. How does it look?   Sure enough, the top comment immediately points out that it should be "my wife's and my". However, a cross-post to the Grammar subreddit produced :     It's fine as it is written. "my wife and I" is a noun phrase, functioning as a subjective pronoun in the singular and made possessive with the apostrophe. It is exactly the same as "our".      It seems weird because you would never use "I's" on its own but it is not on its own here - it is part of a noun phrase.   That's a rather intriguing argument. Does it hold any water?


Suppose that the vector      $\tilde{a} = (a_1,a_2,...,a_J)$ has a multivariate normal distribution and let      $$A = \Sigma_{j=1}^J a_j\,.$$  Then what is the distribution of $a_j/A$ or $\tilde{a}/A$ called?  I do know that Dirichlet distribution can be used to deal with a vector of which the sum of the elements is one, but I'm asking the special case where the vector has a multivariate Normal distribution.

Problem: I am parameterizing distributions for use as a priors and data in a Bayesian meta-analysis. The data are provided in the literature as summary statistics, almost exclusively assumed to be normally distributed (although none of the variables can be < 0, some are ratios, some are mass, and etc.).   I have come across two cases for which I have no solution. Sometimes the parameter of interest is the inverse of the data or the ratio of two variables.      Examples:    the ratio of two normally distributed variables:  data: mean and sd for percent nitrogen and percent carbon  parameter: ratio of carbon to nitrogen.  the inverse of a normally distributed variable:  data: mass/area parameter: area/mass    My current approach is to use simulation:  e.g. for a set of percent carbon and nitrogen data with means: xbar.n,c, variance: se.n,c, and sample size: n.n, n.c:  set.seed(1) per.c <- rnorm(100000, xbar.c, se.c*n.c) # percent C per.n <- rnorm(100000, xbar.n, se.n*n.n) # percent N   I want to parameterize ratio.cn = perc.c/perc.n  # parameter of interest ratio.cn <- perc.c / perc.n   Then choose the best fit distributions with range $0 \rightarrow \infty$ for my prior   library(MASS) dist.fig <- list() for(dist.i in c('gamma', 'lognormal', 'weibull')) {     dist.fit[[dist.i]] <- fitdist(ratio.cn, dist.i) }   Question: Is this a valid approach? Are there other / better approaches?  Thanks in advance!  Update: the Cauchy distribution, which is defined as the ratio of two normals with $\mu=0$, has limited utility since I would like to estimate variance. Perhaps I could calculate the variance of a simulation of n draws from a Cauchy?  I did find the following closed-form approximations but I haven't tested to see if they give the same results...  $$\hat{\mu}_{y:x} = \mu_y/mu_x + \sigma^2_x * \mu_y  / \mu_x^3 + cov(x,y) * \sigma^2_x * \sigma^2_y / \mu_x^2$$ $$\hat{\sigma}^2_{y:x} = \sigma^2_x\times\mu_y / mu_x^4 + \sigma^2_y / mu_x^2 - 2 * cov(x,y) * \sigma^2_x * \sigma^2_y / mu_x^3$$  Hayya, J. and Armstrong, D. and Gressis, N., 1975. A note on the ratio of two normally distributed variables. Management Science 21: 1338--1341


The following is a Combinatorial proof of Fermat's Little Theorem from Arthur Engel's book:Problem Solving Strategies.  We have pearls with $a$ colors. From these we make necklaces with exactly $p$ pearls. First, we make a string of pearls. There are $a^p$ different strings. If we throw away the a one-colored strings $a^p − a$ strings will remain. We connect the ends of each string to get necklaces. We find that two strings that differ only by a cyclic permutation of its pearls result in indistinguishable necklaces. But there are $p$ cyclic permutations of p pearls on a string. Hence the number of distinct necklaces is $(a^p − a)/p$. Because of its interpretation this is an integer. So $$p | (a^p − a)$$.  I can't figure out how the primality of $p$ is utilised in this proof. Please Explain.

I came across a combinatorial proof of the Fermat's Little Theorem which states that    If $p$ is a prime number then the number ($a$$p$-$a$) is a multiple of $p$ for any natural number $a$.  Let me write down the proof.    PROOF  We have pearls of $a$ colours . From these we make necklaces of exactly $p$ pearls .   First,we make a string of pearls . There are $a$$p$ different strings.If we throw away  the $a$ one one -coloured pearls  ($a$$p$-$a$) strings will remain.We connect the ends of each string to get necklaces.We find that two strings that differ only by a cyclic permutation of its pearls result in indistinguishable necklaces.But there are $p$ cyclic permutations of $p$ pearls on a string . Hence the number of distinct necklaces is    [($a$$p$-$a$)/$p$].  Because of this interpretation this is an integer.Thus ($a$$p$-$a$) is a multiple of $p$ for any natural number $a$. [HENCE PROVED]     MY CONFUSIONS    What is the use of the fact that $p$ is a prime in this proof?  If this proof is true then why is this not true for every positve integer $p$?


Is there any pattern to predict whether to use -ant or -ent, in words such as those below?  abundant / attendant / arrogant VS abhorrent / absorbent / dependent  I find -ent seems to be more common... Some associate -ant with noun and -ent with adjective, but that does not always hold.

OK, so I’m ashamed to admit that as a native speaker I think I’ve missed something somewhere. I was typing up some documentation and spellchecker kept bugging me.  So I looked up some words and found this:     The suffixes ‑ance and ‑ence mean   “quality of” or “state of.” Words   ending in these suffixes are usually   nouns. There is no rule that governs   whether a word ends with    ‑ance or ‑ence.   Even the dictionary on my Mac goes so far as to say:     ORIGIN from French ‑ence, from Latin   ‑entia, ‑antia (from present participial stems ‑ent‑, ‑ant‑). Since   the 16th cent. many inconsistencies   have occurred in the use of ‑ence and   ‑ance.   Is this for real?  There really is no rule?


I'm making a tri-fold brochure that will fit on a 8.5 x 11 piece of paper. I would like it to completely fill the paper, however it keeps printing with white borders around it. How can I fix this?

With SketchApp, I used A4 artboard preset and exported to PDF.  When i see print preview of that pdf, it shows like this:


"Every open subset of $\mathbb{R}$ can be written as a countable union of open intervals."     Why is the above statement true? Is it because the topology of $\mathbb{R}$ is defined to be the topology generated by intervals of the form $(a,b)?$   I want, next, to prove that $$ (r,\infty)=\bigcup_{n=1}^{\infty}\left(r + \dfrac{1}{2^n},\infty \right). $$ My attempt at a proof: To show that $\bigcup_{n=1}^{\infty}\left(r + \dfrac{1}{2^n},\infty \right)\subseteq (r,\infty)$, is trivial:  $x>r+\frac{1}{2^n}>r$, for some $n\in \mathbb{Z}^+$.  To exhibit the other direction, can I use the fact that $n\leq 2^n$ (provable by induction) and then use the Archimedean property?

Let $U$ be an open set in $\mathbb R$. Then $U$ is a countable union of disjoint intervals.    This question has probably been asked. However, I am not interested in just getting the answer to it. Rather, I am interested in collecting as many different proofs of it which are as diverse as possible. A professor told me that there are many. So, I invite everyone who has seen proofs of this fact to share them with the community. I think it is a result worth knowing how to prove in many different ways and having a post that combines as many of them as possible will, no doubt, be quite useful. After two days, I will place a bounty on this question to attract as many people as possible. Of course, any comments, corrections, suggestions, links to papers/notes etc. are more than welcome.