Getting the graphics/pictures at the right spot

I have three .eps files which i saved from MATLAB.Iam writing in latex and would like to add these three pictures just below my text in the section that Iam writing in.here is the latex code Iam using:   \begin{figure}[H] \includegraphics[height=150px,width = 200px ]{poisson1.eps} \hfill \includegraphics[height=150px ,width = 200px ]{poisson2.eps} \hfill \includegraphics[height=150px ,width = 200px ]{poisson3.eps} \end{figure}   The first problem is that these graphics/pics. end up at the end of the document not below my text as i want. Latex just seem to put the graphics/pictures where it wants. How can i change the way latex chooses to place the graphics/pitures  Can someone help?


Could anyone please indicate a general strategy (if there is any) to get the PDF (or CDF) of the  product of two random variables, each having known distributions and limits?   My particular need is the following: Let $w :=u \cdot v$. The PDF of $u$ is $$\frac{1}{\pi u}\frac{1}{\sqrt{u^2-0.25}},$$ for $z>0.5$ and the PDF of $v$ is $$\exp\left(-\frac{v}{v_0}\right),$$ for $v_1<v<v_2$. What's the PDF of $w$?


I am a beginner in English and I am quite confused about the name of this challenge. How is it correct, "10 year challenge" or "10 years challenge"


I'm trying to model a room. For this I created walls around the room by basically extruding a cube three times and then attaching the ends. I want to now make a loop cut around the wall to make holes for windows and doors, but it doesn't work as expected. Basically I would like the loop cut to go all the way around the room, but for some reason it stops at one of the edges. See the pictures attached. Why does it do this and how do I fix it?


How do I code a table to look like this? I'm not the best at LaTeX and can't seem to wrap my head around \multirow. I checked other examples prior to posting but they used \multicolumn and it just confused me even more. Thanks in advance!    \begin{center} \begin{tabular}{ |c|c|c|c|c|}   \hline  TextA & TextB & TextC & TextD & TextE\\  \hline  A & TextF & TextG & TextH & TextI\\  B & TextJ & TextK & TextL & TextM\\  C & \multirow{2}*{TextF} & TextG & TextH & TextI\\  \cline{3-3}  & TextJ & TextK \\ \hline \end{tabular} \end{center}   I was trying something like this.. I'm starting to have problems as I'm trying to multirow within a multirow? I'm not sure of the process here. I would like TextG to be split into 2 and TextH and TextI to be the cells which are split in 3 but not sure how to go about it. Will then TextJ and TextK be the contents of the split TextG cell?


Does the figure eight ($S^1\vee S^1$) have the fixed point property?

Does the figure eight (The wedge sum of two circle $\simeq S^1\vee S^1$) has the fixed point property or not? How would you justify your answer?


I'm working my way through the Oxford notes in Probabilistic Combinatorics and came across this question in one of the question sheets; I'd like to stress that this is not my homework: I'm simply working through the notes for my own pleasure.   For $n, r ∈ \mathbb{N}$, $1 < r < n$, let $z(r, n)$ be the largest possible number of $0$ entries in an $n × n$ matrix which has no $r × r$ submatrix whose entries are all $0$. (Here a submatrix is obtained by selecting any $r$ rows and any $r$ columns; the rows/columns need not be consecutive.)  Consider a random matrix in which each entry is $0$ with probability $p$ and $1$ with probability $1−p$, independently.   Deduce that $z(r, n) > pn^{2}-p^{r^{2}}n^{2r}.$  My solution:  Let $[n]_{2}$ denote the set of all $n \times n$ matrices, with only $0-1$ entries. For each $\sigma \in [n]_{2}$ let the random variable $X(\sigma)$ denote the number of $0$ entries in $\sigma$ and the random variable $Y(\sigma)$ denote the number of $r \times r$ submatrices filled with entirely with $0$'s. It follows that $\mathbb{E}(X)=pn^{{2}}$ and $\mathbb{E}(Y)=\binom{n}{r}^{2}p^{r^{2}}<n^{2r}p^{r^{2}}$.   Further more consider the random variable $X-Y$ for which $\mathbb{E}(X-Y)>pn^{2}-n^{2r}p^{r^{2}}$. It follows that there exists a $\sigma \in [n]_{2}$ such that $X(\sigma)-Y(\sigma)>pn^{2}-n^{2r}p^{r^{2}}$. Given such a $\sigma$ construct $\sigma' \in [n]_{2}$ as follows. For each of the all $0$, $r \times r$ sub matrices of $\sigma$ remove at random a single $0$ from each to ensure $\sigma'$ has no $r \times r$ such sub-matrices. We have removed at most $\binom{n}{r}^{2}<n^{2r}$ such zero's and so we can conclude that $\sigma'$ has at least $pn^{2}-p^{r^{2}}n^{2r}$ zeros thus we can conclude that $z(n,r)>pn^{2}-p^{r^{2}}n^{2r}$.  I'd appreciate any comments on the validity of the proof.


Can two solids, a human and a wooden desk, using only human muscular power to close the distance, actually physically touch at the atomic level?

If a human places their hand on a wooden desk, the sense of touch and solidity is actually provided by the repulsion effect of the electron shells of the atoms in the hand and desk giving feedback to the various sensors in the human body.   Can these two things actually physically touch at the atomic level?   In this case we are defining "touch" as the atoms of the hand and desk coming as close to each other as the atoms in the desk are to each other normally.  Using only human muscular power to close the distance, can it be proven that a hand and the wooden desk have physically touched as per the given definition?


Batch File Copy and Move without overwriting

I'm trying to create a batch file (to run in the background) that will copy a single file without overwriting any file in the destination with the same name, and then move the file, again not overwriting if there is a file in the destination with the same name?  I'm using this at the moment, but it is overwriting.  copy %1 dest move %1 dest


How can I protect my data in the event that my laptop gets stolen?

Can someone access your info if your laptop gets stolen? I've seen a bunch of videos on how easy it is to recover your password.. Any way to make your data "hack proof"?


Does gelatin work for clarifying beer?  If so:   How much do you use?   When do you add it?   How do you prepare it? (Do you boil it in water? How much water to dissolve the gelatin?)


Let $A$ be the set $\{\propto,\{1,\propto\},\{3\},\{\{1,3\}\},3\}$.   The statement "$\{1,\propto\}\subseteq A$" is false.   (Taken from )  But I think this is true as can see $\{1,\propto\}$ as being a subset of $A$ ?


How to check if two objects (or arrays, maps, sets, etc) have the same values as another?

I have already looked at , but I'm not looking for references. I'd like to know how to check if two objects, or two arrays, two maps, two sets, etc, have the same values as another. Edit Not only the same values, but also keys! For example; var a = {foo: "bar"}; var b = {foo: "bar"}; a == b // I'd like true, but this returns false  Above code will return false, because of object reference. I do know that "foo" == "foo" will return true, because that's how strings work, but how's that for objects, arrays, maps, etc?


How to install .dict.dz/.index files to OSX dictionary.app

I have a dictionary that consists of a dictionary.dict.dz and dictionary.index files. How can I install this dictionary for use with OSX dictionary app (running Mavericks)?  It works fine with GoldenDict, but I'd prefer to have this dictionary amongst the rest.  DictUnifier, which I have used to install a few other dictionaries, doesn't recognize the file.


Why isn't tilde recognised as home folder in this case?

This doesn't work:  $ ls "~/.wine/drive_c/tools/Family Tree v2.0" ls: cannot access '~/.wine/drive_c/tools/Family Tree v2.0': No such file or directory   But this does:  $ ls "/home/daniel/.wine/drive_c/tools/Family Tree v2.0" Dossiers                           Dossiers_orig   Infos.opt      Racines.exe  'Register OCX.bat'   racines.CNT Dossiers-2019.11.03-11.46.tar.gz   Html            REGSVR32.exe   Racines.hlp   Uninst.isu          readme.txt   Given that ~ is supposed to be the same as /home/daniel, what's going on here?


How can I find the top users for a specific tag? For example, Java on Stack Overflow. I want to filter the "Users" tab by Java the tag.


C++ when to create an object on the heap

I know this question has been asked before but I could use some clarification.  Here is a simple example I was trying to understand:  string s1; string *s2 = new string();   What I know:   s1 will be created on the stack  s2 will be created on the heap The stack is faster  s2 must be manually deleted  In general - create on stack unless you have to create on the heap.   What I am confused about:   When would you ever have to use the heap? - A common advantage I've read is the object will still be available after you exit the scope of the function it is created in.  Why would this ever be desirable?  Couldn't just just create on the stack and then pass by reference to use that object outside of your current function?  An example would be very helpful. I am aware that the stack has a limited amount of memory so in the example above if I were to store a huge string into both s1 and s2, is there a point where s1 would overflow (would this cause a stack overflow?) while s2 would retain all the input?  If such a point does exist is this dependent on the machine and is there a way to find out the max s1 could store before such a problem occurs?


Why is a sample covariance matrix singular when sample size is less than number of variables?

Let's say I have a $p$-dimensional multivariate Gaussian distribution. And I take $n$ observations (each of them a $p$-vector) from this distribution and calculate the sample covariance matrix $S$. In this , the authors state that the sample covariance matrix calculated with $p > n$ is singular.    How is it true or derived? Any explanations?


Synchronize multiple threads to edit a Hashmap

I want to let a single thread wait for another one to finish writing on a Hashmap but I always get a java.util.ConcurrentModificationException, eventhough I synchronized the method.  Here is my Code:  HashMap<Page, Integer> prebuffer = new HashMap<Page, Integer>(); Map<Page,Integer> buffer = Collections.synchronizedMap(prebuffer);  private synchronized void bufferContaining(int pageid) {     synchronized (buffer) {         if (buffer.size() > 1) {             for (Map.Entry<Page, Integer> entry : buffer.entrySet()) {                 Page page = entry.getKey();                 int taIds = entry.getValue();                 if (page.pid == pageid) {                     buffer.remove(page, new Integer(taIds));                 }             }         }     } }   Thank you very much for your help! :)


After restarting my ubuntu is stuck on a black screen with some boot messages after restarting. I tried to use the recovery mode and use the dpgk and fsck commands, the dpgk didn't change anything and fsck wouldn't work because the system is in read/write mode.   What are my options here? I have some important files on the installation so I can't just reinstall.  Might be worth mentioning that I have a dual boot, grub menu is working fine, and that I restarted initially because I couldn't open terminals any more. Version is Ubuntu 18.04.  The last boot message is "Started the Apache HTTP server.dispatcher service .... ystem changes.pp link was shut down".  Thanks for reading, any help is greatly appreciated!


Is there an "open with" command for the command line?

Does the command line have a way to get a recommended list of programs used to open a particular file, based on the file type? For example, a .pdf file would have an open with... recommendation using the programs Evince and Document Viewer.   I use the command line for most things, but sometimes I forget the name of a program that I want to use to open a particular type of file.   BTW I am using Ubuntu 13.10.  pro-tip  Thanks to @slm 's selected answer below, I made the following bash script in a file called openwith.sh:  xdg-mime query default $(xdg-mime query filetype $1)   Add as an alias or execute directly as an openwith command.


characterization of the existence of higher order expectation.

