DecimalFormat hisFormat = new DecimalFormat("########.##"); hisFormat.setRoundingMode(RoundingMode.DOWN);  Float x=12345678.12345f; System.out.println("Float Value " + hisFormat.format(x));   Above code print "Float Value" as 12345678 I need 12345678.12  How can I get my result? Please let me know.

What I would like is a method to convert a double to a string which rounds using the half-up method - i.e. if the decimal to be rounded is 5, it always rounds up to the next number. This is the standard method of rounding most people expect in most situations.  I also would like only significant digits to be displayed - i.e. there should not be any trailing zeroes.  I know one method of doing this is to use the String.format method:  String.format("%.5g%n", 0.912385);   returns:  0.91239   which is great, however it always displays numbers with 5 decimal places even if they are not significant:   String.format("%.5g%n", 0.912300);   returns:  0.91230   Another method is to use the DecimalFormatter:  DecimalFormat df = new DecimalFormat("#.#####"); df.format(0.912385);   returns:  0.91238   However as you can see this uses half-even rounding. That is it will round down if the previous digit is even. What I'd like is this:  0.912385 -> 0.91239 0.912300 -> 0.9123   What is the best way to achieve this in Java?


I want to show that if $3$ is a primitive root modulo $p$ if $p$ is a prime of the form $2^n+1$ for some $n>1$.  First, I wrote $3^{p-1} \equiv 1 \mod p$. Then writing it as $(1+2)^{p-1}$, we see that $p| 2+ \dots 2^{p-1} =2^p - 2$ and I stuck at this point.  Also, by a theorem we can see that $3 $ is a quadratic residue modulo $p$. I wrote $3 \equiv n^2 \mod p$ but that is not helpful too.  So, how can I prove this theorem?

The following is exercise 6 of Chapter 4 in Ireland and Rosen's Number Theory.  If $p=2^n+1$ is a Fermat prime, show that $3$ is a primitive root modulo $p$.  I first recall that any Fermat prime actually has form $2^{2^n}+1$. Hence $p\equiv 1\pmod{4}$. Exercise 4 from the same chapter states the if $p\equiv 1\pmod{4}$, then $a$ is a primitive root mod $p$ iff $-a$ is as well. I was able to prove this, but unable to show $-3$ is a primitive root.   Is there a fruitful approach?    P.S. I was able to cheat and use the fact that  $$ \phi(p-1)=\phi(2^{2^n})=2^{2^n-1}=(p-1)/2 $$ and since there are $(p-1)/2$ quadratic nonresides and each of the $\phi(p-1)$ primitive roots is a quadratic nonresidue, then the two sets are actually the same.  Then $3$ is a nonresidue since applying quadratic reciprocity $$ \left(\frac{3}{p}\right)=\left(\frac{p}{3}\right)=\left(\frac{2}{3}\right)=-1 $$ hence not primitive. But I only know this from a number theory class I took back in school, not from anything in Ireland and Rosen so far. Is there a way to avoid using a sledgehammer the authors haven't given me yet?


It is clear that a division ring is simple, having only trivial right ideals.  It is also clear that if a ring, R, is unital and finite, having only trivial ideals, then the ring is a division ring.    However, is it true that a unital ring with only trivial right ideals is a division ring, with its order being irrelevant?

This is question #66 from        Let $R$ be a ring with a multiplicative identity. If $U$ is an additive subgroup of $R$ such that $ur \in U$ for all    $u \in U$ and for all $r \in R$ , then $U$ is said to be a right ideal of $R$. If $R$ has exactly two right ideals, which of    the following must be true?      I. $R$ is commutative.   II. $R$ is a division ring (that is, all elements except the additive identity have multiplicative inverses).   III. $R$ is infinite.     Here is my reasoning: Because $R$ is a ring, $R$ is also a additive group with some identity element $0$. We have a theorem that says $0r = 0 $ in any ring, so $\{0\}$ is a right ideal of $R$. Also, $R$ is a right ideal of $R$. Now I have found two different right ideals and there mustn't be any more.     Edit: As mentioned in the comments, the example below is not a ring, so it is not applicable to the problem. I could not fix it by taking additive closure because that introduced more than two ideals.  A possible candidate for $R$ could be the set of $2\times2$ matrices $\{0,I,-I,a,-a\}$ where $a = [[^1_0] ,[^0_0]]$. The only right ideals are $R$ and $\{0\}$. This ring satisfies only property I, but the answer key says that II is the correct answer.


If every former Hogwarts student who goes bad was in Slytherin, why has Hogwarts kept the house over the years? Why not disband it?

Maybe I'm just hearing the wrong comments, but it seems that Slytherin is considered a dark house by almost everyone.  I know when both reading the books and watching the movies, I always had a feeling of foreboding when there were a number of Slytherin house members around or the time when Harry and friends went into Slytherin and felt this feeling was emphasized by the writing and film directing.  We hear very little positive about Slytherin (other than the repeated line that Harry would be a great wizard if he went in Slytherin) and there really isn't a list of great wizards who were in Slytherin House.  Even in the movie Deathly Hallows (I can't check the book - I loaned it to my sister 3 weeks after it was published and haven't seen it since!), McGonagall specifically asks Filtch to lead all the Slytherin students into the dungeon while Hogwarts is under siege by Voldemort.  She doesn't specify that any Slytherin students remain behind to help fight.  Is this intentional?  Did JKR intentionally create a bad reputation and not present any counter-examples so we'd believe all of Slytherin was bad?  Most characters in the Potter-verse are complex.  While we can admire James and Lily Potter, we also see how James teased and taunted Snape, showing us a harsh side of James, and we see that there is good in Snape.  We even see complexity in Voldemort as a villain who is mixed-blood, but hates those of mixed blood and wants purity for all witches and wizards.  With all the complex characters, it seems odd that there is essentially nothing to redeem the House of Slytherin - which is not just one character, but is a group represented by a number of characters.  But yet it seems as if it's presented, in both books and movies, as dark and full of schemers and bad people.  Are there indications, and especially more than a few or just tiny ones, that there are a fair number of good witches and wizards in Slytherin?


For a test I want to start a long-running Python 3 script on Linux, capture some of its output, check that it's as expected and kill it again.  I'm just trying to get the general framework working for now.  When I run the following code, I would expect the output to include line = "0" -- the python script just prints out an increasing sequence of integers, one per second. Instead, that for loop is skipped completely.  import subprocess from tempfile import NamedTemporaryFile import time import unittest  import asynchronousfilereader  class TestProcessSpawning(unittest.TestCase):     def test_spawning_counter(self):         counter_code = \ """ import time i = 0 while True:     print(i)     i = i + 1     time.sleep(1) """          with NamedTemporaryFile(mode="w", suffix='.py', delete=False)\                 as temp_file:             temp_file.write(counter_code)             file_name = temp_file.name              # proc = subprocess.Popen(['ping', 'localhost'],             #                         stdout=subprocess.PIPE, close_fds=True)             proc = subprocess.Popen(['python3', file_name],                                     stdout=subprocess.PIPE, close_fds=True)              time.sleep(3)              assert proc.returncode is None  # None => still running              reader = asynchronousfilereader.AsynchronousFileReader(proc.stdout)              time.sleep(3)  # give it a chance?              for line in reader.readlines():                 print('line = "{}"'.format(line))                 break  # just grab first one              proc.kill()   However, if I change ['python3', file_name] to ['ping', 'localhost'] I do get a line of output from ping (I'm running on Linux so ping keeps producing output until you stop it).  Any idea why this seems to work ok for other types of subprocess but not for python?    Notes:   this code uses the  available from pip if I just run python3 <temp_file_name> in a shell, the script runs as expected, printing 0, 1, 2, ... the process return code of None after a few seconds suggests the process gets run (i.e. doesn't just crash) I have tried running it through unbuffer as suggested : the output did not appear I tried passing bufsize=1 to Popen: the output did not appear if I include the -v flag I get lots of output, including this, which suggests python is trying to run interactively even though I've provided a file name:      Python 3.5.2 (default, Nov 23 2017, 16:37:01)       [GCC 5.4.0 20160609] on linux      Type "help", "copyright", "credits" or "license" for more information.

