I have lmp_fedora executable file located in /src. I use this command:   mpirun -np 4 lmp_fedora < in.stdinfile   to execute the job. However it is only able to run if I copy lmp_fedora into the same directory where I am launching the job. I compiled a alias:  echo 'alias lmp_fedora=/home/MyUSERNAME/liggghts/src/lmp_fedora' >> ~/.bashrc   and my motive is to be able to execute lmp_fedora from any directory. Is the above correct? and if yes, now I am stuck on what should my new job submit command be for that to happen.

I'd like to know if there is a way to run  program/shell script without typing full path:  /opt/idea/bin/idea.sh


I have seen a few answers to this question in this site, one of them deals with a very special case, while the other one only one side of the problem is proved, so I wanted a better answer and asked this question.  Let $f$ be a bilinear form on a finite dimensional vector space $V$ over some field $\mathbb F$. I was trying to prove that $f$ can be expressed as a product of two linear functionals i.e. $$f(u,v) = L_{1}(u) L_{2}(v) \text{for} L_{1},L_{2} \in V^*$$ if and only if $f$ has rank $1$.  I just know the definitions. If someone suggests an answer it will be very much helpful.

Let $f: V \rightarrow F$ a bilinear form such that $f \ne  0$. Prove that $f$ can be presented as a product of two linear forms $f(X,Y) = \left(\sum\limits_i^nb_ix_i \right)\ast \left(\sum\limits_j^nc_jy_j\right)$ if and only if $rank(f)=1$   I saw this question and it's answer:   But the answer seems to ignore the fact that $rank(f)$ must be $1$. I don't know how to use that fact to solve this.  Thanks in advance


I'm new to vim-latex and to tikz. I'm trying to create a FSM using tikz library as explained . I used the same lated code   \documentclass[a4paper]{article} \usepackage{tikz} \usetikzlibrary{calc,positioning,shapes,shadows,arrows,fit} \begin{document} %hello world! %in the document \begin{tikzpicture} \node(pseudo) at (-1,0){}; \node(0) at (0,0)[shape=circle,draw]        {$q_0$}; \node(1) at (2,0)[shape=circle,draw]        {$q_1$}; \node(2) at (4,0)[shape=circle,draw]        {$q_2$}; \node(3) at (6,0)[shape=circle,draw,double] {$q_f$}; \path [->]   (0)      edge                 node [above]  {b}     (1)   (1)      edge                 node [above]  {a}     (2)   (2)      edge                 node [above]  {b}     (3)   (2)      edge [bend left=30]  node [below]  {a}     (0)   (0)      edge [loop above]    node [above]  {a}     ()   (1)      edge [loop above]    node [above]  {b}     ()   (3)      edge [loop above]    node [above]  {a,b}   ()   (pseudo) edge                                       (0); \end{tikzpicture} \end{document}   When I paste this code in Texmaker, it generates the right FSM as described in the link above. But when I paste it in vim (vim-latex installed following ), it just generate a pdf file that has some letters over each other in the middle of the page.  Could someone please tell me what is the problem? Thanks

Using vim with latex suite on two different computers, on one it's fine, but on the other my tikz pictures ''colapses'' (all text is put to the center of the figure, nothing is drawn) The same pc can compile fine from texstudio, but not from vim- latex suite  Edit: Seems the problem was compiling to dvi instead of pdf


I get data from a sensor in int type but the data range from 0 to 999. I need a simple way for the var to always be the same length. Like if I get 123 I don't need to change it but if it's 43 I need it to be 043. Is there a simple way to do that?  Thanks.

I'm trying to find a good way to print leading 0, such as 01001 for a . While the number would be stored as 1001, what is a good way to do it? I thought of using either case statements or if to figure out how many digits the number is and then convert it to an char array with extra 0's for printing, but I can't help but think there may be a way to do this with the printf format syntax that is eluding me.


I've been searching this site over and over to find a solution to my problem, but I can't find it and what I've found does not seem to work.  My problem is as follows: I'm trying to cite APA style in my ShareLaTeX file, but whenever I type \cite{} and select one of the proposed writers from my .bib file, an error occurs. The citation appears in bold, and the error is:   Citation 'Slagter2012' on page 1 undefined on input line 24.: You have cited something which is not included in your bibliography. Make sure that the citation (\cite{...}) has a corresponding key in your bibliography, and that both are spelled the same way.   Now I've checked this over and over and it seems all the same to me. Is here something wrong in my file?  \documentclass{article}     \usepackage[utf8]{inputenc}     \usepackage[affil-it]{authblk}     \usepackage[american]{babel}     \usepackage{csquotes}     \usepackage[style=apa]{biblatex}     \DeclareLanguageMapping{american}{american-apa} \addbibresource{article.bib}     \title{MyArticle}     \author{MyName}     \date{Dated: \today}     \affil{University of Amsterdam}     \begin{document}     \maketitle     \section{Introduction}     This is the introduction.\cite{Slagter2012}     \printbibliography \end{document}   This is my .bib file  @article{Slagter2012, author = {Slagter, Heleen A. and Tomer, Rachel and Christian, Bradley T.      and Fox, Andrew S. and Colzato, Lorenza S. and King, Carlye R.      and Murali, Dhanabalan and Davidson, Richard J.}, isbn = {1530-8898 (Electronic)$\backslash$n0898-929X (Linking)}, issn = {0898-929X}, journal = {Journal of Cognitive Neuroscience}, number = {9}, pages = {1932--1940}, pmid = {22663253}, title = {{PET Evidence for a Role for Striatal Dopamine in the      Attentional Blink: Functional Implications}}, volume = {24}, year = {2012} }   And this is the output    What am I doing wrong?  NOTE I am completely new to this, be as clear as possible otherwise I will not understand ;)

Running the minimal example  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib} @ARTICLE{example,   author  = {Other, Anthony Norman},   title   = {Some things I did},   year    = {2014},   journal = {J.~Irrep. Res.},   volume  = {1},   number  = {1},   pages   = {1-10} } \end{filecontents*} \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib} \begin{document} Hello\cite{example}. \printbibliography \end{document}   I get the warning There were undefined references.  I have read  and know that I need to run:   LaTeX Biber LaTeX   However, my editor is only set up to run BibTeX. How do I go about setting up my editor/IDE to be able to run Biber, and how do I run the LaTeX/Biber/LaTeX cycle?  Answers (sorted alphabetically by editor name)                    Answer guidelines   Each answer should be for one editor. If the editor is cross-platform, if possible give a single answer with notes covering the minor platform variations. Please edit the question to include new answers in the 'link list' Each answer should be 'stand alone', i.e. don't say 'It's almost the same as editor Y but ...' for the editor part Instructions for 'build tools' such as arara or latexmk are welcome but should explain how to set up the editor in question as not all editors allow simple addition of arbitrary tools


Lagrangian formalism is a technique using which we can obtain the time evolution of a dynamical system. Given a dynamical system, can we say whether or not we can write down a Lagrangian (solving it is another thing) i.e. can we say that a given dynamical system is in the realm of lagrangian dynamics (or is it invalid to ask such a question)?

It is an usual practice that any quantum field theory starts with a suitable Lagrangian density. It has been proved enormously successful. I understand, it automatically ensures valuable symmetries of physics to be preserved. But nevertheless the question about the generality of this approach keeps coming to my mind. My question is how one can be sure that this approach has to be always right and fruitful. Isn't it possible, at least from the mathematical point of view that a future theory of physics does not subscribe to this approach?


Sometimes I am thinking if I encounter a Dragonite or Lapras, will it turn into a Ditto?  It is requiring the possibility to catch dittos from rare Pokémon.  Hope no Dittos from those rare Pokémon.

Ditto has now been released in the latest patch, and I would like to catch one.  What are the conditions to capture a Ditto? Does it show up on the nearby tracker? Or will it transform into something?


Can you help me with that:     Why is $\int_{-\infty}^\infty |\text{sinc}(t)|\ dt=\infty$ ?   I saw this in Signal Processing course and I can’t understand why this is true.  Reference:   Didn’t find any relevant material unfortunately.

In  wikipedia article for improper integrals,  $$ \int_0^{\infty}\frac{\sin x}{x}dx $$ is given as an example for the integrals that have an improper Riemann integral but do not have a (proper) Lebesgue integral. Here are my questions:   Why does this one have an improper Riemann integral? (I don't see why $\int_0^a\frac{\sin x}{x}dx$ and $\int_a^{\infty}\frac{\sin x}{x}dx$ converge.) Why doesn't this integral have a Lebesgue integral? Is it because that $\frac{\sin x}{x}$ is unbounded on $(0,\infty)$ and Lebesgue integral doesn't deal with unbounded functions?


For example i have a list: ArrayList<Observer> arrlist = new ArrayList<Observer>();  The list contains the observer objects but i want to know the frequency of objects that have the same value for example String name     public class  Observer{     private String name; }  How do i do that?

I have an ArrayList, a Collection class of Java, as follows:  ArrayList<String> animals = new ArrayList<String>(); animals.add("bat"); animals.add("owl"); animals.add("bat"); animals.add("bat");   As you can see, the animals ArrayList consists of 3 bat elements and one owl element. I was wondering if there is any API in the Collection framework that returns the number of bat occurrences or if there is another way to determine the number of occurrences.  I found that Google's Collection Multiset does have an API that returns the total number of occurrences of an element. But that is compatible only with JDK 1.5. Our product is currently in JDK 1.6, so I cannot use it.


How many irreducible polynomials in $Z_2[x]$ of degree $3$?   I have discussed this with my friend before and we found that $x^3 + x^2 + 1$ and $x^3+x+1$ are the two said polynomials which irreducible. We got this the approachment that polynomials $p(x) = ax^3+bx^2+cx+d$ must satisfy $a\ne 0$ and later $d \neq 0$ and here we only need to take some cases of the value of $b$ and $c$.  Do you have idea to solve this problem clearly without guessing?  I am afraid that there will be a new problem asking for polynomials whose degree is higher than this one and here I will be stuck.

Two part question:  1) There are three irreducible cubic polynomials $\mathbb F_2$  Aproach: Bruteforce, there are not as much cubic polynomials, just 8 of them:  $x^3$  $x^3+1$  $x^3+x$  $x^3+x+1$  $x^3+x^2$  $x^3+x^2+1$  $x^3+x^2+x$  $x^3+x^2+x+1$  Only three of them are irreducible(??): $x^3+1$,$x^3+x+1$ and $x^3+x^2+1$  Reality check - do i miss point of irreducible polynomial here, and should consider adding $x^3+x^2+x+1$ to irreducible list? It is reducible, bit different way then other polynomials: $x^3+x^2+x+1=(x+1)^3$  2) Only irreducible polynomial of degree 2 over $\mathbb F_2$ is $x^2+x+1$. Does it help, with conjuction of part 1, to find all irreducible polynomials of degree 5?