Consider a non-neg r.v $X$ and fix a positive integer $n$, I am trying to show that a necessary and sufficient condition for the $n$th order expectation to exist is that $\sum_{i\in\mathbb{N}}i^{n-1}P(X\ge i)$ converges.   Attempt: We have a well established relation,  $\sum_i P(X\ge i)\le EX < 1+\sum_iP(X \ge i)$, I am convinced this is used but i am unsure how to to incorporate $i^{n-1}$ . If we consider a partition of the real line given by $A_i=\{i-1\le X < i\}$ and then let choose $X_i=(i-1)I_{A_i}$ then the series is a discrete r.v. with $E(\sum_i X_i)=\sum iP(X\ge i)$ which is similar to the form we need it in. But im unsure where to go from here.


Sci-fi cartoon show with an elite soldiers group

There was this sci-fi animated series. A cartoon show, if you must. It had a group of men and a woman who were part of some special elite group. The had lego blocks sort-of-a-thing on their body (not sure if as a part of their armour). Whenever the need arose, special weapons or types of equipment would attach to their backs, their arms etc. For example, you could attach jetpack wings to the back and basically fly. Or you could attach a gun to your arm.  I am just able to remember one particular scene and have mentioned all that I could recall from it.  All the characteristics of the show I would now further describe may be from a completely different series and just mixed up with this memory.  There was this white dude, who was the leader of this squad and would get the best possible equipments for a particular fighting climax.  The setting was a pretty modern day era, which I don't think had dark gloomy alien species. Completely not sure about this part though.


How can I model indentations on a surface?

I'm trying to learn blender, and for fun trying to make a model of a bottle. The bottle shape is no problem, but the bottle has a special pattern in its material that needs to be cut out from it. How can i do this? I tried many different ways but nothing worked very well. I've attached an image of bottle in Blender. The pattern I want to cut out is the photo I've used as background image.


Why is it not true that $\int_0^{\pi} \sin(x)\; dx = 0$?

I know the following is not right, but what is the problem. So we want to calculate  $$ \int_0^{\pi} \sin(x) \; dx $$ If one does a substitution $u = \sin(x)$, then one gets $$ \int_{\sin(0) = 0}^{\sin(\pi) = 0} \text{something}\; du = 0. $$ We know that $\int_a^a f(x) \; dx = 0$ for all functions $x$, so why doesn't this work for the above?  I get that the "something" "can't be found" because $du = \cos(x)\,dx$. But does it really matter what the $du$ is when one is integrating from $0$ to $0$?  Edit: I don't know what a "diffeomorphism" is. I am just in basic calculus.


Laravel project in subfolder of public_html gives trouble with .htaccess redirect

I've set up my VPS server and am trying to set up a Laravel project. I have a /public_html/ folder with an index.html that's shown when visiting the website URL.   I have a laravel project in: /public_html/project_one/ The original index.php is located in /public_html/project_one/public/index.php   I want the website to show to Laravel project_one by default, but since yesterday I literally googled this for 4 hours, I tried every solution on stackoverflow, nothing worked... I think I've tried over 10 versions of .htaccess I could find.  The question:  Does anyone know how to setup the .htaccess inside /public_html/ so it redirects to my Laravel project in /public_html/project_one/ ? And have the .htaccess inside /project_one/public/ be compatible with this?  I want the main url to show the Laravel project. So www.mainurl.com is Laravel's project_one/public/index.php file. I do not want /project_one/ to be written in the URL!  Just out of curiosity, if I now visit: www.mainurl.com/project_one I get a 403 forbidden.  Failed solutions  In /public_html/ I tried to add .htaccess with:  DirectoryIndex index.php  #Redirect to /project_one/public if you haven't already and the IP is okay RewriteCond %{REMOTE_ADDR} ^1\.2\.3\.4* RewriteCond %{REQUEST_URI} !^/project_one/public RewriteRule ^(/lucaphoto)?(.+) /project_one/public$2 [L]  #if IP does not match and you ARE in the folder, then Redirect to root RewriteCond %{REMOTE_ADDR} !^1\.2\.3\.4* RewriteCond %{REQUEST_URI} ^/project_one/public RewriteRule .? / [R=301,L]   This gives me something really strange:   On Chrome: it redirects me to www.mainurl.com/project_one -> And then gives me a 403 forbidden error... On safari: it redirects me nowhere but gives me this error:      Forbidden. You don't have permission to access / on this server.      Additionally, a 404 Not Found error was encountered while trying to   use an ErrorDocument to handle the request.   Laravel's original .htaccess File  By the way, Laravel has an original .htaccess file at /project_one/public/.htaccess. And it looks like this:  <IfModule mod_rewrite.c>     <IfModule mod_negotiation.c>         Options -MultiViews     </IfModule>      RewriteEngine On      # Redirect Trailing Slashes If Not A Folder...     RewriteCond %{REQUEST_FILENAME} !-d     RewriteRule ^(.*)/$ /$1 [L,R=301]      # Handle Front Controller...     RewriteCond %{REQUEST_FILENAME} !-d     RewriteCond %{REQUEST_FILENAME} !-f     RewriteRule ^ index.php [L]      # Handle Authorization Header     RewriteCond %{HTTP:Authorization} .     RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] </IfModule>   Someone said this was a duplicate for:  But it's really not. I read that whole article, tried some tweaks, couldn't solve the problem... : (


Can I install and use the video driver from the CD that came with my motherboard in place of the driver that comes with newer releases of Ubuntu?

I have been booting Ubuntu to 3.13.0-93-generic because the newer releases do not support the RS880 [Radeon HD4250] video card that is built-in on my motherboard.    If I were to install the latest release of Ubuntu, would I be able to use the video driver from my Asus CD that came with the motherboard?    Please see question, "" if you need more detailed information about the problem I am experiencing.  I understand that Ubuntu is not supporting my old video card because AMD did not agree to continue supporting it for another five years, but will my old driver work with the newer release of Ubuntu?  If so, how do I go about installing the driver from my CD?  (I know a little, but never enough.)  Thanks!    I really don't want to buy a new computer just because this one is old.  It still works great with the older software on it, but 14.04 LTS keeps wanting to upgrade and I can't because of the driver issue.  Thanks again!


Let G be an order 957 group. I have to prove that it is cyclic.  When I calculate Sylow p-subgroups for p=3, I find that 319 is a valid number or Sylow 3-subgroups. p=11 and p=29 gives me a normal Sylow p-subgroup for each of them.  I know that, if all Sylow groups were normal, we could probe the isomorfism to cyclic 957 group. By Sylow, how could this be solved?


Can I use math functions in PIC16F877A code?

Can I use exponential (exp) math function in PIC16F877A code? For example like this:  double a,ans; a=5.7; ans=exp(0.5);


I'm fairly new on using LaTex, so maybe this is a really simple question to answer. I've rewritten the whole question due to the comments made.  What I'm trying to do is to declare my own command that is just like \footcite but that exclude the year.  The problem is that I in some citation don't want the year to be printed, just the author. So in general the command \footcite works perfectly with verbose-ibid, but for some specific citations the year shouldn't be printed.  Here is an example of my LaTex code (which I hope is MWA):      \documentclass{book}    \usepackage[utf8]{inputenc}     \usepackage[swedish]{babel}     \usepackage[style=verbose-ibid, backend=biber, labeldate, isbn=false, url=false, sorting=nyt, hyperref=true, pagetracker=true]{biblatex}  \usepackage{filecontents} \begin{filecontents*}{\jobname.bib}     @book{200910rp162,     Address = {Stockholm},     Author = {Prop.{ }2009/10:162},     Title = {Ers{"a}ttning vid expropritaion},     Year = {2010},     Keywords = {offentligttryck},     }     @book{Babcock1931rev,     Address = {Ann Arbor},     Author = {Babcock, Frederick M.},     Publisher = {University of Michigan, School of Business Administration, Bureau of Business Research},     Title = {Real estate valuation : a statement of the appraisal problem and a discussion of the principles involved in the development ...},     Year = {1931},      keywords={litteratur}, } \end{filecontents*} \addbibresource{\jobname.bib}  \DeclareNameAlias{default}{last-first} \renewbibmacro*{cite:short}{%   \printnames{labelname}%   \setunit*{\nameyeardelim}%   \iffieldundef{labelyear}     {}     {\printtext[parens]{\printtext[bibhyperlink]{%        \printfield{labelyear}%        \printfield{extrayear}}}}} \begin{document}  Some text that I have a citation on.\footcite[s. 12]{200910rp162}  And some other text I cite on another page.\footcite[s. 15]{200910rp162}  Text.\footcite[s. 12]{Babcock1931rev}  Text2.\footcite[s. 15]{200910rp162}   \end{document}   In my presented example footnote 1-3 is good. It's the 4th that is wrong, I don't want it to display the year (2010) for that specific source. But for "normal" literature I want it just like how \footcite works.     Edit: Regarding the comment. I'm writing a book about Swedish Law, and it's customary to cite Government bills that precede a new law by the name of the bill, e.g. Prop 2009/10:162 and a page reference. That's why I put the name of the bill as author in my .bib. And I also put the { } so that it comes out as Prop. 2009/10:162, otherwise LaTex treats the 2009/10:162 as surname and put it first. For all my "normal" citations I perfectly happy :). It's just for this "Prop-citations" I'm struggling.  I tried to make my own command with:      \DeclareCiteCommand{\footciteauthor}[\mkbibfootnote]   {\usebibmacro{prenote}}   {\usebibmacro{citeindex}%    \usebibmacro{citeauthor}}   {\multicitedelim}   {\usebibmacro{cite:postnote}}   But it didn't work. I also tried the tips with shorthand. It works okay, but then the "ibid-tracker" doesn't work.  Final edit: I manage to make my own solution, that I don't think is the best one, but at least it works for now. This is what I did (I reckon that it could be interesting if someone else has the same problem). First I took away all Year-entries in the .bib for the sources that I don't want year to be showed. Then I added this to my preamble:  \renewbibmacro*{date+extrayear}{%     \iffieldundef{year}       {\printtext{}}       {\printtext[parens]{\printdateextra}}}%  \DeclareNameAlias{default}{last-first} \renewbibmacro*{cite:short}{%   \printnames{labelname}%   \setunit*{\nameyeardelim}%   \iffieldundef{year}     {\printtext{}}     {\printtext[parens]{\printtext[bibhyperlink]{%        \printfield{labelyear}%        \printfield{extrayear}}}}}   Sorry for long post :)


I am looking at the c code:   if((VAR_ON&3) > 1)   I am not sure what kind of variable VAR_ON is, my guess is it is a pointer, but what does the &3 at the end do to it? I apologize if this is a duplicate question, I just could not find any question regarding the ampersand AFTER a variable.


import math def hexToDec(hexi):     result = 0     for i in range(len(hexi)-1,-1,-1):         if hexi[i] == 'A':             result = result + (10 * math.pow(16,i))         elif hexi[i] == 'B':             result = result + (11 * math.pow(16,i))         elif hexi[i] == 'C':             result = result + (12 * math.pow(16,i))         elif hexi[i] == 'D':             result = result + (13 * math.pow(16,i))         elif hexi[i] == 'E':             result = result + (14 * math.pow(16,i))         elif hexi[i] == 'F':             result = result + (15 * math.pow(16,i))         else:             result = result + (int(hexi[i]) * math.pow(16,i))     return result   Even after reversing the range order and reimporting I still get the same results.


How to study the convergence of $\int^{\infty}_{0}\frac{2\cos(t)\sin(t)}{t}dt$?

