i am wondering if you could help me in my project. I would to ask your opinion of what algorithm is best to used in generating random numbers that ranges from 1 to 9.. Its a game like "Sphere Break" a famous mini game of FFx-2.   Please refer to the picture for   Need Opinions Please!! Need Help Badly.   My problem is that i want a certain algorithm to generate random numbers from 1 - 9 like in the picture every gameplay = another set of random coins...   P.S. i am developing an android game using unity !! thx for the response
How do I generate a random int value in a specific range? I have tried the following, but those do not work: Attempt 1: randomNum = minimum + (int)(Math.random() * maximum);  Bug: randomNum can be bigger than maximum. Attempt 2: Random rn = new Random(); int n = maximum - minimum + 1; int i = rn.nextInt() % n; randomNum =  minimum + i;  Bug: randomNum can be smaller than minimum.
Arduino only works in root I've installed Arduino but as the title says, I can only upload with sudo. And yes my user is part of the dialout group so that's the weird thing.   Arduino did function before on my system. What could be wrong?  Output ls -l:  ls -l /dev/ttyUSB* crw-rw-rw- 1 root dialout 188, 0 apr  2 09:23 /dev/ttyUSB0 Reputation for comments? I have seen many good comments that really improve the quality of questions and answers, and I think they deserve a bit of reputation (maybe just 1 point) for a upvote. Let $x\in\mathbb{Q}$ with $x&gt;0$.  Prove that we can find $n\in\mathbb{N}^*$ and distinct $a_1,...,a_n \in \mathbb{N}^*$ such that $$x=\sum_{k=1}^n{\frac{1}{a_k}}$$ Here is a picture of two of them:    I searched for these connectors in  and  for an hour, but couldn't find anything similar. Can you please name these connectors for me and/or give a link to their subcategory in one of these part seller websites? concurrentModificationException Does scaling lead to weak convergence to the null function? Let $f\in L^p(\mathbb{R}^d)$, with $1&lt;p&lt;\infty$. Is it true that    $$\lambda^{\frac{d}{p}}f(\lambda x ) \rightharpoonup 0\quad \text{ weakly in }L^p\text{ as }\lambda\to+\infty?$$   One has the easy case for $f\in L^{p-\epsilon}\cap L^p$. This condition allows the use of Hölder's inequality as follows (here $\frac{1}{p}+\frac{1}{p'}=1$ and $\phi$ is a continuous function with compact support):  $$\begin{split}\left\lvert \int_{\mathbb{R}^d} \lambda^{\frac{d}{p}} f(\lambda x)\phi(x)\, dx\right\rvert&amp; \le \lambda^{\frac{d}{p}}\lVert f(\lambda x)\rVert_{L^{p-\epsilon}}\lVert \phi\rVert_{L^{(p-\epsilon)'}} \\  &amp;= \lambda ^{\frac{d}{p}- \frac{d}{p-\epsilon} } \lVert f\rVert_{L^{p-\epsilon}}\lVert\phi\rVert_{L^{(p-\epsilon)'}}\to 0. \end{split} $$ But what happens if that condition is removed? I carried out an explicit check on the standard example of a function $f$ that belongs to $L^2(\mathbb{R})$ and does not belong to $L^{2-\epsilon}(\mathbb{R})$ for any $\epsilon &gt; 0$, namely  $$f(x)=\begin{cases} 0 , &amp; x&lt;2 \\ \frac{1}{\sqrt{x}\log x}, &amp; x \ge 2\end{cases}.$$ Taking $\phi=\chi_{[a, b]}$ with $2&lt;a&lt;b$ one has  $$\left \lvert \int_{\mathbb{R}} \lambda^{\frac{1}{2}}f(\lambda x)\phi(x)\, dx \right\rvert  = \dfrac{  \int_{\lambda a }^{\lambda b} \frac{dy}{\sqrt{y}\log(y)} } {\lambda^{\frac{1}{2}}}, $$ and an application of l'Hôpital's rule shows that the right hand side tends to $0$ as $\lambda \to \infty$. This implies weak convergence to $0$ by a standard density argument.   This seems to point towards an affirmative answer to the question in the gray box. Printer "Filter failed" Upgraded to 18.04 from 16.04. I have a workplace printer connected through appsocket which stopped working.  Printer status is Idle-Filter failed.  Printing queue instantly goes to "stopped".  Right clicking on the printer shows "option finishings has value 3 and cannot be changed". I can't find any info on this error except one pdf to ignore the error.  The printer model Ricoh MP 2555 worked previously with the Ricoh MP C2800 driver. Now it works with neither 2800 or 2555.  The IP address of the printer pings fine. When I try and detect the printer on the network using IP address and I ask it to use the Ricoh MP 2555 driver, it asks for an additional driver which opens Ubuntu software (which never helps) and fails.  I tried changing drivers from "" by providing the ppd file. It still doesn't help. var/log/cups/error.log doesn't tell much, or I don't get it.  Hope someone knows about this error or some kind of a generic solution. Converting a number with comma as decimal point to float <lightning:recordViewForm will not display I know that there exist some attack when using same modulus.      But with a little modification, $m$ is the plain-text $N$ is the RSA modulus $r_1, r_2$ is the random padding $e, s$ is the public exponent $C_e, C_s$ is the cipher-text  encrypt as follow $$С_e = (m + r_1)^e   \bmod N$$ $$С_s = (m + r_2)^s   \bmod N$$  If attacker only knows $C_e, C_s, r_1, r_2, e, s, N$. Is it possible to know $m$?  It seems the  does not work? Is the 'Tough' feat's additional health still added when Wild Shaped/Shapeshifted? Following on from this question:   It seems all feats carry over to your new form if your new form is capable of using them (so Mounted Combatant and Inspiring leader would usually be ruled as unusable in most circumstances). But what about Tough?     Your hit point maximum increases by an amount equal to twice your   level when you gain this feat. Whenever you gain a level thereafter,   your hit point maximum increases by an additional 2 hit points.   Would this increase your maximum HP by the same amount when in the form of a rat, or brown bear? How to apply for a UK standard visitor visa as a family? I am an Indian citizen residing in the United States. My wife and I are planning to travel to the UK for a week. We plan to apply for the UK standard visitor visa from the US. I was filling out the application and I have a few questions.   Travel History - The application asks for travel history to the United States, Canada, Australia and New Zealand. Considering that we're resident aliens in the United States, should we consider all the times we've traveled back to the US from India? Travel History - Should we also list out the times we've traveled to India from the US? Cost of the trip - Hypothetically if we plan to spend a total of ~4,000 USD on this trip, should I split up the cost and write down 2,000 USD on my application and 2,000 USD on my wife's application? Income - From what I've read on the forum, my wife must say that "someone else" i.e. me - is paying for her costs and mention my GWF number in the remarks on her application. Would that be sufficient considering that I'll be sending all income documents with my application? Savings - We have joint savings accounts. Should I mention the same amount on both our applications? Posting the documents - Is the up-to-date advice to send all documents in one packet? Or would sending them in separate packets at the same time be better? My thought was to annotate my wife's packet with my GWF number if we were to send them separately. Bank statements - We get e-statements. Would printing those out be enough? Limit FTP access only to the /var/www with vsftpd I am running vsftpd as ftp server on my linux (rasbian), I log in to the machine as a root user.  I would like to be still locked to using only /var/www, how can I configure vsftpd conf to accomplish it? Will a PCI Express x16 3.0 card work in a PCI Express x16 slot? I have a motherboard with a PCIexpress x16 slot.  I want to purchase a card called AMD Radeon HD 7770, which uses PCIe version 3.0.  Is that backwards compatible? Moderncv adding date of birth to personal information Using matplotlib in pygame How to specify ec2 instance types for different services? After I have specified a default EC2 instance type for my Juju charm, how do I override that for one of the services?  For instance, the  deploys wordpress and mysql, and I can set the default-instance-type in my environments.yaml so both services are m1.small  But how do I configure it so that (only) the mysql service gets deployed on an instance type better suited to a database, like m2.xlarge ? Let $a$, $b$ and $c$ be the three sides of a triangle. Show that $\frac{a}{b+c-a}+\frac{b}{c+a-b} + \frac{c}{a+b-c}\geqslant3$. Find with proof all positive integers $n$ such that $2^n + 1 \equiv 0 \pmod{n}$ I found this problem in a book and while I understand the given solution, I don't quite understand how somebody would arrive at this solution unless they did out the casework and happened to make the right guesses to solve the problem. Any guidance on solving this from scratch would be greatly appreciated! Proving that the function is differentiable and $f'(0)=0$ Consider a function $f (x) $ such that $f (x)=\begin {cases} x^2 &amp;  \text {x=irrational}     \\ 0   &amp;\text {x=rational} \end {cases}$ Then prove that $f $ is differentiable  at $x=0$ and $f'(0)=0$ $$\text {Attempt} $$ .                  .  Now I consider two sequences $x_n=\frac {\sqrt{2}}{n},y_n=\frac {1}{n} $ one irrational one rational both going to $0$ as $n\to \infty $. But now the problem is how to consider LHD,RHD.Do we have to consider irrational case then rational case and if both limits go to same value then say that function is differentiable.I can easily see the graph on graphical calculator and verify the result but I am more interested in analytical method.