Let me write down some difference between them as I know   Modules can't be instantiated, whereas classes can be Multiple modules can be included / extended, whereas only one class can be inherited   Aside from the above mentioned two, I don't see any other differences between them   Both can have class level variables (@@) Both can have class-instance level variables (@, initialized directly in the module/class) Both can have instance variables (@, initialized inside the methods) Both can have global variables ($) Both can have methods that can be directly called using their names (prefixed with "self") Both can have inner classes A class that includes and extends a module has access to all its methods (non-private) which is the same as inheriting from a class does for the subclass   Leaving the multiple inheritance out, is the only difference between classes and modules are that of creating objects?  (I don't have a lot of experience in Ruby, just trying to get my head around the difference between classes and modules. Please feel free to point out anything that I might have missed)

I came from Java, and now I am working more with Ruby.   One language feature I am not familiar with is the module. I am wondering what exactly is a module and when do you use one, and why use a module over a class?


I am trying to understand what gradient one-form means actually. In the book that I'm following (A first course on General Relativity by Schutz) it's told that gradient is a one-form and it's association with the "gradient vector" is a one-to-one map through the metric tensor (Lorentz metric in the book). I am having trouble understanding what the components of the gradient one-form $ \tilde d \phi$ (of some scalar field $\phi$) $\{\frac {\partial \phi}{\partial x^\alpha}\}$ stand for. What meaning do these component values just by themselves hold at a point {$x^\alpha$}, given that the rate of change of $\phi$ depends on the direction we take. Is it the case that, only when $ \tilde d \phi$ is supplied with a "unit" vector it gets a physical meaning, "the rate of change of $\phi$ in that direction"?

I am reading Sean Carrol's book on General Relativity, and I just finished reading the proof that the gradient is a covariant vector or a one-form, but I am having a difficult time visualizing this. I usually visualize gradients as vector fields while I visualize one-forms with level sets. How to visualize the gradient as a one-form?


I have below program snippet.  public class MapKeyAsAnObject {      public static void main(String[] args) {          Employee e1 = new Employee(1, "abc"); // P         Employee e2 = new Employee(2, "xyz");         Map<Employee, String> map = new HashMap<Employee, String>();         map.put(e1, "Object1");         map.put(e2, "Object2");          System.out.println(map.get(e1)); // A         System.out.println(map.get(new Employee(1, "abc"))); //B     } }  // My pojo class class Employee {      private int id;     private String name;      public Employee(int id, String arg) {         this.id = id;         this.name = arg;     }             }      In Above program, statement 'A' returns "Value1" which is fine because   i pass the same reference to get the value but in statement 'B' which   returns null but i want to get "Value1" Because both Employee class in statement 'P' and 'B' having same employee data which i want to prevent to store as well as want to return the reference of e1 in statement 'B' .what should be done to achieve the goal.

What issues / pitfalls must be considered when overriding equals and hashCode?


Let $(X,\|\cdot\|_{1})$ and $(X,\|\cdot\|_{2})$ be complete normed vector spaces and $\|x\|_{1}\le\|x\|_{2}$ $\forall x\in X$. I want to prove that $\exists M>0$ such that $\|x\|_{2}\le M\|x\|_{1}$.  We know that any Cauchy sequence $(x_{n})_{n\in\mathbb{N}}\subset X$ converges. And of course, $\frac{1}{M}\|x\|_{1}\le\|x\|_{1}\le M\|x\|_{1}$.  Does anyone have any hints on how I can proceed? I assume that I have to use this completeness property somehow.

Suppose $ X $ is a Banach space with respect to two different norms, $ \|\cdot\|_1 \mathrm{ e } \|\cdot\|_2 $. Suppose there is a constant $ K > 0 $  such that $$ \forall  x \in X, \|x\|_1 \leq K\|x\|_2 .$$ show then that these two norms are equivalent


The title says it all. When I try to place the reputation widget on my home screen, I get this:  When I try again, I get this error, presumably because the Stack Exchange service has stopped.  Is this a bug? If so, where should I report it?  I am running Android 5.1 armeabi on a DigiLand DL718M tablet.

The Android widget on my  is always saying:     please login before using this widget   Here is a screenshot of this happening(sorry for the ugly style, I am not a great designer). I used blue rectangles to hide private/irrelevant information. I am trying to place the 2x1 widget in the 2x1 empty slot in the top right:    I have tried logging out and logging back in to the app, but still the problem persists.  This happened recently (in the past two months).


I need a way to turn the following image into a vector in Adobe Illustrator, I have tried image trace but it never seems to do the job well enough.

I have a raster image, basically a scanned drawing of the outlines (and some detail) of various objects, and I wish to convert these lines to vectors, using either Illustrator or Inkscape.  My present solution is to have the raster image as a background layer, and in a new layer above it I use the pen to follow the lines as close as possible.  Later I tweak these lines to fit the raster image better. That has worked fine for simple drawings. However for some of my extremely complex drawings, this is very tedious to do.  Is there any tool or filter of some sort that is capable of recognizing the lines in line drawings and creating vector paths from them?


I used the following in Home  $ sudo apt install python-pip   the output was the following  Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  python-pip : Depends: python:any (< 2.8)               Depends: python:any (>= 2.7.5-5~)               Recommends: python-all-dev (>= 2.6) but it is not going to be installed               Recommends: python-setuptools but it is not going to be installed               Recommends: python-wheel but it is not going to be installed E: Unable to correct problems, you have held broken packages.   I already tried the following without sucess  sudo apt-get clean   no special output but didn't fix the problem   sudo apt-get autoclean   no special output but didn't fix the problem   sudo apt-get -f install after sudo dpkg --configure -a and then sudo apt-get -f install  output was : 0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.  sudo apt-get -u dist-upgrade and then sudo apt-get -o Debug::pkgProblemResolver=yes dist-upgrade  which gave the output :  0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   The aforementioned were some of the solutions proposed here   Thanx!! :)

After upgrading from 10.04 to 12.04 I am trying to install different packages.  For instance ia32-libs and skype (4.0).  When trying to install these, I am getting the 'Unable to correct problems, you have held broken packages' error message.   Output of commands:  sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.   After running this:  sudo dpkg --configure -a foo@foo:~$ sudo apt-get install -f Reading package lists... Done Building dependency tree        Reading state information... Done 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.


I have a some data set on which I fit a linear regression model using the lm function in R. I can also visually obtain the prediction Interval around that regression line using predict. My question is how is that prediction interval line computed?? Can I obtain the equation of that line in R?

If the best linear approximation (using least squares) of my data points is the line $y=mx+b$, how can I calculate the approximation error? If I compute standard deviation of differences between observations and predictions $e_i=real(x_i)-(mx_i+b)$, can I later say that a real (but not observed) value $y_r=real(x_0)$ belongs to the interval $[y_p-\sigma, y_p+\sigma]$ ($y_p=mx_0+b$) with probability ~68%, assuming normal distribution?  To clarify:  I made observations regarding a function $f(x)$ by evaluating it a some points $x_i$. I fit these observations to a line $l(x)=mx+b$. For $x_0$ that I did not observe, I'd like to know how big can $f(x_0)-l(x_0)$  be. Using the method above, is it correct to say that $f(x_0) \in [l(x_0)-\sigma, l(x_0)+\sigma]$ with prob. ~68%?


I have a dual-boot laptop with both Windows 10 and Ubuntu 16.04.  Currently, the Windows side has too much disk space, and I want to resize things so that the Ubuntu side has more.  Here are my partitions:    Any clue for expanding sda7 with unallocated space?  Any help gratefully received.

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


We had this problem in exam  class  yesterday on Combinatoric  and it was supposed to be the new year gift from our teacher. The exercise was entitled A Gift Problem for the Year 2018      Problem:      The numbers  $1,\frac{1}{2},\frac{1}{3},\frac{1}{4},\cdots,\frac{1}{2018} $ are written on the blackboards. John chooses any two numbers say $x$ and $y$ erases them and writes the number $x+y+xy$.   He continues to do so until there is only one number left on the board.   What are the possible value of the final number?   I understood the problem as follows for instance if John take $x=1$ and $y=\frac{1}{2}$ then $x+y+xy =2$ and the new list becomes $$2,\frac{1}{3},\frac{1}{4},\cdots,\frac{1}{2018} $$   continuing like this and so on.....  Please bear with me  that I do not want to propose my solution since I fell like it was wrong and I don't want to fail the exam before the result get out. but by the way I found, $2017$, $2018$ and $2019$ but I am still suspicious.   You may help is you have an idea.

I wanted to know, let the numbers $1,\frac12,\frac13,\dots,\frac1{1000}$ be written on a blackboard. One may delete two arbitrary numbers $a$ and $b$ and write $a+b+ab$ instead. After $999$ such operations only one number is left. What is this final number.  I tried, let $*$ be an operation $a*b = (1+a)(1+b) - 1$, and $(a*b)*c = (1+a)(1+b)(1+c) -1$. by induction we can show that for $N$ such no.s we have $(1+a)(1+b)(1+c)\dots(1+d) - 1$, where $n\{a,b,c,\dots,d\} = N$. In the question we have numbers $1,\frac12,\frac13,\dots,\frac1{1000}$. plugging in we get the final number $1000$, but the answer given is $100$.  What am i doing wrong?  Any help appreciated.  Thanks.


Is there a word or idiom to describe someone who is always trying to create a good impression when talking about himself? Someone who is always trying to show that he is better than others even if he is not.  For example, when you talk to someone about a trip to an amazing place and then the person you are chatting with says that he went on a better trip than yours, that you bought a great car but this person's is better... and so on.

I am looking for idioms or informal/slang/colloquial expression for some people that make you think that they are able of building a skyscraper, constructing a spaceship, playing the piano better than Mozart or something very fancy that requires remarkable skills, but when it comes to practice they prove to be completely inadequate.


I have a quick question regarding a scene I'm working on. I have no idea if it's impossible or the easiest thing in the world, but if you want to take a look at the image I attached, I attached a transparent image onto a mesh with an existing node setting to make it appear plastic. I was wondering if there is anything I could do to make the text appear glittering like gold. Any advice?  Here is the blend file to those who asked.   Much appreciated.

I have a problem with setting up a mixed material for a bottle label I need.  The label will need some different surfaces; - Diffuse (the base paper) preferably with a normal map for adding the paper feel to it. - Glossy (the golden text and details), preferably with a normal map for adding a bevelled feeling.  I have all parts isolated in different PNGs/TIFFs.  Now, is it possible or even a good idea to set this up in the same material? Or should I go for different materials on the same object (and if so, please guide me)?      Very nice results with your setup @bstnhnsl! I think it produces exactly what I need. (sorry for answering my own question, but I didn't know how to post an image sample otherwise).    One question, though: You mentioned that one can use an unlimited amount of material this way, and I've tried but I don't think I get it; should I use one more Mix shader to add for instance one more texture image?


I want to change my mouse pointer to an custom cursor in my application.  So when my application starts, i want the custom cursor, and when it stops i want it gone.  How to do this in c# behind the code in wpf?

I want to use an image or icon as a custom cursor in WPF app. What's the best way to do it?


Does the  spell work through a ? Or is it blocked by Full Cover, even if the target can be seen?  This question is similar , but contrarily to Gaze effects the spell Eyebite obeys the following rule regarding spell casting:     To target something, you must have a clear path to it, so it can’t be behind total cover.

The spell description of  is silent on the question of whether spell effects can pass through the wall.  The semi-relevant part of the description states:     Nothing can physically pass through the wall.  It is immune to all damage and can't be dispelled by dispel magic.  A disintegrate spell destroys the wall instantly, however.  The wall also extends into the Ethereal Plane, blocking ethereal travel through the wall.   How are folks ruling on the question of spells passing through the wall (in both directions)?  If the answer is that spells cannot pass through the wall, do you rule that it also blocks line of effect (so that you can't target a spell on the other side)?


I'm currently working on my thesis, more specifically I'm analyzing some data collected from researchers about the project's they're working on.  In the end, I have performed a multiple linear regression to verify which determinants (budget, team size,...) significantly influence the external impact of a research project. While the dependent variable (project impact) has been assessed from a survey (conducted among the institute's researchers), the independent variables are based on objective measures.  In such a scenario, what would be an acceptable r-square percentage? Could a low percentage be justified by the "subjectiveness" of the dependent variable? I've heard that the scientific area matters... i.e. in physics you rather need to have a r-square > 95% while in sociology > 5% might be already interesting...  Do you have any references about this?

I've fitted my model and am trying to understand whether it's any good. I've calculated the recommended metrics to assess it ($R^2$/ AUC / accuracy / prediction error / etc) but do not know how to interpret them. In short, how do I tell if my model is any good based on the metric? Is an $R^2$ of 0.6 (for example) sufficient to let me proceed to draw inferences or base scientific/business decisions?     This question is intentionally broad, to cover a wide variety of situations that members frequently encounter; such questions could be closed as duplicates of this one. Edits to broaden the scope beyond the metrics mentioned here are welcome, as are additional answers - particularly those that offer insight about other classes of metrics.


In first and second hyperoperations (addition and multiplication), order of two operands doesn't matter, result is same. However, it doesn't work on exponentiation. Why it does matter in exponentiation, i mean, if we try to create a law that says : "Order of operands of hyperoperations doesn't change the result", why it gets broken after exponentiation?  Or, if orders actually matters in the nature of hyperoperations, then why addition and multiplication behaves in a way that their order don't differ the result?

Considering Peano axioms we'll define addition, multiplication and exponentiation operations.  We can then prove that addition and multiplication operations are commutative and associative. The proof for addition operation is pretty straightforward but for for multiplication it a bit more difficult. For example, to prove associativity, we have to prove distributivity first.  Moreover, for the definition itself it is not obvious that commutativity should take place, because the definition is not symmetric.  $a \cdot 0 := 0$  $a \cdot S(b) := a \cdot b + a$  Here $S(b)$ is the "next" function from Peano axioms  This definition is not symmetric with respect to $a$ and $b$, so commutivity is not obvious.  For exponentiation operation neither commutivity nor associativity take place. And I am very curious about the logical explanation why that happens  NOTE: The explanation I am looking for is somehow similar to a Abel–Ruffini theorem which explains WHY there is no an algebraic solution for a general polynomial equation


If I create an array of objects and I want to print the array is possible to give him a String value as representation in the array?  Example:  If I create a 2D array [7][7] and I put an object called Car in position [1][5] when I print the array is possible to give a String value of "Toyota" in the array? I want that the object appear in the array as a Toyota

In Java, arrays don't override toString(), so if you try to print one directly, you get the className + '@' + the hex of the  of the array, as defined by Object.toString():  int[] intArray = new int[] {1, 2, 3, 4, 5}; System.out.println(intArray);     // prints something like '[I@3343c8b3'   But usually, we'd actually want something more like [1, 2, 3, 4, 5]. What's the simplest way of doing that? Here are some example inputs and outputs:  // Array of primitives: int[] intArray = new int[] {1, 2, 3, 4, 5}; //output: [1, 2, 3, 4, 5]  // Array of object references: String[] strArray = new String[] {"John", "Mary", "Bob"}; //output: [John, Mary, Bob]


We are new to Linux. We have a small charter school customer that is struggling with a lab solution and Ubuntu seems to be a good choice with a server and thin clients. I bought a used server and 5 Dell thin clients to put up a lab and test. I also downloaded Ubuntu server. Just need to know if I'm headed in the right direction and if anyone has any tips or ideas. All the students need is internet access(Maybe Chrome) and basic office programs. The immediate need is to get 15 up and going but the long range plan is for about 90. Please help!!  Jay

Upgrading my Ubuntu 14.04 LTS to 16.04 then 18.04 LTS left LTSP unable to boot clients. I am using the traditional 2 NIC structure on 1404, with thin clients on a physically separate subnet, and their system in chroot. It uses isc-dhcp-server and tftpd-hpa.  Trying to debug my upgraded system (including switching to dnsmasq) I came across bugs which only seem to be fixed in versions of packages later than those in the bionic repos, with no backports, so I gave up on the upgrade route.  So is there a currently reliable way of installing LTSP on 1804?


I am photographing mountains 50 miles away. If I want predict cloud cover — I'm looking for low clouds for sunrise — which location should I choose?  Should I choose where I am standing, or the cloud cover forecast for the mountains 50 miles away?

In order to have better planning for my landscape photography, I'd like to better understand weather forecasting data.  I already know some things like:   A cloud coverage between 30 and 70% is the ideal High clouds are what makes the sky red   In many photography blogs, I read that people use satellite and radar data in order to get even more information, but I don't know how to interpret them. I know is they should help understanding how clouds are moving in the sky, so basically understanding if the sun is going to be covered or not, but still I can't manage it.


I have the following C# Code  public class MeasurementData {     #region Public Properties      public int ADC { get; set; }     public double Latitude { get; set; }     public double Longitude { get; set; }     public int SensorID { get; set; }     public DateTime Day { get;set; }     public int CO2 { get; set; }      #endregion }   and the code looks with minted like this:     This is very very close to perfect. Except that DateTime is not colored. I know that minted can't be able to know what this is, because it does not know my code. Minted does only know a snipped. But i'd like to color it myself with telling minted how to color this Word(s). is there an option? It would be great when i could say that this are my classes:  define classes {DateTime, MyClass, ... }   and then this classes are color in bright blue or sth. The color is not that important. i think i am able to figure the coloring out myself.  Haven't found something on the net :(

I have defined several structures and types in a C++ project. I have to write some documentation for this code, and I use  to typeset my code.   I would like to be able to add some keywords to the minted database, so minted will also recognize these and give them the appropriate color. (I would like to have them colored in the same way a type, eg. double would be colored.)


I defrosted a package of unopened sealed ribs outside for an hour and a half because I was short on time. I did not think it would be a problem, but after reading all the different posts, I am a little concerned. The package was sealed, so are they okay to eat? i rinised them and salted them and they are in the oven...

I generally defrost meat on the kitchen counter. A friend of mine suggested that this was dangerous and suggested that I defrost meat in the refrigerator. I am no biologist but it seems to me that as long as the meat doesn't get warm defrosting it on the counter should be safe.  Generally, I remove the frozen items from the freezer and place them on a plate on the counter in the packaging they were frozen in. When they are mostly / completely thawed I place the meat in the refrigerator.  Am I wrong and should I be defrosting in the refrigerator?


$a_1=1, a_2=8$ and $a_n=a_{n-1} +2a_{n-2}$ for $n\ge3$  Prove that   $$a_n =3\cdot2^{n-1} +2(-1)^n$$ for $n\in N$  Base Case: n=1   $a_1= 3\cdot2^0+2(-1)^1, a_1 =1$, the base case holds true  I.H: Suppose its true for $$a_k =3\cdot2^{k-1} +2(-1)^k$$  How do i proceed for induction step, am i suppose to use $a_n=a_{n-1} +2a_{n-2}$ in the induction step?

I would appreciate a little help in finalizing a proof for the following:  Let $a_n$ be the sequence defined as $a_1 = 1$, $a_2 = 8$, and $a_n = a_{n-1} + 2*a_{n-2}$ when $n \geq 3$. Prove that $a_n = 3*2^{n-1} + 2(-1)^n$.  I decided to use strong induction and show that if the statement is true for $1,...,n$ , then it is true for $n+1$ (going off the fact that the statement is true for $n=3$). I have: $$a_{n+1} = a_n + 2*a_{n-1} = 3*2^{n-1} + 2(-1)^n + 2(3*2^{n-2} + 2(-1)^{n-1}) = 3*2^n + 2(-1)^n + 4(-1)^{n-1}$$  Which is close to the result I want $(3*2^n + 2(-1)^{n+1})$ but the signs are switched for the $(-1)$ terms; therefore I suspect I missed a $-1$ somewhere, but I could not see where the error is.  I appreciate all and any help. Thank you kindly!


Just now,...  Here I found 'samba' daemon running around with my network. Probably some application had it as a dependency. I removed it, after I dropped the two ports in 'iptables'.  sudo apt-get remove samba   Then I took a quick examination of the system, and found port TCP/5298 to be open. Nmap calls the service 'presence' which is like... not the thing ... to tell paranoid sysops.  WHAT IS RUNNING ON THAT PORT!?; RATHER HOW DO I FIND OUT WHAT IS RUNNING ON THAT PORT?

I suspect a program is listening on port 8000 on my machine.  When I run the following command, I get this error:  > python -m SimpleHTTPServer # Lots of python error socket.error: [Errno 98] Address already in use   If I use another port (8000 is the default), the web server runs fine.  If I run wget localhost:8000 from the command line, it returns 404 Not Found.  What can I do (or what tools are available) to find what program is listening on port 8000, and from there where that program is configured?


I have Windows 7 Home Premium 64 bit installed on a 128GB SSD drive. Recently, I've purchased a new 500GB SSD drive and wish to move the entire OS over there, in order not to be forced to install everything all over again. I have tried a few things I've found in various guides online, and even tried it with EaseUS TODO Backup software, but at best all I got is that when I start the PC from the new drive, I get a message to insert a bootable disk... Any help in this matter will be greatly appreciated.

I've taken the plunge and bought an SSD and want to move my existing Windows installation over. The current hard disk is 500Gb, but I've trimmed the contents down to about ~40Gb. I'm transferring it across to a 100Gb SSD and looking for the easiest way just to copy everything across and set the SSD up as a boot device.  I've looked at a few tools like Macrium Reflect, but they don't seem able to restore to a smaller drive. Do I need to go for something like  to do this? I'm trying to avoid scary Linux-based boot utilities if possible, does anyone know of an easier way?


I am experiencing some strange issues with request.getParameter("param") in Java.  I am trying to test the returned value to set a boolean, nothing fancy. :)  String param = String.valueOf(request.getParameter("param")); boolean paramIsAll = false; if (param == "all"){paramIsAll = true;}  System.out.println("-"+ param +"-"+ String.valueOf(paramIsAll));   My output is: -all-false  ???

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


Which font is used on Stack Overflow for code snippets? Example: var $div = $("#preloader"); $.each($.imgNames, function (i, val) {     $("<img />").attr("src", $.largePath + val).addClass('PRELOADED').appendTo($div); });

I quite like the look of the font used in the code blocks that appear on Stack Overflow.    What, dear listener, is the font face used for such?


I was trying to "benchmark" two nearly identical loops. When I inspect them one by one the subtraction is without any hiccups, and the TimeSpan gives back the correct numbers as the TotalMilliseconds. When I benchmark the two loops together however the first subtraction gives back a number between 3 - 4 (which should be right), and the second one always gives back 0. What am I doing wrong? Thanks!  class Program {     static void Main(string[] args)     {         Console.WriteLine(":: Simple for ::");          var a = 0;         var start = DateTime.Now;          for (int i = 0; i < 10; i++)         {             a += i;         }          Console.WriteLine("Elapsed time: {0} ms", (DateTime.Now - start).TotalMilliseconds); // 3 - 4 ms         Console.WriteLine(":: Fancy for ::");          a = 0;         start = DateTime.Now;          foreach (var i in Enumerable.Range(0, 9))         {             a += i;         }          Console.WriteLine("Elapsed time: {0} ms", (DateTime.Now - start).TotalMilliseconds); // 0 ms     } }

I need to find a bottleneck and need to accurately as possible measure time.  Is the following code snippet the best way to measure the performance?  DateTime startTime = DateTime.Now;  // Some execution process  DateTime endTime = DateTime.Now; TimeSpan totalTimeTaken = endTime.Subtract(startTime);


When a body say a cylinder of radius R rolls down an inclined plane without slipping why is there no work done by the force of friction?  In other answers that I have read they say that it is because the displacement is zero but thats not true because the point on the bottom is moving on a trochoid. So this is not a duplicate.  We can also do a different approach like say initially the point P is in contact with ground where friction acts then the force of friction f provides torque about centre of mass equal to RfX where x is angular displacement net of P which clearly is not always zero in some cases might be .

I am confused by rolling friction.  Suppose you have a cylinder rolling which starts at rest at the top of an incline plane and begins to roll down the plane without slipping. Is work done by the incline on the cylinder?   I know from doing some problems that the total kinetic energy (translational and rotational) is $mgh$, which is true only if the only work done on the cylinder is by gravity. But also, the cylinder must have nonzero angular acceleration, so friction must be exerting torque on the cylinder, so work must be done by friction. One of these statements is wrong.


How can I access files stored on the USB drive from which Ubuntu boots? (Using Ubuntu 12.10)

How can I find the files that were stored on my flash drive before I installed Ubuntu to it?   Edit: No, I didn't format it, my files are still on the flash drive root. I just need to know how to access them there.


I charge my iPad. Later, I notice that the battery is charged at 100 %.  Now, what is better to preserve the battery capacity ?   Unplugging the cable.  Leaving the cable plugged.    The answer may vary depending on whether I leave the iPad sleeping or whether I use the iPad.

Is it OK to use an iPhone 4 that is fully charged while keeping it plugged to wall outlet?   I am worried about stressing battery too much since it is charging and discharging at the same time.  Any issues here?


a committee of 3 women and 4 men is to be formed from 6 women and 7 men. How many ways committee can be formed if it can only include at most 1 of the youngest woman or youngest man.  case 1: neither are included -> 5C3 X 6C2  case 2: only youngest woman included -> 5C3 X 7C4  case 3: only youngest man included -> 6C3 X 6C3  i then add all of those up together. is this right?

A security company consists of $7$ men and $6$ women. Determine the number of ways to form the night shift team of $3$ men and $3$ women if it can include at most one of the oldest man or oldest woman.  I know the first step is to pick $3$ from each group which is   $_6C_3 \cdot _7C_3 $  but I am not sure how to account for the "include at most one of the oldest man or oldest woman"   The answer is $_6C_3 \cdot _7C_3 + _6C_3 \cdot _5C_3 + _6C_2 \cdot _5C_3 $  Also, how do I account for it in my calculations if I want to include the oldest man and oldest woman from the group?


I am trying to run a test program to confirm my selenium installation. I have a 64 bit windows desktop and have downloaded the 64 bit version of Geckodriver from seleniumhq.org   Here is my source code :  import org.openqa.selenium.WebDriver; import org.openqa.selenium.firefox.FirefoxDriver;  public class Name {  public static void main(String[] args)  {      String Firefoxdriverpath = "C://Desktop//geckodriver-v0.14.0-win64//geckodriver.exe";         WebDriver driver;     System.setProperty("webdriver.gecko.driver", Firefoxdriverpath);     driver = new FirefoxDriver();     driver.get("http://www.google.com");     System.out.println(driver.getTitle());     driver.close();  } }   I am getting a runtime error :  Exception in thread "main" java.lang.NoClassDefFoundError: com/google/common/base/Function     at Name.main(Name.java:15) Caused by: java.lang.ClassNotFoundException: com.google.common.base.Function     at java.net.URLClassLoader.findClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)     at java.lang.ClassLoader.loadClass(Unknown Source)     ... 1 more   Any pointers on what I may be missing is helpful?

I am working on selenium. I am using linux os. I am using firefox driver for automated testing my app. My firefox version is 53.0.3 (64 bit). When I run the code the Firefox browser open and don't pass the URL, meanwhile getting an error.   My selenium code:  //Firefox driver      System.setProperty("webdriver.gecko.driver","pathToGeckodriver");     driver =new FirefoxDriver();   Console error:  java.lang.IllegalStateException: The driver executable does not exist: /home/naveen/IdeaProjects/QberTestCase/pathToGeckodriver     at com.google.common.base.Preconditions.checkState(Preconditions.java:199)     at org.openqa.selenium.remote.service.DriverService.checkExecutable(DriverService.java:121)     at org.openqa.selenium.remote.service.DriverService.findExecutable(DriverService.java:116)     at org.openqa.selenium.firefox.GeckoDriverService.access$000(GeckoDriverService.java:37)     at org.openqa.selenium.firefox.GeckoDriverService$Builder.findDefaultExecutable(GeckoDriverService.java:95)     at org.openqa.selenium.remote.service.DriverService$Builder.build(DriverService.java:296)     at org.openqa.selenium.firefox.FirefoxDriver.createCommandExecutor(FirefoxDriver.java:277)     at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:247)     at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:242)     at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:238)     at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:127)     at util.DriverManager.<init>(DriverManager.java:39)     at steps.LoginSteps.<init>(LoginSteps.java:13)     at user.userTest.initDriver(userTest.java:25)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)     at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)     at java.lang.reflect.Method.invoke(Method.java:498)     at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:100)     at org.testng.internal.Invoker.invokeConfigurationMethod(Invoker.java:515)     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:216)     at org.testng.internal.Invoker.invokeConfigurations(Invoker.java:143)     at org.testng.SuiteRunner.privateRun(SuiteRunner.java:307)     at org.testng.SuiteRunner.run(SuiteRunner.java:270)     at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)     at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)     at org.testng.TestNG.runSuitesSequentially(TestNG.java:1284)     at org.testng.TestNG.runSuitesLocally(TestNG.java:1209)     at org.testng.TestNG.runSuites(TestNG.java:1124)     at org.testng.TestNG.run(TestNG.java:1096)     at org.testng.IDEARemoteTestNG.run(IDEARemoteTestNG.java:72)     at org.testng.RemoteTestNGStarter.main(RemoteTestNGStarter.java:127)   Test ignored.


I want to show that " for a complex $n$ order matrix $A$ if $x^tAx=0$ for all column vectors $x$ in $\Bbb C^n$ then $A =0$".    My try: I know the fact that when we take base field $\Bbb R$ then result is not true because $x^tAx=0$ will imply $A$ is skew symmetric and that is not necessarily $0$ matrix. When base field is $\Bbb C$ then characteristic polynomial of $A$ will splits then we can apply schur's theorem that there exists an orthonormal basis such that $A$ is similar to upper triangular matrix.  I don't know how to proceed from here. Give me some hint and please tell if I am moving in right direction or not .

Let $T$ be a linear operator on an inner product vector space $V$. I'd like to prove that if $$(Tx|x)=0 \quad \forall x \in V$$ then $T$ is the null operator. I can't figure out this proof using contradiction, do I have to choose an appropriate vector?


I'm an Indian passport holder, travelling to Buenos Aires via London Heathrow (Flight departs same day within 24 hours). I am also a valid B1/B2 US Visa Holder. Would I still require a DATV (Direct Airside Transit Visa) despite that?

Is there a website or some other way to find out if I need a transit visa for a short stop in the UK on my way somewhere else? Ideally this should give me the answer for all nationalities, and take into account any other visas I may have.


i was doing an assignment using Python and i had to use a 2D list with a specific size.  my idea was to use this..  lists = [[]]*10 //output => [[],[],[],[],[],[],[],[],[],[]]   because i have used..  nums = [0]*10 //output [0,0,0,0,0,0,0,0,0,0]   so far so good, the problem was wwhen i do this..  lists[0].append(5)     //the result is [[5],[5],[5],[5],[5],[5],[5],[5],[5],[5]]   it appends the object i'm adding to every list in lists, while if i did this..  nums[0] = 5   //the result is [5,0,0,0,0,0,0,0,0,0]   i have figured a work around the problem by using   lists = [[] for i in range(10)]   but my question is: why it did that, in first case?

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


I'd like to search recursively for files with a specific Change date. Note, this is not the Access or Modify date, but the Change date as outputted by stat.  #stat prototype.js   File: `prototype.js'   Size: 175637      Blocks: 352        IO Block: 4096   regular file Device: 803h/2051d  Inode: 18146171    Links: 1 Access: (0644/-rw-r--r--)  Uid: (  507/user)   Gid: (  505/user) Access: 2016-11-03 04:54:05.000000000 -0500 Modify: 2016-01-06 03:38:54.000000000 -0600 Change: 2016-07-23 03:42:37.000000000 -0500   In my specific case, I'd like to find all files with a Change date of 2016-07-23. The OS is CentOS release 6.4. Thanks!

Is it possible to find all php files within a certain directory that have been modified on a certain date  I'm using   find /var/www/html/dir/ -mtime -28 | grep '\.php'    to get files modified within the last 28 days, but I only need files that have been modified on the following date: 2011-02-08


So, a friend of mine want to have Ubuntu on his laptop (acer aspire e5 575: 4gb ram, i3 7th gen, 1tb HDD). Here is the thing: I don't know what partitions I'have to do in order to install Ubuntu Desktop (dual boot with W10). I already watched some tutorials, but I am now confused because all the tutorials show different installations methods. Some tutorials show this partitions: root, boot, home, efi, swap. This is where I'm lost. I don't want to mess up his laptop.  P.S 1: I already made the partition of the main disk (HDD) in Windows 10 (Disk Management) in order to have free space for Ubuntu (370gb of total free space) P.S 2: I have Ubuntu Desktop as my main system as well. But I installed it on a new SDD, so other friend of mine told me that I only have to make this 3 partitions: root, boot and home. And this works totally perfect for me. P.S 3: I'm new in GNU/Linux, so I don't have much idea of how file systems works here. P.S 4: By the way, I hope that somebody can understand me because of my terrible english.

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


When I write a long limit there is a big gap between the limit and the function. How can I fix this? Furthermore is there a way to make the limits smaller so as not to be longer than the limit symbol? Also why is that gap there and that size difference between the length of the symbol and the limit under it? Shouldn't all be under it?  \documentclass[12pt]{article} \usepackage{amsmath} \usepackage{unicode-math} \begin{document}  $\displaystyle \lim_{n\to +\infty}x(n)$  \end{document}

I want to get the following:    I tried the following  \[    a(i,k) \leftarrow     \min\Big\{0, r(k,k) + \sum_{i^{'} | i^{'}\notin \{i,k\}}\max\{0, r(i{'},k)\}\Big\} \]   and got    How can I make the part under the summation extend to left and right without making a space between plus and max as in the first figure?


I'm looking for very simple obfuscation (like encrypt and decrypt but not necessarily secure) functionality for some data. It's not mission critical. I need something to keep honest people honest, but something a little stronger than  or .  I'd prefer something that is already included in the  framework 2.0, so I don't have to worry about any external dependencies.  I really don't want to have to mess around with public/private keys, etc. I don't know much about encryption, but I do know enough to know that anything I wrote would be less than worthless... In fact, I'd probably screw up the math and make it trivial to crack.

How can I encrypt and decrypt a string in C#?


I am expert in speaking English    Or     I am expert at speaking English   Which one is correct?

When would you use "expert in" and when would you use "expert on"?  A quick google search yields about the same for both, but I have a feeling "expert in" can occur in sentences somehow with a different meaning altogether.


Let $\displaystyle a_0 + \frac{a_1}{2} + \frac{a_2}{3} + ... + \frac{a_n}{n+1} = 0$, where $a_i$'s are some real constants.  How can we prove that the equation $a_0 + a_1x + a_2x^2 + ... +a_nx^n = 0$ has at least one solution in the interval $(0,1)$?

Knowing that $$ \frac{a_0}{1} + \frac{a_1}{2} + \frac{a_2}{3} +\cdots + \frac{a_n}{n+1} =0$$ Prove that  $$ a_0 + a_1x + a_2x^2 + \cdots + a_nx^n = 0$$ has at least one real solution.  I suspect that it's proven with the intermediate value theorem. But can't find two numbers that satisfy it.


I am writing my curriculum vitae, but I have one question.  In the first image, there are spaces between different sections.  (Between contact and phone, between education and Seoul~~,....)  Thus, I want to narrow down these gaps.  How can I solve this problem??  (I tried to modify the code.... code is in the second image....)

I am writing my curriculum vitae, but I have one question.  In the first image, there are spaces between different sections.  (Between contact and phone, between education and Seoul~~,....)  Thus, I want to narrow down these gaps.  How can I solve this problem??  \documentclass[margin,line,letterpaper,11pt]{res}  \usepackage{times}  \usepackage{enumitem}   \setlength{\topmargin}{0.1in} \setlength{\textheight}{11in}  \setlength{\textwidth}{6in} \setlength{\oddsidemargin}{-.55in}  \setlength{\evensidemargin}{-.55in}  \oddsidemargin -.25in \evensidemargin -.49in \textwidth=5.4in  \newcommand{\ts}{\textsuperscript}  \newcommand{\block}[1]{     \vspace{.1in} \section{\sc #1} }  \newcommand{\subblock}[1]{     \vspace{-.2in}\subsection*{#1} }  \newenvironment{enum}{     \begin{enumerate}[leftmargin=5mm]     \setlength{\itemsep}{1mm} }{     \end{enumerate} }   \begin{document}   \name{\sc \LARGE  }   \begin{resume}  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \block{Contact} Phone:  \\ Email:  \\\vspace*{-6mm} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \block{Education}  University : \\  %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \block{Other\\ Activities}  Club : \\   %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%  \end{resume} \end{document}


I understand how to configure a sparse checkout in Git, but I was wondering if it's possible to eliminate the leading directories. For example, say I have a Git repository with a folder structure like so:   folder1/foo folder2/foo/bar/stuff folder3/another/foo/bar/stuff2   And I only want the contents inside stuff2. For sparse checkout of those directories, the .git/info/spare-checkout file would look like this:  folder3/another/foo/bar/stuff2/   My problem is after I'm finished with the sparse checkout, I don't see stuff2 or the contents of stuff2 inside the root of my directory; I see folder3 and then all of the subdirectories leading up to stuff2.  I'm guessing the answer to this question is that it's not possible with Git, but I just wanted to make sure. This is one (and only) behavior of SVN that I miss; the ability to run svn co https://url.com/myrepo/folder3/another/foo/bar/stuff2 . and have the contents dumped into the current directory.

Is it possible to check out subdirectories of a repository in Git?  Imagine I am setting up a new WordPress installation. I will create two new directories for my plugin and theme customization:   wordpress/wp-content/plugins/myplugins/  wordpress/wp-content/themes/mytheme/   I want to maintain these directories via Git. In Subversion, I would accomplish this by having trunk/myplugins/ and trunk/mytheme/ directories and checking out subdirectories. Does Git have a way to accomplish the same task using a single repository?  I could just be missing the boat on some Git paradigm, as a long time SVN user with little exposure to Git.  Edit:  storing different content is an interesting way to handle this.


Want The formula or to find The Sum of Series where  $$S=\sum_{k=0}^n \binom{x+k}{k+1}$$  where $x$ is any constant $\geq 1$  and $n$ is another constant.

Is there a closed formula for:  $\sum_{i=1}^{N}{\binom{i+k}{i}}$   ( k is a constant whole number )


I installed a new Windows hard-drive in my computer and took the old one (Ubuntu 14.04 installed on it) out and put this in an external hard drive encasing.  The problem I am facing now is that Windows does not pick this external hard drive up (the only way to use the hard drive is to switch the laptop off, plug the external in and boot into the Ubuntu OS installed on the external. How do I format this hard drive for use as a Windows external?

I want to know how to make a drive ( non-system ) from EXT4 to NTFS. Can anyone help me out?


I noticed a particularly nice math font being used in this paper: .   Does someone recognize it? I've tried detexify but could not find it.  Here is an A:    a B:    and a U:

Is it possible to identify the font used in a specific document/picture?  Answers to this question should identify:   Possible methods to do this (perhaps one answer per method) and adequately describe how to use it (as opposed to merely stating it); Ways of finding the identified fonts, if possible (free or not); and Any prerequisites associated with the method used, if required (for example, "In order to use method X, your document has to be in format Y").   This question is meant as an FAQ, based on an . Its aim is to facilitate the community with the general procedures involved in font identification. Similar cases are solved on a per-usage basis on 's  tag.


I am working on a VERY simple calculator with Java and it does not seem to output an answer after selecting the operation. The code is as follows:   import java.util.Scanner; public class Calc { public static void main(String[] args) {     Scanner keyboard = new Scanner (System.in);     Double fnum;     Double snum;      Double answer;     String operation;      System.out.println("Enter a number.");     fnum = keyboard.nextDouble();     System.out.println("Enter another number.");     snum = keyboard.nextDouble();     System.out.println("What operation do you wish for? [Multiplication, Addition, Subtraction, Division]");     operation = keyboard.next();      if (operation == "Multiplication" || operation == "multiplication" || operation == "*") {          answer = fnum * snum;         System.out.print("Your answer is: " + answer);      }        else if (operation == "Division" || operation == "division" || operation == "/") {          answer = fnum / snum;         System.out.print("Your answer is: " + answer);      }        else if (operation == "Addition" || operation == "addition" || operation == "+" || operation == "add") {          answer = fnum + snum;         System.out.print("Your answer is: " + answer);      }        else if (operation == "Subtraction" || operation == "subraction" || operation == "-" || operation == "subtract"){          answer = fnum - snum;         System.out.print("Your answer is: " + answer);      }       else {         System.out.println("This is not valid.");     }   }  }   and this is the output:  Enter a number. 6 Enter another number. 6 What operation do you wish for? [Multiplication, Addition, Subtraction, Division] Multiplication  This is not valid.   Any help would be very appreciated.  P.S. there are no errors.  Thanks!

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


I have a class that has one public method (cheer for single responsibility principle) except within that method there is a try that lists about 20 method calls. In terms of testing and / or refactoring and testing, how would I go about this? I'm new to java. Looking for a better way to structure and test this code. Any suggestions / pointers to best practices would be appreciated! Thanks!

How do I unit test (using xUnit) a class that has internal private methods, fields or nested classes? Or a function that is made private by having  (static in C/C++) or is in a private () namespace?  It seems bad to change the access modifier for a method or function just to be able to run a test.


The solution proposed as a duplicate is not a PowerMockito solution and as a consequence does not answer this question. Further, this question IS answered legitimately below.   IDK if this is a duplicate or not but I sure can't find the item in question if it is. I keep expecting this to be really simple, since it is pretty simple with reflection but I'd rather do it using the right tools.   Clarification: Legacy code. No getters / setters.   Is it correct to use Whitebox for this? I thought it was "Off Limits" i.e. part of the internal API? ...or was that strictly Mockito?


Most outlets in my house are non-grounded (line and neutral contacts only). I just bought a Hakko fx-888d soldering station, and immediately noticed that touching the iron-station cable gives the same sensation as when I plug in my aluminium Macbook.  This sensation disappears when I unplug both devices. I measured the voltage between the ground (from a grounded outlet in the bathroom) and the Hakko cable; it was about 100...110 V (I used the AC regime of the multimeter).   What causes this voltage? Is it dangerous for me or for electronics?  UPDATE: I live in the Netherlands, where having 2 contact outlet is allowed. The human safety is ensured by RCD = GFCI. The house is not that old and is well wired (with copper) and grounded, where required. While I'd be happy to improve it and rewire the ungrounded outlets, it doesn't make much sense as I am renting.   Also, plug orientation here is arbitrary (plug can be inserted in the outlet in two ways), so the design never relies on which wire is neutral and which one is line.

I have HP 1514 printer. I noticed that the usb type A plug coming from printer has as buzzing feeling when touching skin. I connected one multimeter probe to the USB plug and the other one to ground pin in my power outlet as shown in the sketch below. The multimeter shows 18V. Shows 0 when measuring current with same setup.    I believe that this is not okay? What could be the cause? Could I damage my Macbook by using this printer (I have used it for a year with no problems, though)


Time is considered to be a dimension, and we are moving at certain rate in one direction in time. What force makes us move in time? I mean it must be ether time moving or us moving in time so there has to be some force that 'pushes'/'pulls'? Was this 'time inertia' acquired during big bang, or nothing is moving and I am just being silly?

It seems to me that there is no such thing as time. There  is only movement in the universe and we compare our own movement to a different object to have a sense of time. It can be a clock or a atomic vibration.  Does this view of time work within the current framework of phsics?  Do physicists have an explanation/proof about time's existence?


$$\lim_{n\to \infty } \,\cos (1) \cos \left(\frac{1}{2}\right) \cos \left(\frac{1}{4}\right)\cdots \cos \left(\frac{1}{2^n}\right)$$  How would you evaluate this limit? Is it just equivalent to $$\prod_{n=0}^\infty {\cos \left( \frac{1}{2^{n}} \right)}$$

This limit seemed quite unusual to me as there aren't any intermediate forms or series expansions which are generally used in limits. Stuck on this for a while now .Here's how it goes :    $$ \lim \limits_{n \to \infty} \left[\cos\left(x \over 2\right)\cos\left(x \over 4\right)       \cos\left(x \over 8\right)\ \cdots\ \cos\left(x \over 2^{n}\right)\right] $$


I'm using HDRI's in Blender 2.8 (cycles) and I don't understand how these are supposed to work to create realistic environmental light. The BLUE in the "Sky" shots is casting so much BLUE that my entire world looks ridiculous.   Is there a way to use JUST the sunlight within the HDRI to create more realistic sunlight?  UPDATE: I think the trick is to ensure that the trees or mid-point of the HDRI is exposed as to cut down on the sheer amount of blue influencing the rendering. This version looks acceptable to me.

In experimenting with an hdr environment texture for the World (with Cycles), I do not see very pronounced shadows in my scene even though the image has an uncloudy sun.  I expect my objects to cast shadows because even though the sky is bright, the sun is much brighter.    For outdoor scenes, is it typical practice to use a Sun lamp in addition to the environment texture or am I missing some other setting?


Let $W$ be the random variable that counts the number of tails before one gets $r$ heads for a coin whose probability of heads is $θ$. Without using moment generating function, show that the mean and variance for $W$ are $[r(1-θ)]/θ$ and $[r(1-θ)]/θ^2$. I know it is a negative binomial distribution. But without using mgf, how to calculate that? I tried and I gave up in the half way because it is too complicated.

Let W be the random variable that counts the number of tails before one gets r heads for a coin whose probability of heads is θ. Without using moment generating function, show that the mean and variance for W are [r(1-θ)]/θ and [r(1-θ)]/θ^2 Please help me with the complete proof. I have some ideas, but I can't write it in a formal way. Thanks!


I am searching how to connect functions written in text file to programmed functions in source code. Here is an example In test.txt I have create_session("azerty", 123, "test.png", "test.yaml", True) launch_session("abc", 695, "file.txt")  In my source code I have def create_session(self, var1: str, var2: int, var3: str, var4: str, var5: boolean) def launch_session(self, var1: str, var2: int, var3: str)  My goal is when I read this file containing "commands" I would like to be able to connect each command to the associated function checking number of parameters and parameters. By example the command name is "totuti" and the correct programmed function "totuti" is executed, if it is not found an error is raised. If my command in text file contains only 4 parameters and the source code programmed function needs 5 parameters, it doesn't work. The same process is executed checking parameters type. My question is : does any package exist to do this ? Is there any way to check parameters type ?

What is the best way to go about calling a function given a string with the function's name in a Python program.  For example, let's say that I have a module foo, and I have a string whose content is "bar". What is the best way to call foo.bar()?  I need to get the return value of the function, which is why I don't just use eval. I figured out how to do it by using eval to define a temp function that returns the result of that function call, but I'm hoping that there is a more elegant way to do this.


Given that $f,g:(a,b) \rightarrow \mathbb{R}$ and both uniformly continuous on $(a,b)$ .... Can we say that $fg$ is uniformly continuous? .... If not please provide a counter-example and if true please provide me a hint  Thank you

Suppose that $f$ and $g$ are uniformly continuous functions defined on $(a,b)$. Prove that $fg$ is also uniformly continuous on $(a,b)$.   My attempt: Since $f$ is uniformly continuous on $(a,b)$, for all $\epsilon>0$, we have $\delta_f(\epsilon)>0$ such that for all $x,y \in (a,b)$, $|x-y|<\delta_f$, $|f(x)-f(y)|<\epsilon$  Since $g$ is uniformly continuous on $(a,b)$, for all $\epsilon>0$, we have $\delta_g(\epsilon)>0$ such that for all $x,y \in (a,b)$, $|x-y|<\delta_g$, $|g(x)-g(y)|<\epsilon$  Notice that $$|f(x)g(x)-f(y)g(y)|=|f(x)g(x)-f(x)g(y)+f(x)g(y)-f(y)g(y)| \leq |f(x)||g(x)-g(y)| + |g(y)||f(x)-f(y)|$$  Here I don't know how to bound $|f(x)|$ and $|g(y)|$. I have proven that uniformly continuous functions preserve boundedness of an interval , i.e. $f$ is bounded on $(a,b)$. Can anyone help me?


What is the terminal command for easily uninstalling programs or software?

Suppose I download a .deb package from a website and install it. (I assume that when I double click the .deb file, the package is installed through a GUI that interfaces with dpkg right?)  How can I uninstall it?


I am using windows 8 and texmaker 4.4.1 I downloaded a template from   Then I open the cv_13.tex and use QuickBuild, then I received the following comments: Error : could not start the command : pdflatex -synctex=1 -interaction=nonstopmode   I am afraid that libraries may be missing or a building link should be used but I have no idea how to fix it, anyone knows the problem?

I just downloaded and installed Texmaker. I've never used any (La)TeX before.  When I click the Run button with an arrow next to "Quick build" I get an error saying "Could not start the command". Why? What do I need to do?


I've been attempting to make a falling object kill a player, but i still want to make sure the player can touch and interact with the object to move it around without dying. The code i've made so far somewhat works as it wont kill the player when they move it will kill the player when it falls and hits them, but the problem is it only works if they have not moved yet from their spawn position (could also be true for when they have stood still for a second). Here is my code  using System.Collections; using System.Collections.Generic; using UnityEngine;  public class BoxyKill : MonoBehaviour {     public Rigidbody2D rgbd;     public CharacterController2D character;      private void OnCollisionEnter2D(Collision2D collision)     {         if (collision.gameObject.tag == "Player")         {             Debug.Log("Hit player");             if (rgbd.velocity.y <= -5f) {                 character.Damage(10);                 Debug.Log("Hit player 2");             }         }     } }   Note - the 'rgbd' is the boxs and this script is attatched to the object  Thanks!  UPDATE  So as of DMGregorys suggestions i have updated the code and while it works i have encountered the same problem (however a lot more controlable this time)   Here is my current code      public Rigidbody2D _body;     private float minimumDamageThreshold=10;     private float collisionDamageScale=.0001f;       void OnCollisionEnter2D(Collision2D collision)     {          Vector2 normal = collision.GetContact(0).normal;         Vector2 impulse = ComputeTotalImpulse(collision);          Vector2 myIncidentVelocity = _body.velocity - (impulse / _body.mass);          Vector2 otherIncidentVelocity = Vector2.zero;         var otherBody = collision.rigidbody;         if (otherBody != null)         {             otherIncidentVelocity = otherBody.velocity;             if (!otherBody.isKinematic)                 otherIncidentVelocity += impulse / otherBody.mass;         }          // Compute how fast each one was moving along the collision normal,         // Or zero if we were moving against the normal.         float myApproach = Mathf.Max(0f, Vector3.Dot(myIncidentVelocity, normal));         float otherApproach = Mathf.Max(0f, Vector3.Dot(otherIncidentVelocity, normal));          float damage = otherApproach - myApproach;         Debug.Log(damage);         character.Damage(damage);     }     static Vector2 ComputeTotalImpulse(Collision2D collision)     {         Vector2 impulse = Vector2.zero;          int contactCount = collision.contactCount;         for (int i = 0; i < contactCount; i++)         {             var contact = collision.GetContact(0);             impulse += contact.normal * contact.normalImpulse;             impulse.x += contact.tangentImpulse * contact.normal.y;             impulse.y -= contact.tangentImpulse * contact.normal.x;         }          return impulse;     } }   It now works and will kill the player, and i have it printing out the damage in the debug for the character script damage function. The only problem is, it will constantly damage the player if it touches the box at all, and the player needs to be able to move the box around so this will slowly kill it. This could be a problem with the variable amounts that i have configured due to a lack of understanding (and a lot of mindless fideling to be honest).

I don't know how to name what I am searching for... Force, Impact? It's easier to explain with an image for me. We have two GameObjects with colliders, A and B. They can move in any direction (top down game with 360° movement possibilities). First case (left): A go to the right at a speed of 2, B to the left at a speed of 1 and they collide. How to calculate that A take 1 damage (from the speed of B in its direction) and B take 2. Second case: A go to the right at speed of 2 and B to the right at speed of 1. A take 0 damage and B take 1.    I am using Collision2D which doesn't have "impulse" property. I have no idea how to calculate thing like this manually.


If $X: \Omega_1 \times \Omega_2 \to \mathbb{R}$ is measurable then each of the slices $X_{\omega_1} : \Omega_2 \to \mathbb{R}$, $X_{\omega_1} : \Omega_2 \to \mathbb{R}$ defined by $X_{\omega_1}(\omega_2) = X(\omega_1,\omega_2)$ etc. are measurable.   I guess that the converse need not be true. Is it true that if $X_{\omega_1}$ is  $\textit{continuous}$ for all $\omega_1$ while $X_{\omega_2}$ is $\textit{measurable}$ for all $\omega_2$ (e.g. for $\Omega_1 = \Omega_2 = \mathbb{R}^d$) then $X$ is measurable?  More generally, if $X : \Omega_1 \times \Omega_2 \cdots \Omega_n \to \mathbb{R}$ and $X_{\omega_1},X_{\omega_2},\cdots,X_{\omega_{n-1}}$ are continuous and $X_{\omega_n}$ is measurable can we say that $X$ is measurable?  Thanks, Phanindra

Please help me to prove the following;  Let $ \ f:[0,1]^2\longrightarrow\mathbb{R}$ be such that: (i) $\ f(x,\cdot)$ is measurable for each fixed $x\in[0,1]$; (ii) $\ f(\cdot,y)$ is continuous for each fixed $y\in[0,1]$. Show that $\ f$ is measurable.


I want to create a default value for an attribute by defining it in ActiveRecord. By default everytime the record is created, I want to have a default value for attribute :status. I tried to do this:  class Task < ActiveRecord::Base   def status=(status)     status = 'P'     write_attribute(:status, status)   end end   But upon creation I still retrieve this error from the database:  ActiveRecord::StatementInvalid: Mysql::Error: Column 'status' cannot be null   Therefore I presume the value was not applied to the attribute.   What would be the elegant way to do this in Rails?  Many thanks.

How can I set default value in ActiveRecord?  I see a post from Pratik that describes an ugly, complicated chunk of code:   class Item < ActiveRecord::Base     def initialize_with_defaults(attrs = nil, &block)     initialize_without_defaults(attrs) do       setter = lambda { |key, value| self.send("#{key.to_s}=", value) unless         !attrs.nil? && attrs.keys.map(&:to_s).include?(key.to_s) }       setter.call('scheduler_type', 'hotseat')       yield self if block_given?     end   end   alias_method_chain :initialize, :defaults end   I have seen the following examples googling around:    def initialize      super     self.status = ACTIVE unless self.status   end   and    def after_initialize      return unless new_record?     self.status = ACTIVE   end   I've also seen people put it in their migration, but I'd rather see it defined in the model code.  Is there a canonical way to set default value for fields in ActiveRecord model?


I cannot watch a video stream because the site says I need Adobe Flash 11.8.0. My version is 11.2.202. (This is a recently acquired used computer formerly with Windows and now with Linux. I am not a tech person - I'm an end user. So be kind, please!!)  I went to the Adobe site and it stated I had the latest version for Linux. I went to the Adobe site directed by the video provider (Comcast) and I saw a statement that Adobe is not providing upgrades for Linux beyond 11.2 any longer.  I tried downloading a version from the Adobe site and the readme.txt told me to unpack the tar.gz file. On your Q&A site, it says not to use a tar.gz file.  Can anyone direct me in end-user language (who knows nothing about Linux) what I need to do?  Thank you!

As Adobe no longer supports Flash on Linux (see "NOTICE" below), is there a way to use Chrome's Pepper Flash plugin with Firefox?    NOTICE!  Flash no longer is supported for Linux EXCEPT as part of Chrome (with the exception of the extremely out of date Firefox 11.2 version, even though it gets security updates, it is still ancient and not updated that frequently).  This is detailed in the .  The relevant section is Platform support, sub section Personal Computers, section Linux, quoted here (January 14, 2015 was when this was pulled, and the most important lines in this have been bolded for important reasons because people won't want to read the whole thing here):     Linux      Adobe has been working closely with Google to develop a single, modern API for hosting plug-ins within the browser. The PPAPI, code-named "Pepper", aims to provide a layer between the plug-in and browser that abstracts away differences between browser and operating system implementations. You can find more information on the Pepper API at .      Because of this work, Adobe has been able to partner with Google in providing a "Pepper" implementation of Flash Player for all x86/64 platforms supported by the Google Chrome browser. Google now distributes this new Pepper-based Flash Player as part of Chrome on all platforms, including Linux.      For Flash Player releases after 11.2, the Flash Player browser plug-in for Linux will only be available via the "Pepper" API as part of the Google Chrome browser distribution and will no longer be available as a direct download from Adobe. Adobe will continue to provide security updates to non-Pepper distributions of Flash Player 11.2 on Linux for five years from its release.      Flash Player will continue to support browsers using non-"Pepper" plug-in APIs on platforms other than Linux.      Adobe will not be providing a Pepper-based debug player implementation of the Flash Player browser plug-in on Linux.      As of Adobe AIR 3, Adobe has discontinued support for Adobe AIR for Linux operating systems.


On the heels of  regarding a user spamming "Thanks in advance is considered extremely rude" and starting arguments on several posts, I ended up sending in 3 detailed flags on posts where this occurred in the comments.  The first two were a couple days ago, both validated and all comments deleted, and the third, and worst one, was last night. The comments escalated into name-calling and mudslinging on a new user's second post. So, I flagged the post and brought attention to the comments instead of flagging each comment individually.  The comments were all deleted, and the user was even . I had suggested "some kind of intervention beyond just deleting all the comments again" and it looks like the suggestion was honored.  So, bearing this in mind, what possible reason could my flag have been marked invalid?  Note: I've read the 2 answers from these posts:       ...but they deal with a user complaining about an invalid flag when a question has been closed later by the community. The difference here is that the action was definitely handled by a moderator (comments deleted, user suspended), and not by the community, later - after a mod deemed the flag invalid. I assure you that there was nothing questionable about whether or not the 6 comments should have been deleted.  Did I do something wrong? I'm not sure what the policy is on disclosing flags, but I'd be happy to share more information if it helps clear up what my mistake could have been.  Was it rude of me to include the extra request? Was it proper to let the mod know that this was an ongoing problem, or should I have just flagged with the "bare minimum" details and let the mods figure it out? Perhaps I got too involved the business of moderators, and therefore the flag was deemed invalid.  The invalidation may very well have been a misclick as Cody Gray suggested in the comments, but I'd be interested in hearing whether or not I possibly stepped over the line.

I flagged a post and (choose one)   my flag was marked as helpful, yet nothing was done my flag was marked as declined, yet the post was deleted/edited/closed   Why?


Hi my website is only a month old but I have paid to have traffic to my site so I don't know if maybe that is the problem. I have an error in webmaster tools for a url link http://www.example.com/null.html? I never made that page so as you can understand I was a tad confused. Does anyone have any insight as to what I should do next an if I should cancel my paid traffic with the company in question or if that is normal.

GWT is reporting 404 crawl errors on pages that have never been part of the website.  For example, it's reporting crawl errors on several non-existent pages such as mysite.net/blog/how-can-i-improve-seo-ranking. On the 'Linked from' tab, it lists several internal pages that don't even have this page linked from. Also on the 'Linked from' tab, it lists the sitemap, which is updated once a week and never has links to these non-existent pages.  I am unable to figure out what exactly is causing this- is it something to do with the website itself or is GWT wrongly identifying pages? If these pages are not even listed on the sitemap or linked from any of the internal pages, why is GWT reporting this? Does anyone know how to fix this?


public class CaseTriggerHandler {          public static void closeCase(Set<Id> caseId,Map<Id,Case> newMap){                  List<Quality_Investigation__c> qualityInvestigationList = [SELECT Id,Send_to_Advisor__c,Cancel_Investigation__c,Case__c FROM Quality_Investigation__c WHERE Case__c IN:caseId];         For(Quality_Investigation__c singleQI:qualityInvestigationList){             if(singleQI.Send_to_Advisor__c==False &&  singleQI.Cancel_Investigation__c==False ){                                  newMap.get(singleQI.Case__c).addError('You cannot Close this case. ' +'There are Open QIs');             }                      }      }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


For a variety of reasons, I have an unusually complex email address which is tiresome to keep re-typing.  Is there any way I can re-program one of my little used Windows 10 keys, such as a function key, to hold this address?

Using Windows 7, is there an in-built or third-party method of recording windows commands and being able to play them back?  As a very basic example of what I would like to be able to do, imagine having two desktop themes that you like to alternate between. The Windows commands would be something like   Open personalisation applet select second theme ok   (I'm calling this a macro because of the equivalent capability in Word.)


Are all or any hash functions evenly distributed?  For example: if you had every combination of 256 bits and ran that through SHA256, would that produce approximately 1 of each combination, or would there be peaks?  Are distributions of the hashes calculable without going through the permutations in lower bit sizes?  Is evenness of the distribution of a hash function impacted by the length of the input vs the resultant hash length?  Which hashing functions are most evenly distributed?  (e.g. as close to 1 of each equal-bit-length combination possible)  Edit: The linked "duplicate" doesn't come close to addressing all these questions.

In reading about the  protocol I noticed how much its proofs-of-work apparently depend on  of the SHA-256 hash function. And so  presumably do many other applications.  How do researchers go about proving uniformity of proposed hash functions? Is it just an empirical matter of running many inputs through the function and observing the distribution of outputs, or can one formally prove the property? Where could one (non-crypto-expert) learn about how such proofs are constructed and look one up e.g. for the case of SHA-256?


I recently got an iPhone 6s. At home I do not have Windows or Mac computers, only Ubuntu.  Is there a way to transfer files (music, photos, PDF, or really anything actually) between the PC and the phone? It should not involve syncing via an internet service, as I may have the need to transfer large or private files. Also, I do not want to jailbreak the device.

I am looking for a way to transfer large files to the iPad without using iTunes or pushing to and pulling from a remote server.  I run an Ubuntu laptop as my only OS at the moment and want to be able to transfer movies to my iPad.  I currently transfer most of my files by way of the dropbox app which works well for small files but is quite slow for larger files and eats up my bandwidth.  Ideally I'd like to be able to transfer over a cable or through WiFi.  Thanks for any tips.


My simple experiment:  Two equally-sized patches of the night sky are observed:   Patch A contains $100$ stars Patch B contains $110$ stars   My null hypothesis is that stars are randomly distributed in the sky. The random distribution means that there will be some natural variation from patch to patch.   My question:   How is the p-value (or at the very least, a test statistic) calculated for rejecting the null hypothesis that there is no significant difference between the two patches of sky?

This is an elementary question, but I wasn't able to find the answer.  I have two measurements: n1 events in time t1 and n2 events in time t2, both produced (say) by Poisson processes with possibly-different lambda values.  This is actually from a news article, which essentially claims that since $n_1/t_1\neq n_2/t_2$ that the two are different, but I'm not sure that the claim is valid.  Suppose that the time periods were not chosen maliciously (to maximize the events in one or the other).  Can I just do a t-test, or would that not be appropriate?  The number of events is too small for me to comfortably call the distributions approximately normal.


In a PowerPoint template footer we can add the date, the page numbers, but is there a way to also add the user name as a variable depending on who creates the presentation?

How can I insert a document property (e.g. the author's name) in a slide in PowerPoint 2007? I know this can be done in Microsoft Word, but I can't find how to do it in PowerPoint.  (The idea is that with a document property it is easy to change e.g. the content of the footer in all the slides, even if you use different master pages. If there is a different solution, that would be fine as well.)


It was difficult for me to find the proper title for the issue that I'm facing. I would like to define a list of cases like:  Case 1:  Case 2: .....   For that, I did the following:  \begin{enumerate}[Case 1:]     \item Energy value     \item Optimizer \end{enumerate}   When I compile it, I get the following:  C1se 1: Energy value C1se 2: Optimizer   The letter a in the word Case has changed to 1 which I don't know why !!   I even tried the word Scenario, and I get it like Scen1r1o  Do you have any idea how to solve this issue?

I'm trying to get a list of custom labels. Here is what I've tried:  \begin{enumerate}[Exercise (1)]  \item first  \item second  \end{enumerate}   This results in each item being labeled as: Exerc#se (#)  Where # is the number of the item in the list. How can I make the "i" in exercise not be pattern matched?   Using a \ doesn't work, it causes syntax error.


Basically I need an if statement of which the response is dependent upon the current working directory.  I have done some research on the topic and I believe that the getcwd() function is what I am looking for, but I can't figure out how to interface with it in an if statement.   I am new to C, and the program I am making needs to be located on the Desktop (btw its a UNIX system) for it to run properly and the if statement needs to determine whether it is located on said desktop or not.

I'm making a C program where I need to get the directory that the program is started from.  This program is written for UNIX computers. I've been looking at opendir() and telldir(), but telldir() returns a off_t (long int), so it really doesn't help me.   How can I get the current path in a string (char array)?


I have python code like this:  newlist =[[52, None, None], [129, None, None], [56, None, None], [111, None, None],             [22, None, None], [33, None, None], [28, None, None], [52, None, None],             [52, None, None], [52, None, None], [129, None, None], [56, None, None],             [111, None, None], [22, None, None], [33, None, None], [28, None, None]]   I want the newlist like:  newlist =[52, None, None,129, None, None,56, None, None,111, None, None,22,            None, None,33, None, None,28, None, None,52, None, None,52, None,             None,52, None, None,129, None, None,56, None, None, 111, None,             None,22, None, None,33, None, None,28, None, None]   Is there any way to work around ?

Is there a simple way to flatten a list of iterables with a list comprehension, or failing that, what would you all consider to be the best way to flatten a shallow list like this, balancing performance and readability?  I tried to flatten such a list with a nested list comprehension, like this:  [image for image in menuitem for menuitem in list_of_menuitems]   But I get in trouble of the NameError variety there, because the name 'menuitem' is not defined.  After googling and looking around on Stack Overflow, I got the desired results with a reduce statement:  reduce(list.__add__, map(lambda x: list(x), list_of_menuitems))   But this method is fairly unreadable because I need that list(x) call there because x is a Django QuerySet object.  Conclusion:   Thanks to everyone who contributed to this question.  Here is a summary of what I learned.  I'm also making this a community wiki in case others want to add to or correct these observations.  My original reduce statement is redundant and is better written this way:  >>> reduce(list.__add__, (list(mi) for mi in list_of_menuitems))   This is the correct syntax for a nested list comprehension (Brilliant summary !):  >>> [image for mi in list_of_menuitems for image in mi]   But neither of these methods are as efficient as using itertools.chain:  >>> from itertools import chain >>> list(chain(*list_of_menuitems))   And as @cdleary notes, it's probably better style to avoid * operator magic by using chain.from_iterable like so:  >>> chain = itertools.chain.from_iterable([[1,2],[3],[5,89],[],[6]]) >>> print(list(chain)) >>> [1, 2, 3, 5, 89, 6]


This is a follow-up to my previous question here:   In Canasta, if the “partner” of the person who laid down an invalid meld after exposing her cards, now comes down with a valid meld, can she now use any of the cards in the “invalid” meld that are lying exposed?  Or are they only used for discards still?

Would like to know what happens when you come down with an invalid meld You have now exposed all your cards on the table. I was told you have to leave them down on the table and use them as discards. Until they are all gone. My question is is if you come down with a valid meld can your partner open and put her meld down? Or do you have to wait till all the cards that were exposed are discarded?


This is a my first foray into building electronics.  I am building a project that uses chip/SMD LEDs and resistors. What type of soldering kit should I be using for those devices?

Possibly many questions have been asked on soldering smd parts, but I haven't found specific answers, Like:   Do you use a watchmakers lens or some other type of magnifying glass while soldering these miniature components? What would be most optimum to see a larger picture? How do you solder components where pads lie beneath the package, I don't own a reflow oven and have tried to ignore these packages but can't do that anymore.  Are there any techniques to manually solder BGA, iLCC, CSP amongst others. What tools do you use, apart from tweezers, soldering iron, solder wire, and a bright/ illuminated workplace. Any suitable "third hand" that you have found that makes a monster of a difference? Is there a specific tip thickness to use for the soldering iron, what about the solder wire guage? For prototyping if would not always be feasible to make a pcb, do you solder these components on a veroboard or do you buy a breakout board?   You could add more to these based on your experience and wisdom...  Your turn.


How do I display images in the terminal? I am on Mac OSX mountain lion (10.8.5), and the answers in  don't work on OSX. Is it possible at all?

Can I see images and watch movies inside the terminal emulator? In case of virtual console I can do it via framebuffer, but what about terminal emulators?


If integers $a$ and $b$ are not both zero, then $\gcd(a,b)=\gcd(a-b,b)$   Assume either $a=0$ or $b=0$. If $a=0$, then $\gcd(a,b)=\gcd(0,b)=b$ and $\gcd(a-b,b)=\gcd(-b,b)=-b$, so $\gcd(a,b)\neq\gcd(a-b,b)$.  If $b=0$, then $\gcd(a,b)=\gcd(a,0)=0$ and $\gcd(-b,b)=\gcd(a,0)=0$.  So, what can I say? Can you help? Can you check my proof-trying?

Given: $a = qb + r$. Then it holds that $\gcd(a,b)=\gcd(b,r)$. That doesn't sound logical to me. Why is this so?    Addendum by LePressentiment on 11/29/2013: (in the interest of  and averting a duplicate)  What's the intuition behind this result? I only recognise the proof and examples solely due to algebraic properties and formal definitions; I'd like to apprehend the result naturally.


Can yeast leaven cornmeal? If not, why? The ?

I want to understand which flours can and can't be used with yeast to get a rise for baking bread. From what I understand, yeast consumes sugar and produces carbon dioxide, which gets trapped inside the dough and causes it to expand during proving.   Does gluten have any special properties for trapping carbon dioxide that make it uniquely capable of trapping CO2 or can I perform this process with a variety of flours?   Flours I'm interested in are soy flour, defatted peanut flour, brown rice flour,  dark rye flour, chickpea flour, sorghum flour, oat flour, and several varieties of corn flour.


I have a program that receives an argument and prints it every second:    ~# ./myapp 234 234 234 234 234 ...     I want to be able to run it in the background and right after a shell but it must be in one line (I don't want to explain why I need it because I don't want to make the discussion too complicated right now).    This is what I tried and the error I received:    ~# bash -c "./myapp 234 &; sh"  bash: -c: line 0: syntax error near unexpected token `;' bash: -c: line 0: `./myapp 234 &; sh'   I also tried with && as separator:    ~# bash -c "./myapp 234 & && sh"  bash: -c: line 0: syntax error near unexpected token `&&' bash: -c: line 0: `./myapp 234 & && sh'   Any idea how I can solve it?    EDIT: Thanks to @roaima. I also found a link that talks about it:

How can one run multiple programs in the background with single command?  I have tried the commands below, but they do not work.  nohup ./script1.sh & && nohup ./script2.sh & -bash: syntax error near unexpected token '&&'  nohup ./script1.sh & ; nohup ./script2.sh & -bash: syntax error near unexpected token ';'


The definition is given by the following formula:  $$\limsup_{n \rightarrow \infty} x_{n} := \lim_{n \rightarrow \infty}(\sup_{m\geq n} x_{m}) $$  I could not understand the meaning of $(\sup_{m\geq n} x_{m})$ and why we have this number m and why it must be $\geq n$, could anyone explain this for me please?

How to explain the following definition of $\lim\sup s_n$ intuitively?  let $\lim\sup s_n$=$l$  The definition is ($\forall t<l,\forall N,\exists n>N, s_n>t$) and ($\forall t>l,\exists N,\forall n>N, s_n<t$)  For the first one, if we have a increasing sequence from very negative to $0$, how is it still true. i.e. $\{-1, -0.5, ... , -0.00001,...\}$, here $\lim\sup s_n=0$. let $t=-1,$ so $t<0$, but not all terms are greater than $t$.  For the second one, I am also confused. I think It would be great if someone could show some valid examples.  Also when we prove the such limit exists, is it necessary to show both characteristics?