I'm using the  to start a subprocess and connect to its output stream (standard output). I want to be able to execute non-blocking reads on its standard output. Is there a way to make .readline non-blocking or to check if there is data on the stream before I invoke .readline? I'd like this to be portable or at least work under Windows and Linux. Here is how I do it for now (it's blocking on the .readline if no data is available): p = subprocess.Popen('myprogram.exe', stdout = subprocess.PIPE) output_str = p.stdout.readline()


I am really being confused by why the correlation formula is called the correlation of two variables $X$ and $Y$. Also how is it derived?   The part where we divide covariance by product of standard derivation of $X$ and standard derivation of $Y$ is the most confusing for me. Please explain the reasons or provide some good source for such things.

Can anyone help me understand the Pearson correlation formula? the sample $r$ = the mean of the products of the standard scores of variables $X$ and $Y$.   I kind of understand why they need to standardize $X$ and $Y$, but how to understand the products of both the z scores?    This formula is also called "product-moment correlation coefficient", but what's the rationale for the product action? I am not sure if I have made my question clear, but I just want to remember the formula intuitively.


In short, I'm using Microsoft Visual Studio 2012, programming in C++. My main method has a while(1) repeating a bit of code, and never leaves the loop.  Microsoft Visual Studio is allowing me to compile without a return value for the main method, even though it's declared int main(int argc, char** argv). Is this standard for other compilers, or just a "feature" of Microsoft Visual Studio?   I realize I never get to the code that returns a value, but should I just thrown on a return 0; at the end anyway?

What is the correct (most efficient) way to define the main() function in C and C++ — int main() or void main() — and why? And how about the arguments? If int main() then return 1 or return 0?  There are numerous duplicates of this question, including:       — For C++, with a very good answer indeed.     Related:


I am from C++ background and new to java script and having difficulty understand for loop scope. What is the scope of variable initialized inside for loop.    //Setup var contacts = [     {         "firstName": "Akira",         "lastName": "Laine",         "number": "0543236543",         "likes": ["Pizza", "Coding", "Brownie Points"]     },     {         "firstName": "Harry",         "lastName": "Potter",         "number": "0994372684",         "likes": ["Hogwarts", "Magic", "Hagrid"]     },     {         "firstName": "Kristian",         "lastName": "Vos",         "number": "unknown",         "likes": ["Javascript", "Gaming", "Foxes"]     } ];   function lookUpProfile(firstName, prop){   for(var i=0;i<contacts.length;i++){       if(contacts[i].firstName==firstName){           if(contacts[i].hasOwnProperty(prop))             return contacts[i][prop];           else              return "No such property";         }     }        if (i === contacts.length)     return "No such contact";  }  // Change these values to test your function lookUpProfile("Akira", "likes");     I am confused how  if (i === contacts.length) variable "i" is used outside for loop, variable "i" is initialize inside for loop and if statement is written  out of scope of for loop. Value of document.write(i) is equal to 4 when printed outside loop.Can somebody please explain this?

What is the scope of variables in javascript? Do they have the same scope inside as opposed to outside a function? Or does it even matter? Also, where are the variables stored if they are defined globally?


I have a polyline shapefile with about 20 kinds of roads. I would like to know how can I create automatically a vector file for each one. I am aware of how to do it using ArcGIS Desktop - see  How do I do it using QGIS or SAGA?

I have a feature class with over 2,000 features, and I need to make them all individual feature classes based on a field.   Is there a way to do this?


A couple of days ago I accidentally downloaded a file that looked very shady. My antivirus (Avira) pinged me that the file was suspicious, so I immediately deleted it, and then cleared my browsers downloads and also emptied the recycling bin. It was a .exe file, so it was very obviously a virus.  Then, just now a few minutes ago while I was browsing reddit, I noticed a tiny popup window in the top left of my screen which flashed by super quickly, and then disappeared, without me being able to notice what it said.  Is it possible that I infected myself, despite not clicking the .exe file?  I have run a full scan by Avira, and I just downloaded Malwarebytes and ran a scan of that too. Malwarebytes found one threat ("Stubinstaller.exe or something, which internet told me was nothing dangerous), while Avira found "OpenCandy.Gen" which was then moved to quarantine.  Did I infect my computer, or was the popup (likely) something unrelated?  (In case it is relevant, I am running a 64bit Windows 7)  EDIT: I just found the logs in Avira of the event; It shows it found "PUA/EDownloader.Gen7", and that "Access denied" action was performed.  EDIT2: I am using Chrome  EDIT3: This is not a duplicate of  this. I am asking "Is it possible that I have been infected", not "how to remove a known infection".

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


Specifically, I am using conda command part of Miniconda distribution. It happens that the installer put files in /root/miniconda3/.   The problem is that /root/miniconda3/bin is in path, but the command conda can only be run by root, not other sudoer.  I tried to set rights to 777 (I know this is bad since it contains compiler and stuff, and it's under root, but this is only for test environment).  Note: I own the root and the sudoer.

On my fedora VM, when running with my user account I have /usr/local/bin in my path:  [justin@justin-fedora12 ~]$ env | grep PATH  PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/justin/bin   And likewise when running su:  [justin@justin-fedora12 ~]$ su - Password:  [root@justin-fedora12 justin]# env | grep PATH PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/justin/bin   However, when running via sudo, this directory is not in the path:  [root@justin-fedora12 justin]# exit [justin@justin-fedora12 ~]$ sudo bash [root@justin-fedora12 ~]# env | grep PATH PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/sbin:/bin:/usr/sbin:/usr/bin   Why would the path be different when running via sudo?


What are all the solutions to the functional equation $f(ax)=bf(x)$, where $a,b>0$, and $f$ is continuous, strictly monotone and increasing, and $x$ ranges over the reals?  references? proof?  Thanks    Additional details following the first response:  It is easy to see that the function $f(x)=c\cdot x^\alpha$, with $\alpha =\log b/\log a$ and any constant $c$ is a solution for the functional equation.  Also, the $c$ can be different for the positives and the negatives.  So, if $x^\alpha$ is not monotone itself, we can create a monotone solution by gluing together a positive $c$ for the positive side with a negative $c$ for the negative side.  Is this correct?  My question is if these are all the solutions, and if this is appears in the literature.    Thanks.

I am trying to solve the following functional equation, and could use some help.$$ 2f(x)=f(ax)$$  For some $a\in\mathbb{R}$. By repeated adding $2f(x)$ together we notice that $$2nf(x)=f(a^nx).$$  Also $$2mf(a^{-m}x)=f(x)\Rightarrow \frac{1}{2m}f(x)=f(a^{-m}x).$$  Putting it all together I have for all $m,n\in\mathbb{N}$, $$\frac{n}{m}f(x)=\frac{2n}{2m}f(x)=f(a^{n-m}x)$$  I am unsure of how to proceed from here.


Page 3 top left of this also shown in this screenshot:   How would you modify Figure 11 to make a voltage controlled attenuator instead of a voltage controlled amplifier?   A previous stack exchange post talks about DC inputs and using a switch instead- I'm not asking about those in this post  My input for example could be audio and the purpose could be to decrease loud sounds

Having discovered just how awful the AC ripple is on some of my 5VDC wall-adaptors, I decided to make an Arduino program to calculate the RMS AC component and DC component of an adaptor under varying current loads.  My current issue is that the Arduino (and it's ADC's and DAC's) run on 5V, so 0-5V is it's analog input and output range. Many "5V" adaptors output a little more than that (and I want to be able to test 9V and 12V adaptors as well). So, I want a way for the Arduino to attenuate the input down to something within the 0-5V range, and the only way I can think of to do this is to use the Arduino's analog voltage output (which, I realize, is just PWM digital). Hence, I need a voltage-controlled attenuator.  The application requirements are:   It must be able to attenuate the input anywhere from a gain of 1 down to a gain of about 0.25 (to get, say, a 15V input well within the 0-5V ADC range) The range of controlling voltages must also be within 0-5V. Furthermore, the range cannot be too small, since the Arduino can only select 256 values between 0-5V. In other words, I can't have a controlling voltage of 2.000V give me a gain of 1 and a controlling voltage of 2.001V give me a gain of 0.25, as the Arduino doesn't have that kind of control over its analog output.  Any attenuation needs to affect the AC and DC portions equally, or else my ac_component/dc_component ratios will be erroneous.  I would very much like not having to supply additional voltage rails. For example, I don't want to have to supply a +12V and -12V for a certain op-amp. If it can all be done with a 5V rail, that's optimal. Or, +12V will probably also be fine. Attenuation does not need to be linear with voltage. All I'm after is being able to calculate (RMS ac_component / dc_component), and those ratios will stay the same without my knowing the exact attentuation. I understand that JFETs (see the schematics below) aren't all that well-suited to DC operation for thermal issues or something. Gradual drift in the attenuation is okay. My Arduino program only samples the voltages from the wall-adaptor for about 1/10 of a second. As long as the gain doesn't change appreciably over that time span, things are fine.   The first thing I tried was this sample which I found. It kinda did what I wanted, but it's inverting, so the output ends up being negative (and out of the 0-5V range of the Arduino).         – Schematic created using   Then, I realized that the op-amp was probably just lowering the output impedance of the what's really just a voltage-divider with a JFET in place of one of the resistors, and I didn't need that because the Arduino has a much higher input impedance than the power-supplies I'll be testing, so I tried this ...          but I'm getting something strange. It looks like the AC component is getting affected by the gain-control input voltage, but not the DC component (see requirement 3). I clearly don't understand FETs like I should. Can someone either suggest some fixes to this approach, or suggest an alternative?


What do I need to do if I want to clear the console without OS-Limitations? I know that on Linux and Mac the command "clear" exists, whereas Windows has "cls". I want to clear the console every now and then on the three major systems without personally choosing "clear" or "cls".   My idea so far was   import platform os = platform.system() if os == "Windows":     clear = 'cls' else:     clear = 'clear'   and then just use clear as variable for both, depending on the OS, but it doesn't work. Is something like this actually possible?

Like most Python developers, I typically keep a console window open with the Python interpreter running to test commands, dir() stuff, help() stuff, etc.  Like any console, after a while the visible backlog of past commands and prints gets to be cluttered, and sometimes confusing when re-running the same command several times.  I'm wondering if, and how, to clear the Python interpreter console.  I've heard about doing a system call and either calling cls on Windows or clear on Linux, but I was hoping there was something I could command the interpreter itself to do.  Note: I'm running on Windows, so Ctrl+L doesn't work.


Folland problem 5.36 (b)  Let $\mathcal{X}$ be a separable Banach space and let $\mu$ be counting measure on $\mathbb{N}$. Suppose that $\{x_{n}\}_{n=1}^{\infty}$ is a countable dense subset of the unit ball of $\mathcal{X}$, and define $T:L^{1}(\mu)\to \mathcal{X}$ by $Tf = \sum_{1}^{\infty}f(n)x_{n} $.  Show that $T$ is surjective. My approach: Consider any $x\in\mathcal{X}$ and let $x_{n}$ be a sequence such that $x_{n}\to x$ (since $\mathcal{X}$ is separable this can be done). Now consider $f^{k}$ such that $f^{k}(k) = 1$ and $f^{k}(j)= 0$ if $j\neq k$. Clearly $Tf^{k} = x_{k}\to x$. But now the problem is that $f^{k}$ doesn't converge.

Folland, "Real Analysis", Chapter 5.3, Exercise 36:     Let $\mathcal{X}$ be a separable Banach space and let $\mu$ be   counting measure on $\mathbf{N}$.  Suppose that   $\left\{x_n\right\}_1^\infty$ is a countable dense subset of the unit   ball of $\mathcal{X}$, and define $T \colon L^1(\mu) \to \mathcal{X}$   by $Tf = \sum_1^\infty f(n) x_n$.  (a)  $T$ is bounded.  (b)  $T$ is   surjective.   I have proved (a).  I would like help on (b).  Here are my ideas so far.    Say we want to show $y \in \mathcal{X}$ is in the image of $T$.  Reduce to the case $||y|| = 1$ and let $x_{n_m} \to y$.  My thought is to produce for each $N$ a function $f_N \in L^1(\mu)$ such that $||y - \sum_n^\infty f(n)x_n|| < 1/N$ and also such that the $f_N$ converge in $L^1(\mu)$ to some $f \in L^1(\mu)$.  Then use the continuity of $T$ to conclude $T(f) = y$.    The way I have been setting up my inequalities is as follows. Pick $M_N$ such that for all $m > M_N$, $||y - x_{n_m}|| < 1/N$.  Then I want to define $f_N$ so that $$\sum_n^\infty f_N(n) = \sum_{m > M_N}^\infty f_N(m) = 1, $$ hence $$||y - T(f_N)|| = ||\sum_{m > M_N}^\infty f_N(m) y + \sum_n^\infty f_N(n)x_n|| \leq \sum_{m > M_N}^\infty f_N(m) || y - x_{n_m} || < \frac{1}{N}. $$  Presumably, if the $f_N$ are appropriately chosen, then I can find a dominating function and apply the Dominated Convergence Theorem to finish up.    However, getting all these hypotheses to hold simultaneously has been difficult.  In essence, the difficulty seems to be in requiring that the $f_N$ be "normalized" as well as possess a dominating function.  If this method is feasible, at least it seems to require a bit of analysis to show the desired series all converge.  Perhaps I am missing something cleaner.  If so, a simpler solution would be much appreciated.    -Thanks.


I have now two polygons as in the screen.  The first is "well formed", in a form that contains data (the one in blue) the second one has an intersection and, for that reason, is not well formed and I would like to delete it if it has intersections.  Any idea of how to detect the intersection? Thanks!

From the man page for :        If shape is Complex, the path may self-intersect.  Note that contiguous coincident points in the path are not treated as self-intersection.   If shape is Convex, for every pair of points inside the polygon, the line segment connecting them does not intersect the path. If known by the client, specifying Convex can improve performance. If you specify Convex for a path that is not convex, the graphics results are undefined.   If shape is Nonconvex, the path does not self-intersect, but the shape is not wholly convex. If known by the client, specifying Nonconvex instead of Complex may improve performance.  If you specify Nonconvex for a self-intersecting path, the graphics results are undefined.      I am having performance problems with fill XFillPolygon and, as the man page suggests, the first step I want to take is to specify the correct shape of the polygon. I am currently using Complex to be on the safe side.  Is there an efficient algorithm to determine if a polygon (defined by a series of coordinates) is convex, non-convex or complex?


ls -la prints the following:  drwxrwxrw- 2 www-data www-data 4096 Aug 12 11:04 files   My username does not belong to www-data. When trying to cd into files I get a "permission denied" though the "read" permission for others is set.   Why do I need the "execute" permission?

I am having a bit of trouble understanding what the execute permission means for directories. Do I understand it correctly that anything in a directory for which a user does not have x-rights is inaccessible even if the things inside the directory gives specific rights to the user?  Or will the user still have direct access to the things in the directory, but simply cannot list what is in the directory?  (What I am really trying to understand is how safe a directory is from access from other users if they do not have x-permission for it.)


I have a Thinkpad and I usually use  to control the fan on my laptop. But this program doesn't start at the startup automatically, so I created a startup program with this command:  sudo  /etc/init.d/thinkfan start   That is the command in the guide to start thinkfan.  But this didn't work. How can I fix?

I have a daemon that runs fine if I start it manually with the service command:  ricardo@ricardo-laptop:~$ sudo service minidlna start                     * Starting minidlna minidlna                                                              [ OK ]    but it's not configured to auto start when the PC reboots.   How can I configure it to start automatically, even if no one is logged into the PC?


How do I programmatically minimize an iPad/iPhone UIApplication?

I am programming an iPhone app, and I need to force it to exit due to certain user actions.  After cleaning up memory the app allocated, what's the appropriate method to call to terminate the application?


I am following the Bayesian Methods for Machine Learning course on Coursera. Unfortunately, it glosses over many details, and I am struggling to understand how to check if a distribution is a conjugate of another.  For example, I would like to check if $ N(\mu_1 |m, s^2)$ prior is conjugate over parameter $ \mu_1$ for the likelihood $ N(X| \mu_1, \sigma_1^2)$.  As far as I understand, we have to multiply the two normals and check if the result is in the same family as the prior.  Since we only want to check how the relevant variables behave, we can use a simplified form:  $ N(X| \mu_1, \sigma_1^2)$$ N(\mu_1 |m, s^2) \propto exp(-\frac{(x-\mu)^2}{2\sigma^2}) exp(-\frac{(\mu -m)^2}{2s^2})$   First of all, can I simplify and move the denominator in the $exp$ outside in this way?   $ exp(-b(x-\mu)^2) exp(-c(\mu -m)^2)$   where b and c are just two constant? Then, how would I proceed?  Many thanks to whoever could clarify this.   $ $

Given a random variable $X$ which follows a normal distribution $X \sim (\mu,\sigma^2)$ with unknown mean and known variance. Say we have $n$ observations $y_i$ where $1\le i \le n$ and each $y_i$ is sampled from a normal distribution $Y_i \sim N(x,\sigma_i^2)$ (not i.i.d.) where $x$ is sampled from $X$ and it is the same for all $\{Y_i\}$, but $\sigma_i$ is different for different $Y_i$.  The question is: how to compute the posterior distribution $X$ given the observations p(X|{y_i})? The question is different from the answer listed in  because $y_i$ is not sampled from i.i.d. distribution.


I'm trying to convert this for each into a for loop. how do I do that? here's the code im using for (char character: word.toCharArray()) {                     character = Character.toUpperCase(character);                                          if (character >= 'A' && character <= 'Z') {                         count[character - 'A']++;                     }                                      }  Thanks in advance

Consider:  List<String> someList = new ArrayList<String>(); // add "monkey", "donkey", "skeleton key" to someList     for (String item : someList) {     System.out.println(item); }   What would the equivalent for loop look like without using the for each syntax?


As shown in the video, I have an object that move at high speed in 3d space. But the emitter does not have time to emit particles all the way. It creates particles for each frame. But to emit particles constantly with a moving object? Thank you for your time.

I have tried using the Subframes option. It hasn't done a thing.  So I have an object which gives off 3 particles into the air.  I have an Icosphere object on a different layer with a particle instance modifier on it.  That allows me to add a particle system to the Icosphere to create some awesome particle trails    But the particle system that is attached to the Icosphere creates clumps of particles on each frame.  I am wanting a nice, smooth stream of particles being emitted from the main particles.  Is there a way to fix this, or does the Subframes option not work with the Particle Instance modifier.  Here is my .blend file:  I am using Blender 2.72


I'm in year 10 (9th Grade for the Americans) and I just had a question about physics. How does a battery create potential difference? It it because the electrons are gaining energy as they get pulled further away from their atoms  or it is becuase of the concentration of delocalised electrons at the negative terminal?

I would like to know how potential difference is created between two points?Is potential difference created by adding more electrons at one side?If that's the case how to add more electrons at one side?  I'm really looking to know what really constitutes potential difference?


I'm getting repeat requests for resources on my server and this is increasing the load greatly. Currently my load is at 2.5ish. I block individual IP addresses causing the problem but eventually the attacker seems to reappear with a different IP. Any ideas?  Here is my server log:  I'm getting repeat requests for '...' and 'GET'

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


I've tried for hours to find a solution for this fairly simple layout. The closest I've got is: \begin{minipage}{.25\textwidth}     \includegraphics[width=\textwidth]{res/server.jpg} \end{minipage} \begin{minipage}{.75\textwidth}     \begin{flushright}         asdasd\\         asdasdasdasdasddsa     \end{flushright} \end{minipage}  .. which produces something like:  How to move the text up to the top line? I've seen many solutions with tables and boxes. Is there a simple way to do it with minipage? With [t] alignment of the minipage \begin{minipage}[t]{.25\textwidth}     \includegraphics[width=\textwidth]{res/server.jpg} \end{minipage} \begin{minipage}[t]{.75\textwidth}     \begin{flushright}         some text\\         some more text     \end{flushright} \end{minipage}   With \vspace{0pt} \begin{minipage}[t]{.25\textwidth}     \vspace{0pt}     \includegraphics[width=\textwidth]{res/server.jpg} \end{minipage} \begin{minipage}[t]{.75\textwidth}     \vspace{0pt}     \begin{flushright}         some text\\         some more text     \end{flushright} \end{minipage}

I need to put some text at the same height in my page, and I'm trying to do it with a minipage, but I'm not able to do it since they get centre-aligned.    This is the LaTeX for the figure I've uploaded:  \begin{minipage}[]{0.5\textwidth}     \begin{flushleft}         {\large \textit{Author}:\vspace*{0.5cm} \\          Me}     \end{flushleft} \end{minipage}% % \begin{minipage}[]{0.5\textwidth}     \begin{flushright}         {\large \textit{Supervisor}:\vspace*{0.5cm} \\          Him}\\         \vspace*{0.5cm}         {\large \textit{Advisor}:\vspace*{0.5cm} \\          Other Guy}     \end{flushright}     \end{minipage}%   Can you please explain me what I'm doing wrong?


Need help with proof by induction for: $$2(\sqrt n - 1) < \sum_{i=1}^n \left(\frac{1}{\sqrt i}\right)$$  For n=1: Good. Assuming for n, trying to proof for (n+1)... Thanks.

I'm having some troubles trying to prove the Exercise 13, page 41 of Apostol's Calculus I, which is the one used to explain some features of integration in the next pages.  It says:  Prove that $2(\sqrt{n+1} - \sqrt{n}) < \frac{1}{\sqrt{n}} < 2(\sqrt{n}-\sqrt{n-1})$ if $n\geq 1$. Then use this to prove that   $$2\sqrt{m}-2 < \sum_{n=1}^m\frac{1}{\sqrt{n}}< 2\sqrt{m}-1 \qquad \text{if } m \geq 2$$  (At this moment I'm stuck with the first part of the problem).  Proof (by Induction):  $$P(n): 2(\sqrt{n+1} - \sqrt{n}) < \frac{1}{\sqrt{n}} < 2(\sqrt{n}-\sqrt{n-1})\qquad  \text{for }n\geq 1$$  Base Case: $P(1)$  $$\begin{align*} 2(\sqrt{1+1} - \sqrt{1})       &<  \frac{1}{\sqrt{1}}  < 2(\sqrt{1}-\sqrt{1-1})&\\ 2(\sqrt{2} - \sqrt{1})         &<\hspace{5pt}  1 \hspace{6pt}    <  2 \end{align*}$$  which is true.  Induction Hypothesis: Assume $P(k)$ is true for a positive integer $k \geq 1$:  $$\underbrace{2(\sqrt{k+1} - \sqrt{k})}_{a} < \frac{1}{\sqrt{k}} < 2(\sqrt{k}-\sqrt{k-1})\qquad (1)$$  Induction Step: Prove $P(k+1)$:  $$2(\sqrt{k+2} - \sqrt{k+1}) < \frac{1}{\sqrt{k+1}} < \underbrace{2(\sqrt{k+1} - \sqrt{k})}_{a}$$    This was my strategy:  Since we assumed $P(k)$ is true, by multiplying the set of inequalities $(1)$ by $\frac{\sqrt{k}}{\sqrt{k+1}}$ we get  $$2\left(\sqrt{k} - \frac{k}{\sqrt{k+1}}\right) < \frac{1}{\sqrt{k+1}} < \underbrace{2\left(\frac{k}{\sqrt{k+1}}-\sqrt{\frac{k-1}{k+1}}\right)}_{b}$$  Then, if we can show that $b < a$, by transitivity we have that $P(k+1)$ is true.  And there is where I'm stuck. I'm not sure what I'm doing wrong, but by setting the inequality $b<a$, it seems that the assumption I made doesn't work:  $$\begin{align*}\frac{k}{\sqrt{k+1}} - \sqrt{\frac{k-1}{k+1}} <&\ \sqrt{k+1} - \sqrt{k}\\  \frac{k}{\sqrt{k+1}} - \sqrt{1- \frac{2}{k+1}} <&\ \sqrt{k+1} - \sqrt{k}\end{align*}$$  The RHS approaches $0$ while the LHS approaches $k$, which reverses the inequality, so I think it's not the correct approach.  Could someone shade me some light on it?


I just bought a new Lenovo Ideapad S410p with this ethernet card:  $ lspci -nn | grep 0200 03:00.0 Ethernet controller [0200]: Qualcomm Atheros QCA8172 Fast Ethernet [1969:10a0] (rev 10)   Both wireless and eth0 works fine, connect to internet and router no issues there.  But with any tool I used to check the traffic on it shows me zero in both up/down traffic. And this happens ONLY with the ETH0 interface, with the wireles card (another Qualcom Atheros) the traffic is showed, I searched in google with no luck, any idea about how to fix it?   Using Ubuntu 14.04 64 bits

In the Network history graph of System Monitor, network activity over Wi-Fi shows up fine, but activity over wired ethernet doesn't show up at all.  Using lspci, my ethernet adapter shows up as follows:  02:00.0 Ethernet controller: Qualcomm Atheros AR8162 Fast Ethernet (rev 10)   Is there any way to fix this?  To be absolutely clear, I am having no problems with the network connection itself, I just am unable to monitor its activity.


Contents of file.txt:  apple mango orange   My script should read apple and create a zero byte file apple.txt then mango.txt file.  Could someone help, please?

For example I have a file called fileNames.txt.  cat >fileNames returns  abet  able  abacus   How do I use fileNames to create abet, able, and abacus as .txt files?  I tried using pipes with cat and touch.


I got a problem. I installed SDL, rebooted pc, and got to GNOME-terminal or in other name it's TTY I guess so. I tried to reboot again, but I get the same screen. Could someone help me how to get out of TTY and get back to Unity (Desktop)?

So I got a problem here. So I installed SDL 2.0.1, everything worked fine, I installed dependencies of sdl as well, so I saw that it didn't worked, so I rebooted my pc, after that I get to gnome, and don't know what do, maybe some help? :)


Can anyone explain why the output is so distorted and weird?  Circuit   Waveform

The 'classic' non-inverting amplifier configuration uses negative feedback. What happens when the + and - terminals are switched? Based on my pencil-and-paper analysis and a Circuitlab simulation, it seems that the result is the same. Is this correct? Can we make a non-inverting amplifier with positive feedback?  Derivation for the positive feedback non-inverting amplifier: I assume that input impedance is infinite, output impedance is zero, and the output voltage is given by   $$ V_{out} = A(V^{+} - V^{-}) $$  Now using the voltage divider equation,   $$ V^{+} = V_{out} \frac{R_b}{R_a+R_b} $$  and for the negative terminal, we have  $$ V^{-} = V_{in} $$   Substituting into the equation for the output voltage,  $$ V_{out} = A(V^{+} - V^{-}) = AV_{out} \frac{R_b}{R_a + R_b} - AV_{in} $$  $$ V_{out}(1 - A \frac{R_b}{R_a + R_b}) = -AV_{in} $$  $$ V_{out} =  \frac{-AV_{in}}{1 - A \frac{R_b}{R_a + R_b}}$$  If the input frequency is relatively low, and both resistors are of a similar order of magnitude, then   $$ A \frac{R_b}{R_a + R_b} >> 1$$  $$ V_{out} \approx \frac{-AV_{in}}{ - A \frac{R_b}{R_a + R_b}} =  V_{in} \frac{Ra + R_b}{R_b} $$  Which is the formula commonly given for the output of the classic non-inverting amplifier. So is there any difference between these two circuits? If so, where does my analysis fail? What is a more accurate way of analyzing the positive feedback circuit presented below?     EDIT: As suggested by Jasen, the positive feedback circuit I posted is a Schmitt Trigger. The Wikipedia article on  explains it fairly well. It turns out that they key to analyzing it is to solve for the voltages at the input terminals and then treat the Op-Amp as a comparator. That is, find equations for V+ and V-, and then ask the question "When does V+ > V- hold?"


I am trying to achieve the type of photo where the people/moving parts of the photograph are virtually invisible, but the static background is perfectly sharp.   For example, I am taking a photo inside of Saint Peter's Basilica, and I want the photo to be of the beautiful architecture and decoration, not the other tourists. To achieve the effect where the people are like ghosts, I set the shutter speed to 4 seconds and let the camera figure the rest out itself.   Because of the limited lighting in the basilica, the 4 seconds are permissible and the photo comes out as desired. Here it is:    (Sorry about the image quality. It is a photo of a photo.)  How I can achieve this effect in an area with more light, like outdoors? Lowering the shutter speed alone will not help, for it will either give me a photo without the effect, or a white photo. I thought that maybe I could put a polarized filter over the lens to limit the amount of light that can enter. I also thought that maybe I can put a light gray filter on the lens to limit the amount of light but that might just make it grayer and not really help at all.   How can I achieve this effect in lighter conditions?

I would like to take a picture of a street during the day to depict how much traffic and cars there are on the street.  Is there anyway to do this with a long exposure photograph?  I have a Nikon D90 and I set the f stop down to 1/16 (the lowest of my lens) and set the time to 2 seconds. Doing this, the exposure is almost saturated when taken around 5pm with the sun setting behind a tree. Doing this, the cars passing by were very hard to make out against the stationary background, being visible as a blur in the color of the car.  Perhaps this is not possible and I should just do this at night where the cars lights are much brighter than the background.  Please suggest how else I might depict the traffic in a photograph?  Are daytime long exposure photographs even possible?


when i run xp_fixeddrives command to the drive that contains my tempdb, I obtain 10mb of free space, but the following query return other thing (45000 mb free).  other query :  USE tempdb; GO SELECT SUM(unallocated_extent_page_count) AS [free pages],  (SUM(unallocated_extent_page_count)*1.0/128) AS [free space in MB] FROM sys.dm_db_file_space_usage;   this drive only contain my tempdb db.  what is my error?

We have a fairly big MS SQL 2008R2 database that resides on a SSD drive. The drive itself only has ~110Gb of space, and the database files are the only files on the drive.  The database is in "Simple" recovery mode, and only has two files, .MDF and .LDF.   The disk is now nearly full: the MDF is currently 109Gb in size. However, SSMS tells me there's nearly 18Gb of "Space Available" (in the 'General' properties page), and if I go through the motions of Shrinking the file it also tells me there's 18Gb of space free. SSMS also tells me the database size is around 132Gb, which surprises me - that wouldn't fit on the drive!  From what I've read, shrink is a really bad idea. However, I'm starting to see replication errors (could not allocate space for object). We've previously tried shrinking the database, but within a few hours the file was back to it's original size.  How should we proceed - given there's apparently 18Gb of free space, should SQL automatically use that free space? Or is it as simple as: we really need more disk space?


In  of Cyclic group:       The integer and modular addition operations, used to define the cyclic   groups, are both the addition operations of commutative rings, also   denoted Z and Z/n. If p is a prime, then Z/p is a finite field, and is   usually instead written as Fp or GF(p). Every field with p elements is   isomorphic to this one.   Per my understanding, the Z/p should be a finite field no matter p is prime or not, is it right?

Let $n \in ℕ$. Show that the ring $ℤ/nℤ$ is a field if and only if $n$   is prime.   Let $n$ prime. I need to show that if $\bar{a} \neq 0$ then $∃\bar b: \bar{a} \cdot \bar{b} = \bar{1}$. Any hints for this ?  Suppose $ℤ/nℤ$ is a field. Therefore: for every $\bar{a} \neq 0$ $∃\bar b: \bar{a}\cdot \bar{b}=1$. How can I show that $n$ must be prime ?


I really miss the graphical "Services" tool from older versions of Ubuntu, but I understand why it had to go. I always have terminals open anyway, so I use (because I have to now, I guess) service --status-all to see what services are running. This would be ok except that the command produces output like the following:   [ + ]  winbind  [ ? ]  wpa-ifupdown  [ - ]  x11-common   I'm guessing that those symbols mean something like listening, blocked, or stopped, but which is which? More importantly, why doesn't the man page say?

I need to identify the currently running services but I can't figure out the results of running service --status-all, I mean what does ?, - and + mean ?  $ service --status-all  [ + ]  acpid  [ + ]  anacron  [ + ]  apparmor  [ ? ]  apport  [ ? ]  atieventsd  [ + ]  avahi-daemon  [ ? ]  binfmt-support  [ + ]  bluetooth  [ - ]  brltty  [ + ]  console-font  [ + ]  console-setup  [ + ]  cron  [ + ]  cups  [ + ]  cups-browsed  [ - ]  dbus  [ ? ]  dns-clean  [ + ]  friendly-recovery  [ - ]  grub-common  [ ? ]  irqbalance  [ - ]  kerneloops  [ ? ]  killprocs  [ + ]  kmod  [ ? ]  lightdm  [ - ]  lm-sensors  [ ? ]  mysql  [ ? ]  networking  [ ? ]  ondemand  [ ? ]  pppd-dns  [ - ]  procps  [ - ]  pulseaudio  [ ? ]  rc.local  [ + ]  resolvconf  [ + ]  rfkill-restore  [ + ]  rfkill-store  [ - ]  rsync  [ + ]  rsyslog  [ + ]  saned  [ ? ]  sendsigs  [ + ]  setvtrgb  [ ? ]  speech-dispatcher  [ - ]  sudo  [ + ]  timidity  [ + ]  udev  [ ? ]  umountfs  [ ? ]  umountnfs.sh  [ ? ]  umountroot  [ - ]  unattended-upgrades  [ - ]  urandom  [ + ]  virtualbox  [ - ]  x11-common   And would running this command with sudo make any difference ? I tried it and in my case it didn't make any difference, but may it differ in other setups ?


Here my HTML

Home

 Title vertical middle

     The class .wrap is covers the full screen. That is perfect! My problem ist that the third child element (div with img-responsive) ends in the middle of the screen size.   How can I make that the third child is at least the space between the Navbar and the footer. Of Course it should extend if the content ist is more...  here the css classes:  .wrap {     min-height: 100%;     height: auto;     margin: 0 auto -60px;     padding: 0 0 60px; } .img-responsive{     display: block;     max-width: 100%;     height: auto; } .startpage {     padding-top: 20px; }   And the next question ist: How can I make the h1 Tag vertical Align middle ?

I am working on a web application where I want the content to fill the height of the entire screen.  The page has a header, which contains a logo, and account information. This could be an arbitrary height. I want the content div to fill the rest of the page to the bottom.  I have a header div and a content div. At the moment I am using a table for the layout like so:  CSS and HTML    #page {     height: 100%; width: 100% }  #tdcontent {     height: 100%; }  #content {     overflow: auto; /* or overflow: hidden; */ }

...

...

     The entire height of the page is filled, and no scrolling is required.  For anything inside the content div, setting top: 0; will put it right underneath the header. Sometimes the content will be a real table, with its height set to 100%. Putting header inside content will not allow this to work.  Is there a way to achieve the same effect without using the table?  Update:  Elements inside the content div will have heights set to percentages as well. So something at 100% inside the div will fill it to the bottom. As will two elements at 50%.  Update 2:  For instance, if the header takes up 20% of the screen's height, a table specified at 50% inside #content would take up 40% of the screen space. So far, wrapping the entire thing in a table is the only thing that works.


I discovered that the following 2 URLs are serving exactly same content. Why is this not impacting Wikipedia's SEO? I've heard having same content across 2 URLs has negative impact on SEO.      Disclaimer: I'm a developer, not in SEO or marketing so don't know much about SEO.

This is a general, community wiki question regarding duplicate content.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .     What does Google consider to be duplicate content? Will the way I am presenting my content result in a duplicate content penalty? How can I avoid having my site's content treated as duplicate content?


First of all, I apologize for posting a screenshot from Stack Overflow in Russian. If you have the same situation, you can place English version here.  My low quality queue is empty (zero items), but popup menu for low quality posts queue has red lamp.         Before removing counter from popup I have seen 0 and never clicked on the item with zero count. Now I see red - going in and here is nothing to review.  Is it behavior by (new) design or some kind of bug?  A  happened for close vote queue for another user, described on ruSO.meta. He has more items skipped during review, but lamp is red and queue is empty like in my case.  As , this has happened on  as well.

One of the more common bits of feedback when we  was that some sites would prefer to have an indication when there are any outstanding reviews available. So we are trying an experiment with an "inbox zero" review indicator. This would mean:  The review indicator lights up whenever there is at least one item in any queue.  There's no concept of the "danger threshold"; if there's even one item in a queue, it's marked with a red dot.    Clearly, this logic would be annoying for , so we've made it a site setting. We're going to test it out on a handful of sites to see how people respond to it:            One final thing: you will be notified even when you cannot complete a review task (for anyone who can see the review queue - 500+ reputation). In particular, people who do not have enough reputation to handle items all the queues will be notified of items in queues they can't access. This is the next thing we are working to fix. If too many people are frustrated by this situation, we'll pause the test until that problem is fixed. It'll also light up even after you've finished all the review tasks available to you, which is a much harder problem for us to fix. The goal of this experiment is to test whether aggressively notifying users can make "inbox zero" a possibility for sites that are close.


If I log in as User 1, i see user 1's profile picture. If I log in as User 2, I see user 2's profile picture. As expected. But after browsing a bit, User 2 would suddenly see User 1's profile picture.   This ONLY seems to happen on /forum (i use the standard drupal forum module).  And I use my .theme file to populat a variable as follows:   $variables['current_user_profile_picture_medium'] = \Drupal::entityTypeManager()->getStorage('image_style')->load('medium')->buildUrl($pp);   Where $pp = public://someOrOtherProfilePic.png  And I use it in my template as follows:  {{ current_user_profile_picture_medium }}   So it would seem that the .theme file figures out it needs to user profile pic A, but then when User B logs in, it still shows pic A.   I think I am missing something about caching here. It would seem the .theme file is only getting the details once. So I went to look what php is being generated and found this:  echo $this->env->getExtension('Drupal\Core\Template\TwigExtension')->escapeFilter($this->env, $this->sandbox->ensureToStringAllowed($this->getAttribute(($context["user"] ?? null), "profile_picture_medium", [])), "html", null, true);   It seems to be getting confused with $context["user"] or not updating it or something.  Can anyone steer me in the right direction? What am I missing about caching/twig/templates?  Thanks!  UPDATE  It seems I might be having similar issues to .  UPATE 2  Adding this to settings.php didn't help:  $settings['cache']['bins']['page'] = 'cache.backend.null';   UPDATE 3  I tried adding a twig function, but even that remains cached. This doesn't seem to work:  <img src="{{ get_current_user_profile_picture() }}" class="img-responsive" alt="...">   If I put die() in this function, it doesn't hit the die() if the page has already been loaded once.  I'm really stumped....

I'm showing the name of the currently logged-in user in header, using \Drupal::currentUser()->getUsername(), but it's showing an already cached  page. I know I can disable the cache for a particular page using \Drupal::service('page_cache_kill_switch')->trigger(), but this won't work with the header.html.twig file.  How can I achieve it without affecting the performance?


How to find following integral $$\int \csc^3 x\ dx=?$$  my work:   i substitute $\csc x =t$, $dx=-\frac{dt}{\csc x\cot x}=-\frac{dt}{t\sqrt{t^2-1}}$ $$\int t^3\frac{-dt}{t\sqrt{t^2-1}}$$  $$=-\int \frac{t^2dt}{\sqrt{t^2-1}}$$ substitute $t=\sec\theta$, $dt=\sec\theta\tan\theta\ d\theta$ $$=-\int \frac{\sec^2\theta\sec\theta\tan\theta\ d\theta}{\tan\theta}$$ $$=-\int \sec^3\theta d\theta$$  i got the similar cubic trigonometric function. I am not able to solve this integration. please help me solve it. thanks.

I need to calculate the following indefinite integral:  $$I=\int \frac{1}{\cos^3(x)}dx$$  I know what the result is (from Mathematica):  $$I=\tanh^{-1}(\tan(x/2))+(1/2)\sec(x)\tan(x)$$  but I don't know how to integrate it myself. I have been trying some substitutions to no avail.   Equivalently, I need to know how to compute:  $$I=\int \sqrt{1+z^2}dz$$  which follows after making the change of variables $z=\tan x$.


I came across the following sentence and I would like to ask if it is grammatically correct to say the second one also and if we can what will it mean?      1 .His parents make him stay at the table until he's eaten everything.   2. His parents make him stay at the table until he eats everything.

1.I will study hard until I get a high score on this exam. 2.I will study hard until I've gotten a high score on this exam.  I think these sentences are grammatically correct. but if I add a specific time, I think these sentences have to be only this one:  3.I will study hard until I get a high score on this exam on July 25th.  And how about these?  a. I'd like to watch all of the holocaust movies present in the world until I've become an expert on it. b. I'd like to watch all of the holocaust movies present in the world until I become an expert on it.  Since there's no a word representing a specific time, both of them are okay, right? And what I'd like to know is the difference between "have gotten" and "get". What I know about them is we can use "future perfect" to refer to unspecific future event that might happen before some accident. but "get" refers to future event that could be either a specific scheduled event or unspecific future event. that's why if I add a specific time mentioning, I have to use "get".


I am currently writing a helper library that connects to shop floor PLCs via .   The TopServer library has separate versions for x86 and x64 architectures and I want to load the appropriate version at runtime using late binding based on the CPU architecture of the calling code. The methods in the two libraries have the same signatures.  I can use reflection to load the relevant object using the below code but I am wondering what is the best method of using this instance in the calling code.  public class LateBinding {     public static T GetInstance<T>(string dllPath, string fullyQualifiedClassName) where T : class     {         Assembly assembly = System.Reflection.Assembly.LoadFile(dllPath);         Type t = assembly.GetType(fullyQualifiedClassName);          return (T)Activator.CreateInstance(t);     } }   As I'm late binding I don't get the types pre-runtime so was thinking that creating an interface based on the libraries method signatures would be a good way to implement both version.  Does anyone have a view on this method or recommendations on other methods?

We have two versions of a managed C++ assembly, one for x86 and one for x64.  This assembly is called by a .net application complied for AnyCPU.  We are deploying our code via a file copy install, and would like to continue to do so.  Is it possible to use a Side-by-Side assembly manifest to loading a x86 or x64 assembly respectively when an application is dynamically selecting it's processor architecture?  Or is there another way to get this done in a file copy deployment (e.g. not using the GAC)?


Call me a noob, 'cause I really am, but what does 'foo' mean? I have seen it a lot. but I don't know what it means. Could someone clarify? All help is appreciated.

I hope this qualifies as a programming question, as in any programming tutorial, you eventually come across 'foo' in the code examples. (yeah, right?)  what does 'foo' really mean?  If it is meant to mean nothing, when did it begin to be used so?


I'm working with an SVN repository that is laid out like this:   $SVN/[project]/trunk $SVN/[project]/branches/[user]/[branch] $SVN/[project]/tags/releases/[tag]   My .git/config looks like this:     [svn-remote "svn"]   url = $SVN      fetch = project/trunk:refs/remotes/trunk      branches = project/branches/*/*:refs/remotes/*     When I look at git branch -a, I see all the remote branches. Let's say I want to check one out, work on it, then commit the changes back. Here's is what I am trying to do:   git checkout -b comments erik/comments .... work, commit locally .... git svn dcommit   However, dcommit always pushes to $SVN/project/trunk. git svn info always reports the URL as $SVN/project/trunk  I've tried using --track, I've tried reseting with --hard. I'm out of ideas here. I suspect it's my [svn-remote], but that's just a hunch.

I'm relatively new to Git, but I've found it so easy to work with at home that I'd like to use it at work where our projects are stored in Svn repositories. Unfortunately, the repositories are slightly non-standard and I'm having trouble getting them cloned. Sure, they all have trunk, branches/ and tags/, but branches/ and tags/ have subdirectories before hitting the real project directories:  trunk/ branches/maintenance/release1 branches/maintenance/release2 ... branches/development/feature1 branches/development/feature2 ... tags/build/build1 tags/build/build2 ... tags/release/release1 tags/release/release2   After cloning:  $ git svn clone -s --prefix=svn/ https://mydomain.com/svnproject $ git branch -r   development   development@1340   maintenance   maintenance@1340   tags/build   tags/build@1340   tags/release   tags/release@1340   trunk   trunk@1340    I get none of the actual project branches or tags. I actually need to be able to work on the trunk, one maintenance branch and one development branch. I've tried this approach in addition to several hacks at modifying the config, but nothing is working for me.  Is there any way I can get the key components of my non-standard Svn project into a local git repository so that I can easily move between them?  Many thanks.  UPDATE: I should add that I can't do a wholesale switch to Git (yet). There are other team members involved and an international presence. The logistics of the transition are more than I'm willing to undertake until I'm much more comfortable with Git; as I mentioned, I'm still pretty new. I've barely scratched the surface of its capabilities.


I have installed windows 8, and I need to get updated drivers for my HP2311x.   Oddly, there are two very different product support pages at hp.com for this model number:    and     ...though the pictures of a monitor on each page look identical (and just like my monitor, of course.)  Could these be actually the same product?? If not, how can I tell whether I have an LED, or an LED backlit LCD monitor. I bought this quite a long time ago; the packaging and receipt are gone.

Is there a difference between a LED Backlit and LED HD  Display on laptop monitor? or are they the same that is good for the eyes


'Hot' StackExchange questions can be seen , but what exactly is special about them that makes them 'hot'? Many of these 'hot' questions range from 2-20 upvotes, and range from a minute to a week-or-so old. They also have low activity. What's so special about these questions that makes them 'hot'?

I really like the , where certain questions from the Stack Exchange Network are presented, along with a hotness rating that is described as "arbitrary" in its tooltip. Such questions also appear randomly on the sidebar on sites across the network, under the heading "Hot Network Questions". How do these arbitrary hotness points work, and how are they used to select questions to appear in those lists?


In the printed version of  lies an "easter egg" hidden in some misspellings from which readers can deduce the site where a competition took place.  I read the book last and then gave it away to a friend who was interested, so I cannot get back to it. Can anyone scan me that page or tell me where it is so that I can ask my friend to send me a photo? I've gotten really curious, so much that I'd read the book again, which I cannot do.

I already know the URL itself. I want to know which pages contain the typos that make up the URL for the Easter egg in the book Ready Player One.


This is a part of my  about filenames timestamps correction, i wanted to separate it from the other question so that maybe some of the community member will not have a hard time to find it,   I have a big number of image files spared in many folders under a base directory, and some of the files got a filename with the wrong timestamp, so what i want is to compare the filename timestamp with the creation date of each file and generate a .txt file listing the wrong filenames only.   You can find here an example:  Original filename with false timestamp: Filename, Created Date, Modified Date 20180524010500530_FR785101.jpg, 2018-05-24 00:05:00, 2018-05-24 00:05:34  The correct filename with correct timestamp is:  Filename, Created Date, Modified Date 20180524000500530_FR785101.jpg, 2018-05-24 00:05:00, 2018-05-24 00:05:34  I started using ls -lc and stat to get the creation time but i still couldn't figure out how i can compare between the filename timestamp and the creation date and generate a .txt listing all the wrong filenames.   So, is there anyone that can help me write a shell script that can do the job ?

I have a bunch of image files spared into different folders with a false timestamp on the filename (1 hour delay) and i want to correct that according to the creation time.   I am now trying to write a **shell script** that can go through all the folders > extract the creation time and and replace it on the filename timestamp, below a small example:   Original filename with false timestamp:  Filename, Created Date, Modified Date 20180524010500530_FR785101.jpg, 2018-05-24 00:05:00, 2018-05-24 00:05:34  The output would be:  Filename, Created Date, Modified Date 20180524000500530_FR785101.jpg, 2018-05-24 00:05:00, 2018-05-24 00:05:34  Can Anyone tell me if that is possible with a shell script ? Then, can anyone give me some direction on how to use the ls command or any other command that can do the job ?  I have started to document myself on the use of the ls command but i still cannot figure out how i can extract the creation time and replace it into the filename timestamp, also i don't know how i can make the script run through all the folders and sub-folders containing the image files,


Suppose that I launch a thing into a black hole from a secure distance, this black hole is secure at 2 meters and is floating over my yard, doesn't matter.  What will I see?  Will I see that the thing increases their speed and falls quickly into the hole?  Or will I see that the thing decreases their speed and falls slowly, every time more slowly?

Most of you if not everybody will agree that the stronger the gravitational pull, the faster an object will fall. For example, on a planet with 50 times the gravity of Earth, any object will hit the ground on that planet much quicker than it would on Earth. So taking all of these into the equation, does it mean that at a blackhole, an object will fall at an infinite speed because of the infinitely strong gravitational pull of the blackhole?


Unfortunately I have very little Linux experience. We have an Amazon instance running Debian 7.6 and got a message from Amazon saying we were port scanning. We have hopefully stopped this by restricting outbound traffic via an Amazon security group, but as part of the investigation we ran:  sudo clamscan -r -i --bell   this showed the following possible infection:     /var/lib/tomcat7/update_temporary: Unix.Trojan.Elknot FOUND   and I can find very little about this (but some stuff about ElkKnot with an extra K - are they the same thing?)  The following warnings also appear multiple times in the output:  WARNING: Can't open file /sys/module/nfnetlink_log/uevent: Permission denied LibClamAV Warning: fmap_readpage: pread fail: asked for 4094 bytes @ offset 2, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0 LibClamAV Warning: fmap_readpage: pread fail: asked for 4077 bytes @ offset 19, got 0   So my questions are: How I can tell whether the reported infection is genuine or a false positive? Should I be worried about all the LibClamAV warnings? Are they an indication of something wrong, or of Debian not being set up correctly?

This is a  about Server Security - Responding to Breach Events (Hacking)   See Also:                  Canonical Version I suspect that one or more of my servers is compromised by a hacker, virus, or other mechanism:   What are my first steps? When I arrive on site should I disconnect the server, preserve "evidence", are there other initial considerations? How do I go about getting services back online? How do I prevent the same thing from happening immediately again? Are there best practices or methodologies for learning from this incident? If I wanted to put a Incident Response Plan together, where would I start? Should this be part of my Disaster Recovery or Business Continuity Planning?   Original Version       2011.01.02 - I'm on my way into work at 9.30 p.m. on a Sunday because our server has been compromised somehow and was resulting in a    attack on our provider. The servers access to the Internet   has been shut down which means over 5-600 of our clients sites are now   down. Now this could be an FTP hack, or some weakness in code   somewhere. I'm not sure till I get there.      How can I track this down quickly? We're in for a whole lot of   litigation if I don't get the server back up ASAP. Any help is   appreciated. We are running Open SUSE 11.0.            2011.01.03 - Thanks to everyone for your help. Luckily I WASN'T the only person responsible for this server, just the nearest. We managed   to resolve this problem, although it may not apply to many others in a   different situation. I'll detail what we did.      We unplugged the server from the net. It was performing (attempting to   perform) a Denial Of Service attack on another server in Indonesia,   and the guilty party was also based there.      We firstly tried to identify where on the server this was coming from,   considering we have over 500 sites on the server, we expected to be   moonlighting for some time. However, with SSH access still, we ran a   command to find all files edited or created in the time the attacks   started. Luckily, the offending file was created over the winter   holidays which meant that not many other files were created on the   server at that time.      We were then able to identify the offending file which was inside the   uploaded images folder within a  website.      After a short cigarette break we concluded that, due to the files   location, it must have been uploaded via a file upload facility that   was inadequetly secured. After some googling, we found that there was   a security vulnerability that allowed files to be uploaded, within the   ZenCart admin panel, for a picture for a record company. (The section   that it never really even used), posting this form just uploaded any   file, it did not check the extension of the file, and didn't even   check to see if the user was logged in.      This meant that any files could be uploaded, including a PHP file for   the attack. We secured the vulnerability with ZenCart on the infected   site, and removed the offending files.      The job was done, and I was home for 2 a.m.            The Moral   - Always apply security patches for ZenCart, or any other CMS system for that matter. As when security updates are released, the whole   world is made aware of the vulnerability.   - Always do backups, and backup your backups.   - Employ or arrange for someone that will be there in times like these. To prevent anyone from relying on a panicy post on Server   Fault.


the question is, how can control the ls -l total output ? first impression with example that give us total = 0  els3@els3PC:~/test$ touch file els3@els3PC:~/test$ ls -l total 0 -rw-r--r-- 1 els3 els3 0 Jul 20 12:05 file   As i mention this example give us this result total = 0 by creating empty file.  in other way I will try to create a non empty file2 contain '3ls3' .  els3@els3PC:~/test$ cat > file2 3ls3 ^C els3@els3PC:~/test$ cat file2 3ls3 els3@els3PC:~/test$ ls -l total 4 -rw-r--r-- 1 els3 els3 5 Jul 20 12:11 file2   this second example give us total 4 by creating a non empty file. the hole Q is how can i get for e.g total 1 or total 2 etc.. by creating a new file.

I have an empty directory. I am using following command to view the contents of that directory. ls -lart  The output I get is below. total 12 drwxr-xr-x 5 root  root  4096 Oct  2 12:26 .. drwxr-xr-x 2 apx   aim   4096 Nov 29 18:40 .  I don't have any files in this directory, then what counts out to 12 here (total 12)?


Let $a_n$ and $b_n$ be two positive sequences such that $$ b_n =\frac{a_1 + a_2 + ... + a_n} {n}  $$ Prove that $\lim_{n\to \infty} a_n = 0$ implies $\lim_{n\to \infty} b_n = 0$. Is the converse true?

Prove that if $\lim_{n \to \infty}z_{n}=A$ then:  $$\lim_{n \to \infty}\frac{z_{1}+z_{2}+\cdots + z_{n}}{n}=A$$ I was thinking spliting it in: $$(z_{1}+z_{2}+\cdots+z_{N-1})+(z_{N}+z_{N+1}+\cdots+z_{n})$$ where $N$ is value of $n$ for which $|A-z_{n}|<\epsilon$ then taking the limit of this sum devided by $n$ , and noting that the second sum is as close as you wish to $nA$ while the first is as close as you wish to $0$. Not sure if this helps....


Sarkhan the masterless +1 ability. It becomes a 4/4 dragon with flying. Can it attack that turn? Does it depend if the planeswalker was on the field already or just played?

Note: this is intended to be a canonical question about summoning sickness.  "Summoning sickness", broadly, is the rule that stops you from attacking or paying {T} costs with a creature that you just played. But how exactly does it work? How does it interact with other rules and effects?  For example, if I'm trying to figure out how a creature is affected:   Does the status matter (tapped/untapped, face down/face up, etc.)? What if it came into play, but I didn't cast it? What if it's a token? What if it was on the battlefield when my turn started, but it wasn't a creature? What if it stops being a creature? What if it's a creature and also another card type? What if it's a double-faced card that just transformed? What if it changes control? What if it's a copy of another creature? Which of the creature's activated abilities can I use? Are any of its other abilities affected? Can I tap the creature to pay a cost that is not a {T} cost?   (These examples are primarily taken from questions about summoning sickness that have already been asked on the site)


So rolling a d100, or percentile dice, you (typically) would roll 2d10, take one in the tens place and one in the ones place. Does this mean if I roll a 90 and a 0 (a 10) that I get 100? Does that not increase the chances of me getting a 100, since I could get it two different ways, or am I misunderstanding?   I believe I understand everything else about these dice. For instance, a 00 and a 0 are 100, a 30 and a 4 are 34, a 00 and 1-9 is 1-9, et cetera, but this one has me stumped.  Any feedback and help is appreciated!

I own 2 d10 dice with differently numbered sides (0 through 9, and 00 through 90), although the same applies for two identical 'regular' d10 dice.  How do I read the percentage value if I use both dice?  It's pretty straight-forward if I roll between 11 and 89, but outside this range it becomes slightly confusing:  50, 6 → 56%  8, 9 → 89% 00, 0 → 0% or 10% or 100%? 90, 0 → 90% or 100%? 10, 0 → 10% or 20%?   Note: if I roll with identical d10, I roll sequential, not simultaneous to avoid discussion if the 8 or 9 is the first digit.  I have a hunch that 0% isn't really a thing in most systems that use d100, so that eliminates 00, 0 → 0%.  So is it then true that on the first d10, the 00 counts as zero, but on the second d10, the 0 counts as ten?


In a few days' time, I will be going to Australia to further my studies. I have a laptop whose battery died a while back. It turns on with the power cord, but not with the battery. Is it a problem if I bring the laptop? I'm worried that they will ask me to turn the laptop on. My native country is Singapore btw.

I am traveling from the US to the UK and then to Portugal. Round trip. I have a laptop without a battery, so I am hesitant to bring it as carry-on in the plane because I had troubles already with a laptop not turning on through security.   Is there any problem with sending the laptop in the checked-in luggage? If they open my luggage and they find it, would that be a problem? Could they take it away?


I know there's a word for it and it probably is similar to oxymoron, but I can't put my finger on it. Edit - The sentences is generally characterised by having binary choices with no added information. i.e Things are either "A" or "not A"

There is a family of expressions called oxymorons which contain contradicting meanings. What about expressions that add little meaning like "fatally injured" or "the evening sunset"? What are these expressions called?


Here i have a template class:  template <class T,int N>  class A{    private:     T q;    public:     int show(); };   and i want to redefine func "show" different for class int, what do i do? in my thought it's like this:  template<int T,int N> int A<int,N>::show(){      return int(q/100); }   how should i do it right? There are alot of examples for only one template argument,but how i do define it for two or more?

The following code:  template <typename S, typename T> struct foo {    void bar(); };  template <typename T> void foo <int, T>::bar() { }   gives me the error  invalid use of incomplete type 'struct foo<int, T>' declaration of 'struct foo<int, T>'   (I'm using gcc.) Is my syntax for partial specialization wrong? Note that if I remove the second argument:  template <typename S> struct foo {    void bar(); };  template <> void foo <int>::bar() { }   then it compiles correctly.


So, supposedly Jon Snow is an heir to the Iron Throne because he is the son of a Targaryen prince. However, Gendry is the son of an actual king. So, is it better to be son of a prince, or the illegitimate son of a king?

This might be a duplicate or debatable. But as far as the releases of the books & TV series, who should rule Westeros as per the laws of that continent? Ignore the usurpers.  Is it Daenerys Targaryen or Jon Snow (Targaryen)?  If there are Targaryens alive, how can Baratheons be rightful rulers? If I'm not wrong the Baratheons are usurpers, right?


i saw a code where people used prototype keyword in javascript but i do not understand what is the importance of this keyword and when to use it.  here is some code related to javascript prototype  1st example  function Person(fn,ln) {     this.FirstName = fn;     this.LastName = ln; }  Person.prototype.GetFullName = function() {     return this.FirstName + ' ' + this.LastName; }  var p = new Person('jon','smith'); alert(p.GetFullName());    2nd example  function Person(fn,ln) {      this.FirstName = fn;     this.LastName = ln;     Person.prototype.GetFullName = function()     {         return this.FirstName + ' ' + this.LastName;     } }  var p = new Person('jon','smith'); alert(p.GetFullName());   1) just see the code what prototype keyword will do here?  2) also see two same code in 1st example prototype used outside of Person function and in second example prototype is wrapped in person function. looking for good explanation with more sample example to understand it properly . thanks

I'm not that into dynamic programming languages but I've written my fair share of JavaScript code. I never really got my head around this prototype-based programming, does any one know how this works? var obj = new Object(); obj.prototype.test = function() { alert('Hello?'); }; var obj2 = new obj(); obj2.test();  I remember a lot discussion I had with people a while back (I'm not exactly sure what I'm doing) but as I understand it, there's no concept of a class. It's just an object, and instances of those objects are clones of the original, right? But what is the exact purpose of this ".prototype" property in JavaScript? How does it relate to instantiating objects? Update: correct way var obj = new Object(); // not a functional object obj.prototype.test = function() { alert('Hello?'); }; // this is wrong!  function MyObject() {} // a first class functional object MyObject.prototype.test = function() { alert('OK'); } // OK  Also these  really helped a lot.


My HDD size was 1TB (dynamic) and there were already 4 partitions in it. One with the Windows C drive (450GB), another recovery (20GB), another with some tools from the laptop manufacturer (about 200MB) and another with my files in it (Drive T: 450GB).  So, I boot the CD, tried installing Ubuntu 13.10 and tried to partition my drive to dual-boot with Windows 7.   When I came to the point to select which partition I should split/create etc, I chose the one with my files (Drive T) and edited the size to about 350GB.   Then an error message came up saying that Parted cannot change dynamic disks and now when I open Windows the 100GB that were supposed to exist as unallocated size do not exist and partition T capacity has dropped to 365GB!!!  As you can see in the  , weird things happen in Windows, as the drive shows up with two different capacities in the disk management application. (Note: when I open my computer the disk shows up as 365GB)  Has anyone faced a similar problem? What should I do?

I've been trying to install 12.04 for a while now, I'm running on Windows 7 and I already made the partition (it's dynamic). I've tried booting from a disc and also the Windows installer. I haven't tried used any repair-boot programs or anything. Every time I tried to load from either, I get an error:  command=C:\windows\sysnative\bcdedit.exe /set {03f9077f-661f-11e1-845a-d08b36406c3d} device partition=U;  retval=1  stderr=An error has occured setting the element data. The request isn't supported  stdout=   Then after that, it makes a log file with information that I don't understand.  If it is simply due to the fact of it being a dynamic partition, someone please help. If it is more extensive, anyone with details on possible solutions or definite ones please express them.


For comment in  , Rizier123 mentioned the question poster @tim. But I received the notification in my inbox due to the fact that my display name has "tim" as prefix.  My understanding is that when there are multiple participants with the same username prefix specified in a comment, the current behavior is to notify the most recent one.   However, when there is indeed a participant whose username perfectly matches the specified name, matching the most recent one instead of the perfectly matched one is counter-intuitive. Could the current behavior be changed?

How do the comment replies (aka "pinging users") work?  Who can I send an @reply to? How do I respond to a specific user when entering my comment? Will they be notified? What do people mean when they talk about "pinging" another user?  Related:


Someone suggested I read the basic guide of mtg because I'm new to the game, so I was reading it and  it says:     If a spell or ability exiles a card, that card is put in a game area that's set apart from the rest of the game. The card will remain there forever, unless whatever put it there is able to bring it back. Exiled cards are normally face up. This zone is shared by both players.   So if you played a card like  and next turn you use rebound, spell happens, does it remain in exile or go to the graveyard?  (Also, not a question but a side note, all players share the same exile? Thats interesting I didn't know that till just now.)

There are a few cards that allow you to exile cards and then cast them later ( for example). After a spell cast this way resolves, does it go back into exile, or does it resolve normally including being placed in its owner's graveyard? (assuming nothing else effects where it would go after being cast)


I know it is because the electrons in hydrogen and helium absorb them however, they also drop back to ground state immediately and emit the previously absorbed photon. So there should be no net difference as absorbed photon gets emitted. Therefore the emission spectrum should not have missing lines. But they do. What am I missing?

I was looking at  on why  and emission lines don't cancel out:      An experiment shining light on the material and looking at the   reflected spectrum will see absorption lines at those frequencies,   because the relaxation of the excited electrons will emit back   radiation all around randomly, whereas the reflected spectrum is at a   specific angle.   However it is not totally convincing to me. The photons that get emitted towards the center of the Sun (by the electrons in higher energy states that absorbed a photon earlier) would get absorbed again when they hit a different electron (and then re-emitted) and would eventually make it out. So why don't absorption and emission lines cancel out in our Sun?


Someone who wins a game is a winner. Someone who loses a game is a loser.  Is there a word for someone who tied / ended a game in a draw?

If someone wins a match, that person is called a winner.  If someone loses a match, that person is called a loser or runner up.  But if the match is a draw, that is, no one has won or lost, what do you call them then?


Part of my research attracted some attention like:   Nature research highlights Monthly DOE (Department of Energy, USA) highlights Institute newsletter (Is also read by other labs) Editors suggestions on paper (like PRL)   My question is should I mention those in my CV or publications list or not at all, since the former three are not written by me but only about my work and as such not my work to claim.  Background: I'm drafting my CV for a young investigator grant. My overall resume is solid but nothing that keeps you awake at night. Especially empty are the two sections: received grants and won scientific awards.

Is it appropriate to include interviews (published online or in print magazines) in an academic CV?   What about articles/news published about your works? I mean brief (one paragraph) news that professional magazines publish about significant research articles.  If yes, how do you do this to avoid exaggeration?


I have the same question as  but for Blender 2.8 where you can not press N to display the View Properties. I would like to have a 3ds max view and change the viewports accordingly.

How do I change the TOP ortho view to BACK ortho view for my BACK image?   check out the pic I uploaded to see what I'm talking about.


From George Grätzer's Book; More Math Into LaTeX (5th edition) at the subsection 2.6 Your errors: Davey's Dos and Don'ts, it is mentioned that when you submit an article to a journal,   Don't use \left\{,  \right\}, \left(, \right), and so on, [...]. Even when \left and \right do not change the size of the symbol, they add extra space after the closing delimiter.   Why shouldn't we use these very useful commands?  Is there an alternative, except manually change the size?

For mathematics, is it ever disadvantageous to use \left(  and \right)  in equations?  I can't see any way that doing this would hinder the typesetting, so why isn't () just converted into \left( \right) automatically? This would save a lot of typing.  Cheers!


The following will produce 3 lines numbered (1), (2) and (3) on the right: \begin{align} x = 1\\ y = 1\\  z = x + y     \end{align}  while using \begin{align*} ... \end{align*} will produce the same lines without numbers. What if I want to produce the same three lines but with only the last one numbered, or only the first and second lines numbered, etc ?

I know that the align environment labels all the lines, while the align* environment labels none of the lines. Is there a way to have the align environment label only some of the lines?  For example, suppose I have something like this:  \begin{align} x+y  \\ x-y  \\ xy \end{align}   This labels all three lines. Is there a way to only label, say, the second line (x-y)?


I will be traveling from Bombay to Tbilisi with a halt at Dubai.  Now the arrival at Dubai is in terminal 1 by jet airways and departure is from terminal 2 by fly Dubai. The transit time is 7 hours and 30 minutes. Is there a shuttle service within the airport for which I will not require a transit visa or will I have to leave through immigration and then travel outside by road to terminal 2 for which I will require a visa. I'll be traveling with my Indian passport.  PS. I have spoken to jet airways and they said they will give my boarding pass for flydubai in Bombay itself, but they are not sure with the visa.

I am a Kazakh passport holder.   I'm travelling from Delhi via SpiceJet to Dubai, landing at Terminal 1 in the early morning. On the same day in the late evening I have a flight to Astana via flydubai from Terminal 2. I do not have a Dubai visa.  Can I transit from Terminal 1 to Terminal 2 without a visa?   I am asking because of many variations to this question. Some say a visa is necessary, others write its an internal transfer by bus not requiring visa. So, I am confused.


Like, in Windows, in Control Panel, we have Uninstall a Program option, is there anyway I can uninstall a program on Ubuntu? I have installed some programs previously, I do not remember the version and command line i wrote in terminal (because after that, I have used many commands) etc. I searched for a solution on web, and mostly I got an answer, to use Ubuntu software centers. But I do not see many of the softwares I had installed. (For eg. Android Studio, QT. etc) I wish to have a GUI where I can uninstall such programs. Is it possible?

What are the differences between apt-get, aptitude, and synaptic, and which one is the recommended choice for normal day-to-day package management?  This is a basic question, but I think it'd be good information to have on the site, and besides I am relatively new to Ubuntu so I could use an expert explanation.


When transforming the dependent variables, I know R^2 and related criterion is not suitable for model selection. Then which one should I use?

When transforming variables, do you have to use all of the same transformation? For example, can I pick and choose differently transformed variables, as in:   Let, $x_1,x_2,x_3$ be age, length of employment, length of residence, and income.  Y = B1*sqrt(x1) + B2*-1/(x2) + B3*log(x3)   Or, must you be consistent with your transforms and use all of the same? As in:   Y = B1*log(x1) + B2*log(x2) + B3*log(x3)    My understanding is that the goal of transformation is to address the problem of normality. Looking at histograms of each variable we can see that they present very different distributions, which would lead me to believe that the transformations required are different on a variable by variable basis.   ## R Code df <- read.spss(file="http://www.bertelsen.ca/R/logistic-regression.sav",                  use.value.labels=T, to.data.frame=T) hist(df[1:7])      Lastly, how valid is it to transform variables using $\log(x_n + 1)$ where $x_n$ has $0$ values? Does this transform need to be consistent across all variables or is it used adhoc even for those variables which do not include $0$'s?  ## R Code  plot(df[1:7])


How do i add a variable as the name of the variable i want to checks value. My code is as below, when i run this i get the error:  [: A_variable: integer expression expected   I think this is because when doing an if on a variable the proper syntax should be: if [ $A_variable -eq 1 ]; but i am not able to put the dolla sign in front of my variable because i am putting a different variable in the value of my variable.  Its almost like it should be: if [ $${letter}_variable or some mix of this but i dont know what?  array=("A" "B" "C")  A_variable=1 B_variable=2 for letter in "${array[@]}" do  if [ ${letter}_variable -eq 1 ]; then ...

I have two arrays:  arrayA=(1 2 3) arrayB=(a b c)   and I want to print out one of them using a command line argument, i.e., without any if else.  I tried a few variations on the syntax with no success. I am wanting to do something like this:  ARG="$1"  echo ${array${ARG}[@]}   but I get a "bad substitution" error. How can I achieve this?


I have a web app that uses external background images loaded in external CSS.  Right now, it is possible to use the app before the images have fully rendered, creating weird visual effects.  How can I halt script execution until the images are fully loaded?  It can use normal JavaScript or jQuery.  Because the images are loaded in external CSS the normal triggers I have read about don't work.

In jQuery when you do this:  $(function() {    alert("DOM is loaded, but images not necessarily all loaded"); });   It waits for the DOM to load and executes your code. If all the images are not loaded then it still executes the code. This is obviously what we want if we're initializing any DOM stuff such as showing or hiding elements or attaching events.  Let's say though that I want some animation and I don't want it running until all the images are loaded. Is there an official way in jQuery to do this?  The best way I have is to use <body onload="finished()">, but I don't really want to do that unless I have to.  Note: There is a  in Internet Explorer which actually does wait for all images to load before executing code inside $function() { }. So if you're using that platform you'll get the behavior I'm looking for instead of the correct behavior described above.


I have a project requirement to use open protocol RFID tags to control doors handling of a light rail train (also called a tram in Europe). The application must sync and control 2 different doors: one at the train (normal train door opened by driver´s control) and other at the station, also called the platform door. Something as seen in    The idea is, once the train stops at the correct position, when the train drivers commands the train doors to open, the platform door opens in sync. Once tha train driver commands the door to close, the platform door closes also in sync.  To do it, I´m looking for a Gen2 RFID Tag that is externally controlled by a switch or a power connection.  The idea behind the application is:  An RFID once in front of its pair antenna sends its data (code).  To sync doors, it need to "TURN ON" and "TURN OFF" the RFID reading by an external command to the tag. As the control is in the train, where the tag is located, then I need to control the TAG code transmission.  If I use a normal RFID in this application once the train approaches is position the RFID code is sent, the antenna captures it and command the platform doors to be open.   What I need is to sync the moment when the RFID code is sent with  the train door command, so that when the train stops no code is sent (the tag is "off") and when the door is commanded to open it "turns on" the RFID that sends its code that will be interpreted and command the platform door to get opened.  RFID usage is a requirement, not an option.   Advices welcomed.

its been a few years since i've done any electronics but have been asked to research the viability of an idea and have gotten stuck...  We want to transmit a timing signal from RFID readers which will be picked up by tags and used to control a simple switching of an led. The led will be on a powered circuit, and will fade over a few seconds, but essentially will be turned on when the reader emits the pulse.   I suppose this could be done with a standard RF circuit, but on some of the readers the communication will have to be 2-way (recognising a tag is within range and acting accordingly)  The reading/writing of data to the tags is not necessary at all.  Is it possible to use an RFID tag which can be used as a switch for the LED control circuit?  Would there be a better tech to use for this?  Thanks Sean


According to :     In physics, escape velocity is the minimum speed needed for an object to escape from the gravitational influence of a massive body.   But, say, I have a spaceship in low Earth orbit, from which hang a long rope. If its is strong enough, using it, one can climb from the ground up to the spaceship at any speed, 1 m/s for example, which is much slower than the first cosmic velocity.  Thus, an object can "escape from the gravitational influence of a massive body" at a speed lower than its escape velocity, as long as there is a rope or something similar, so technically speaking, escape velocity is the not minimum speed required to escape. Am I right?  If I'm right, this also means we can shoot a sensor into the event horizon of a blackhole, and then pull it back after data are collected, if we can find a really strong rope. Sounds cool.

No long explanation is needed,  What would happen if I were to allow one end of a rope to fall past the event horizon of a black hole while I held the other end?  Would I be able to pull it out? Would the rope feel extremely (infinitely?) heavy?


I would really like to know if there are any methods or applications which can show me which functions are referencing which functions. So say I would like to see from where a function change_state() is called/referenced, I get something like:                    /--app_init()<--main()                   | change_state() <--|                   |                   \--afile.c |<--trigger()                    /  line 100|                    |  line 156|                   |                   \--bfile.c|                      line 26|<--|--button_event()<--process_event()                      line 30|   |                                 \--move_event()    EDIT: I am using the Keil compiler in Windows 7.

I have a large work space which has many source files of C code. Although I can see the functions called from a function in MS VS2005 using the Object browser, and in MSVC 6.0 also, this only shows functions called from a particular function in a non-graphical kind of display. Additionally, it does not show the function called starting from say main(), and then the functions called from it, and so on, deeper inside to the leaf level function.  I need a tool which will give me a function call graph pictorially with functions callee and caller connected by arrows or something like that, starting from main() to the last level of function, or at least showing a call graph of all functions in one C source file pictorially. It would be great if I could print this graph.  Any good tools to do that (need not be free tools)?


I installed Ubuntu 14.04 LTS on a partition of an external disk drive connected to my HP 400-224 PC.  The Ubuntu boot partition is sdb.  EFI mode is enabled for both Ubuntu and Windows 8.1.  Secure boot is enabled; fast boot is disabled; legacy boot is disabled.  When I boot Ubuntu and restart within Ubuntu, grub-efi lets me choose whether I want Ubuntu or Windows.  However, if I go back to Windows and restart, Windows always changes my boot order, placing ubuntu last in the list.  I always have to manually modify my UEFI settings and place Ubuntu ahead of Windows if I want to go back to Ubuntu.  This seems like too much work.  Is there any way to keep Windows from doing this?

I have a Sony VAIO S series with Windows 8 preinstalled, and I installed Ubuntu 12.10 on a new partition. When the PC boots Grub is display, and I can choose between Windows 8 (didn't worked at the beginning, had to change Grub settings) and Ubuntu 12.10. When I select Ubuntu 12.10 everything is OK, but when I use Windows 8, and I restart Grub isn't displayed anymore (Windows 8 boots immediately).  I booted a Ubuntu 12.10 LiveUSB, used efibootmgr, and found out that Windows 8 (each time it boots) changes EFI default bootloader from Grub to Windows Boot Manager.  How do I change this in Windows 8? I read something about bcdedit, but it does not work or I don't know how to use it...