By using Taylor series, I managed to see that the $t \rightarrow 0$, $\frac{2\cos(t)\sin(t)}{t} = 1 -\frac{4t^2}{6}$ whose integral converges. As for the case when $t \rightarrow \infty$, I don't know that to do. It equals to $\int^{\infty}_{0}\frac{\sin(2t)}{t}dt$. What can I do?


Algorithm for finding random and unique number in a range

I want to know an algorithm to find unique random number which is non repeatable. Every time when I call that in program should be give a unique and random number which is not given before by that algorithm. I want to know because some time in a game or app this kind of requirements are came.   For ex. In a game I have created some objects and save all them in a array, and want to retrieve  them by randomly and uniquely and not want to delete from array. This is just a scenario.  I have tried some alternative but they are not good performance wise, never got answer of this question.  How it is possible programmatically?  Thanks in advance.


I am building a map reduce job.  The problem is that comparing is not working correctly.  How can I compare these Strings?  public void reduce(Text key, Iterable<Text> values,         Context context) throws IOException, InterruptedException {      int numItems1 = 0;      for (Text val1 : values) {         if(val1.toString()  == "view")   /// if not working         {             numItems1 = numItems1+1;             numItems2 = 0;             numItems3 = 0;             result1.set( numItems1 );             // val1.set(   result1 + "," + numItems2 + "," +   numItems3  );         }     }      val1.set(result1 + ",");     context.write(key,val1); }


What is Meta protocol for re-requesting ignored feature requests?

Sometimes a feature request is made and then, for whatever reason, time passes and it is ignored without much feedback and without being graced with "status-declined."  Suppose someone else comes along later and agrees with that feature request.  What is the protocol for that user calling attention?  Options as I see them are combinations of the following:   Upvote the old request Make a change in order to bump the old request Place a bounty on the old request Make a new request   It seems to me that #4 is likely to be the most effective but is in risk of being closed as a duplicate.  What's the correct way to handle this sort of thing?  On a related note, suppose that rather than being ignored, the old request actually was explicitly declined, but now someone that wasn't around the first time wishes to add to the discussion.  It's not unheard of for "status-declined" to be changed, but it seems unlikely that upvoting an old, stale, declined feature request is going to do anything.


I recently bought some , considered to be the world's best selling desk toy. Essentially, they are little, spherical magnets that can form interesting shapes when a bunch of them are used together.  After playing around with these buckyballs for a while, I wondered: "Can these guys ever lose their magnetism?" Then I went a step further and thought, "How are magnets affected by the 2nd law of thermodynamics?"  So, how are magnets affected by the 2nd law of thermodynamics? Do they break down and lose their magnetism over time (like iron rusts over time)?


How to open a file in LibreOffice Writer from terminal and be back at terminal

How can I open a file in LibreOffice Writer from terminal and be back at terminal to continue with other tasks?  For instance, if I insert     libreoffice CV*.odt   it will open the file in LibreOffice but I will be unable to proceed with further commands in that instance of terminal.


When are quotients of homeomorphic spaces homeomorphic?

Let $X$ and $Y$ be homeomorphic topological spaces, connected by the homeomorphism $f : X \rightarrow Y$. Let $\sim$ be an equivalence relation on $X$ and $\approx$ be an equivalence relation on $Y$.  I would think that there would be some structure that I could place on the equivalence relations $\sim$ and $\approx$ that would allow me to construct, using the homeomorphism $f$, a homeomorphism $\bar{f}$ from $X/\sim$ to $Y/\approx$. I suspect that that relationship is $a \sim b \leftrightarrow f(a) \approx f(b), \forall a, b \in X$.  That is, I suspect that "equivalent" quotients of homeomorphic spaces are homeomorphic, but I don't know exactly how to formulate this or prove it.  (This result, by the way, to me, seems to hinge on the existence of a "reverse" universal quotient property: juts as functions $f : X/\sim \rightarrow Y$ correspond uniquely to a subset of functions $f : X \rightarrow Y$, I suspect that functions $f : X \rightarrow Y/\approx$ correspond uniquely to some subset of functions $f : X \rightarrow Y$, but I don't know how this works either.)


Hello is there any way to edit html tag class name from script? For example: html: <div id="ThisIsId" class= "ThisIsName"> ... </div>  Script: <script> document.getElementById("ThisIsId").changeClassName("thisIsNewClassName")  </script>


Check if a relation on a set is a function

What do I need to look for in order to tell if a  relation on a set is a function?  Can somebody provide some advice?  For example, the relation is defined by $H$ on $A \times \mathcal P(A)$ for $a ∈ A$ and $B ⊆ A$, $a\, R\, B$ iff $a ∈ B$.  Where $A =\{0,1\}$ does this mean H is a function?


As Pakistani Passport holder and a Schengen visa holder do i need aTransit Visa for Manchester

I am Pakistani passport holder and I have a Schengen Visa and studying in Sweden going back to my country and the flight I booked has a 21-hour layover at Manchester do I need to apply for a transit visa.


‘In’ a meeting or ‘at’ a meeting? Which one is correct?

I would like to know what preposition ‘meeting’ should take. Should I say I’m at a meeting or I’m in a meeting?


Given the series $\sum^{\infty}_{n=1} \frac{n!z^n}{n^n}$ find the radius of convergence.  Well, I know that if the following Lemma holds:  Lemma  Given the series $\sum^{\infty}_{n=1} c_nz^n$ where $c_n,z \in \mathbb C$. If $\beta := lim\frac{|c_n|}{|c_{n+1}|}$ exists, then it is also agrees with the radius of convergence $\rho := \frac{1}{limsup|c_n|^{1/n}}$. That is, $\beta = \rho$  Attempt at the Solution  First I apply the lemma above:  $\frac{\frac{n!}{n^n}}{\frac{(n+1)!}{n^{n+1}}} = \frac{n}{n+1} = 1 -\frac{1}{n+1} \rightarrow 1$  If I now consider  $\limsup(\frac{n!}{n^n})^{1/n} = \limsup\frac{(n!)^{1/n}}{n} \rightarrow +\infty$   Since $\limsup(n!)^{1/n} \rightarrow +\infty$ faster than $\limsup n \rightarrow +\infty$  On the authority of the textbook I'm reading, the radius of convergence should be $e$ I'm not quite sure how one comes to that conclusion. If anyone could point me into the right direction that would be great. Thanks.


Should tiny edits be accepted or rejected in review?

I regularly review suggested edits on the . One common situation is that a user will propose a tiny edit, like , or removing only the salutation from a post. In many cases there are still multiple further improvements that could be made, but that editor hasn't seen them - or can't be bothered.  I feel uneasy accepting such edits. On the one hand, it reminds me of the army of 'twiddlers' on Wikipedia, who spend their time making tiny inconsequential edits when they could be doing something much more useful. It also feels lame to award someone any points at all for capitalising a single letter in a title. I sometimes feel that this may be a kind of gaming of the system on the part of some users - suggesting multiple small edits for point gain rather than just fixing the whole post. I also see this with tag wiki editing.  On the other hand, it is a valid edit, and it does objectively improve the post.  There has been a prior ruling on part of this. There was some substantial discussion about the aggressive removal of salutations during the Rich B era (remember that wonderful chap?). I seem to remember that the conclusion was that removal of "hi! / thanks!" on their own was not sufficient grounds for a post edit, although I can't find that now ( is relevant, but inconclusive).  I have been erring on the side of 'this edit is pointless' and voting to reject, but I notice I am often overruled by other reviewers.  Perhaps one answer would be to provide a third option, after accept/reject:insufficient?  What behaviour are we intending to reward here?


Concatenate one-to-many field in single result?

Say I have the following query:  SELECT *  FROM AppDetails, AppTags  WHERE AppDetails.AppID = '1'    AND AppDetails.AppID = AppTags.AppID   Which gives the following results:  AppID    AppName        AppType    Tag 1        Application1   Utility    Test1 1        Application1   Utility    Test2 1        Application1   Utility    Test3   How can I modify the query to return something like this:  AppID    AppName        AppType    Tags 1        Application1   Utility    Test1,Test2,Test3


MYSQL: Incorrect collation is picked for query

I am facing some weird collation issue which I really don't understand. I have table containing polish accented letters like "Ł" in two or three columns. Due to occurrence of this letters, utf8_unicode_520_ci collation is most suitable for my purpose. I am facing this issue in my PHP page. Webserver is running Apache 2.4, PHP 7.1.0, MySQL 5.7.  After connecting to database, I am setting charset and collation this way:  $connection->set_charset("utf8"); $connection->query("SET NAMES utf8 COLLATE utf8_unicode_520_ci;");   Afterwards I am double-checking actual charsets and collation using SHOW VARIABLES LIKE '%collat%'; and SHOW VARIABLES LIKE '%char%'; which in formatted form return following information:  collation_connection->utf8_unicode_520_ci collation_database->utf8_unicode_520_ci collation_server->binary character_set_client->utf8 character_set_connection->utf8 character_set_database->utf8 character_set_filesystem->binary character_set_results->utf8 character_set_server->binary character_set_system->utf8 character_sets_dir->/usr/share/mysql/charsets/   Until this point everything seems to be corrrect. But i am facing ordering issue when I am running query below:   SELECT birthPlace FROM persons ORDER BY birthPlace DESC LIMIT 5;   which retrun following results:  Łapsze Wyżne Łapsze Wyżne Zvolenská Slatina Župčany Župčany   Entry "Łapsze Wyżne" should not be listed as last as per utf8_unicode_520_ci collation it should be listed along with entries starting with normal "L" character. So it is evident that it is picking other collation then utf8_unicode_520_ci.I think is utf8_general_ci collation what is used (guessing from results order). Collation of table and column "birthPlace" is utf8_unicode_520_ci. I've expected collation precedence will be default column, table, database respectively.  phpMyAdmin and MySQL Workbench sort entries as expected. But my script is not sorting as expected.  So my question is what collation is really used if it is not explicitly set in query and how to solve it without modifying query if possible.   EDIT: Question itself is not about choosing proper collation as I already know and defined collation which is correct one for my purpose on all places I am able to control. Question is what collation is used if it is not explixitly defined in SELECT query. It is collation of connection, column, table, database, or server? Or it is default collation of used charset (in my case it is utf8_general_ci for uth8 charset? This is not clear to me from documentation. I want to order results by utf8_unicode_520_ci by default without defining it in every query I'll run in future. It is possible?


I'm working on a project, written in Java, which requires that I build a very large 2-D sparse array.  Very sparse, if that makes a difference.  Anyway: the most crucial aspect for this application is efficency in terms of time (assume loads of memory, though not nearly so unlimited as to allow me to use a standard 2-D array -- the key range is in the billions in both dimensions).  Out of the kajillion cells in the array, there will be several hundred thousand cells which contain an object.  I need to be able to modify cell contents VERY quickly.  Anyway: Does anyone know a particularly good library for this purpose?  It would have to be Berkeley, LGPL or similar license (no GPL, as the product can't be entirely open-sourced).  Or if there's just a very simple way to make a homebrew sparse array object, that'd be fine too.  I'm considering , but haven't heard any opinions on its quality.


There are some really good discussions of the meaning/ambiguity of the term "natural"  and .  One thing I didn't quite get from those answers: when we say the Snake Lemma, for instance, is "natural", shouldn't we really say it is "functorial"? In other words, it doesn't just associate with each diagram a long exact sequence, it takes maps between diagrams to maps between long exact sequences?


Minecraft Lan connection connection error: io.netty.channel.connecttimeoutexception connection timed out on Mac

Me and my friend want to play Minecraft together on the same WiFi. He has a Windows 10 computer and I have a Mac. At first, opening to LAN would not show up at all. Then I found a way to prefer IPv4 using:  _JAVA_OPTIONS=-Djava.net.preferIPv4Stack=true /Applications/Minecraft.app/Contents/MacOS/launcher   This would make my friends place show up on my screen, but my friend would not see my place when we enabled our open to LAN at separate times. I tried disabling my firewall and it would still not work. When I try to connect to my friends place, I get the error     io.netty.channel.connecttimeoutexception connection timed out.   When my friend tried to direct connect, he would get the same error. Any help is appreciated. We are both on the same Internet right next to each other.


How to show evidence of money being transferred from another account?

I am a Doctor from Bangladesh. I have passed PLAB 1 and going to apply for PLAB 2 visa which falls under the category of Standard Visitor visa. I am really worried because, as currently I am unemployed and working as a trainee Doctor in a hospital, my father is sponsoring me for my upcoming trip. He is a Government employee. His monthly salary is about £500. The problem is the bank statement he is going to show received a recent deposit of about £6,000.  Part of it (around £2,000) was transferred from my mother's savings account to his account and the rest of the money came from a car sale. I am going to show the documents for the car sale during the application.  But the problem is, how can I show that £2,000 which was transferred from another account?


Add advanced search options to the help pages

I was attempting to guide a new user into using the advanced search options today but realised that you can't do it from the Advanced Search Tips link on the search page itself (as it is collapsed by default).  I then tried the , however they are not explained here either.  I realise that you can just tell users to go to the search page and click advanced tips, however that seems clunky.  It also seems odd that the extended help page would just send you back to the old page after all the effort that has gone to to set it up.    I know there's a lot to be said for keeping the help pages concise for new users to easily navigate, however I would like to suggest that either advanced search options are added in full to the search help page or alternatively a new help entry for advanced search options is created.


Do array(or ArrayList) and LinkedList perform the same when iterating?

I know arrays are faster at getting and setting, while LinkedLists are better at adding and removing elements, but what about when iterating? A more "traditional" for(i=0;i<intList.size();i++) would definitely make LinkedLists slower since you'd have to get the element at index i every time. But what if I use for(int i : intList)? How does it work under the hood for this instance? For example:  LinkedList<Integer> intList = new LinkedList(); /* populate list... */ for (int i : intList) {     //do stuff }   I imagine that there's no need to get an specific element when going through the whole List, so it should be possible to have some sort of loop implementation where performance is about the same. Though I don't know how exactly how for is implemented for this example so I can't be sure if this is it.


How to create a map-like (clouds) texture

If you place a map of the world on a sphere, it will look like the image is continuous. Basically the left end of the image is sort of a continuation of the right end. You won't be able to see any cuts.  I'm trying to create a clouds texture to add to my planet such that it will seem it has clouds. I managed to create the clouds in GIMP, however, I can't figure out how to make sure the left end of my image is a smooth continuation of the right end. For example if you were to map the below image to your sphere (I removed transparency to make it clearer), there would be a very obvious transition from the right end of the image back to the left end on your sphere. How would I create a texture such that I get rid of that?   Sorry for my lack of terminology.


Why do ceramic insulators have a stacked disc structure?

I've seen these stacked-disc structures on high voltage power lines everywhere. I could not find any information regarding this particular shape, though.       From what I've noticed, high voltage ceramic insulators only insulate conductors end-to-end (not inside to outside, like traditional plastic insulators). I can only assume the shape makes it difficult for an electric arc to travel along the ceramic material, as opposed to, say, along a solid cylindrical piece.  Why exactly are ceramic insulators shaped like that? Is it to reduce cost? Thermal concerns (from possible electric arcs)?


How to Modify the default Django user table and the custom user table should consist of the 'first name','last name', 'gender', 'Email(Primary Key)', 'phone number' fields. How to do this? forms.py  class UserForm(ModelForm):     class Meta():         model= User         fields = 'First_name','Last_name','Gender', 'email','Phone_number'


I try add object to ArrayList and got error: Error:     Exception in thread "main" java.lang.NullPointerException at   Voiting.addCandidate2(Voiting.java:29) at Main.main(Main.java:11)     public ArrayList<Candidate> candidates;   public void addCandidate2(String CandidateName){         Candidate candidate=new Candidate(CandidateName);         candidates.add(candidate); //нужен конструктор списка кандидатов     }   Constructor Voiting:  public void Voiting(){         candidates=new ArrayList<Candidate>();      }   In main class:  Voiting voiting=new Voiting();             voiting.setTitle("Vibor 2018");             voiting.addCandidate2("Candidate1");


No longer have Administrator permissions on my personal computer

A few months ago I lost my Administrator privileges on my own PC. I believe I encountered this issue when trying to change my account username and during it accidentally changed the account permissions.  So far I have tried the following to fix this issue:  Going to Family & Other Users to change the account permissions (the tab does not show up) Access administrator privileges through safe mode (asks for the built-in admin password) Boot the computer through a USB with using a Password Refixer (was unable to as I could not pay for the software) Fixing the issue through Local Group Policy Editor (local users and groups tab does not show up)  I have also considered booting the computer through a USB with the windows installation media on it and use Shift + F10 to solve the problem from there. I am wondering if there is any free and safe way that I am able to regain my administrator permissions on my own PC. I have been working on trying to fix this for quite a while now but have been unable to find any success. Your help would be greatly appreciated on this issue.


MYSQL SELECT * doesn't work with GROUP BY and HAVING

SELECT * FROM or_mail GROUP BY campaign_id HAVING date_time = MAX(date_time);  SELECT campaign_id, date_time FROM or_mail GROUP BY campaign_id HAVING date_time = MAX(date_time);   The 1st query returns 13 records. The 2nd returns 35.  Why are records missing from the first query!? Why should what I'm selecting matter at all?


I know I can open config files that are related to an assembly with the static ConfigurationManager.OpenExe(exePath) method but I just want to open a config that is not related to an assembly. Just a standard .NET config file.


Using volumetrics in Cycles I have to have the light strength super high

I have to have a spot lamp strength VERY VERY high to have these light rays come through 300000.0 and look good.  Sounds crazy doesn't it.  Maybe it doesn't matter but it doesn't feel right.  Will I start to have problems if add other elements?   Lamp Size: .2 Lamp Strength: 300000.0 World Volume: Volume Scatter World Volume Density: .05  World Volume: Homogeneous: True Render Sampling Settings Clamp Indirect: 3.0  Rendering No Caustics: True


Be $f:\mathbb R^ +\mapsto\mathbb R$ a function that satisfies the following conditions:  a)$ f(f(f(x)))+2x=f(3x)$ for every $x\gt 0$;  b)  $\lim_{x \to \infty} (f(x)-x)=0$.  This was proposed by Gabriel Dospinescu  at a romanian competitions about a decade ago. No idea how to approach it. Thank you!


