I have a String List.On a satisfied Condition ,I need to group strings and remove those before iterating. For example;  List<String> test = new ArrayList(); List<String> newLst = new ArrayList(); test.add("A1"); test.add("A2"); test.add("A3"); test.add("A1B1"); test.add("C1"); for(String s: test){     if(s.startsWith("A"){         newLst.add(s);         test.remove(s);     } }   Once A1 reaches the loop,collect related string in new list and remove it from existing.  Getting Concurrent Modification exception.Kindly help to solve this.  Output: newLst: A1,A2,A3  test : A1B1,C1  newLst : A1B1 test:C1  newLst : C1

We all know you can't do the following because of ConcurrentModificationException:  for (Object i : l) {     if (condition(i)) {         l.remove(i);     } }   But this apparently works sometimes, but not always. Here's some specific code:  public static void main(String[] args) {     Collection<Integer> l = new ArrayList<>();      for (int i = 0; i < 10; ++i) {         l.add(4);         l.add(5);         l.add(6);     }      for (int i : l) {         if (i == 5) {             l.remove(i);         }     }      System.out.println(l); }   This, of course, results in:  Exception in thread "main" java.util.ConcurrentModificationException   Even though multiple threads aren't doing it. Anyway.  What's the best solution to this problem? How can I remove an item from the collection in a loop without throwing this exception?  I'm also using an arbitrary Collection here, not necessarily an ArrayList, so you can't rely on get.


Find the Maclaurin series of $f(x)=\dfrac{1}{1+x+x^2}$ and the radius of convergence of the series.  I can't solve this problem.

I want to find the power series of $$f(x)=\frac{1}{x^2+x+1}$$ How can I prove the following? $$f(x)=\frac{2}{\sqrt{3}} \sum_{n=0}^{\infty} \mathrm{sin}\frac{2\pi(n+1)}{3} x^n  \,\,\,\, |x|<1$$  In particular I would like to know how to proceed in this case. The polinomial $x^2+x+1$ has no roots so here I cannot use partial fraction decomposition: what method should I use?


I'm stuck... The problem states that - You wish to construct a right cylindrical can (with bottom and top) from a square steel plate with side length 10 cm. What dimensions on r and h maximizes the volume of the can.  Can someone please point me in the right direction.

Question:  Consider the following square sheet of metal (grey) with the side s = 10 cm. From it, we want to cut the parts of a cylindrical can with a lid and a bottom (bblack). Determine the radius and height of the can when the volume is maximal.   The rectangle and circles have to be cut in entire, singular pieces, so no trickery to minimize waste and no diagonal placement of the rectangle.  Solution has to use optimization / differentiation.  Attempted solution:  In order for this to work out the circumference of the circles and one side of the rectangle has to be identical. Otherwise they will not fit together in a cylindrical can.  This leads us to two cases that needs to be treated separately.  Case 1: The rectangle is standing upright.  Case 2: The rectangle is lying on its longest side.  There are two cases that needs to be considered separately.  Case 1:  The right-hand side of the above image must be the circumference of a circle, so  $$s_1 = 2r\pi$$  The bottom-side must be the height of the cylinder plus two radii of the circles:  $$s_1 = h + 2r$$  Putting these together becomes:  $$2r\pi = h + 2r = 10$$  Solving for h:  $$h = 10 - 2r$$  The volume of the can:  $$V = r^2\pi h$$  Adding in the earlier formula to get rid of h:  $$V = r^2\pi h = r^2\pi (10 - 2r) = 10r^2\pi - 2r^3\pi$$  Taking the derivative:  $$V' = 20\pi r - 6\pi r^2$$  Setting derivative equal to zero:  $$V' = 0 \Rightarrow r = \frac{10}{3}$$  (neglecting trivial r = 0 solution)  Height is then:  $$h = 10 - 2r = 10 - \frac{20}{3} = \frac{10}{3}$$  But this is not really possible given the side of the metal sheet cannot be more than 10 cm and $$2r\pi > 10$$.  Case 2:  The bottom becomes:  $$2r + 2r\pi = 10 \Rightarrow r= \frac{5}{1+\pi}$$  The right side becomes:  $$h = 10$$  However, none of these answers match the solution:  $$r = \frac{5}{\pi}$$  $$h = 10(1-\frac{1}{\pi})$$  Did I get the starting point for the possible cases right? Where did I go wrong? How come it appears that no calculus is needed in the second step?


I've been using titlesec in XeLaTeX for quite a long time and never had problems with it. But recently, I updated it via tlmgr (as I have TeXLive 2015) to 2.10.1 and now I'm facing this situation:  When I load the package, section and subsection numberings disappear. I tried to explicitly show the numbering (see MWE below) without luck. Of course, when I comment the package including line (and its associated commands), the numberings appear again.  Here is a MWE:  \documentclass{article}  \usepackage{titlesec} \titleformat{\section}[hang]{\normalfont\Large\bfseries}{\thesection.}{1em}{}[] \titleformat{\subsection}[hang]{\normalfont\large\bfseries}{\thesubsection.}{0.5em}{}[] \titleformat{\subsubsection}[runin]{\normalfont\normalsize\bfseries}{\thesubsubsection.}{0.25em}{}[.---]  \begin{document}  \section{A fancy section}  \subsection{A subsection}  \subsubsection{A sub-subsection}  \end{document}   Here is an image of the output I get:    I've never had this issue since I installed TeXLive. How can I solve it?  EDIT: I forgot to say I have TeXLive in another computer without the update and the MWE works fine. Here is an image of the output:

After reinstalling TeXLive distribution (install-tl-20160318, Ubuntu 14.04), a issue occurs with the updated version of the titlesec package: the section numbering is lost.  What could it be missing? Is there a modification I have not seen?  Below is a MWE comparison of the two versions. The prevtitlesec package is a reinstall of the previous version (2011/12/15).  \documentclass{book} \usepackage[margin=2cm,a4paper]{geometry} %\usepackage{prevtitlesec}% 2011/12/15 version \usepackage{titlesec}% 2016/03/15 version \usepackage{lipsum}  \begin{document}  \chapter{Title of the first chapter} \lipsum[1] \section{A test section} \lipsum[4] \subsection{A test subsection} \lipsum[4] \subsection{A test subsection} \lipsum[4]  \end{document}   titlesec package 2011/12/15:    titlesec package 2016/03/15:


I would like to create conference posters using idiomatic TikZ code as far as possible. I took a look at tikzposter () but it seems rather unmaintained. The documentation was last updated in January 2014.  To make things precise, I am missing e.g. this:   Predefined coordinates like page.north east. Multi-row titles without . Less vbox, hbox, ... in the . Support any number of font sizes.   Should I rewrite tikzposter or is there something else ideally with a Github page which I can use and contribute to?

I want to create posters for my poster presentation on a conference. What tools or LaTeX classes are available for preparing posters ?


I'm trying to import a Sentienl 2 image into RStudio (Version 1.0.136) using rgdal (v. 1.2-5) package. However, it seems something is wrong. My OS is macOS Sierra v. 10.12.1  S2<- readGDAL("S2A_OPER_MSI_L1C_TL_SGS__20160916T153615_A006454_T34VCR_B12.jp2") Error in .local(.Object, ...) :  I have checked gdalDrivers() and this is what I got:  64  JPEG JPEG JFIF  FALSE  TRUE     TRUE    I've checked already this link but didn't work for me   I think I have to instal the jpeg2000 driver but not sure about how to do it.  Any idea about this issue?

Is there any way I can open Sentinel 2 JPEG2000 file (.jp2) using R? Or more specifically with the {raster} package in R?  I keep getting the Error message that .jp2 is:     not recognised as a supported file format.   Do you know if this file format will be added to the raster package any time soon, or how to open it in R without converting it to .tif first?


I'm trying to get some intuition on why order of a subgroup divides order of a group. I know Lagrange's Theorem and its proof (every element of a group is an element of some coest, cosets are disjoint and each one has the same number of elements as subgroup), but the proof is more like magic than any intuition.  So I've been trying to prove this fact (divisibility of order) without Lagrange theorem. Let's say we take a group $H$ and try to extend it, by taking $g \notin H$ and considering group $G$ generated by set $H \cup {g}$. Such a group would have to contain $g^{-1}$ and every word over alphabet $\{g, g^{-1}, H\}$. Is it possible to prove intuitively that such construct is of size $|H|\cdot n$ for some $n \in \mathbb{N}$? This would essentially prove that any group $G$ containing $H$ has order divisible by $|H$|, because we would be able to take $g \in G$ such that $g \notin H$, extend $H$ by it just like above and continue this process until $H$ is extended into $G$.

I am beginning with Abstract Algebra and I'm trying to understand Lagrange's Theorem. The theorem reads      For any finite group $G$, the order of every subgroup $H$ of $G$ should divide the order of $G$.   It seems simple and I've used it to solve some exercices but I believe I'm missing the essence of it. Is there an example that can help me understand it better, or visualize it? Is there a geometric interpretation?


I downloaded a huge amount of files, but discovered the use of md5 and sha as integrity checkers quite recently. From then I always prefer to check it for big downloaded files, even if I never found them to be corrupted.   Do we really need to check the integrity of downloaded files?   Pick as example a Linux distribution that I have just downloaded, which is 1GB, if you want.   Thank you

My memory isn't great but I think five or six years ago, when I downloaded some package, there was never a checksum line under the download icon on the webpage. And no instructions to "check the checksum" to make sure your download is correct. Now these things are everywhere. I have two questions about them (whether MD5 or whatever).   When did they start becomeing so popular and why are they used? I mean, if I'm downloading a package from server X, then it is up to the server to make sure it is giving me the correct package (I think, anyway). How do you check the checksum? Usually I download the package and install it immediately. Maybe this is stupid.


In my loss function I'm using the mean of the log-cosh error between the predictions and targets, as well as an additional regularization term that scales as the mean of the absolute value of another quantity in my calculation.     My understanding is that L1 strictly refers to using the sum of absolute values, not their mean, so saying I'm doing "L1 regularization" could be misleading.   My question is, what terminology should I use to refer to such a regularization term?  "L1 divided by the number of elements" seems long & pedantic.   PS- The quantities in the error and the quantity in the regularization do not have the same number of elements, so I'd feel odd saying "I calculate the (regularized) loss and divide by the number of elements."  The reason I'm using the mean instead of the sum is so that I don't have to re-engineer the regularization coefficient every time I change the problem size.   EDIT: In response to comment, here's the question in mathematical form:   If, strictly speaking, an "L1 regularization" term is applied via something like  $${\rm Loss} = {\rm (other\ \,terms)} + \lambda  \sum_{i=1}^N |y_i| $$,   and instead I'm doing  $${\rm Loss} =  {\rm (other\ \,terms)} + \lambda {1\over N} \sum_{i=1}^N |y_i| $$,  what is the appropriate terminology to refer to this?  I supposed one might say "It's still L1, it's just that you're using a different value for your coefficient."

In a neural network class I'm taking the error measure is defined as:    If the purpose of squaring the difference of the predicted and target values is to always have a positive value, then why not just use the absolute value of the difference instead?  Secondly, why is the summation halved?


I want to know if there is a command X that allows me to execute another command Y after a certain time. I would specify the time in X. The idea comes from a sleep timer, where I found:   With:  sudo shutdown -P +60   But say I want to do as described above:  command X -time 60 ls -a   Is there something like this and if not could I add it myself?

I want to do such as following:  #!/bin/bash command1 pause 30 seconds command2 exit   This is only example script with pause of 30 seconds between run of 2 command.  How to do this?


Sorry but I have read a lot on this topic, in threads of this platform and multiple articles .. etc. And I'm still not sure what resolution and frequency my laptop can run on an external monitor.  Laptop: Macbook Pro 15 "Retina (Late 2013) Connections: 2 Thunderbolts, 1 HDMI  About what I would like:   I want to add 1 new monitor to work on a double screen: monitor + laptop screen. I'm thinking about 27 "- 32" with a resolution somewhat higher than FullHD. In this way I hope not to notice too much negative ppi difference compared to the Retina display   About Freq y Res:   I don't want 30hz or 24hz with higher resolutions; I would like to know the maximum resolution for an external display at 60hz. QuadHD, 2K, 4K? I have no idea.   I have read about MST and 60hz at 4k works with this computer, but I do not understand too much how it works and if this affects me. Because I want to connect only 1 additional monitor.  Now, knowing this maximum resolution at 60hz, I will be able to decide to buy a monitor that best suits the requirements.  And now what cable or adapter do I need so that everything works correctly without limitations?  Thank you

How do I find out the number, type, resolution & refresh rate of additional monitors I can attach to my MacBook or MacBook Pro?  This is an attempt at a canonical QA, as per the Meta QA -   to try prevent the myriad "same but different" questions we get on every possible combination of computers, cable & monitors There are perfectly good resources out there that Ask Different should not have to duplicate the efforts of.


When I tried to run fsck on Ubuntu 18.04 recovery-mode I got the following message. Can anyone tell me why?  /lib/recocery-mode/recovery-menu: line 80: /etc/default/rcS: No such file or directory fsck from util-linux 2.31.1 /dev/sda4 is mounted e2fsck: Cannot continue, aborting.

I intend to use fsck for checking my Linux partition of the main disk, because its file system is suspicious of being not unmounted cleanly by shutting down the system. I have searched in my environment variables: none of them except of PATH should control the fsck program. But the program apparently needs to be used during a boot: :~$ fsck -V fsck from util-linux 2.20.1 Checking all file systems. [/sbin/fsck.ext4 (1) -- /] fsck.ext4 /dev/sda6  e2fsck 1.42 (29-Nov-2011) /dev/sda6 is mounted. WARNING!!!  The filesystem is mounted.   If you continue you WILL cause SEVERE filesystem damage. Do you really want to continue? no check aborted.  (There is no /forcefsck file in my root according to  . My etc/fstab file contains    # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # #                 proc            /proc           proc    nodev,noexec,nosuid 0       0 # / was on /dev/sda6 during installation UUID=1ac55d8d-c112-4bc7-9e79-921d196f9f79 /               ext4    errors=remount-ro 0       1 # swap was on /dev/sda7 during installation UUID=54f7e314-50e2-419b-a45d-47c3058ecc00 none            swap    sw              0       0 /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0   ). According to an answer to  I have tried tune2fs hoping that I'll get the present value of the max_mounts_count parameter to be able to set it to 1 for checking the partition during the next boot. But after sudo rm /var/lib/update-notifier/fsck-at-reboot and a restart I have only got a response  :~$ tune2fs -l /dev/sda6 tune2fs 1.42 (29-Nov-2011) tune2fs: Permission denied while trying to open /dev/sda6 Couldn't find valid filesystem superblock. Can I use sudo tune2fs -l /dev/sda6 safely? Thanks.


Under the current directory I have a number of files, and one directory. I would like to move all files to the sub directory:  mv ./* subdir/ cannot move ./subdir to a subdirectory of itself...   The warning is harmless but it makes mv return 1, therefore it's not possible to determine whether other files have been moved.  cp could help but I have some large files to move and it's not efficient enough.  Scripting would seem to work too, but I'd prefer a one liner if there is any.

I often want to do some variant of this idiom:  $ mkdir 2010 $ svn mv * 2010   Of course, I get an error because the glob matches 2010 as well:  svn: Cannot copy path '2010' into its own child '2010/2010'   Is there a way to replace "svn mv * 2010" with a different one-liner that does the right thing?


How can I retrieve from the command line (or a shell script) only the name of the active network interface, in Linux? If there are several active interfaces, I want just one (selected arbitrarily).

By default ifconfig will show me all available interfaces , but what if I just want to display active ones? Like, en0 only in below.   en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500     ether 14:10:9f:e0:eb:c9      inet6 fe80::1610:9fff:fee0:ebc9%en0 prefixlen 64 scopeid 0x4      inet X.X.X.X netmask 0xffffff00 broadcast 101.6.69.255     nd6 options=1<PERFORMNUD>     media: autoselect     **status: active** en3: flags=8963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1500     options=60<TSO4,TSO6>     ether 32:00:14:e7:4f:80      media: autoselect <full-duplex>     **status: inactive**   Notice ifconfig en0 will not satisfy, en0 is not always the active one ;)  I'm running Mac OS X.


The observable universe is limited by a cosmic horizon. Galaxies beyond the horizon move away from us faster than light, so we cannot see them. Imagine a spaceship in the vicinity of our horizon. If the ship is stationary relative to the local galaxies there, we would see it moving away from us near the speed of light due to the space expansion.  Now the ship takes off in the direction away from us with a relativistic speed relative to the local galaxies there. What would be its speed relative to us? Would the ship cross the horizon and disappear from our view even though the ship still is not as far away from us as the actual horizon? Or would the relativistic speed addition apply allowing us to still see the ship (albeit deeply redshifted)?

What does general relativity say about the relative velocities of objects that are far away from one another? In particular:--  Can distant galaxies be moving away from us at speeds faster than $c$? Can cosmological redshifts be analyzed as Doppler shifts? Can I apply a Lorentz transformation in general relativity?


Which one is the longest anime ever created?  Not just episodes, the duration of each episode is also important.

I know that the Pokemon anime has over 800 episodes, and One Piece has 600+ episodes, but I've heard that they are not in the top 10 of anime with the most number of episodes.  So what anime is longest?


I am new to Ubuntu and i want to install iTunes through playOnLinux.. Every time I open playOnLinux though , i get the following error :   PlayOnLinux is unable to find 32bits OpenGL libraries. You might encounter problem with your games   and then this error :   PlayOnLinux cannot find wine (from Wine) You should install it to use PlayOnLinux   My ubuntu version is 16.04..  What I'm supposed to do ??

I am looking for a step by step instruction to guide me in the ways of installing, configuring and debugging many of the issues new users have when dealing with Wine in Ubuntu.  What is the recommended way of installing Wine, some of the key issues that it has and how to solve them?  If I have a specific problem with an App in Wine, how do I go about solving it? What are the recommended steps to ensure that I can fix a problem related to an app I wish to use?


In page it says in order to solve a problem in Apache 2.4, we have to create a configuration file inside the conf-available directory. For example servername.conf.  sudo vi /etc/apache2/conf-available/servername.conf   And inside this we just need to add one line  ServerName localhost  I can do that but how do I save it ?

I can't save changes after editing   sudo vi /etc/network/interfaces   Text before editing:    auto lo iface lo inet ...   Edited to:  auto eth0 iface eth0 inet dhcp   What key combination or sequence must I press to save this?


When I installed Ubuntu,I made a disk partition of 120 GB, which of course is too much as I don't have many heavy weight software. I'm currently using only 16/120GB, I was wondering if I can split the partition on which Ubuntu(Make the 120GB to 50 GB and separate the 70GB partition) is installed and if I do so I won't have any bad consequences.

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


If a virus causes my computer to automatically shut down when it is turned on and makes it unable to be turned back on, how does a person destroy the virus without destroying the infected computer's drive or files?

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


Why is gravity such a weak force?   It becomes strong for particles only at the Planck scale, around $10^{19}$ $\text{GeV}$, much above the electroweak scale ($100$ $\text{GeV}$, the energy scale dominating physics at low energies).   Why are these scales so different from each other? What prevents quantities at the electroweak scale, such as the Higgs boson mass, from getting quantum corrections on the order of the Planck scale?   Is the solution super symmetry, extra dimensions, or just anthropic fine-tuning?  Can we relate few problems of quantum mechanics with gravity ?  Despite the fact that there is no experimental evidence that conflicts with the predictions of general relativity, physicists have found compelling reasons to suspect that general relativity may be only a good approximation to a more fundamental theory of gravity. The central issue is reconciling general relativity with the demands of quantum mechanics. Well tested by experiment, quantum mechanics is the theory that describes the microscopic behavior of particles. In the quantum world, particles are also waves, the results of measurements are probabilistic in nature, and an uncertainty principle forbids knowing certain pairs of measurable quantities, such as position and momentum, to arbitrary precision. The Standard Model is the unified picture of the strong, weak, and electromagnetic forces within the framework of quantum mechanics. Nonetheless, theoretical physicists have found it to be extremely difficult to construct a theory of quantum gravity that incorporates both general relativity and quantum mechanics.  At the atomic scale, gravity is some $40$ orders of magnitude weaker than the other forces in nature. In both general relativity and Newtonian gravity, the strength of gravity grows at shorter and shorter distances, while quantum effects prevent the other forces from similarly increasing in strength. At a distance of approximately $10^{-35}$ $\text{m}$, called the Planck length, gravity becomes as strong as the other forces. At the Planck length, gravity is so strong and spacetime is so highly distorted that our common notions of space and time lose meaning. Quantum fluctuations at this length scale produce energies so large that microscopic black holes would pop into and out of existence. A theory of quantum gravity is needed to provide a description of nature at the Planck length. Yet, attempts by researchers to construct such a theory, analogous to the Standard Model of particle physics, have lead to serious inconsistencies.

Why is gravity stronger than other forces at the macroscopic level, yet weaker than other forces at the quantum level? Is there an explanation?


I am Persian, and as some of you know, Google Play denies service to Iran. It became a common practice here to download .apk files and install them later on.    Can Stack Exchange give a direct link to the Android application? This way we are getting our software right from the source. Yes, it is possible to use a third-party services such as Aptoide, but it spams its users.

I'm one of those exceptions that deviates from the norm: I run CyanogenMod without any Google apps.   Is it possible to download the Stack Exchange Android app .apk directly?


I was reading an  and came across the phrase "Perhaps their time is come at last."     The founder of the first vegan society said in 1944 that "in time [people] will view with abhorrence the idea that men once fed on the products of animals' bodies." Many since have shared his hope. Perhaps their time is come at last.   I googled it but couldn't find any satisfactory reason as to why the author should use "Time is come" instead of "Time has come". Any ideas?

In the King James version of the Bible there is a verse like this:     The Lord is my strength, and my fortress, and my song. And He is become my salvation.   Is it still feasible to use "is become" instead of "has become" and what is the semantic difference?


I've been reading through a book (I think it was The Complete Guide to Middle-earth by Robert Foster) and I'm uncertain what the ultimate fate of the Numenorians who invaded Aman will be?  Ar-Pharazôn made a huge error in invading Aman with a massive force of men, but they were buried under mountains if I remember correctly. Is this punishment forever or will they be able to redeem themselves?  Will they be allowed to take part in the final music with the rest of men or will they remain trapped forever?

As you know, this is the apocolyptic event which occurs at the end of LOTR. I've been searching non-stop but simply cannot find if any from say, War of the Ring will return. People like Gandalf, The Witch King. I know Sauron and Morgoth and the other Valar do, but It's more the likes of say Saruman. He specifically confuses me. Would they make use of Saruman? Would he be brought back? What confuses me about him though is, who would he serve? Morgoth or Manwe?


Attempting to edit  causes the iOS mobile app (1.4.5) to crash. I'm using an iPhone 6 with iOS 9.3.1.

I have attempted to edit . In this case, it contained code within a single block. As soon as the editor comes up, the app stops responding and crashes after a few seconds. I have tested this several times and it has occurred each time.  However, this does not occur in the browser (the Chrome app, at least).   iOS version: 8.1.3 (latest) App version: 1.2.2 (latest)


The definition of a Hamiltonian system I am working with is a triple $(X,\omega, H)$ where $(X,\omega)$ is a symplectic manifold and $H\in C^\infty(X)$ is the Hamiltonian function.  I am wondering if someone can give me an interesting, or useful, example of a Hamiltonian system for which $X$ is not the cotangent bundle of a manifold.

NOTE. This is not a question about mathematics and in particular it's not a question about whether one can endow the torus with a symplectic structure.  In an answer to the question    I claimed that there exist (in a mathematical sense), Hamiltonian systems on the torus (and in fact on higher genus surfaces as well).  However, when pressed to come up with a physical system in the real world (even an idealized one) whose dynamics could be modeled as a Hamiltonian system on the torus, I could not think of one.  Does such a system exist?  I would even be satisfied with a non-classical system which can somehow effectively be described by a Hamiltonian system on the torus, although I'm not sure that the OP of the other question I linked to above would be.


Let's say we would like to heed the margins when writing a submission such as using  Now I remember there was an option that makes the margins visible, so one knows immediately where the document overflows. Searching the net though did not turn up anything, but I remember there was one such option. I'd appreciate if someone reminds me how to do it.

Is there any way to overlay some lines and dimensions on the document so that one can see where the margins end and more easily examine the overall layout and ratios of elements on the page?  See for example, some of the illustrations of frameworks in this article on the  and this one on  (which displays dimensions).


In the movie The Lord of the Rings it said that Sauron somehow gave (presumably by proxy) several rings to Elves, Dwarves, and Men. There's also another race called Hobbits, who became quite important in the story. Why didn't he give them any rings so that he could control them as well?  Forgive my ignorance here; I never read the books and I'm only watching the movie for the 2nd time in 16 years.

Simple: every other race in Middle Earth has rings, why do Hobbits and Orcs not?


I just bought a Schwinn bike with the following codes on the tire. AKR6483 / 40-622 / 700x38c. I have gone to numerous websites to possibly order a solid rubber tire for my bike so I will never have to by a replacement tire or repair a flat due to puncture. Can you tell me which solid rubber tire would be acceptable for this bike  Thank you very much  Ron

As a child I had solid rubber inner tubes in my bike. They were a pain to get on but after I never had a flat again!  Now I've recently started biking again and have had two flats in two days, each resulting in a three-mile walk back home. I've been searching for solid rubber tubes for a few hours now, but have only found them at wal*mart, and they don't have the correct size? (700x38c)  Why have they disappeared? I thought they were a fantastic product . . .


I wanted to make an input value same to above input val using jquery.The above input type val is coming from a function. But don't know why the second input value is being set to undeefined and console gives no error.  HTML :  <input type="hidden" name="date" id="transactiona_date">   I Tried jquery 1.  console.log($("#myDate").val()); $("#transactiona_date").val($("#myDate").val()); console.log($("#transactiona_date").val());   2.  console.log($("#myDate").val()); $('#transactiona_date').val($("#myDate").val()); console.log($("#transactiona_date").val());   I even tried changing id to class in jquery as well as in html    console.log($("#myDate").val()); $(".transactiona_date").val($("#myDate").val()); console.log($(".transactiona_date").val());   No matter what i do i always get this in console.  06-02-2018 undefined   Any help why it is behaving like this ?  Also the myDate is getting value from  <input style="width:98%;margin-left:1%;margin:right:1%" type="text" name="invoice_date" id="myDate" value="<?php echo date('d-m-Y'); ?>">   Also i have no other error showing in console.And i want to share that the following id's or there is no other thing or code containing a relation to this code in same page , still lets consider a possibility of something interfering with the code, can you suggest a suitable way to diagnose my problem or how can i check what's been wrong in my code.

When embedding JavaScript in an HTML document, where is the proper place to put the <script> tags and included JavaScript? I seem to recall that you are not supposed to place these in the <head> section, but placing at the beginning of the <body> section is bad, too, since the JavaScript will have to be parsed before the page is rendered completely (or something like that). This seems to leave the end of the <body> section as a logical place for <script> tags.  So, where is the right place to put the <script> tags?  (This question references , in which it was suggested that JavaScript function calls should be moved from <a> tags to <script> tags. I'm specifically using jQuery, but more general answers are also appropriate.)


Let $A$ be a ring, and let $J$, $K$ be ideals of $A$. The radical of $J$ is the set $$\operatorname{rad}J=\{a \in A:a^n \in J  \text{ for some }  n \in \mathbb{Z}\}.$$ Prove for any ideal $J$, $\operatorname{rad}J$ is an ideal of $A$.   I know that I will start the proof supposing that $a^n \in J$ and $b^m \in J$, and will work to show $(a+b)^{m+n} \in J.$ How would I go about this? and how do I use this to prove the ideal?

$$Rad(I)=\{a \in R | \exists n \in \mathbb{N} \text{ such that } a^n \in I\}$$   R is a commutative ring, I is an ideal.   To show that $Rad(I)$ is an ideal of $I$, we have to show that for $a,b \in Rad(I)$ it stands that $a-b \in Rad(I)$ and for $r\in R$ it stands that $a\cdot r\in Rad(I)$, right??   When $a,b \in Rad(I)$ we have that $a,b \in R$ and $a^n, b^m \in I$.   $a-b \in R$.   But how can we show that $(a-b)^x \in I, x \in \mathbb{N}$ ??


I know a elementary way to prove that for $n>1$, $n$ never divides $2^n-1$:     Suppose that $n$ does divide $2^n - 1$. Then $n$ must be odd. Let $p$ be the smallest prime dividing $n$. Then $2^{p-1}\equiv1 \pmod p$. Let $m$ be the smallest divisor of $p - 1$ such that $2^m \equiv1 \pmod p$. Since $m$ is smaller than $p$ it must be coprime to $n$, so $n = qm + r$ with $0 < r < m$. Hence $2^r \equiv 1 \pmod p$. Contradiction.   One can find this solution  (it's from an old Putnam exam). But I heard that there is a nice way to prove the claim utilizing group theory and Lagrange theorem. Could somebody provide such a proof?

Here is a problem which i have not been able to do for quite sometime.   For $n \geq 2$, show that $n \nmid 2^{n}-1$.   I have thought of proving this in two ways: One by using induction which didn't actually work. Next by Fermat's little theorem we have $2^{p-1} \equiv 1 \ (\text{mod} \ p)$, which actually says that for $p \mid 2^{p}-2$. But i couldn't proceed more than this. Any ideas by which i can actually solve the problem?


I have the following code :  var x = 6; var y = 4; var a = function(b) {      return function(c) {          return y + b + c;      }  };  x = 2; y = 5;  var fn = a(x);  x = 1; y = 3;   I was asked to figure out what unknown  needs to be in order for fn(unknown) to output 10 :  console.log(fn(unknown)); // This should output 10   I know unknown needs to be 5 in order for the fn output to be 10, but can someone explain why?  I'm sure it has to do with enclosure but not quite understand how the variables get assigned at different stages.

How would you explain JavaScript closures to someone with a knowledge of the concepts they consist of (for example functions, variables and the like), but does not understand closures themselves?  I have seen  given on Wikipedia, but unfortunately it did not help.


I need an advice.. I need to recreate the following formula:   The only difference is that color of the brackets needs to be red. Is it neccessary to do this in math mode, or can be achieved in some other way ?

I have some special delimiters that I want to add to a glossary, those get hyperlinks and colors etc. However when i want to use those delimiters, using \left, \right and \middle becomes impossible. I think with the following question fixed I can create my hyperlinked delimiters:  How to color delimiters:  As a minimal working example I have:  $\left\textcolor{red}{(}a\right)$   What i would like to have is (Created without \left \right):    This gets the error: ! Missing delimiter (. inserted).    Trying this :   $\textcolor{red}{\left(}a\right)$   results in ! Extra }, or forgotten \right.  Who can help me?


As far as I understand it, the p-value is the probability of obtaining the observed data or more "extreme" values under the null hypotesis, concluding that if this probability is small enough the null hypotesis is likely false.   Why are we interested in the probability of more "extreme" values as opposed to, for instance, the probability of some small interval around the obtained value? (i.e. the probability of obtaining a value in the interval [obtained_value - sigma/2, obtained_value + sigma/2] ) What does "more extreme" actually mean? Sure, if we are talking of a test statistic following a normal distribution, "more extreme" can mean farther away from the mean. However, what about a bimodal distribution? Is there some formal way of stating what "more extreme" means?    Thank you!

I know that there are lots of materials explaining p-value. However the concept is not easy to grasp firmly without further clarification.  Here is the definition of p-value from Wikipedia:     The p-value is the probability of obtaining a test statistic at least   as extreme as the one that was actually observed, assuming that the   null hypothesis is true. ()   My first question pertains to the expression "at least as extreme as the one that was actually observed." My understanding of the logic underlying the use of p-value is the following: If the p-value is small, it's unlikely that the observation occurred assuming the null hypothesis and we may need an alternative hypothesis to explain the observation. If the p-value is not so small, it is likely that the observation occurred only assuming the null hypothesis and the alternative hypothesis is not necessary to explain the observation. So if someone wants to insist on a hypothesis he/she has to show that the p-value of the null hypothesis is very small. With this view in mind, my understanding of the ambiguous expression is that p-value is $\min[P(X<x),P(x<X)]$, if the PDF of the statistic is unimodal, where $X$ is the test statistic and $x$ is its value obtained from the observation. Is this right? If it is right, is it still applicable to use the bimodal PDF of the statistic? If two peaks of the PDF are separated well and the observed value is somewhere in the low probability density region between the two peaks, which interval does the p-value give the probability of?  The second question is about another definition of p-value from Wolfram MathWorld:     The probability that a variate would assume a value greater than or   equal to the observed value strictly by chance.   ()   I understood that the phrase "strictly by chance" should be interpreted as "assuming a null hypothesis". Is that right?  The third question regards the use of "null hypothesis". Let's assume that someone wants to insist that a coin is fair. He expresses the hypothesis as that relative frequency of heads is 0.5. Then the null hypothesis is "relative frequency of heads is not 0.5." In this case, whereas calculating the p-value of the null hypothesis is difficult, the calculation is easy for the alternative hypothesis. Of course the problem can be resolved by interchanging the role of the two hypotheses. My question is that rejection or acceptance based directly on the p-value of the original alternative hypothesis (without introducing the null hypothesis) is whether it is OK or not. If it is not OK, what is usual workaround for such difficulties when calculating the p-value of a null hypothesis?     I posted a new  that is more clarified based on the discussion in this thread.


When I try installing anything I get error E: Malformed entry 1 in list file /etc/apt/sources.list.d/atom.list /etc/apt/sources.list.d/atom.list: deb https://packagecloud.io/AtomEditor /atom/any/ any main

I'm relatively new to Ubuntu 16.04, and everything has been going fine until my OS threw this error today.   Below is the source code from /etc/apt/sources.list for line 54:  deb http://archive.canonical.com/ partner   I have tried appending ubuntu after the / and before partner, but this does not seem to work.   Any ideas what else to try? I can't run sudo apt-get update until this is fixed.


I've gotten every level, both imperial and non-imperial; and I've completed every Vader mission. However, I still don't have all the characters.   How can I unlock all the characters? Is it possible to do so without using Bux?

Which characters in Tiny Death Star can be unlocked without paying in Imperial Bux?


I know that there are  to "convert" LaTeX source to HTML markup that, when rendered, resembles the hypothetical original PDF.  Is there such a package that works within LaTeX? I'm wondering whether to work towards a package (loaded via \RequirePackage before the preamble) that applies changes such as \def\textit#1{<i>#1</i>}, so that by the final expansion it has written out HTML source to an auxilliary file.  Has this been done? Might it be plausible?

I know there are a lot of threads on existing Tex-HTML converters already, but I have a question about the feasibility of creating one.  Existing tools use other scripting languages to parse raw TeX and output HTML.  Would it be a better idea to write a package for TeX that overrides commands and outputs content to a HTML file?  For instance overriding \section to write a <h1>{content}</h1> tag to another file.  Is this feasible? I'm sure everyone knows more about TeX than me so I'd like to hear your thoughts.


During the test there is a NullPointerException thrown. I tried to debug it and the only thing I worked out was that eventOptional is always null. Just as if Mockito.when().thenReturn() didn't work. Can anybody help? Here's my code for a tested service and for the test itself:  @Service public class EventService {      @Autowired      public EventService(EventRepository eventRepository) {         this.eventRepository = eventRepository;     }     //...     public void updateEvent(EventDTO eventDTO) {         Optional<Event> eventOptional = eventRepository.findOneById(eventDTO.getId());          eventOptional.orElseThrow(() -> new BadRequestException(EVENT_NOT_FOUND));         //...     } }   And the test class:  @RunWith(MockitoJUnitRunner.class) public class EventServiceTest {      @Mock     private EventRepository eventRepository;     @InjectMocks     private EventService eventService;      private Event sampleEventFromDb;      @Before     public void setUp() throws Exception {          MockitoAnnotations.initMocks(this);     }      @Test     public void shouldUpdateEventTestAndWithProperTime() throws Exception {         EventDTO eventDTOMock = Mockito.mock(EventDTO.class);          sampleEventFromDb = Event.builder()             .name("name")             .startDateTime(LocalDateTime.now())             .placeName("place")             .description("description")             .publicEvent(true)             .owner(new User())             .build();          Mockito.when(eventRepository.findOneById(anyString())).thenReturn(Optional.of(sampleEventFromDb));         Mockito.when(eventDTOMock.getId()).thenReturn("1");          eventService.updateEvent(eventDTOMock); //NullPointerException         //...     } }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I have the following rule:  Don't allow numbers of any sequence with 4 or more 0s at the beginning.  So this number:  0000438967   will fail validation (4 zeros)  But this number:  0004389678 (3 zeros)  Will pass validation.  the reason for this question was I needed verification on whether I was doing it correctly as, when checking in online Regex validators, I was getting mixed verification results. I know it sounds like a simple question but verification from others is important.  thanks Russ

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


I have not found any solution for this besides people saying no way. I am just hoping that someone knows a new trick that could do this.  So here is what I did.  git commit -m "test configure finished"  git status On branch master Changes not staged for commit:   (use "git add/rm <file>..." to update what will be committed)   (use "git checkout -- <file>..." to discard changes in working directory)   git push origin master   git revert HEAD error: Your local changes to the following files would be overwritten by merge:   git reset --hard fb305ae7d5e01e595986 a3753cbdd22ead4cb945 HEAD is now at fb305ae    I did not perform a git add before these commands.  Can I get those unstaged files back???

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


I am working on a codeigniter project where the system requires php version < 5.6 that is 5.5, but few days ago I have installed ubuntu 15.04 with having LAMP stack installed using tasksel;the tasksel is gives me the latest update to php5.6 which is incompatible to my project;even I have uninstall tasksel LAMP server and installed lamp individually but the problem is not persisted  I have a limited knowledge in linux environment if anybody knows please help me with some resources;I will be highly obliged.  Thank You.

I installed Ubuntu 15.04, but I need to use PHP 5.5 and in 15.04 the standard is PHP 5.6  I added the PPA:  sudo add-apt-repository ppa:ondrej/php5   But when I tried to install, I got:  The following packages have unmet dependencies:       php5-mcrypt : Depends: phpapi-20121212 Depends: php5-common (= 5.5.24+dfsg-1+deb.sury.org~vivid+1)  but 5.6.4+dfsg-4ubuntu6 is to be installed   How should I proceed?


I know how to calculate a determinant, but I wanted to know what the meaning of a determinant is? So how could I explain to a child, what a determinant actually is.  Could I think of it as a measure of independence of the columns or rows? Or is there another interpretation that is even simpler?  Edit: The explanation should also explain, the role of the determinant for the solvability of linear equations.

In my linear algebra class, we just talked about determinants. So far I’ve been understanding the material okay, but now I’m very confused. I get that when the determinant is zero, the matrix doesn’t have an inverse. I can find the determinant of a $2\times 2$ matrix by the formula. Our teacher showed us how to compute the determinant of an $n \times n$ matrix by breaking it up into the determinants of smaller matrices. Apparently there is a way by summing over a bunch of permutations. But the notation is really hard for me and I don’t really know what’s going on with them anymore. Can someone help me figure out what a determinant is, intuitively, and how all those definitions of it are related?


This question has been  before but I couldn't get the solution to work. I have a shapefile with lots of empty columns and I would like to remove them all with a script or some tools.  This is the script that was posted as the solution to the other thread.  lyr = iface.activeLayer() lstDelete = []  for idx in lyr.dataProvider().attributeIndexes():     uv = lyr.dataProvider().uniqueValues( idx )     if not uv:         lstDelete.append( idx )  lyr.dataProvider().deleteAttributes( lstDelete )  # Update the layer structure lyr.updateFields()   When I try it both on Windows 2.18.1 and Mac 2.18.0 I get no change to my active layer.

I have a Shapefile with a lot of empty columns but many of them are empty. Using QGIS or ogr2ogr, how do I remove all attribute columns where everything is NULL?


I am currently stuck with a problem related to the indentation in the table of contents. Essentially, the numbering "eats into" the heading. This happens for "Chapter 7" and "Chapter 8" in the example. Unfortunately, I cannot change the type of numbering, as it is required by the professor.   Is there any method to increase indentation for chapters in the table of contents without changing indentation in the regular document?   Many thanks, your help is highly appreciated!  desp_user  \documentclass[12pt, a4paper, tocindentauto, bibliography=totoc, listof=totoc, final]{scrbook}  \renewcommand\thepart{\Alph{part}} \renewcommand\thechapter{\Roman{chapter}} \renewcommand\thesection{\arabic{section}} \renewcommand\thesubsection{\thesection.\arabic{subsection}}  \begin{document}  \frontmatter \tableofcontents  \mainmatter \part{Part 1} \chapter{Chapter 1} \chapter{Chapter 2} \chapter{Chapter 3} \chapter{Chapter 4} \chapter{Chapter 5} \chapter{Chapter 6} \chapter{Chapter 7 - issue} \chapter{Chapter 8 - issue}  \chapter{Chapter 9}  \end{document}

Following minimal document:  \documentclass{report}  \begin{document} \renewcommand*\thechapter{\Roman{chapter}} \tableofcontents \setcounter{chapter}{6} % Problem starts at chapter 7 \chapter{Seven} \chapter{Eight} \section{Eight-one} \section{Eight-two} \end{document}   yields this output (cut to size for your convenience):    Clearly, the chapter (and section) headings hang into the chapter (section) numbers. For the previous chapter numbers, this isn’t a problem since all chapter titles are aligned to the same column and the numbers I–VI are sufficiently narrow.  (The same happens regardless of document type, I’m actually using scrreprt with the same result.)  How can I prevent this?


I want the contact number to appear on the dialling screen when initiating call that if contact has more than one number I want to know which number I had dialled.

In the Phone app (iPhone 5, iOS 6.1.2), I click on a contact's number, the call is initiated and starts ringing.   For a brief moment at this point, the label of the number (home / work / etc…) is displayed alongside the contact's name, but it quickly is removed and replaced with the call timer counting up and only the name (and picture of the contact) are shown.      How can I see the number that is being called during a phone call?


Is it possible to have an object 100% pure white without sky blue or sun color tinting the pure whiteness of the photons reflecting/deflecting off an object? Are there any lights that can produce pure white photons (RGB)? And can we see that the color is white or is our eyes going to trick us into thinking the white is a different color? Can scientist produce what can be seen macroscopically as "pure white".

Does a photon having superimposed frequencies exist?  (wrt frequency detected by prism or other detectors, not wrt human eye as only rod-cells can detect one photon falling in the detectable (visible) frequency band and the single photon is perceived by eye+brain as grey irrespective of frequency).  Also, with white here, I do not wish to restrict the question implying all VIBGYOR frequencies or only RGB as each color is also a range of frequencies and white to trichromatic-sensor human eye is just output from three frequencies RGB.  Or can it be that materials which slow light down cause a photon of some single frequency and higher energy to split into VIBGYOR? || and the entire spectrum of human eye's detection range is VIBGYOR+W (as monochromatic light of high intensity can also be perceived white by human eye and it is not related to individual color sensors of human eye at all but that above a certain energy per unit volume (referring to detector area of eye cells), we perceive it white, (somewhat but not exactly) similar to combination of red and green which human eye+brain calls yellow.  I have added the additional description to make the question more precise. If my description causes confusion, please stay with the original question and use description just to get an idea of the intent of the question.


I have an rgb led with a common annode connected to my 3.3v arduino mini pro in the following way:         – Schematic created using   When I try to illuminate more than one diode, to create a "multi" colour, only one of the colours shows. An example would be, using the following code would result in only the red colour showing:  digitalWrite(redLed, LOW); digitalWrite(greenLed, HIGH); digitalWrite(blueLed, LOW);

Different from the best answer of this one:  But well, I'm also an electronics noob ^.^  Recently I bought the official Arduino starter kit and played around with the common cathode RGB LED that came with this kit. In the project book, the instructions for the colour mixing lamp is to use separate 220ohm resistor for each of the RGB legs. But I thought, why can't I put the resistor on just the cathode of the LED?   I tried that by plugging the LED into the breadboard and connecting the cathode through a 220ohm resistor to the ground of Arduino UNO. When I touched any one of the R, G or B anode legs with a jumper wire connected to +5V, the respective colour lights up alright. However, when I bridge the G and B pins together, only the green LED lights up. When I bridge all three anodes together, only the red LED lights up. But if I connect the anodes to +5V through their separate 220ohm resistors(according to the instruction), the colours will combine.   Why is it so?


Any reservations about the potential of this (given in the link below/title above)? Does it seem like a helpless attempt or something which might have the potential of developing into something real?

The  has been criticized on the points of requiring a large amount of exotic matter with negative energy, and conditions deadly for human travellers inside the bubble. What if the Alcubierre metric is used to just span a tiny bubble around a single spin-1/2 particle to transport either classical or quantum information faster than light? Wouldn't known small-scale effects, such as the Casimir force, suffice to provide the exotic conditions required for an Alcubierre bubble large enough to fit at least one particle? My question explicitly addresses the feasibility of a microscopic bubble using known microscopic effects.


How many times is it safe to reuse deep frying oil for things like french fries, falafel, chicken etc.?  Does the food deep fried make a difference in that regard, i.e. is it safer to reuse oil that vegetarian foods were fried in than meats?

What are some guidelines or rules with regard to filtering and reusing (vegetable/canola/sunflower) oil that has been used for deep frying?  Is it safe and acceptable under some circumstances to filter and keep oil? If so, does it depend on which foods were fried? How long can the filtered oil for be kept for?  Or, is it never appropriate? If not, are the reasons health or flavour related? or both?


It seems Jedis can use the force to lift really, really heavy objects (like entire spaceships for example). But when it comes to lifting their own bodies, they can only use the force to jump higher/farther but not defy gravity entirely. Which is awesome no doubt, but what makes it harder to lift your own body as a Jedi than an (I'm assuming at least 200 ton) spaceship?

In The Empire Strikes Back Yoda uses the Force to lift Luke's X-Wing out of the water and put it on land.  In Attack of the Clones and in many instances in the second series of The Clone Wars, Anakin (and others) use the Force to jump higher than they could otherwise, or to jump from very high locations, but I don't think I've ever seen the Force used for outright self-levitation.  But if Yoda could lift the X-Wing, shouldn't a strong Jedi be able to lift himself and, essentially, fly with the help of the Force?


I have a scheduled flight from Zimbabwe to the USA, but my flight will connect in South Africa. I am not sure whether I will be allowed to transit or whether I'm also banned from transiting. I overstayed and got an undesirable person ban.

I received an undesirable status for overstaying a SA visa while hospitalized for injuries sustained in Lesotho. I had to cross into SA from Lesotho. Now I am banned entry into SA until Feb 2016 and though I have submitted a waiver request to remove the undesirable status, I hear from some the waiver request may take 4-5 months or even take longer than the time of banishment.  I have a pre-paid safari planned in October in which I need to fly through Johannesburg to get to Botswana. The Jburg border control requires tourists to pass through SA immigration even when simply changing planes.  1) Will SA grant me "transit" access if I don't leave the airport?  2) Will SA allow me to spend a night in the airport as the layover is 12 hours>  Thanks for passing on any info.


I'm just trying to build some Python game, but import pygame is not working.  I got this error massage:  /usr/bin/python3 /home/dinushi/g.py/snackgame.py Traceback (most recent call last):   File "/home/dinushi/g.py/snackgame.py", line 2, in <module>     import pygame ModuleNotFoundError: No module named 'pygame'

I am running Ubuntu 13.10. I have python 2.7.5 with anaconda 1.8.0. Whenever I start python and type import pygame it tells me that there is no module named pygame.   How can I install pygame?


Running Ubuntu 14.04, was doing some normal maintenance and updates last night, also added a VirtualHost.  The instance of Ubuntu is installed as a VPS in my SolusVMWare software. This means I cannot physically mount or plug anything into it so that another instance or startup of Linux could run.  I wondered why it wasn't connectable one day and realized in the VNC that it was stuck at a screen in start-up prompting the console for "grub rescue".. Is it possible for me to get all of my files back somehow and make a new VPS? Or is there a way to get the problem situated through grub rescue? Any ideas?  If it helps I get this..  Booting from Hard Disk... error: file '/boot/grub/i386-pc/normal.mod' not found. Entering rescue mode... grub rescue>   Please keep in mind I'm trying to keep what's on my Linux serer.

error: file '/grub/i386-pc/normal.mod' not found. grub rescue>   What can I do? I just sit and stare at it.   I found my old netbook (Dell Inspiron 1010) which I have not used for about four years. I replaced Windows XP with Ubuntu 12.10. I used my bootable USB drive. I installed and rebooted. I got the message that normal.mod is not found.   What should I do? Type exit, reboot, or quit? Should I re-install?


Let A be a set of positive rationals $p$ such that $p^2<2$. Now this set contains no upper bound. To prove this, for every rational $p$, a number $p- \frac{p^2-2}{p+2}$ is associated. This number (let's call it $q$) is greater than $p$. Also, it can be proved that $q^2<2$. Now the proof is complete.    I don't know if this is the only proof of this theorem but anyway how could one come up with that number to be associated with $p$. I am interested in the thought process behind.

Suppose $A$ is the set of all rational numbers $p$ such that $p^2 <2$ and $B$ is the set of all rational numbers $p$ such that $p^2 > 2$. We want to show that $A$ contains no largest element and $B$ contains no smallest element.  In Rudin's Principles of Mathematical Analysis, he associates $q = p- \frac{p^2-2}{p+2} = \frac{2p+2}{p+2}$. Did he just come up with this using trial and error?


Should rice be stored in a sealed container in the refrigerator or should it be kept in a cabinet in sealed container?

I have purchased a rather large bag of long-grain white rice (25 lbs.) and need to know the best way for storing it long-term. This rice will be used as both a food-storage food source and as my everyday source of rice for cooking, so the storage solution should (hopefully) be resealable, rather than once-it's-open-it's-open. I eat rice maybe three times a month, so it isn't really "everyday" but it will be my go-to when I have it.


Im quite confused over the use of the radical. I can understand its definition in $\mathbb{R}$, with $\sqrt[n]{x}$ being defined for $x>0$ if $n$ an even integer greater than one and $x$ any real number if $n$ an odd integer greater than one. I believe its referred to as the principal $n$th root for even $n$ as it outputs the positive root rather than the negative root. In $\mathbb{R}$ there are no square roots of negative numbers, so on this domain it's undefined. I also know it defines the same function of $x$ as $x^{1/n}$ for $n$ integer greater than $1$.  In $\mathbb{C}$, a principal $n$th root function can be defined using the same radical notation which for me is confusing. The fact there are so many ways to define the principal $n$th root function in $\mathbb{C}$ makes it worse, and is $x^{1/2}= \sqrt{x}$ in $\mathbb{C}$ or do you have to define it that way after you have defined exactly what you mean by $\sqrt{x}$. Should this principal $n$th root function in $\mathbb{C}$ be viewed as a different function altogether from the one in $\mathbb{R}$, or just an extension of the domain?  Thanks

This is really two questions.   Is there a definition of the principal $n$th root of a complex number? I can't find it anywhere. Presumably, the usual definition is $[r\exp(i\theta)]^{1/n} = r^{1/n}\exp(i\theta/n)$ for $\theta \in [0,2\pi)$, but I have yet to see this anywhere. Is this because it has bad properties? For instance, according to this definition is it true that for all complex $z$ it holds that $(z^{1/a})^b = (z^b)^{1/a}$?


I need help with this word problem. Much appreciated.  Sales of a new model of word processor are approximated by $S(x)=5000 - 4000e^{-x}$, where $x$ represents the number of years that the word processor has been on the market, and $S(x)$ represents sales in thousands of dollars. When will sales reach $4,500,000$?

Sales of a new model of word processor are approximated by S(x)=5000−4000e^(−x), where x represents the number of years that the word processor has been on the market, and S(x) represents sales in thousands of dollars. When will sales reach 4,500,000?


I was reviewing some things I had learned on $e$ (or actually $\exp(x)$, which for $x \in \mathbb{R}$ makes sense to write as $e^x$) a few years back, and decided to try and show that  $\exp(x+y) = \exp(x)\times\exp(y)$. I got really far, but don't know what to do now. This is what I have: $$\exp(x)=\sum_{n=0}^{\infty}{\frac{x^n}{n!}}$$ $$\exp(x)\times\exp(y)=\left(\sum_{n=0}^{\infty}{\frac{x^n}{n!}}\right)\left(\sum_{m=0}^{\infty}{\frac{y^m}{m!}}\right)=\sum_{n=0}^{\infty}\sum_{m=0}^{\infty}{\frac{x^ny^m}{n!m!}}$$ $$\exp(x+y) = \sum_{n=0}^{\infty} {\frac{(x+y)^n}{n!m!}} = \sum_{n=0}^{\infty} \frac{1}{n!} \sum_{k=0}^n \binom{n}{k}x^ky^{n-k} = \sum_{n=0}^{\infty} \frac{1}{n!} \sum_{k=0}^n \frac{n!}{k!(n-k)!} \times x^ky^{n-k} = \sum_{n=0}^{\infty} \sum_{k=0}^n \frac{x^ky^{n-k}}{k!(n-k)!}$$ And that was about it. Now I'm left with showing that: $$\sum_{n=0}^{\infty}\sum_{m=0}^{\infty}{\frac{x^ny^m}{n!m!}} = \sum_{n=0}^{\infty} \sum_{k=0}^n \frac{x^ky^{n-k}}{k!(n-k)!}$$ And I don't know how to do that. I thought that doing establishing something like $j=n-k$ and rewriting would help give me some insight, but it didn't... I don't know how to handle that relationship between an infinite sum of infinite sums and an infinite sum of a simple sum, even if they both look remarkably similar. I also know that what I wrote this far is true by plugging that last sentence into WolframAlpha (unless I transcribed it into this post incorrectly). My study of this kind of math is pretty autonomous via research, so I apologize if there was something that could have been phrased better. I'm also not really sure what tags to put in this. EDIT: A few comments proposed posts that shared the same problem, but they both had this jump: $$ \sum_{n=0}^{\infty}{\frac{x^n}{n!}} \sum_{m=0}^{\infty}{\frac{y^m}{m!}} =  \sum_{n=0}^{\infty} \sum_{k=0}^n \frac{x^ky^{n-k}}{k!(n-k)!} $$ And didn't really explain it. I don't know why this is true... In fact, if this I understand this, then the rest of the way is self-explanatory. The other post did something similar, but used some notation I'm not used to. I think it translates to: $$ \sum_{n=0}^{\infty} \frac{n!}{n!} \sum_{k=0}^n \frac{x^ky^j}{k!j!} = \sum_{k=0}^{\infty} \sum_{j=0}^{\infty} \frac{x^ky^j}{k!j!}  $$ And here, there are two problems: one, I'm not sure that's what's written... And if it is, then again, I don't know why that would be true. EDIT 2: Following the suggestions in the comments, I read up on Cauchy's product and finally see why all of this happens. It is easier with the first example, I thought: $$ \sum_{n=0}^{\infty}{\frac{x^n}{n!}} \sum_{m=0}^{\infty}{\frac{y^m}{n!}} =  \sum_{n=0}^{\infty} \sum_{k=0}^n \frac{x^ky^{n-k}}{k!(n-k)!} $$ This is very much the standard form, if you consider $a_n=\frac{x^n}{n!}$ and $b_m=\frac{y^m}{m!}$: $$ \sum_{n=0}^{\infty}a_n \sum_{m=0}^{\infty}b_m =  \sum_{o=0}^{\infty}c_k = \sum_{o=0}^{\infty} \sum_{k=0}^{o} a_kb_{o-k} = \sum_{o=0}^{\infty} \sum_{k=0}^{o} \frac{x^k}{k!}\times\frac{y^{o-k}}{(o-k)!} $$ The letters are mixed up, but that's because I should have done this a bit better. The point is that I understand it know, because of the . Thank you all!

I am trying to prove $\exp(x+y) = \exp(x) \exp(y)$.  I may use that $$\exp(x) = \sum_{n=0}^\infty \frac {x^n}{n!}$$ I further know how to multiply two power series in one point, i.e. if $f(x) = \sum_{n=0}^\infty c_n(x-a)^n$ and $g(x) = \sum_{k=0}^\infty d_n(x-a)^n$ then $$ f(x)g(x) = \sum_{n=0}^\infty e_n(x-a)^n $$ with $$ e_n = \sum_{m=0}^n c_md_{n-m} $$


I've been benchmarking several queries and learning about indexes by using the ,  and the  option.   My usual benchmarking session goes something like this:  SET PROFILING=1; SELECT SQL_NO_CACHE field_a, field_b FROM table WHERE xxx; SHOW PROFILES;   Some times after adding indexes, I want to know how the query would perform without any index optimization; so my options so far are to either delete the related indexes or use explain to check what indexes are in use and  what indexes to ignore;  EXPLAIN SELECT SQL_NO_CACHE field_a, field_b FROM table WHERE xxx; SELECT SQL_NO_CACHE IGNORE INDEX (field_a) field_a, field_b FROM table WHERE xxx; SHOW PROFILES;   Is there a similar option to tell MySQL not to use any index so I can get the query duration without any index optimization. Something like this:  SELECT SQL_NO_CACHE SQL_NO_INDEXES field_a, field_b FROM table WHERE xxx;

I have read articles about FORCE index, but how can I force MySQL to IGNORE ALL indexes? I tried SELECT * FROM tbl IGNORE INDEX(*), but I was not successful. As for why I (and others) need to do this: For example, I needed to summarize referers statistics by tld like this: SELECT      count(*) as c,      SUBSTRING     (         domain_name,          LENGTH(domain_name) - LOCATE('.', REVERSE(domain_name)) + 2     ) as tld FROM `domains_import`      IGNORE INDEX(domain_name) GROUP BY tld ORDER BY c desc LIMIT 100  ...but I always have to look at what indexes are defined or determine what index will be used via Explain. It would be very handy to simply write IGNORE INDEX ALL and simply not care. Does anyone know the syntax or a hack? (Tens of lines via MySQL definition tables are really not a shortcut). Added from : Bechmark:  no index = 148.5 secs  with index = 180 secs and still running with Sending data The SSD array is so powerful, that you almost no care about data cache...   Definition for benchmark: CREATE TABLE IF NOT EXISTS `domains_import` ( `domain_id` bigint(20) unsigned NOT NULL, `domain_name` varchar(253) CHARACTER SET ascii COLLATE ascii_bin NOT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8;  ALTER TABLE `domains_import` ADD PRIMARY KEY (`domain_id`), ADD UNIQUE KEY `domain_name` (`domain_name`);  ALTER TABLE `domains_import` MODIFY `domain_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT;  InnoDB, the test with index (no USE INDEX() or similar) is still running, 250 secs, I just killed it.


what is the difference between these statements? I know that "var $test" declares a jquery variable, but what is the difference of a jquery variable with a general javascript variable ?

I quite often see JavaScript with variables that start with a dollar sign. When/why would you choose to prefix a variable in this way?  (I'm not asking about $('p.foo') syntax that you see in jQuery and others, but normal variables like $name and $order)


How set height for select? i need that "select" it height less popup height. I found some more  solution with use js but this code is bad.

Can someone confirm that its not possible to change the height of a dropdown that is shown when you click on a select box.   The size attribute of the select makes it look like a list, the height attribute in the CSS doesnt do much good either.


I want to use GoogleDNS while I'm on the bus. But there is no settings page to change as far as I can see.

Is there a way to set a global DNS server that will be used for all connections (both Wi-Fi + cellular data)? If there isn't a uniform manner to specify DNS, can I just change the DNS used by the cellular connection?  Ideally, I am looking for an answer for vanilla iOS; however, I'd welcome any solution, including one that requires a jailbreak.


Apparently the easiest method is to use proof by exhaustion, but I've no idea how. Any ideas/solutions? Prove that $n^4−1$ is divisible by 5 when n is not divisible by 5.

Suppose $n$ is an integer which is not divisible by $5$. Prove that $n^4 \equiv 1 \pmod{5}$.


Are there official items for incompletely mitigating light sensitivity? The reason I ask is that I do not want to get rid of the disadvantage completely, but given there are mundane, historic solutions for similar issue, I think it would only be climatic to have an item that can help a bit. When it's worn. When there is time to put it on. My next campaign will be using the Player's Handbook, Xanathar's Guide, Volo's Guide, the Monster Manual, the Dungeon Master's Guide, and Curse of Strahd, but answers from other official sources are welcome.  I know of the  question, but I'm looking for something narrower and not seen in its answers. I don't want to magic disadvantage away for good. Are there items that can mitigate light sensitivity? Preferably mundane, like real life .1 Another Q&A on a similar topic exists as well:  However, my question is not a duplicate of these. I'm looking for incomplete, faulty, situational and generally "bad" solutions that would open up role-playing opportunities - for solutions that, under the older questions, would deserve downvotes for not really helping.  1 Here is how ilgaak, snow goggles, look:

Sunlight Sensitivity looks pretty bad — Disadvantage to attack rolls and Perception checks whenever you, your target, or what you're trying to perceive are in direct sunlight. I hope I'm missing something, since no other PC race has a comparable hindrance.  Are there any ways you have used to mitigate this flaw to make players of this race not at a severe disadvantage (or, if it doesn't need mitigation, explain why it's already balanced without any action required)?


I am planning to copy some files to entire network of linux machines, but when I tried to use scp it asked for confirmation and I need to type "yes" and after that I have to enter the password.  Is there some way to do this without typing "yes" and providing password?

What is the best way of doing scp from one box to the other without prompting for password?  There are two servers:   Server A (10.152.2.10): /home/oracle/export/files.txt Server B (10.152.2.11): /home/oracle/import/   If I want to transfer the files using scp from server A to server B without being prompted to enter a password  [running this from Server A, /home/oracle/export/]  scp files.txt oracle@10.152.2.11:/home/oracle/import   This would prompt me for a password upon entering the command.  I understand that a keygen is required to be generated and copied to Server A. Thus [at server A]:  ssh-keygen -t rsa   This gives me two files stored in /home/oracle/.ssh:  id_rsa id_rsa.pub    1. Am I supposed to copy the two files (id_rsa, id_rsa.pub) over into server B /home/oracle/.ssh ?  While doing some google search on this, some articles mentioned about appending/concatenating this to authorized_keys.   2. Am I supposed to create this file on my own?  I seem to be confused on what is the right way to do this.  Btw, the two servers are running Suse Linux Enterprise Edition 9...


Fresh Install 20.04. I dual boot with Window 10. When I boot to Ubuntu, my Windows HDD and other NTFS/exfat drives mount read-only. I tried modifying fstab, but no change. Is there any way to make these drives writable?

Until recently both my Windows Partition (C:) and my Data Partition (E:) would mount as read/write. Now both seem to only mount as read-only.    GParted Resize (Error)  ntfsresize v2.0.0 (libntfs 10:0:0) Device name : /dev/sda4 NTFS volume version: 3.1 Cluster size : 4096 bytes Current volume size: 86207623680 bytes (86208 MB) Current device size: 86207627264 bytes (86208 MB) New volume size : 78662066688 bytes (78663 MB) Checking filesystem consistency ... Accounting clusters ... Space in use : 62126 MB (72.1%) Collecting resizing constraints ... Needed relocations : 1606868 (6582 MB) Schedule chkdsk for NTFS consistency check at Windows boot time ... Resetting $LogFile ... (this might take a while) Relocating needed data ... ERROR: Extended record needed (1032 > 1024), not yet supported! Please try to free less space.   chkdsk Output:     Checking file system on E: The type of the file system is NTFS. Volume label is Data.  A disk check has been scheduled. Windows will now check the disk.                            99482 file records processed.   495 large file records processed.                        0 bad file records processed.                            0 EA records processed.                                  0 reparse records processed.                             104412 index entries processed.                          0 unindexed files processed.                             99482 security descriptors processed.                    2466 data files processed.                              CHKDSK is verifying Usn Journal...   4479208 USN bytes processed.                                      Usn Journal verification completed. Windows has checked the file system and found no problems.  84187132 KB total disk space.   60479688 KB in 69969 files.      15520 KB in 2467 indexes.          0 KB in bad sectors.     174336 KB in use by the system.      65536 KB occupied by the log file.   23517588 KB available on disk.       4096 bytes in each allocation unit.   21046783 total allocation units on disk.    5879397 allocation units available on disk.  Internal Info: 9a 84 01 00 00 1b 01 00 fc 1a 01 00 00 00 00 00  ................ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................ 42 00 00 00 52 73 5c 77 b0 e7 1d 00 b0 df 1d 00  B...Rs\w........   fstab  # /etc/fstab: static file system information. # # Use 'blkid' to print the universally unique identifier for a # device; this may be used with UUID= as a more robust way to name devices # that works even if disks are added and removed. See fstab(5). # # <file system> <mount point>   <type>  <options>       <dump>  <pass> proc            /proc           proc    nodev,noexec,nosuid 0       0 # / was on /dev/sda5 during installation UUID=8213cc89-2438-41b9-899f-13b4c5b299af /               ext4    errors=remount-ro 0       1 # swap was on /dev/sda6 during installation UUID=45873767-d9ae-4f0c-baab-ffc2726ac24e none            swap    sw              0       0   Checked the drive in GParted, GSmartControl and with ntfsfix, all completed successfully, no change.  Partitions  dev/sda1 NTFS WinRE dev/sda2 NTFS Windows C: dev/sda3 Extended dev/sda4 NTFS Data E: dev/sda5 EXT4 Ubuntu dev/sda6 linux-swap    I am looking for an explanation of:    Internal Info: 9a 84 01 00 00 1b 01 00 fc 1a 01 00 00 00 00 00  ................ 01 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................ 42 00 00 00 52 73 5c 77 b0 e7 1d 00 b0 df 1d 00  B...Rs\w........   and    Resetting $LogFile ... (this might take a while) Relocating needed data ... ERROR: Extended record needed (1032 > 1024), not yet supported! Please try to free less space.


This, I think uses induction. I simplified the equation to get $a_{n+2}.a_{n-1} - a_n(a_n + 1) = -1^n$ This might not be simplifying it at all. Also, I noticed that at $n+1$, R.H.S. becomes$-1^{n+1}= -1\times$ previous L.H.S.

Show that  $$f_{n+1}f_{n-1}-f_n^2=(-1)^n$$ when $n$ is a positive integer and $f_n$ is the $n$th Fibonacci number.


How to calculate time and space complexity for these algorithms? I referred many sites but its confusing me. please any one explain me.   1.   for(i=0;i<n;i++)  {     for(j=i;j<n;j++)//this for loop is based on previous 'i'     {        foo();     }  }   2.  while(m<n) {     for(i=0;i<n;i++)     {          foo();     } }   If possible explain me with some more example. Thanks.

Most people with a degree in CS will certainly know what . It helps us to measure how well an algorithm scales.   But I'm curious, how do you calculate or approximate the complexity of your algorithms?


This question is different from  and I wrote why: I want to run a program a) as a different user b) get elevated privileges (which is additionally required to executing as admin as per UAC) and c) pass the original environment. The linkes article only covers a+b.  I just saw that "runas /user:admin /env cmd.exe" which used to work in WinXP does not work in Vista+ any more due to UAC: An additional elevation is required.  What is the best/shortest (in the sense that I do not need to install a program; copying small auxiliary exes would be OK) to achieve:   Starting an exe as admin (i.e., a different user in the admin group) Additionally, with elevated privileges Keep the environment of the current users Permits to supply parameters to the executed program   I found the "Elevation PowerToys for Windows Vista" and tried:  runas /user:admin /env "%USR%\bin\Elevate.cmd \"%COMMANDER_EXE%\""   but this has one show-stopper and some shortcomings:   Even though I use "/env" the executed program does not inherit the environment The 3-fold nested parameters makes it difficult to supply more complicated parameters to %COMMANDER_EXE% I would prefer a normal/graphical window to enter the password rather than a cmd window After the runas, the UAC dialog additionally pops up (would be good to have this together)

I am trying to run Notepad as admin so I can edit my hosts file from the command line.  I have tried runas /user:(myusername)\administrator "notepad c:\windows\system32\drivers\etc\hosts" I then input my password and I get     RUNAS ERROR: Unable to run - notepad   c:\windows\system32\drivers\etc\hosts 1327: Account restrictions are   preventing this user from signing in. For example: blank pa sswords   aren't allowed, sign-in times are limited, or a policy restriction has   been enforc ed.   PS: I know if I give permission to my user account I can edit it without running as admin. But I'd like to know how to do this without having to change permissions on the hosts file.


I'm using classicthesis.sty and my footnote numbers are not showing.   I do use this command at the beginning of each chapter:   \let\thefootnote\relax\footnotetext{ }   Do you think this is related? How do I show footnote numbers with \footnote{}? Thanks!  According to another post I read here, this should work, but it does not.   \documentclass[parskip=half,10pt,twoside]{scrbook}  \usepackage[     dottedtoc,     floatperchapter,     parts ]{classicthesis} \usepackage{}  \begin{document}   \chapter{Test} \vspace{30ex}  \let\thefootnote\relax\footnotetext{something unnumbered}   \newpage  There should be a footnote number here\footnote{test} \end{document}   Thanks for any suggestions!

I would like to have a footnote about the funding source of my work in the first page without marker.   I tried below approaches:   \footnotetext{text goes here} This creates a footnote but with '0' as marker. However, the marker reference does not  appear within the normal text where I placed this command. Used \def\blfootnote{\xdef\@thefnmark{}\@footnotetext} definition provided at . I placed this definition in the main tex file just after package declaration. But, this gives the below error.     ! Use of \@ doesn't match its definition.    \blfootnote ->\xdef \@thefnmark{}\@f                                        ootnotetext


I'm trying to write a C function that takes a uint64_t and replace it's nth byte to a given one. void    setByte(uint64_t *bytes, uint8_t byte, pos)  I know I can easily get the nth byte like so uint8_t getByte(uint64_t bytes, int pos) {      return (bytes >> (8 * pos)) & 0xff; }  But I have no idea how to Set the nth byte

How do you set, clear, and toggle a bit?


I've split the node editor into two viewports and change the second viewport to 3D view. Is there a way to choose which viewport blender will render in? Blender seems to choose randomly.

This has puzzled me for years: How does Blender decide the window where it will display the rendered image when I hit F12 to render?


When you shine white light on the mirror side of a cd you see beautiful coherent rainbow forms. What causes these forms? When trying to find out by searching the net, it didn't become very clear to me. It was said it's the same phenomenon as the strangely noncoherent deformed rainbows you see if you shine white light on an oily surface on top of water. The thickness of the oil layer varies slightly over the surface which causes light of different frequencies to interfere constructively or destructively. But the layer on the cd doesn't vary in thickness, and the patterns you see are very coherent, in contrast to the rainbow patterns you see on an oil layer. So what's causing these beautiful coherent rainbow patterns?  So I don't ask why these patterns occur for white light which have small phase related regions, but why the effect itself appears (by diffraction gratings I read below), but how, and why have the rainbow patterns beautifully coherent forms, which change shape if you look at different angles.

I have a really hard time solving the following problem I accidentally came across today. Looking at the back of a usual CD one sees coloured bands. This is explained by the fact that the surface (pits and bumps) is effectively a diffraction grating. But why is this effect already visible when one uses incoherent light, e.g. from a light bulb, whereas the interference pattern of a single or double slit would be missing with such illumination?


I have copy+pasted a portion of my latex source here. I'd like to add a caption at the bottom of each of the images load_8.png, load_9.png, load_1.png and load_1.1.png, but can't find an easy way to do this. I've also attached the output of processing this latex code.  . Can someone please show me the way?  \documentclass{article} \usepackage{graphicx} % Required for including images \usepackage[font=small,labelfont=bf]{caption} % Required for specifying captions to tables and figures \begin{document} \begin{center} \includegraphics[width=0.49\linewidth]{fig/load_8.png} \includegraphics[width=0.49\linewidth]{fig/load_9.png} \captionof{figure}{Probability distribution with loading level of a): 0.8 ; b) 0.9} \end{center} \begin{center} \includegraphics[width=0.49\linewidth]{fig/load_1.png} \includegraphics[width=0.49\linewidth]{fig/load_1_1.png} \captionof{figure}{Probability distribution with loading level of a) 1.0 b) 1.1 } \end{center} \end{document}

How can I put two figures side-by-side? Not two sub-figures, but two actual figures with separate "Fig.: bla bla" captions.  A figure is supposed to spread over the entire text width, but I have two figures which are narrow and long, and I need to save the space in order to withstand the pages limit.


Recently someone asked, "" (I'll refer to this as question 1)  This question was closed as a duplicate of "" (let's call this question 2)  At first glance, the two questions do seem very similar.  However, they are actually so different that solutions which are valid for one question would be unacceptable for the other.  Question 1:   Specifically requires a Linux solution Requires the laptop as the only monitor for the PC   Question 2:   The question did not specify OS, but two answers are specifically for Windows, and the others do not actually address the problem.  The accepted answer is one of the Windows-specific answers. Uses the laptop as the second monitor for the PC (this is a fine distinction, but a very important one)   As I've outlined above, the answers for question 2 do not address question 1.  Question 2 did not originally specify an OS, so the argument goes that it is an OS-agnostic question, and would cover all similar questions regardless of OS.  But none of the existing answers provide solutions for non-Windows operating systems.  What are we supposed to do if an existing question is broad enough that it has the potential to contain answers for our more specific questions, but none of the existing answers are even remotely adequate?  In this particular case, I think it would make the most sense to reclassify it as a Windows question, since the only applicable solutions (including the accepted answer) are for Windows, and none of the provided answers to question 2 would work for question 1.  Would it be inappropriate for me to retag question 2 with windows?  Second, there is a very important distinction between using a laptop screen as the only monitor for your PC, versus using it as the second monitor for your PC.  For example, the answer I posted to question 1 involves X-forwarding the entire display of the PC to the laptop.  I think a solution that uses X-forwarding would be ideal for question 1, but it would be completely unacceptable for question 2 (or it would require a lot of additional configuration and some very contrived workarounds to even get it to work).  What would I do if I hadn't already posted my answer to question 1 before it was closed as a duplicate?  It seems to me that my only course of action would be to supply the same answer for question 2--but then I would run the risk of getting downvoted, since it is an incorrect answer for question 2.

I asked a question regarding a very specific feature of a program and whether or not it works with a larger program.  Within hours someone had marked it with "This question may already have an answer here of a similar question, but not related to my question.  The question I asked IS NOT ADDRESSED in the referred-to question. It's frustrating to spend half an hour putting together an intelligent and specific question, and then have someone mark it as a duplicate (or possible duplicate), which apparently causes people to skip over my question. I haven't received any more responses since the question was flagged.   Two questions:  (1) How do I get this flagging removed and (2) what's the best way to prevent these "helpful" flaggings in the future?


How to find the minimum value of      $$2^{\sin^2a}+2^{\cos^2a}$$   I don't understand how to start the sum.

The question is what is the minimum value of $$2^{\sin^2x}+2^{\cos^2x}$$ I think if I put $x=\frac\pi4$ then I get a minimum of $2\sqrt2$. But how do I prove this?


How do I delete all emails on my iPhone4 from a mailbox without selecting them one at a time?  On the last iPhone OS update, something changed which caused all of my old emails to be re-downloaded to my phone.  I have about 3500 emails all but the last few days' I need to delete.

Is there a way to mass delete compiled list of emails on iOS devices (like can be done in os x)? I only know two options: select individually & swipe "left" and from bottom select "edit", then selecting each message individually. I tried solution described in similar question without success (described as iOS 7).


How to prove $$\hat{p}|x\rangle=i\hbar\frac{\partial}{\partial x}|x\rangle,$$ using $$[\hat{x},\hat{p}]=i\hbar~?$$ The question seems to be uncomplete because for any $f(x)$ $$[\hat{x},\hat{p}+f(x)]=i\hbar.$$ But that's my homework. Can someone add some appropriate assumptions and prove the question?  Here is a seemingly right answer:  $$ \hat{Q} = e^{-i \frac{u}{\hbar} \hat{p}},[\hat{x},\hat{Q}]=u \hat{Q} $$ $$ \hat{x}\hat{Q}|x\rangle = (x+u)\hat{Q}|x\rangle $$ $$ \hat{Q}|x\rangle = |x+u\rangle $$ $$ \hat{T} = e^{i \frac{u}{\hbar} \hat{x}},[\hat{p},\hat{T}]=u \hat{T} $$ $$ \hat{p}\hat{T}|p\rangle = (p+u)\hat{T}|p\rangle $$ $$ \hat{T}|p\rangle = |p+u\rangle $$  Therefore  $$ \langle x | p \rangle = e^{i\frac{px}{\hbar}} \langle 0 |_x |0 \rangle_p $$  $$ \delta(p-p') = \langle p | p' \rangle  = 2\pi \hbar |\langle 0 |_x |0 \rangle_p|^2 \delta(p-p') $$ $$ \langle 0 |_x |0 \rangle_p = \sqrt{\frac{1}{2 \pi \hbar}}$$ $$ \hat{p}|x\rangle = \int \hat{p} |p\rangle\langle p |x\rangle= \int \hat{p} |p\rangle e^{-i\frac{px}{\hbar}}\sqrt{\frac{1}{2 \pi \hbar}} = i\hbar\frac{\partial}{\partial x}|x\rangle $$ Which assumption is made here?

I'm curious whether I can find the overlap $\langle q | p \rangle$ knowing only the following:   $|q\rangle$ is an eigenvector of an operator $Q$ with eigenvalue $q$. $|p\rangle$ is an eigenvector of an operator $P$ with eigenvalue $p$. $Q$ and $P$ are Hermitian. $[Q,P] = i \hbar$.   I'm asking because books and references I've looked in tend to assume that $Q$ is a differential operator when viewed in the $P$-basis, then show that it satisfies the commutation relation. (I haven't read one yet that proves that the form given for $Q$ is the only possible one.) I've heard, though, that we can work purely from the hypothesis of the commutation relation and prove the properties of $Q$ and $P$ from it.


I have read Srednicki's Quantum Field Theory book. I want to learn more about advanced topics in field theory, such as geometry and topology in field theory, topology defect, anomaly, soliton, instanton, renormalization，advanced application in condensed matter physics and so on. Does anyone have anything recommended? Thanks

There's a fairly standard two or three-semester curriculum for introductory quantum field theory, which covers topics such as:   classical field theory background canonical quantization, path integrals the Dirac field quantum electrodynamics computing $S$-matrix elements in perturbation theory, decay rates, cross sections renormalization at one loop Yang-Mills theory spontaneous symmetry breaking the Standard Model   What is a good, complete and comprehensive book that covers topics such as these?


Is there a way to configure Windows 10 to, upon a middle-click of a program's taskbar icon, close that program, instead of opening a new copy of that program?  I'd prefer a "native" solution (involving no 3rd-party software), but if that's not possible, a 3rd-party software solution would be acceptable.  (Note: Same question as , but I'm interested in Windows 10 rather than Windows 7.)

Is this possible? I want to close programs in the taskbar with middle-click, like tabs in firefox. The best approach I have so far is waiting for the mini-view that pops up when you point with the mouse in the taskbar and then middle-clicking there, but I would like to close them directly.


$\mathbb{N}^{\infty} = \{(a_{0},a_{1},a_{2},...) \in \mathbb{N} \times \mathbb{N}\times \mathbb{N} \times... \text{ with } \sum\limits_{k=0}^{\infty} a_{k} < \infty \} $ I don't understand what the importance of this statement is: $\sum\limits_{k=0}^{\infty} a_{k} < \infty. \\ $ We have already proved that  $\mathbb{N}\times \mathbb{N}$ is countable as there exists a bijection from  $\mathbb{N} \rightarrow \mathbb{N} \times \mathbb{N}$ and now I think I should use this to create a bijection from $\mathbb{N} \rightarrow \mathbb{N}^{\infty}$ but I don't really know how to do that and use the bijection from $\mathbb{N} \rightarrow \mathbb{N} \times \mathbb{N}$.

On the one hand concatenation of the finite sequence produces a set that is a subset of the natural numbers. On the other hand, while Cantor's diagonal argument fails to produce a sequence with trailing zeros (at the same time not on the list)--I was wondering if there is a way to salvage the diagonal argument?


Looking at , I noticed the times for the comments are missing:    When I reload the page, I see the times on the comments for a fraction of a second, and then they are gone.  On shorter comment threads, I sometimes do see the comments.  Initially I thought that they seemed to disappear if and only if the comments thread gets collapsed due to a large number of comments.  When I click on "show 14 more comments", all comments are shown, including the times, but for shorter comment threads, I sometimes do, sometimes do not see them all; I cannot fully reproduce this.   on Linux (Ubuntu xenial 16.04), no user scripts.

As of today comments do not render MathJax and remaining text. It only flashes the underlying LaTeX, but renders an empty space. Noticed on MSE and MO,  one comment now simply reads: "@Eric Write – Aweygan Jan 26 at 14:08 ".  Have tried different MathJax renderers or other MathJax context menu settings.  The problem appears on Windows 7 32bit and Firefox ESR (with a clean profile too). Works normal on Chrome and the new Firefox Quantum.  UPDATE: Broken on Tor Browser 7.0.2 (based on Firefox 52.2.0). But works on PaleMoon 27.7.1! Broken on Basilisk web browser.


I need to replace the front tyre and tube on my Ridgeback Motion commuter bike. I accidently asked my helpful shopper to get me 700x35c when what I'm replacing is 700x32c. Does it matter? Will this new tube and tire fit? Will it affect performance in any meaningful way? I don't really understand tires sizing so not sure how much difference there is between 32 and 35 - is this the width? The width of which bit?

We often get questions on bicycles.stackexchange about fitting wider or narrower tires to bicycles. We have a large number of these with answers suiting the specific bike or style of bicycle in question, but I have been unable to find one that provides a generic answer covering off all things that need to be considered. For most bicycles, the answer is the same regardless of the specific style and sizes of tires in question.   This is intended as a canonical question that we can point closed questions to.


I'm running Ubuntu 15.10. I'm running the following command in the terminal to swap the left Alt and left Control keys: setxkbmap -option ctrl:swap_lalt_lctl. It works, but as soon as I reboot It's gone and I have to run that command again. I tried adding it to the "Startup Applications." I clicked "Add" in the Startup Applications GUI and in the "command" field I entered setxkbmap -option ctrl:swap_lalt_lctl. I named it "Swap Alt Ctrl." It doesn't work. What am I doing wrong?

Is there a way to query where xkb is getting its configuration from? Under ArchLinux I have /etc/X11/xorg.conf.d/00-keyboard.conf with:  Section "InputClass"     Identifier "system-keyboard"     MatchIsKeyboard "on"     Option "XkbLayout" "us,us"     Option "XkbVariant" "altgr-intl,colemak"     Option "XKbOptions" "ctrl:nocaps,grp:alt_shift_toggle" EndSection              but when I start up, if I do setxkbmap -query, I only get  rules:      evdev model:      evdev layout:     us,us variant:    altgr-intl,   So neither the alternative variants nor options are recognized (needless to say, I cannot change layout). If I however run  setxkbmap -layout "us,us" -variant "altgr-intl,colemak" -option "ctrl:nocaps,grp:alt_shift_toggle"   I get the correct  rules:      evdev model:      evdev layout:     us,us variant:    altgr-intl,colemak options:    ctrl:nocaps,grp:alt_shift_toggle   So is there a possibility something is overwriting my configuration? I am running GNOME/Cinnamon


What is the difference between these two phrases:  something he never did before  something he has never done before

I'm very confused about tenses.  I have examples in two different situations here. Situation 1: I went to New York two months ago and was talking to someone about it.  A. This is the first time I've been to New York. B. That was the first time I'd been to New York.  Which is correct in a daily conversation?  Situation 2: I'm going to New York next month and talking to someone.  A. This will be the first time I've been to New York. B. This is the first time I've been to New York. C. This will be the first time I go to New York.  Which sentence is appropriate?  According to a grammar article I've read before, I think it says that I can use this sentence in both cases:  This is the first time I've been to New York.  But I'm not sure if this is really so. So I'd like to know which tense I should use in each case. Could you explain it?