I've found question , but the link to the documentation isn't helping me at all.  I'd like to know how to color a table column given my column code, but the documentation only gives the syntax of the command. It doesn't give any code example of where to use it.  \usepackage{colortbl}  \begin{table}[h]     \centering     \begin{tabular}{|c|c|c|c|c|c|c|c|}         \hline         \cellcolor[gray]{0.8}128&64&32&16&8&4&2&1\\\hline         1&0&1&1&0&1&0&1\\\hline     \end{tabular} \end{table}   As you can see, I got \cellcolor to work, but I don't want to color individual cells. I want to color a whole column of the table. Does anybody know how I can go about to do this?


Through the code, I will wish my redirect the user to an absolute url.  I tested with drupal_goto () but it only works with relative urls. I wish to go to another domain that current_domain  thank you


Overview I have tried finding a solution to this problem myself and I have flailed. Its just a challenge for me. could you please tell me how far am I in solving this question? My approach for quadratic equation : I am still a student, and when I first saw the quadratic formula I wanted to derive it myself and I did it. This was my logic: the equation $x^2 + bx + c=0$ is obviously supposed to contain 2 roots (real or imaginary). So any 2 points in an axes can be represented as: $n+k$ or $n-k$. so (1) : putting $x = n+k$, (2): putting $x=n-k$ we get two equations; on subtracting $(1) - (2)$ we get an equation in $n$ and $k$ as, $4nk+2kb=0$ which gives $n=-b/2$.  Now substituting this value of $n$ in $(1)$ and $(2)$ and adding them we get $k= (+or-) \sqrt{b^2 -4c}/2 $. My approaches for trying to solve cubic equations: Let $x^3+bx^2+cx+d = 0$ be the equation. My first trials were focused on extracting the roots by various substations. Let me explain some of them. Originally, when I derived the quadratic equation, I wanted to literary "represent the solution" by $n+k$ and $n-k$. most methods that I have thought of for cubic equation similar to that of the quadratic (like assigning 3 unambiguous  variables to uniquely represent 3 roots- $n$ and $k$ represents unique values), by considering 3 unique values, but they end up being ambiguous. Then I was suddenly struck with the idea that I could define certain random operators to "transform" the equation in some way changing the co-coefficients of $x^2, x, x^0$. I have defined the first transformation as: $x^3+bx^2+cx+d=0 \to x^3+ b'x^2 + c'x+d' =0   $ then $b' = b$, $c' =b^2+c$, $d' = bc-d$. Applying this operation changes the modified equation's zeros as follows: $\alpha'=(\alpha+\beta)/2, \beta' = (\beta+\gamma)/2, \gamma' = (\alpha+\gamma)/2 $ if the initial zeros are $\alpha, \beta, \gamma$. My latest assumption is that creating $n$ number of transformations and applying them can help us obtain the roots in some combination. The other operation I have defined is "increment roots by by $\theta$ operation". in this case, $x^3+ bx^2+ cx+ d \to x^3+b'x^2+ c'x+d=0$. here, $b' = b + 3\theta, c' = 3\theta^2+ 2\theta b+ c, d' = \theta^3 +b\theta^2 + c\theta + d$. This modification transforms the original roots $\alpha, \beta, \gamma$ to $\alpha' = \alpha + \theta, \beta' = \beta + \theta, \gamma' = \gamma + \theta$ Now for my questions: How far am I from solving the cubic polynomial problem myself without any external help? More over, I give up. How to find the roots of a cubic equation? Could my latest idea for solving cubic equations actually be applied (the transformation method)? Is it possible to find the roots with my transformation method? (my second transformation definition was successful in converting the coefficient b or c to zero by transforming the roots linearly)


Can I *actually* lock my computer, so that the only thing I can do is type my password?

I make frequent use of Win+L, which will lock my computer and prompt me to enter my password to unlock it. This is to prevent other (mischevious) people from doing anything while I am away.  However, it is still possible to mess with the computer in this locked state. One can access the Ease of Access Center from the lock screen, which looks like this:  (Click image to enlarge)    They can then turn on Narrator (read everything), Magnifier (magnify the area around your cursor), High Contrast (make the colors of the UI strange), On-Screen Keyboard (open up an annoying keyboard in a window), Sticky Keys (ctrl, alt, win, etc. "stick" so you can press one at a time), and Filter Keys (ignore keys pressed multiple times in a row).  These settings are quite annoying by themselves, and activating all of them at once is even more so.  Is there any way to completely lock the computer, so that the only possible action is to enter a password?


Imagine a helicopter that took off from point A on the ground and goes vertically in the air to a certain fixed point B in the atmospheric area at a certain fixed altitude with enough fuel to stay there (at point B) during let's say the whole week. Point B is fixed according to an external system - Copernic for instance. By the end of the week and after several earth rotations, does the helicopter remains at point B? I mean does the point B remains vertically and exactly above point A?


i work in NetBeans and my code does no working.Reason in description/

Exception : Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException: Cannot invoke "java.net.URL.toExternalForm()" because "location" is null I tried many way to resolved my problem. Project :


C#: Why does Settings PropertyValues have 0 items?

Assuming there are 5 items in the settings file (MySetting1 to MySetting5), why does PropertyValues have 0 items while Properties has the correct number?   Console.WriteLine( Properties.Settings.Default.PropertyValues.Count); // Displays 0 Console.WriteLine( Properties.Settings.Default.Properties.Count);     // Displays 5


How to find the number of factors of $884466000$ without using a calculator?


Plurals of quotations: “Chorus of ‘Hello’s”; “Ooh”s & “Ah”s

Is there a way to pluralize a quotation? E.g.,     He was greeted with a chorus of “Hello”s.   or     Her daring earned “Ooh”s & “Ahh”s from around the room.   With actual dictionary words (“Hello” in the first example), simple plurals might do, without quotes: “He was greeted with a chorus of hellos.”  With ad hoc onomatopoeic words like “ooh” & “ahh”, though, can I pluralize them without confusing the reader? Is italicizing part of the word acceptable: “Her daring earned oohs & ahhs from around the room”?


Apple Mail, producing multiple duplicate drafts on gmail

Apple Mail is producing multiple duplicate drafts on gmail.  After I send a message, there are multiple drafts of it left :-(.  That totally kills productivity and confidence. As I see the leftover draft, I'm never sure if I did actually send the message or not. Not having a draft == msg was sent, but not in this case.  I had a similar problem with my previous company IMAP server.  What is the cause and how can I fix it?  Are you guys/girls using Apple Mail with GMail?


I'm trying to make the user type an easier URL.  So users query for: https://example.com/invoices/X123  And the .htaccess would rewrite (mask) to    https://api.example.com/invoices/1/getInvoicefromHash.html?hash=X123   But somehow it does not work. It just redirects...  This is my .htaccess:  RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^invoices/(.*)$ http://api.domain.com/1/getInvoicefromHash.html?hash=$1 [QSA,L]


How to "unpivot" or "reverse pivot" in Excel?

I have data that looks like this:  Id | Loc1 | Loc2 | Loc3 | Loc4 ---+------+------+------+----- 1  | NY   | CA   | TX   | IL 2  | WA   | OR   | NH   | RI   And I want to convert it to this:  Id | LocNum | Loc ---+--------+---- 1  |   1    | NY 1  |   2    | CA 1  |   3    | TX 1  |   4    | IL 2  |   1    | WA 2  |   2    | OR 2  |   3    | NH 2  |   4    | RI   What's the easiest way to do this in Excel 2007?


Automatically delete folder contents after 'n' days - Windows 10

I am wondering if someone can tell me how I can make a folder in windows that will automatically delete any files within that have been there for more than 'n' days, say maybe 7 for a week.  I have found a similar question that was answered well , though im not sure if it works on windows 10.  Also, would this be a '.bat' file? And, how do I make the batch file run automatically?  Thanks!  Edit:  I created a .bat file, starting with the mentioned answer:       forfiles /p "C:\what\ever" /s /m *.* /D -<number of days> /C "cmd /c del  @path"       Which I changed to:  forfiles /p "F:\Movies" /s /m *.* /D -<1> /C "cmd /c del @path"   exactly, to test it.  The folder 'Movies' has a bunch of things whos date modified is from very long ago.  I created a task with Task Scheduler (Thanks Thomas)  and it didnt delete anything.  I also tried running the batch manually, tried changing it to 1 minute, tried putting it in the folder that its deleting from, and ran it as admin.  Nothing worked.  I have permissions on the folder.  Does anyone have any suggestions?  Did I do something wrong with the code?


How to remove duplicates from Python list and keep order?

Given a list of strings, I want to sort it alphabetically and remove duplicates. I know I can do this:  from sets import Set [...] myHash = Set(myList)   but I don't know how to retrieve the list members from the hash in alphabetical order.  I'm not married to the hash, so any way to accomplish this will work. Also, performance is not an issue, so I'd prefer a solution that is expressed in code clearly to a fast but more opaque one.


Can we have multliple routing.yml files in a single module?

I have more than 50 menus which I need to create custom. as per the module structure, we need to create routing.yml in root folder. but I want to do something like this below:     myModule       -  products(folder)               - routing.yml               - src(folder)                 - productController         -  brands(folder)               - routing.yml               - src(folder)                 - brandsController.php           - myModule.info.yml       - myModule.module   is it way to do achive something like this.  I just want to make code seperation and avoid to add all routes in routing.yml


i have dropbox account with files. Now, i need to check date, when file changed. If file changed, the script are download new file. If file not changed, i have echo "not downloaded".  My file:  if [ -f /root/time.txt ]; then   dropbox=`cat /root/time.txt | awk '{ print $12 }' | sed "s/,//g;s/\"//g"`   data=`date -d $dropbox +%Y%m%d%H%M%S`   echo $data   dropbox2=`curl -X POST https://api.dropboxapi.com/2/files/get_metadata --header "Authorization: Bearer oc3DfYTzbxAAADDADAqWWh2nyEA21OgecbWedBNB02XRWj8janlbftW123DASy122W" --header "Content-Type: application/json" --data "{\"path\":\"/wwe.txt\",\"include_media_info\":true}" | awk '{ print $12 }' | sed "s/,//g;s/\"//g"`   data2=`date -d $dropbox2 +%Y%m%d%H%M%S`   echo $data2  if [$data -eq $data2]; then   echo not downloaded  else     curl -X POST https://content.dropboxapi.com/2/files/download --header "Authorization: Bearer oc3DfYTzbxAAADDADAqWWh2nyEA21OgecbWedBNB02XRWj8janlbftW123DASy122W" --header "Dropbox-API-Arg: {\"path\": \"/wwe.txt\"}" -o "./wwe.txt"     fi else   curl -X POST https://api.dropboxapi.com/2/files/get_metadata --header "Authorization: Bearer oc3DfYTzbxAAADDADAqWWh2nyEA21OgecbWedBNB02XRWj8janlbftW123DASy122W" --header "Content-Type: application/json" --data "{\"path\":\"/wwe.txt\",\"include_media_info\":true}" -o "./time.txt"    fi   But,when i start script, i have this output:  1.sh: line 8: 1.sh: [20161008235133: not found   On line 8, i compare two dates (one from file, second from new checking of metada):  if [$data -eq $data2]; then   Where i have error ? Please help.


how to edit a .pdf file in kubuntu 13.04?

How to edit .pdf files in Kubuntu 13.04 ? Is there any supported software like "Adobe Acrobat" with the help of which I could do editing ?


Which package can be used to write BNF grammars?

I googled and found two packages:   mdwtools bnf   Unfortunately, both of them have extremely poor documentation. There are only one to two examples for each one, which makes it hard to follow. Furthermore, none of them shows how to indent the grammar properly, rather than just setting up the environment to have a nice look. I wonder is there a major package for writing BNF, or we can just manually use tabbing to handle the indentation? Thank you.


Uppercase letters in a string. Python 2.7

I have researched the string.upper() command and can't seem to figure out how to print a string where only the first letter is upper cased.  string = 'name' print string.upper()  print string[0].upper(), string[1:]   Could someone please give me a hint on how to do this?


mm-qcamera-daemon causing massive battery drain

Recently, mm-qcamera-daemon has been causing massive battery drain on my Nexus 5, and making it become rather warm. At the same time, the camera appears to be locked, meaning opening the default camera app (or any camera app) causes the alert Camera is currently in use to appear.  Numerous forums around the web site apps such as Snapchat and a Yahoo video app as the issues, but I've never installed these apps before.  Restarting the phone does seem to fix the issue, but after awhile (more than 12h) later, the battery starts draining again.    UPDATE: Like the top answer says, this problem should have been fixed by the 4.4.4 Kitkat update that rolled out.


Adding object to an array - nullPointException

In my task I have 2 classes Kadry(personnel) and Pracownik(worker).  Pracownik looks like this (with getters and setters):  public class Pracownik {  private String name; private String lastName; private double salary; private char gender; private int structure;  public Pracownik( String name, String lastName, double salary, char gender, int structure) {     this.name = name;     this.lastName = lastName;     this.salary = salary;     this.gender = gender;     this.structure = structure;   In the class Kadry there are fields private Pracownik[] workers and private int employment (holds actual number of workers), Constructor that initializes the fields. There is also a method that adds a worker to the list, and this point is where i got into troubles, because i keep getting NullPointException. My class Kadry looks like this:  public class Kadry { private Pracownik[] workers_; private int employement_;  public Kadry () {     Pracownik[] workers_ = new Pracownik[100];     employement_ = workers_.length; } public void addWorker(Pracownik p) {     for (int i = 0; i < 100; i++) {        if (workers_[i] == null) {            workers_[i] = p;            break;        }        else System.out.println("List is already full!!!");     } }  public static void main(String[] args) {     Kadry k1 = new Kadry();     Pracownik Piotr = new Pracownik("Piotr", "Wanjas", 3000.00, 'M', 3);     k1.addWorker(Piotr);     System.out.println(k1.workers_[0].getName());      } }   The NullPointException shows up at line if (workers_[i] == null) {


Connectedness of an irreducible algebraic curve without singularities.

I'm currently reading Griffith's Introduction to Algebraic Curves. In chapter 2, he proves the following:     Given $C$ an irreducible algebraic curve, and $S$ the set of singularities in the curve, $C^{*}=C\backslash S$ is connected.   I understand that $S$ is a finite set, but I don't see how intuitively how $C$ stays connected when you remove singularities. For example, when taking the curve defined by $x^3-x^2+y^2=0$. This function clearly has a singularity at the origin. When the origin is removed, how is the resulting curve still connected- there is a section to the left of the y axis and a section to the right. Taking the closure of either could not intersect the other. How is the set $C\backslash S$ still connected, intuitively? What part of what I'm saying doesn't make sense?


unable to find a medium with a live file system in ubuntu 14.04 using wubi Windows installer

hi i am installing ubuntu 14.04 or any version from wubi  (Windows Installer) but after restarting the windows its throws me error that its unable to find a medium  with a live system . i also tried with install to create a bootable pen drive but still it didnt work out . i also tried to change the bios to sata from achi but still it showing me the same error. i use ubuntu before but never faced this problem before but now this problem coming why ??  I m using hp540 laptop with windows7 32 bit   help me with this problem


How can I copy a file to a new location, creating the directory as well

I want to cp a file to another directory but that directory doesn't exist yet.  So I would do:  mkdir /new_place cp the_file /new_place   Can I do this in one? I imagine something like cp the_file -m /new_place if "m" stood for "make dir's that don't exist"  Would this be a chance to use scp, rsync or another copying utility?


How to reproduce a biblio reference in a text exactly as it appears in the reference section

I have a document with bibliographical references at the end handled by biblatex and biber.  I need to reproduce in the core of a text a bibliographical reference exactly in the same way as it appears in the bibliographical references.   I thought of a way to handling this issue by calling successively   \noindent \autocite{a} \Citeauthor{a}. \citetitle{a}.   However, I don't have a commande for \cite-journalname and another for \cite-doi or even \cite-volume or \cite-pages, ... So my solution does not work.  Any hint?  Here is a MWE  \documentclass{article} \usepackage{filecontents} \begin{filecontents*}{\jobname.bib}  @Article{a,   date =     {2003},   author =   {Author, Amy},   title =    {Paper title},   journaltitle = {Journal title},   volume =   10,   number =   4,   pages =    {100-141},   doi={10.1109/TAC.2016.2614910}    }   \end{filecontents*}  \usepackage[backend=biber]{biblatex} \addbibresource{\jobname.bib}  \begin{document}     \nocite{*}     \section{My text}     I need to print here a complete biblio reference exactly as it appears in the References section. A trial was to cite the reference in the following way:      \noindent \autocite{a} \Citeauthor{a}. \citetitle{a}.  \section{References}     \subsection{Journals}     \newrefcontext[labelprefix=\Alph{subsection}-]     \printbibliography[]  \end{document}


I am from Pakistan. I had applied for a UK visa for my plab (medical) examination, but my visa was refused due to sudden influx of money in my father's bank statement and secondly as I am unemployed, so my ECO thinks that I would not return back home. Now I am thinking of re-applying with my mother's bank statement and showing some property in my name. Should I re-apply or appeal?


Can a series be non absolutely convergent at point beyond its radius of absolute convergence?

Let $\sum a_nx^n$ be a series, where $a_n$'s are not necessarily positive & let $R>0$ be its radius of absolute convergence. Then for $x=r>R$,  $\sum |a_n|r^n$ will be divergent, but my question is,  can the series $\sum a_nr^n$ be convergent.   Please give me few examples.


Converting a list of lists of points to seperate y and x lists

I have a list structured like so:  >>> print(pts) [[(120, 1200), (121, 1201), (122, 1202)],  [(130, 1300), (131, 1301), (132, 1302)]]   And I need all the x and y points concatenated seperately like so:  >>> print(y) [120 121 122 130 131 132] >>> print(x) [1200 1201 1202 1300 1301 1302   The original list is created by the following method:  pts = [] y = [120, 121, 122] x = [1200, 1201, 1202] pts.append(list(zip(y, x))) x = [1300, 1301, 1302] y = [130, 131, 132] pts.append(list(zip(y, x)))   The final result must be seperate y and x lists so I can use it with np.polyfit().  The length of both the individual points list and overal list will vary, however, I will always have equal length of y and x points.  I'm thinking there should be a way to reshape and slice?  Maybe I could flatten and take all  the even indices for x and odd indices for y?


The form of the verb in attributive clause when the subject in main clause is "I"

For example, which of the following is correct?     I am a teacher who likes teaching.   or     I am a teacher who like teaching.


Write to variable and preserve formatting

ifconfigvar=$(ifconfig eth0) && echo $ifconfigvar   You can see that output of the above command has no formatting:   eth0 Link encap:Ethernet HWaddr 00:1f:16:ef:5b:c0 UP BROADCAST MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)


Is there a special term for when a noun is used to describe another noun?

Is there a term for when a noun is used as an adjective, as in:   Click the button to open the configuration dialog. I need to stop at the car wash. The train station is right next to the bus station. Do you have documentation for the setup process? I'm throwing a party, and the entire ELU community is invited. Hopefully, the party won't get busted by the grammar police again.   Is there a word to describe that?  Also, are those even adjectives? Or are they adverbs or something?  (I feel like this must be a duplicate (?) but I could only find questions about when adjectives are used as nouns, not the other way around...)


Does Ubuntu update software packages like KeePassXC in LTS versions or does LTS mean I keep the version that was current when the LTS was released?  I installed KeePassXC on Ubuntu 18.04 LTS. I don't recall now what version of KeePassXC it was when I first installed it, but as of today it's 2.3.1. The most up-to-date version is now 2.4.1. I understand I can get updates by Snap and PPA, but I'm curious if a normal Ubuntu software update will eventually update KeePassXC or whether it remains static throughout the LTS period.  Edited to add: I understand now from the responses that the software packages were frozen to the time of release and that normally they will remain static and not be updated with the normal "Check for software updates." Does this static approach hold true for "apt-get"-type approaches, or can I get updates that way, eventually? I note from the source code link that KeePassXC 2.3.1 is still the source, but don't understand if I can "force" an update outside of Snap or PPA.  Further edited as possible duplicate: The basic question was essentially a duplicate, but my first edit took it further - "as the repositories change, can I then "apt-get" an updated version. It appears the answer is "no, not safely."


Can someone explain how to analyse the ruuning time of this algorithm PointsCoverd(x1,..xn)

Here is the pseudo code. This is specical case btw. >pointsCoverd(x1,...,xn)  >segments <- empty list  >left <- 1  >    while left <= n: >        (l,r) <- (xleft,xleft +2) >        segments.append((l,r)) >        left <- left + 1 >        while left <= n and xleft <= r: >            left <- left +1 return segments >return segments


I don't know if this is a common issue, but some times ago I started to see a blinking cursor onthe Chrome's webpages, like it was in "edit" mode...  probably is due to an extension that I would install, but now, I don't know how to get rid of this. Wherever I click I leave the cursor blinking at that place....  I have not so much extensions actually, but I have unsinstalled some


For any $k \ge 2$ so $k^3 + 27$ can never be a prime.

For any $k ≥ 2$, $k^3 + 27$ can never be a prime. I tried to use mathematical induction on this one, but I can’t go on. Can someone help me?


Use the Maclaurin series to prove that $e^{i\theta} = cos(\theta) + isin(\theta)$

Our teacher assigned extra credit for which we are allowed to use any source (including this website) to find the answer. This material has not been covered in class or in the book we are using. We learned Taylor series using series of real numbers but we have not covered anything remotely similar to the problem below so I have no idea how to even begin this problem.   Let i =$\sqrt{−1}$   a) Use the Taylor series centered at x=0 to prove that, for all $\theta$,  $e^{i\theta} = cos(\theta) + isin(\theta)$  b) Use above answer to prove that $[cos(\theta)+ isin(\theta)]^n = cos(n\theta)+ isin(n\theta)]$  c) We may write $[cos(\theta)+ isin(\theta)]^n = cos^n(x)(1+itan(\theta))^n$  Use the 5th order Taylor polynomial for $(1+x)^\frac{1}{3}$ with $x = itan(\theta)$ to find an estimate for $sin\left(\frac{\theta}{3}\right)$.  Use this approximation to estimate the value of $sin\left(\frac{\pi}{18}\right)$.  Hint: Two complex numbers $a+bi$ and $c+di$ are equal if $a=c$ and $b=d$.


Attempt to invoke virtual method 'void android.widget.ImageView.setImageDrawable(android.graphics.drawable.Drawable)'.  on a null object reference.  i m getting this error please help.   private void loadSongs() {         Uri uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;         String selection = MediaStore.Audio.Media.IS_MUSIC + "!=0";         Cursor cursor = getContext().getContentResolver().query(uri, null, selection, null, null);         if (cursor != null) {             if (cursor.moveToFirst()) {                 do {                      String name = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.DISPLAY_NAME));                     String artist = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.ARTIST));                     String url = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.DATA));                     String albumId = cursor.getString(cursor.getColumnIndex(MediaStore.Audio.Media.ALBUM_ID));                     Cursor cursorm = getContext().getContentResolver().query(MediaStore.Audio.Albums.EXTERNAL_CONTENT_URI,                             new String[] {MediaStore.Audio.Albums._ID, MediaStore.Audio.Albums.ALBUM_ART},                             MediaStore.Audio.Albums._ID+ "=?",                             new String[] {String.valueOf(albumId)},                             null);                     assert cursorm != null;                     if (cursorm.moveToFirst()) {                         String path = cursorm.getString(cursorm.getColumnIndex(MediaStore.Audio.Albums.ALBUM_ART));                         Drawable img = Drawable.createFromPath(path);                         image = (ImageView)rootView.findViewById(R.id.albumArt);                        // image.setImageDrawable(img);                         image.setImageDrawable(ContextCompat.getDrawable(getActivity(),R.drawable.ed));                     }                     songInfo s = new songInfo(name, artist, url);                     _songs.add(s);                 }                 while (cursor.moveToNext());                 cursor.close();                 recyclerView.getAdapter().notifyDataSetChanged();             }         }     }


while reading about linux file searching I got the following...  To search for files using the * wildcard, replace the unknown string with *, e.g. if you remember only that the extension was .out, type ls *.out  and when I tried the following command on system(ubuntu 14.04 LTS) ..I got   anupam@JAZZ:~$ ls  *.bash*   ls: cannot access  *.bash* : No such file or directory  anupam@JAZZ:~$ ls  .bash*  .bash_history   .bash_logout  .bash_profile  .bashrc  anupam@JAZZ:~$   in the first case why it is showing No such directory ( *.bash* ) and in next case its showing the files ( .bash* )   I am new to this flavor, and according to my automata theory classes (*) means any combination of strings including epsilon(empty),,So why the results are different in both the cases....?


intuition/logic behind comparing p-value and significance level

I'm new on this forum and I hope that this is not already asked. My question is this:  I know that the p-value is defined as  $p=P($obtaining sample as or more contradictory to $H_0$ then the one obtained$|H_0 $is true$)$   and the significance level is  $\alpha=P($reject $H_0 | H_0 $is true$)$.  What is the logic/intuition behind rejecting the null-hypothesis when $p < \alpha$?  Kind regards,


Find the nilpotents in $\mathbb{Z}_3[x]/(x^2-1)$

We have the ring $\displaystyle R=\mathbb{Z}_3[x]/I, \ I=(x^2-1)\mathbb{Z}_3[x]$ is a principal ideal. The question is to find the elements $a\in R$ such that $a^n=0_R$ for some $n\in\mathbb{N}$.    I'm trying to understand the form of the elements in $R$.  Firstly, the elements of $R$ have the form $f(x)+I, \ f(x)\in\mathbb{Z}_3[x]$. By the euclidean division there exist $\pi(x)\in\mathbb{Z}_3[x]$ and $a,b\in\mathbb{Z}_3$ such that $f(x)=\pi(x)(x^2-1)+(ax+b)$. The elements of the form $ax+b$ where $a,b\in\mathbb{Z}_3$ are the following:  $$A=\{0,1,2,x,x+1,x+2,2x,2x+1,2x+2\}$$  (Is that a correct approach to examine the form of the elements in $R$?)  We have that $x^2-1=(x+1)(x-1)=(x+1)(x+2)$ in $\mathbb{Z}_3[x]$. If $f(x)^n+I=0+I$ then $f(x)^n\in I\Rightarrow (x+1)(x+2)\mid f(x)^n$. By looking at the polynomials in $A$, this is true if $f(x)=0$. But how can I check what happens to the $n-$th power of the rest of the polynomials?  Secondly, I 'm trying to find the invertible elements of $R$. Now we are looking for elements $f(x)\in A$ such that $\gcd(f(x),x^2-1)=1$. Are these $\{1,2,x,2x\}$? How can I find the inverse of $2x$?   Thank you in advance.


Python: a value of a variable changes unintentionally

I am working on a little project that involves working with and transforming coordinates and my code behaves in a way that I can't explain. Example code: koord = [[60,10],[70,18],[61,21],[69,11]] min_X = [255,255]  for i in range(len(koord)):     if koord[i][0]<min_X[0]:         min_X=koord[i] print(min_X)  for i in range(len(koord)):     for j in range(2):         koord[i][j]=koord[i][j] - min_X[j]     print(min_X)  I expect it to always print [60, 10], but instead I get [60, 10] [0, 0] [0, 0] [0, 0] [0, 0]  Why does the min_X value change? It seams to redo the first for-loop but why? Can someone explain why this happens and how I can fix it?


Reference frame and conservation of energy

Say spaceship $\alpha$ burns a portion of its fuel to leave planet A and is cruising through space at 10 m/s relative to the surface from which it launched. Spaceship $\alpha$ is being observed by spaceship $\beta$, which launched from planet B. The relative velocities of the two planets are such that spaceship $\alpha$ is moving at 50 m/s relative to planet B.  Spaceship $\alpha$ plans to increase its speed by burning some amount of fuel (which is converted completely to kinetic energy), and it communicates its intentions to spaceship $\beta$. Astronauts on each ship use conservation of energy to predict the change in velocity of the ship after the fuel is burned, with $$\frac{1}{2}m v_2^2 = \frac{1}{2}m v_1^2 + E_{burn}$$ and $$\Delta v = v_2 - v_1$$ The chemical potential of the fuel burned shouldn't be affected by the observer's reference frame. However, astronauts on spaceship $\alpha$ consider their initial velocity to be 10 m/s, but from the perspective of astronauts on spaceship $\beta$ who launched from planet B, it is 50 m/s. This will cause the astronauts to calculate different values for $\Delta v$.  Clearly, $\Delta v$ won't depend on reference frame. What, then, is the criteria for selecting $v_1$ such that the correct $\Delta v$ is calculated? With the spaceship flying through space, choosing planet A to have zero velocity seems as arbitrary as choosing planet B.


Wrong Wolfram|Alpha limit? $ f(x,y) = \frac {xy}{|x|+|y|} $ for $(x,y)\to(0,0)$

I have this function:  $$ f(x,y) = \frac {xy}{|x|+|y|} $$  And I want to evaluate it's limit when $$ (x,y) \to (0,0)$$ My guess is that it tends to zero. So, by definition, if:  $$ \forall \varepsilon \gt 0, \exists \delta \gt 0 \diagup \\ 0\lt||(x,y)||\lt \delta , \left|\frac{xy}{|x|+|y|}\right| \lt \varepsilon $$ Then $$ \lim_{(x,y)\to(0,0)}\frac {xy}{|x|+|y|} = 0 $$ So:  $$ \left|\frac{xy}{|x|+|y|}\right| = \frac{|xy|}{|x|+|y|} = \frac{|x||y|}{|x|+|y|} \le 1 |y| \lt \delta $$  So for any $$\delta \lt \varepsilon$$ the inequality is true. Hence, the limit exists and is equal to zero.  . Am I wrong or is Wolfram|Alpha wrong?


Writing Datetimes with Fortran in Shapefiles

I'm writing shapefiles nicely with Fortran. One of the fields I'm writing is a Date field. I read several things online that seem conflicting, wondering if I could get some clarification.  The dBASE file has a Date input, I can easily work with this. Fields are however limited to 10 bytes, so there is no room for time. And altering the field inside of QGIS just leads to the time not being saved (why does it even exist in QGIS then?). So I get the same issue as  and similar things. I also found  that a datetime format is accepted with dBASE but this doesn't seem to get recognized in QGIS (I know the link seems to imply it only works in FoxPro but it was worth a shot). I'm additionally confused by  which suggests that time is no problem for ArcGIS, (which is obviously not QGIS but they use the same .dbf files, I'm also writing these file for use in ArcGIS).  My question boils down to this: I guess Date+Time is a bit of an issue with the .dbf file, so my options are to basically store the time as a string ("When visualizing data through time, you must specify the Time field that contains the time values. These time values can be stored in date, string, or numeric field types. For best performance, it is recommended that you store your time values in a date field type"). The last link makes me think that ArcGIS can still work with this (I'd like to be able to create time-based visualizations with the time slider, etc.). I just can't find what format to put it in when I save the time as a string and if there is any special indicator I'd need to set in the .dbf header or something, and will ArcGIS or QGIS be able to obtain the time information despite the column being a string column. I want to be able to do this all through Fortran, without actually changing any settings in ArcGIS or QGIS. I'm trying to automate this process through Fortran and I'm really close, this is the last bit.


Prove that second partial derivatives are not equal

$$ f(x,y)= \begin{cases} \frac{x^3y-y^3x}{x^2+y^2},\ \ (x,y)\ne(0,0)\\ 0,\ \ (x,y)=(0,0) \end{cases} $$ I have to prove that $$ \frac{\partial^2f}{\partial x\partial y}\ne \frac{\partial^2f}{\partial y\partial x} $$ To be honest, I don't really get this task. If I find second partial derivatives at $(x,y)\ne(0,0)$, I'll get total equality because both of them are continuous. If I find either first partial derivative at $(0,0)$, I'll get $0$. It seems to me that, therefore, second partial derivatives at $(0,0)$ will be zeros too. So, what am I doing wrong?


another php/mysql injection using TinyMCE

I'm no php programmer, only site admin, I've recently adopted a site with web panel that causes sql injection when trying to post html code in TinyMCE, containing apostrophe.  Problematic html code;  img onmouseover="this.src='layout/gfx/wiecej1.png'   php code;  $edytuj = $_POST['edytuj'];   sql query;  if($edytuj) {      $podstrony_id = $_POST['id'];      $podstrony_id_kategorie = $_POST['id_kategorie'];      $podstrony_id_moduly = $_POST['id_moduly'];      $podstrony_tytul = $_POST['tytul'];      $podstrony_szablon = $_POST['szablon'];      $podstrony_tresc = $_POST['tresc'];      $podstrony_aktywnosc = $_POST['aktywnosc'];       $zapytanie = "UPDATE $tab_podstrony SET id_kategorie='$podstrony_id_kategorie', id_moduly='$podstrony_id_moduly', tytul='$podstrony_tytul', szablon='$podstrony_szablon', tresc='$podstron$      $wynik = mysql_query($zapytanie);   Site uses php-cgi-5.4.39 and mysql-5.5 I don't have access to previous environment (where this panel worked fine), so I can't find out if it's configuration or code problem.


how can I select all objects in a collections using python?

I want to select all objects in a collection (collection names are known). pseudo: selectedObjs1 = allObjectsInCollectionName; <--- How? for all objects in selectedObjs1:     process...  Thanks.


I'm trying to understand the proof that any group of index $2$ is normal.   Let $G$ be a group and $H$ a subgroup of index $2$.  I understand that if $x\in H$ then $xH=H=Hx$ since $H$ is a subgroup. However, I don't understand why if $x\in G\setminus H$ then $xH=G\setminus H.$  I know there are other proofs of this on this site but none of them specifically address this question.


If $f \in L^{p_1}(E) $ is bounded then $f\in L^{p_2}$ for any $p_2>p_1$

Show that if $f$ is a bounded function on $E$ that belongs to $L^{p_1}(E)$ then it belongs to $L^{p_2}(E)$ for any $p_2>p_1$   How can I insert argument about the boundedness of $f$? I can prove $L^{p_2} \subset L^{p_1}$ but I am stuck here. Please help.


How to find quantiles and likelihoods of mixture distributions?

My PDF:     M was estimated and found to be 5.   I need to work out the quartiles for the PDF above. In addition, I need to use different methods of estimation to estimate the parameters. So far I've successfully used the method of moments. I'm finding it difficult to form the likelihood function.  This is the approach I took to work out the quartiles, which I believe is not correct; quartile 1 below:    And this is what I have so far for the likelihood function:    Any help would be truly appreciated! Thank you.


When should I create a primary key on multiple columns?

I'm interested to know in which case I should create a primary key on multiple columns and why ? To be more specific about my question, I want to know  what are the advantages and disadvantages of primary key on multiple columns in terms of performance. I did some research and found  where someone is saying  Another good question is SHOULD a primary key be multiple columns. :) – Sonny Boy Nov 17 '09 at 17:31 Well, that's a different question, and the answer is NO, NOT EVER, AND IF YOU DO I WILL HUNT YOU DOWN AND HURT YOU. Just a personal preference, of course :-) – Stu Dec 4 '09 at 16:46  Despite the joke, there should be some good reason on why one shouldn't use primary key on multiple columns but I couldn't find any answer.  I was wondering about this because I have a concrete problem. Consider the following table: CREATE TABLE IF NOT EXISTS `user_travel_data` (   `id` int(10) unsigned NOT NULL AUTO_INCREMENT,   `id_user` int(10) unsigned NOT NULL,   `day` date NOT NULL,   `origin` varchar(8) NOT NULL,   `destination` varchar(8) NOT NULL,   `data` varchar(255) NOT NULL,   PRIMARY KEY (`id`),   UNIQUE KEY `ukey` (`id_user`, `day`, `origin`, `destination`) )   In this table, for each user I have some data for each day and for each  travel from origin to destination. I need this table because it's very easy to use WHERE clause on it. However, the numbers of line in this table are just insane. Usually, a user has ~50 origins and ~100 destinations. With 30 days filled & 200 users, there's ~30 million lines in my table. Because each user has around ~150000 lines, I had to create some tools for them to edit/delete/add lines in group. And, because of these tools, users tends to delete old lines and create a whole bunch of new lines. This leads to a very fast increase of my primary key. While it is not a problem now, it could be one pretty soon. So, since I don't use the id on this table, I was wondering if I could do something like : PRIMARY KEY (`id_user`, `day`, `origin`, `destination`)   is also quite useful but didn't help with my problem


In a Linear Algebra textbook I am reading, the following is stated: $b\notin \operatorname{span}(A \cup \{a\})\setminus \operatorname{span}(A)$. It does so without explaining what "$\setminus$" means. I apologize if this question does not belong here but I just want to understand what it means. I can close the question if someone just comments on its meaning.


Given a number presented in decimal form $n=\sum_{k=0} d_k10^k$ there are some nice thumb rules to decide whether it is divisible with a prime number  $p\in\{7,11,13,17,19,23,29\}$.   For each of this numbers there is a number  $a_p$ such that $p|n\iff p|(a_p\cdot d_0+\sum_{k=0} d_{k+1}10^k)$.  $a_7=-2,\;a_{11}=-1,\;a_{13}=4,\;a_{17}=-5,\;a_{19}=2,\;a_{23}=7,\;a_{29}=3$  E.g. $\;19\cdot 17=323$ and $32+2\cdot 3=38=2\cdot 19$ and $32-5\cdot 3=17$.  Is there a number $a_{31}$ that works the same way? Or $a_p,\;p\ge37$?


On my  top tag scores seem to be in an old state. Or how does it work? Are these scores received reputations? What are scores there? And the votes? Questions and answers count equal?  The whole top tag section is not being updated. There is a similar , but this one is about the new profile main page, where the "scores" term appears. For me its meaning is unclear.


Move space from one partition to the other

I have tried to move the space from one partition to the other using GParted.    But it is not working out for me, the disk seems locked (considering the key), and I have tried to unmount it:  $ sudo umount /dev/sda5 umount: /dev/sda5: not mounted   How can I move the 10GB to /dev/sda5?


Let $p$ a prime number such that $p≡3$ (m0d $4$), and $p>3$, discuss the factorization of $(p)$ in $\mathcal{O}_K$, where $K=\mathbb{Q}(\sqrt[4]{3})$.  I know that the ring of integers in this case is $\mathbb{Z}[\sqrt[4]{3}]$,and  by Kummer's theorem, one can decide the decomposition based on factorization of $f(x)=x^4−3$ (mod $p$). There are five possible cases:  $f(x)$ factors into $4$ linear factors in $\mathbb{F}_{p}[x]$. $f(x)$ factors into $2$ linear factors and $1$ irreducible quadratic factors in $\mathbb{F}_{p}[x]$. $f(x)$ factors into $2 $ irreducible quadratic factors in $\mathbb{F}_{p}[x]$. $f(x)$ factors into $1 $ linear factor and $1$ irreducible cubic factor in $\mathbb{F}_{p}[x]$. $f(x)$ is irreducible in $\mathbb{F}_{p}[x]$.  I don't know how to go further than this!


Borrowing money from 401k retirement plan to pay credit card bills?

I have some credit card debt that I would like to pay off. I feel like I am throwing money away on the interest charges each month. I was curious to know if taking a loan from my 401k to pay off my credit cards is a wise thing to do?   Keep in mind this is all very new to me—from what I understand, if I borrow from my retirement account, then I am required to pay back the money I borrow + interest. So say I borrow 1,000 + 5% interest I would have to pay back $1050.  However since I am technically paying back myself, wouldn't it all be going back in to my pocket anyways? Meaning it would be better to take the $1000 from my 401k, pay off my debt (therefore, eliminate the credit card interest each month) and use that money I would be putting towards my credit card interest each month to pay myself back?   Is this a wise thing to do or am I missing something here?   Thanks!


Why Ampere's law uses the current which passes through the open surface only?

In Ampere's law: $$ \oint \vec B\cdot d\vec \ell = \mu I $$ the current in the equation is the current which passes through the open surface. If a surface is chosen such that on the outer region of surface too current flows. That current too contributes to magnetic field at a point on that surface. But why we consider only the inner current? Or is it that Ampere's law find magnetic field only due to inner current?


writes to say   Factor (J)     SI prefix    Value           Item  10E−7            nJ        5.6×10E−7 J     energy per proton in the CERN Large                                              Hadron Collider in 2011 (3.5 TeV) 10E3             kJ        1.4×10E3 J      total solar radiation received from the                                             Sun by 1 square meter at the altitude                                             of Earth's orbit per second (solar                                             constant)   This leads to the assumption the energy generated at Sol's core is significantly higher.   If this assumption is correct, and the earlier reports in  about creation of micro-black-holes in more powerful avatars of LHC are reasonable, would it be far-fetched to state micro-black-holes may form within a star too?


There is a very simple proof by means of divisibility that $\sqrt 2$ is irrational. I have to prove that $\sqrt 3$ is irrational too, as a homework. I have done it as follows, ad absurdum:  Suppose $$\sqrt 3= \frac p q$$  with $p/q$ irreducible, then  $$\begin{align} & 3q^2=p^2 \\ & 2q^2=p^2-q^2 \\ &2q^2=(p+q)(p-q) \\ \end{align}$$  Now I exploit the fact that $p$ and $q$ can't be both even, so it is the case that they are either both odd, or have different parity. Suppose then that $p=2n+1$ and $q=2m+1$  Then it is the case that  $$\begin{align} &p-q=2(n-m) \\ &p+q=2(m+n+1) \\ \end{align}$$  Which means that  $$\begin{align} &2q^2=4(m-n)(m+n+1) \\ &q^2=2(m-n)(m+n+1) \\ \end{align}$$  Then $q^2$ is even, and so is then $q$, which is absurd. Similarly, suppose $q=2n$ and $p=2m+1$.  Then $p+q=2(m+n)+1$ and $p-q=2(m-n)+1$. So it is the case that  $$\begin{align} &2q^2=(2(m-n)+1)(2(m+n)+1)\\ &2q^2=4(m^2+m-n^2)+1 \\ \end{align}$$  So $2q^2$ is odd, which is then absurd.    Is this valid?


Getting NullPointerException Error in Java

I have one class called Square that exetnds a class called Shape. In my main, I instantiating it like this:   Point p1 = new Point(3,3);   Shape s1 = new Square(p1,3);    I am getting the following error when I compile it:  Exception in thread "main" java.lang.NullPointerException at Shape.<init>(Shape.java:19) at Square.<init>(Square.java:18) at mine.main(mine.java:16)   I have one superclass called Shape implemented like this:     abstract class Shape implements Comparable<Shape> {   public Point position;    public Shape(Point p){     position.x  = p.x;      //Line 19     position.y  = p.y;   } }   Point is the following class:   public final class Point {   public double x;   public double y;    // constructor that sets the values of x and y   public Point(double num1, double num2)   {       this.x = num1;     this.y = num2;   } }   Square is the following class:  class Square extends Shape {   private double side; // side is the side length    public Square(Point p0, double side)   {       super(p0);               // Line 18     this.side = side;   }


If this rather trivial I apologize. How we can embed very quickly a video (mp4) in a beamer slide? From what I have seen I cannot figure out the proper way.  I tried with the multimedia package (following this ) but it din't work. (The slides will be in pdf format. I use Adobe reader XI.)  \documentclass{beamer} \usepackage{multimedia} \begin{document} \begin{frame}{myvideo} \movie[]{}{video.mp4} \end{document}


Within 300 km radius of Tokyo - Coastal/seaside destinations in Japan for nature and relaxation?

Since I'm planning to visit Japan for 10 days and plan to apportion 5 days to Tokyo, I thought to reframe  inside a 300 km radius around Tokyo. 300 is just an estimate; I'm not strict about this. Moreover, I'm curious to know if where urban  go, for want of a seaside/costal  region for picturesque, scenic relaxation, resembling that of a nature getaway/resort/retreat. I tried  and     such as it's written , I equally want: 'We love rocky beaches, nature hikes, history, the smell of ocean air, the scenery of water, and ... to experience Japan in a smaller town way'   but I would like the satisfaction of these criteria:   I want to avoid bears and lethal animals.     Due to possible radiation, I'd like to shun Fukushima and its surroundings.     I won't drive, so must rely on public transport and walking (over reasonable distances).  I want to evade temples and all buildings related to religion.


I need the best film production video editor

I recently installed my ubuntu and am new to it. I have some projects with me related to video editing and since you can see, I have switched from windows to linux. I wanna know the best video editor for Ubuntu/Linux  thanks in advance for your suggestions.


"Balconies", "porches", "decks", "terraces", "verandas", "lanais", "galleries", and "piazzas" in GAE and dialectal AE

In AE, a porch is apparently just about the same structure as a veranda, i.e. an open or enclosed gallery or room attached to the outside of a building.     Besides, a porch (or veranda) can apparently also be designated in some parts of the U.S. alternately as a "(sun) deck", a "gallery", "a "lanai", a "terrace", and a "piazza". Are any of these regional usages widespread enough to have gotten to flood into mainstream AE? Also -- in dialectal AE -- can a large outback or outfront balcony, i.e. a platform that projects from the wall of a building and is surrounded by a railing, a balustrade, or a parapet (like of those found attached to hotel suites, or serving as restaurant dining area) be referred to alternately as a "terrace", a "gallery", and a "patio"?


Story where many kids were fathered by a virus

I am looking for a story which I read probably two decades ago, in the 90s, but which was probably already old at that point. I think I read it in some kind of anthology, in English, and in the USA.  A substantial number of children, all across the world, are the result of some kind of virus which caused infected women to become pregnant. The resulting children are either clones of the virus's creator, or else his DNA acts as the father's and mixes with the mother's in the normal way—I don't remember which.  The children who resulted are identifiable by their appearance. The story follows one such child in school (middle or high school, I'd say). Being one of these children is an embarrassment and makes him an outcast from the normal children.  I believe a band of these "siblings" comes together and end up finding the creator of the virus.


Is a well-ordered subset of $(\mathbb{R},<)$ countable?

Suppose $X \subseteq \mathbb{R}$ is well-ordered by $<$, the normal ordering on $\mathbb{R}$. Is it then countable? If so, how to prove this. I've tried to set up a bijection as follows:  $$ \phi : \mathbb{N} \to X : n \mapsto \ <\textrm{-least element of } X \backslash \phi(\mathbb{N} \upharpoonright n) $$ I.e, $0$ maps to the least element of $X$, 1 maps to the least element of $X \backslash \{x_1\}$, $2$ maps to the least element of $X \backslash \{x_1,x_2\}$ etc. This is injective by construction, but I'm not sure if it is surjective.


I Recently bought a 2Tb external drive and configured time machine on my OS X 10.6.8 iMac. It started by making a full backup (approximately 1.6 Tb). Fine. I see a series of hourly incremental backups have run (a few hundred Mb each) A week goes by. All is good I have about 400Gb free on the backup disk. Suddenly it wants to make another 1.6 TB full backup. Disk full error. This implies that weekly (and I now assume, monthly) backups are not incremental. Is that correct?


What is - function Empty() - in javascript ?

I have this function :   function fff(){}  Which is a function which is an instance of Function constructor  so fff.__proto__ should show me  : function Function() { [native code] }   But it doesn't.  It shows :  function Empty() {}    It is only at the constructor property of __proto__ that I see function Function() { [native code] }   Question :   What is this function Empty() {} function and why fff.__proto__ won't show me  : function Function() { [native code] }  ?   nb I know that __proto__ is the actual object that is used in the lookup chain to resolve methods, etc. prototype is the object that is used to build __proto__ when you create an object with new.  But again : function fff is a function which is instantiated behind the scenes by newing Function constructor....so ?


Can anyone explain thread monitors and wait?

Someone at work just asked for the reasoning behind having to wrap a wait inside a synchronized.  Honestly I can't see the reasoning.  I understand what the javadocs say--that the thread needs to be the owner of the object's monitor, but why?  What problems does it prevent?  (And if it's actually necessary, why can't the wait method get the monitor itself?)  I'm looking for a fairly in-depth why or maybe a reference to an article.  I couldn't find one in a quick google.  Oh, also, how does thread.sleep compare?  edit: Great set of answers--I really wish I could select more than one because they all helped me understand what was going on.


Force on different points on a body not passing through the centre of mass

I was studying about centre of mass and I found that if the line of action of force passes through centre of mass then it will execute pure translation. Moreover acceleration of centre of mass is net force applied on the body divided by the total mass of the body and my textbook says that its valid for all points on the body where the force is applied. I can't get this as when the line of action of force will not pass through centre of mass then body must also rotate and i think the acceleration(translational) of centre of mass must change (due to rotation of body). Assume that the body is rigid. Any help is appreciated.


How do I check if a site already exists from PowerShell?

I have a script that exports a site and restores it in another web application.  I want to check if the target site already exists.  Is there an easy way to tell if www.example.org/sites/asite/ is free, without throwing an error in Powershell?