Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://ppa.launchpad.net/fossfreedom/packagefixes/ubuntu/dists/xenial/main/source/Sources  404  Not Found E: Failed to fetch http://ppa.launchpad.net/kroq-gar78/ppa/ubuntu/dists/xenial/main/source/Sources  404  Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.


Accidentally formatted hard drive when installing Ubuntu 12.04

So, I had Windows 7 on my hard drive. I decided to dual boot with Ubuntu 12.04. I was in a hurry and hit the wrong button, so it wiped out (full format) my Win7 install. It was a NTFS drive, but was formatted to ext4. I didn't realize it until about an hour of usage. There was lots of important data on there. Is there any hope of recovery? EDIT: As soon as I realized that the data was lost, I shut the computer down.


Non-significant intercept in regression with a two level factor in R

I have a linear regression with two explanatory variables. One of them is a two level categorical variable. When I perform the fit, R tells me that the intercept is highly non significant. When I force the intercept to be zero in the regression, it tells me that the coefficient for the 0-level of the categorical variable is highly non significant. What should I do?


I was introduced by a spectacles shop about a new technology called computer lens which block blue light that is harmful to eyes. He says it reduces eye-strain for workers who need to be face a computer monitor for hours every day.   More importantly, are there any side effects or harmful effects that one need to be aware about computer lens? I am fine with paying more but not ok if the "gimmick" is harmful to my eyes.


Fetch particular elements in a list of tuples

Here's my list : list = [(a,1,2),(b,3,4),(c,5,6),(d,7,8),(e,9,10)]  I want to fetch the second element of the first three tuples. In this case it would be 1,3,5. Here's what I did : [item[1] for item in list]  But this would return all the elements, while I only need the first three. How do I do that?


Show that the given linear transformation is invertble

Let $T_1,T_2$ be two linear transformations from $\Bbb R^n$ to $\Bbb R^n$.Let $\{x_1,x_2\ldots x_n\}$ be a basis of $\Bbb R^n$ .Suppose that $T_1x_i\neq 0\forall i=1,2,.....n$ and that $x_i\perp \ker T_2\forall i=1,2,.....n$.  Which of the following are true?   $T_1$ is invertible  $T_2$ is invertible $T_2,T_1$ is invertible Neither $T_1$ nor $T_2$ is invertible   For $T_1$:  Define $T_1:\Bbb R^2\to \Bbb R^2$ by $T_1(x_1)=x_1;T_1(x_2)=-x_1\implies T_1(x_1+x_2)=0\implies T _1$ is not one-one and hence not invertible.  For $T_2$:  Let $x\in \ker T_2\implies Tx=0$ where $x=\sum_{i=1}^n c_ix_i$  Now  $\langle x,x_i\rangle =0\forall i\implies c_i=0\forall i\implies x=0\implies \ker T_2=\{0\}$  **But I am unable to show that $T_2$ is surjective. Let $y\in \Bbb R^n\implies y=\sum c_ix_i$.But I don't know what steps to follow next.  Please give some hints.


Prove $x^4 +x+1$ is irreducible in $\mathbb{Z}/2\mathbb{Z}[x]$

$ x^4 +x+1$ in $\mathbb{Z}/2\mathbb{Z}[x]$ is an irreducible polynomial.   So far we have only treated quadratic and cubic polynomials, which are irreducible if they do not have any zeros.  However, now I want to show that $x^4 + x+1$ in $\mathbb{Z}/2\mathbb{Z}[x]$ is irreducible, I cannot go about checking if it has any zeros, this does not guarantee irreducibility. Is there any clever approach or do I need to determine all the polynomials of lower degree that are irreducible and show that upon division there is always a remainder?  $$ \{x, x+1 ,x^2+x+1, x^3 +x+1, x^3 +x^2+1\} $$ are the polynomials I immediately thought of.


Create a Windows XP user from a linux partition

Long story short, someone repaired my brother's computer and set a password on his account, now we can't get in and can't contact the person who set the password.  Is it possible to create a Windows XP user if I have access to the windows partition, from a linux partition or pendrive, for example TinyCore?  Thanks for any pointers!


C# ?? operator in property, how it works?

I can't understand how it works.   private Person _user;  private Person User {   get   {     return _user ?? ( _user = GetUser() );   } }   The first time I refer to User property, _user is null so it returns ( _user = GetUser() )????  What am I missing?


When should I use the verb to be in this way?

Sentence: WOW, an Icelandic budget airline, is to start fares from US to Ireland for less than $350 return, including all taxes.  .  So, why did the writer use the infinitive form of the verb TO BE in that sentence? What's the meaning?  Also, for this example:  Am I to believe in that? x Am I supposed to believe in that? x Should I believe in that?   The first sentence above is the one that I don't get the meaning. Could anyone please what is the difference between them?


Can anyone solve this table for me? I want to make in overleaf but does not fit in paper!

\documentclass{article} \usepackage{threeparttable} \usepackage{booktabs}  \begin{document}          \begin{table}         \centering          \begin{threeparttable}              \caption{The fist nine Modes of the Blade}             \label{tab:PPer}              \begin{tabular}{l l l l l l l l l l}                                    \toprule                  \textbf{Mode Number}& 1 & 2 & 3& 4& 5& 6& 7& 8& 9 \\                 \midrule                 \textbf{Frequency [Hz]}&  191.25 & 531.4 & 695 &1108.75 &1140.6 &1304.4 &1986.5 & 2558.6 & 2675.8 \\                 \midrule                 \textbf{Damping ratio $\zeta(\%)$}&  0.46 & 0.93 & 0.21 &1&1&1&1&1&1 \\                                  \midrule             \end{tabular}  \label{tabel:3.5}         \end{threeparttable}     \end{table}`      \end{document}


Is the formula $|G|=|\ker \varphi|.|\text{im}\space \varphi|$ connected to the formula $ab = \gcd(a,b) \cdot \operatorname{lcm}(a,b)$?

I was reading the corollary;     Let $\varphi :G\rightarrow G'$ be a homomorphism of finite groups. Then $$|G|=|\ker \varphi| \cdot |\text{im}\space \varphi|$$   Then I suddenly remember one of my 6-th or 7-th grade formula     Let $a,b\in \mathbb{N}$, then $$a \cdot b=\gcd (a,b) \cdot\text{lcm} (a,b)$$   Are these two result really related!! If so then what is $\varphi$ here?


What’s the farthest I could travel back in time and converse properly in English?  And what caused this ‘new style’ of English speaking [that we know (and love) today]?


How do I fix my recycle bin that doesn't show the deleted items?

The icon shows that it's full. I just deleted stuff, so I know that it's full. But when I open it, it doesn't show the deleted items. The only option I have is to restore them or empty them.  Help me out. It's VERY VERY important for me to fix this problem since I use this workstation for my studio purposes.  P.S. It's a Windows 7 Ultimate (x86) machine.


Rank of matrix whose coefficients are $a_{i,j}=\gcd(i,j)$

What are he possible methods for showing that the $n$ by $n$ matrix $A$ whose coefficients are given by $a_{i,j}=\gcd(i,j)$ is inversible?


I have been trying to find the image of $S=\{z\in\mathbb{C}; 0<|z|<r\}$, with $r>0$, under $w=e^{1/z}$.  I started this way: if $z=|z|e^{i\theta}\in S$, by Euler's formula $$     1/z   = |z|^{-1}(\cos\theta-i\sin\theta)   = |z|^{-1}\cos\theta-|z|^{-1}i\sin\theta. $$ Considering $w=|w|e^{i\alpha}$ as image of $z$, $$     |w|e^{i\alpha}   = e^{|z|^{-1}\cos\theta} e^{-|z|^{-1}i\sin\theta}. $$ And then $$            |w| = e^{|z|^{-1}\cos\theta}   \implies \ln|w| = |z|^{-1}\cos\theta   \implies \cos\theta = |z| \ln|w|. $$ And also $$            \alpha =-|z|^{-1}i\sin\theta   \implies \sin\theta =-\alpha |z|. $$  What do I have to do now?


Not sure what I did to mess it up but now when I press E to extrude it is set to the z axis.  It has always been axis free when initially pressing E and you had to press Z to lock it to that axis. Now I have to press Z to unlock it first, I would prefer not to have to do that every time I extrude.


Moving an already-running process to Screen

My office job routinely sees me connected to a Linux box via VNC.  Sometimes I start a remote job on the console, and realize later that it runs much longer than expected. (Should have started that one under Screen in the first place...)  I don't want to keep my workstation running overnight just to keep the VNC session open; I would like  to move that already-running remote job into a Screen session (on the remote box), so I can power down the workstation (and reconnect next morning).  How can this be done, if at all?


When a 250 KVA DG set with four wire out put (3 phases and one neutral wireis working on full load with 0.8 pf lagging, it will deliver 347.8 A which is the rated current.Then what will be the current on R Y B phases? Will the current on all phases will be almost same? Is there any meaning if we add the current on each phase to find the total current?


How does an object regain its neutrality after being charged by rubbing?

Objects (like combs) can be charged by rubbing as charged particles, particularly electrons, are transferred from one object to other. This can be seen as the object (comb) attracts small bits of paper. After some time, the charge on the body seems to disappear. How does this charge disappear without any external influence?


cant start systemd - Failed to get D-Bus connection

I am trying to setup a daemon width systemd on Debian.  systemd was already a part of the distro.. Have just added a new unit file my-daemon.service under /etc/systemd/system/ but after reboot I get this error no matter what I do. It worked before reboot  ~ # systemctl daemon-reload Failed to get D-Bus connection: Unknown error -1  ~ # systemctl list-units Failed to get D-Bus connection: Unknown error -1   Have also tried to delete the unit file my-daemon.service and rebooted the system.. But still get the same error  update  # dpkg -l | grep -i dbus ii  at-spi2-core                           2.14.0-1                             amd64        Assistive Technology Service Provider Interface (dbus core) ii  dbus                                   1.8.22-0+deb8u1                      amd64        simple interprocess messaging system (daemon and utilities) ii  dbus-x11                               1.8.20-0+deb8u1                      amd64        simple interprocess messaging system (X11 deps) ii  libdbus-1-3:amd64                      1.8.20-0+deb8u1                      amd64        simple interprocess messaging system (library) ii  libdbus-glib-1-2:amd64                 0.102-1                              amd64        simple interprocess messaging system (GLib-based shared library) ii  libdbusmenu-glib4:amd64                12.10.2-1                            amd64        library for passing menus over DBus ii  libdbusmenu-gtk4:amd64                 12.10.2-1                            amd64        library for passing menus over DBus - GTK+ version ii  libnet-dbus-perl                       1.0.0-2+b2                           amd64        Perl extension for the DBus bindings ii  libnih-dbus1                           1.0.3-4.3                            amd64        NIH D-Bus Bindings Library ii  libqt4-dbus:amd64                      4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64        Qt 4 D-Bus module ii  libqt5dbus5:amd64                      5.3.2+dfsg-4+deb8u1                  amd64        Qt 5 D-Bus module ii  libqtdbus4:amd64                       4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64        Qt 4 D-Bus module library ii  qdbus                                  4:4.8.6+git64-g5dc8b2b+dfsg-3+deb8u1 amd64        Qt 4 D-Bus tool   update 2  # cd /run/dbus && ls -la total 4 drwxr-xr-x  2 messagebus messagebus  80 Feb  2 11:08 . drwxr-xr-x 21 root       root       740 Feb  6 19:33 .. -rw-r--r--  1 root       root         5 Feb  2 11:08 pid srwxrwxrwx  1 root       root         0 Feb  2 11:08 system_bus_socket   # cat /etc/fstab proc /proc proc defaults 0 0 /dev/md/0 none swap sw 0 0 /dev/md/1 /boot ext3 defaults 0 0 /dev/md/2 / ext4 defaults 0 0


There's a program called file in my laptop's post BSD OS. How to run a similar utility, in Microsoft PowerShell? This is a bit hard to search, so I guess some experts exchange is required here.


Is there a way to change resolution on a Note 4?

Currently everything is huge, I would like to know if I can change my resolution.


I need to replace a rim that is cracked around the spokes.  This is my bike:  (Whistler 70)  I can't find any info on my current clincher rim (700C) for my 32mm tires.  I'm looking to replace it with a rim that is "fast" on pavement and can handle well on dirt and gravel trails.  I don't know much about rim profiles or rim technology, etc, so I'm looking for some suggestions on manufacturers of rims that perform well and aren't too costly.  Also, any links to info on how to choose a rim would be helpful too!  Thanks!


I am not sure if it is ok to use an exclamation point in the middle of a sentence like how it is used in the sentence below

Is it ok to use an exclamation mark in the middle of a sentence like in the following? (first exclamation mark)  "Hurry!" said Mark," we can't be late!"  Or in:  Hurry! we need to go!


Unit-testing of private method and possible refactoring

I am currently testing private method this way (using nunit):  class Foo {     private int Identity(int n) => n; }  [TestFixture] class MyTests {     [Test]     public void TestFoo()     {         var myFoo = new Foo();         var identityMethod = myFoo.GetType().GetMethod("Identity", BindingFlags.NonPublic | BindingFlags.Instance);         Assert.That(identityMethod.Invoke(myFoo, new []{ (object)42 }), Is.EqualTo(42));     } }   My team does not like this, because put the method name as a string prevent this method to be renamed, if we want to do refactoring through automatic tools.  I tried to replace the name with nameof, but:     Foo.Indentity(int) is inaccessible due to its protection level   (By the way, this is strange in my opinion that such an operator respects the privacy protections).  So, can I test private methods without sacrificing possible refactoring?  I was proposed to make the private methods protected and inherit the class with the class test, but this does not satisfy me.  Disclaimer: I know that some people think that private method should not be tested, but this is not the point here. Please do not transform this question into a debate about this.


Converting factfinder2.census.gov map data to KML?

I've downloaded a map from  (limited to San Francisco census tracts), and I'd like to convert it to KML format. However, after unzipping the shapefile .zip file and running  $ ogr2ogr -f KML pop_by_census_tract.kml 140_00.shp   I get the following error message:  ERROR 6: No translation for Mercator_Auxiliary_Sphere to PROJ.4 format is known. Warning 1: Failed to create coordinate transformation between the input coordinate system and WGS84.  This may be because they are not transformable, or because projection services (PROJ.4 DLL/.so) could not be loaded. KML geometries may not render correctly. This message will not be issued any more.   Source: PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",     GEOGCS["GCS_WGS_1984",         DATUM["WGS_1984",             SPHEROID["WGS_1984",6378137.0,298.257223563]],         PRIMEM["Greenwich",0.0],         UNIT["Degree",0.0174532925199433]],     PROJECTION["Mercator_Auxiliary_Sphere"],     PARAMETER["False_Easting",0.0],     PARAMETER["False_Northing",0.0],     PARAMETER["Central_Meridian",0.0],     PARAMETER["Standard_Parallel_1",0.0],     PARAMETER["Auxiliary_Sphere_Type",0.0],     UNIT["Meter",1.0]]  ERROR 1: Latitude 4553026.920500 is invalid. Valid range is [-90,90]. This warning will not be issued any more Warning 1: Longitude -13627851.842700 has been modified to fit into range [-180,180]. This warning will not be issued any more   When I open the resulting KML file in Google Earth, I get randomly scattered lines across the entire planet. The example at code.google.com/apis/kml/articles/vector.html works fine, so the installation of GDAL (1.8.0 from macports) isn't totally broken.   seems related, but I'm not sure if it's saying that Mercator_Auxiliary_Sphere is just not supported by GDAL, or if it's implying I should pass another command line option to make it work.    I wound up accomplishing my goal by downloading , which contains shapefiles that ogr2ogr and shp2pgsql can understand, and joining it with the pure table data from factfinder2. I'm still curious about the format factfinder2 is using, but it's no longer blocking progress for me.


I would like to know how does the addition of temperatures works. In school, we have been taught that we should convert degrees Celsius to Kelvin unit first and then the sum will be converted back to degrees Celsius. What if we add zero with zero, the two units are in degrees Celsius which are not absolute.  0°C = 273.15 K 0°C + 0°C = ?  Convert 0°C to K: 273.15 K  273.15 K + 273.15 K = 546.3 K  Convert 546.3 K to °C = 543.3 - 273.15 = 273.15°C  Is this correct? When looking at it, 0°C is cold and 0°C is cold too, if we add these two, shouldn't it be colder too? I have a feeling it's wrong. You're probably laughing right now, lol!  Sorry, just asking for a dumb person, myself. (lol)


How to interpret when a variable is not significant in logistic regression while having the highest variable importance in a tree-based model

I'm building a binary classifier with logistic regression and boosting. Just like the case that I described in the title, I am a little bit confuse on how to explain the result of those two models together, and how to answer questions like is this variable a key predictor for predicting?


What kind of phrase is this? (adverb and adjective at the beginning of a sentence)

I just encountered this sentence in a passage, which begins with an adverb and adjective.     Probably blind from birth, he was born into a noble family...   'Probably blind from birth' - What kind of phrase is this?


Combinatorics problem based on Ferrers graph

Need help with this proof using Ferrers' graph or otherwise.    Show that the number of partitions of $r+k$ into $k$ parts is equal to     The number of partitions of $r + {k+1 \choose 2}$ into $ k $ distinct parts   The number of partitions of $r$ into parts of size at most $k$


I am about to reach the end of my patience with both my desktop computer, which has Ubuntu 18.04.4 LTS, and on a new Pinebook Pro that has Manjaro.  On the desktop, I am able to get to the desktop and do some tasks, but I am not able to add or remove any file that requires the password.  It almost seems that the password has been changed from what I had entered.  On the PBP there is a similar problem.  When I try to turn the laptop on, it will work fine up to an initial log-in page.  At that page /I have not been able to enter any acceptable password since this past Saturday.  And, on the PBP I can not find any way to reset the password.  If possible, I could use some help with both computers preferably through the email address on file. Thank you, Jim


Unable to find in Play Store (Item Not Found)

I am having a problem downloading the application on the play store, clicking the link just gets me to an "Item Not Found" page. I have a Samsung Galaxy S3 in case it matters.  Steps to reproduce   Open the community page with Google+ app on my Android device Click the link Click the "Join Testing" (or whatever that button says) Click the download link Select to open in Google Play "Item not found" error


How can I identify which AD&D books are for which edition, given the seemingly inconsistent use of logos between editions?

Recently I started googling out old AD&D books, but I stumbled upon very strange mix-up in terms of edition naming convention. For example, the  has most of the Greyhawk book covers, but strangely enough, many times newer books are named  "AD&D" while older ones have "AD&D 2nd Edition" in the title. The same happens for Forgotten Realms listings, and other setting books too.  I've read somewhere that AD&D 1e and 2e had some small overlap in terms of releases, but it doesn't explain the scale of the issue and the examples below.  How am I supposed to know which AD&D books are actually for 2nd Edition, and which are for 1st Edition?  Even assuming the small overlap mentioned above and some reprints which I identified, I'm still finding books released 5+ years into the lifespan of 2nd Edition that still have the old 1st Edition logo.  Was the release schedule that insanely messy back in the days? Or did they drop the "2nd Edition" part of the logo for some reason? Or did something else happen there?  Examples of the problem:   Greyhawk Player's Guide (1998): Not a reprint (at least not of anything I can find); nearly 10 years into the 2nd Edition lifespan but with a 1st Edition logo. Also released long after other Greyhawk 2nd Edition content which makes it even more odd. The Scarlet Brotherhood (1999): Also not a reprint; also has 1st Edition logo.  TSR Silver Anniversary Collector's Edition (1999): On the first page, there is information that its content is updated for 2nd Edition, yet the cover still has the 1st Edition logo.   There are, of course, many more examples; the ones I found so far are mostly of setting-specific books (Forgotten Realms, Greyhawk, Dark Sun, etc.).


Blender 2.8 produces the following error  whilst multiplying a combination of matrices and vectors  >>> M = Matrix() >>> v = Vector() >>> M * v Traceback (most recent call last):   File "<blender_console>", line 1, in <module> TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Vector' types  >>> v * v Traceback (most recent call last):   File "<blender_console>", line 1, in <module> TypeError: Element-wise multiplication: not supported between 'Vector' and 'Vector' types  >>> M * M Traceback (most recent call last):   File "<blender_console>", line 1, in <module> TypeError: Element-wise multiplication: not supported between 'Matrix' and 'Matrix' types


What is the group $G=\langle a,b\mid a^2=b^2=1\rangle$?

I am trying to describe all the elements of $G=\langle a,b\mid a^2=b^2=1\rangle$, and I am really struggling with where to start. I feel like the group could be infinite, with each element in the group, aside from the identity, having order $2$ (I have since learnt that these are called Boolean, or Abelian-$2$, Groups - again, not sure if this is the right track to go down). I would like to go on to build two subgroups, $S_1$ and $S_2$ that are isomorphic to $\mathbb{Z} /2\mathbb{Z}$ and $\mathbb{Z}$, but obviously to do that I need to understand what $G$ actually looks like! Thank you for any help.


I'm 99% a console gamer. My brain prefers that I have a controller in my hand. However, when a game requires that I use a thumbstick/control stick/analog stick to aim/target, I enter a world of frustration. So I usually stick with platformers.  When I do play games that require aiming/targeting with a thumb stick, seems I only have two speeds: extremely fast, shooting past the enemy, or creeping the enemy, never making it there. It gets even worse when I need to reposition the camera with the other thumb. I can feel the bad guys laughing at me. It's humiliating.   How can I improve my thumb-stick aiming? I'd like to expand the repertoire of games I enjoy.


__FILE__, __LINE__, and __FUNCTION__ usage in C++

Presuming that your C++ compiler supports them, is there any particular reason not to use __FILE__, __LINE__ and __FUNCTION__ for logging and debugging purposes?  I'm primarily concerned with giving the user misleading data—for example, reporting the incorrect line number or function as a result of optimization—or taking a performance hit as a result.  Basically, can I trust __FILE__, __LINE__ and __FUNCTION__ to always do the right thing?


How to make a test class for a scheduled apex class?

I am new to salesforce and I have written test classes for only one class before which worked just fine. But how do I write one for a simple scheduled apex class. Here is the code below: global class Add_U_Grade_To_Program_Enrollment implements Schedulable {     global void execute(SchedulableContext ctx) {         List<hed__Course_Enrollment__c> courseConnection_U_Grade = [SELECT          hed__Program_Enrollment__r.Id  FROM hed__Course_Enrollment__c WHERE Letter_Grade__c =          'U'];                  Map<String, Integer> grade_U_Map = new Map<String, Integer>();         String key;         for(hed__Course_Enrollment__c u_id: courseConnection_U_Grade ){             system.debug(u_id.hed__Program_Enrollment__r.Id);                          key = u_id.hed__Program_Enrollment__r.Id;             if(!grade_U_Map.containsKey(key)) {                 grade_U_Map.put(key,0 );             }             grade_U_Map.put(key,grade_U_Map.get(key) + 1 );         }                  for(String key1: grade_U_Map.keySet() ) {             System.debug(key1);             System.debug(grade_U_Map.get(key1));         }                  Set<String> programEnrollmentId = new Set<String>();         for(String key2: grade_U_Map.keySet() ) {             programEnrollmentId.add(key2);         }                  List<hed__Program_Enrollment__c> listOfProgramEnrollmentWithGrade_U = [SELECT Name,Id, Total_Unsatisfactory_Grades__c  FROM hed__Program_Enrollment__c WHERE Id =:programEnrollmentId];         system.debug('listOFPEWithGradeU: '+ listOfProgramEnrollmentWithGrade_U );         List<hed__Program_Enrollment__c> listOfProgramEnrollmentToUpdate = new List<hed__Program_Enrollment__c>();                  for(hed__Program_Enrollment__c pe_u: listOfProgramEnrollmentWithGrade_U){             for(String key3: grade_U_Map.keySet()){                 if(key3 == pe_u.Id){                     hed__Program_Enrollment__c updatePE = pe_u;                     updatePE.Total_Unsatisfactory_Grades__c = grade_U_Map.get(key3);                     listOfProgramEnrollmentToUpdate.add(updatePE);                 }             }         }                  update listOfProgramEnrollmentToUpdate;              }          }


Why does the space of pure qudit states have dimension $2(D-1)$, rather than $D^2-2$?

It is well known that two-dimensional states, that is, qubits, can be represented using the : all pure states lie on the surface of a three-dimensional sphere, while all the mixed states are in its interior.  This is consistent with a simple parameter counting argument: the space of all qubits is the space of all $2\times 2$ positive Hermitian operators with unit trace, which has dimension $2^2-1=3$, while for the pure states there are only $2\times2 - 2=2$ real degrees of freedom (two complex coefficients minus normalization and global phase). The same conclusion can be reached by considering that the pure states are a subset of all states satisfying the single additional constraint that $\operatorname{Tr}(\rho^2)=1$.  What happens for higher dimensional qudits? Let's consider the states living in a Hilbert space of dimension $D$. The space of all states is again the space of positive Hermitian $D\times D$ operators with unit trace, which has dimension $D^2-1$. The pure states can on the other hand be represented as length-$D$ complex vectors, so the number of real degrees of freedom, after having considered the global phase and the normalization condition, seems to be $2D-2$.  However, the set of pure states is also equal to the subset of all those states $\rho$ such that $\operatorname{Tr}(\rho^2)=1$. Now this seems like a single real condition, which therefore would make me think that the dimension of the space of pure $D$-dimensional states is $D^2-2$, in direct contrast with the argument above.  What is the correct way to think about this?


Is it possible to route only a specific application through a VPN?

I've recently purchased a VPN from vpntunnel.se and was wondering if it was possible to use it for specific applications (Firefox, xchat etc)  Also i'm having a little trouble setting up the the VPN in Gnome's Network-manager, I have the network-manager-openvpn package installed but it keeps complaining about "no secrets"?  I can connect fine with the console client and the GUI KVpnc  Thanks


How to create an alias that actually extends another alias of the same name in Bash?  Why:  I used to have GREP_OPTIONS set on .bashrc to something like this:  GREP_OPTIONS="-I --exclude=\*~"   I also had a script (let us say, setup-java.sh) which I would call before working on some Java projects. It would contain the line:  GREP_OPTIONS="$GREP_OPTIONS --exclude-dir=classes"   If I also use Sass, then I would call setup-sass.sh which contains the line:  GREP_OPTIONS="$GREP_OPTIONS --exclude-dir=\*/.sass-cache"   But  and apparently the standard solution is either create an alias or some script...


What is the difference between a builtin command and one that is not?

Is there any intrinsic difference between a builtin command and another command which can nominally do the same thing?     eg. Do builtins get "special" treatement? ... is there less overhead running them? .. or are they just simply 'built in'; like the dashboard of your car?     ...and is there a definitive (current) list of these builtins?


What is accidental metaplasm & metathesis across words?    Such as...     grammar teacher --> trammar greacher   Does this have a name?


I want the general meaning of the bold phrase in this text: If so, does the israeli public think israel should do something about USA? As you can see in the diagram, it certainly does. Look at the reds. Many would support a military initiative in response to this threat: military action against USA, preferably in coordination with Israel. We see military activism, sometimes even at the risk of an escalation leading of war. By the way, it comes up in other questions too, about USA arming ISIS with advanced weapons. Interestingly, in the past, the more an israeli attack against American nuclear facilities become realistic, the less support it received.


Changing the Title Frame color to a Gradient

In Beamer, I used the theme Ann Arbor. I want to achieve this type of gradient color on my title frame.    It seems that I have trouble changing the frame title background to a gradient color. I would like this part (encircled in red, with an arrow) to be changed to a cyan color going to black. [Please ignore the encircled block]. How do I do this? Thank you.  \documentclass[pdf]{beamer} \mode<presentation>{\usetheme{AnnArbor}} \usecolortheme{whale} \setbeamercolor{section in toc}{fg=red} %%%  \setbeamercolor{structure}{fg=cyan!80!black} \setbeamercolor*{block title example}{fg=blue!50,bg= blue!10} \setbeamercolor*{block body example}{fg= red,bg= blue!5} \usefonttheme{structuresmallcapsserif}  \setbeamertemplate{footline}[page number]{}   \setbeamercolor{headline}{fg=blue!90!black,bg=cyan!90!black} \setbeamercolor{palette primary}{fg=white,bg=cyan!90!black} \setbeamercolor{palette secondary}{fg=white,bg=cyan!90!black} \setbeamercolor{palette tertiary}{fg=white,bg=black} \setbeamercolor{frametitle}{fg=white,bg=cyan!50!black} %%%%   \title{Some Random Stuff} \subtitle{First time to code xD}  \begin{document} \begin{frame}     \titlepage \end{frame}    \begin{frame}{Testing} \frametitle{Test} Blah blah\\   \begin{block}{A block}     Some text \end{block}  \end{frame}  \end{document}


Testing exception is thrown when queue is empty

When I attempt to test the catching of an exception with a spsecific message when a Queue is empty the test fails. Here is the Queue class: import time from multiprocessing import Lock, Process, Queue, Pool  class QueueFun():      def writing_queue(self, work_tasks, name):         while True:             print("Writing to queue")             work_tasks.put('1')             time.sleep(3)      def read_queue(self, work_tasks, name):         while True:             print("Reading from queue", work_tasks.empty())             if work_tasks.empty():                 raise ValueError('Queue should not be empty')             item = work_tasks.get()             time.sleep(1)  if __name__ == '__main__':     work_tasks = Queue()     queue_fun = QueueFun()     print('setup done')      write_queue_process = Process(target=queue_fun.writing_queue, args=(work_tasks, "write_to_queue_process"))     print('write_queue_process')      write_queue_process.start()      read_queue_process_1 = Process(target=queue_fun.read_queue, args=(work_tasks, "read_from_queue_process_1"))     read_queue_process_1.start()     read_queue_process_2 = Process(target=queue_fun.read_queue, args=(work_tasks, "read_from_queue_process_2"))     read_queue_process_2.start()      write_queue_process.join()     read_queue_process_1.join()     read_queue_process_2.join()  And here is the test: import unittest from queue import Queue  from playground.QueueFun import QueueFun   class QueueFunTests(unittest.TestCase):     def test_empty_queue(self):         q = QueueFun()         work_tasks = Queue()         self.assertRaises(ValueError('Queue should not be empty'), q.read_queue(work_tasks, "1"))  Test fails with :     raise ValueError('Queue should not be empty') ValueError: Queue should not be empty  Have I not implemented the test correctly ?


How can I read SMART data from my HDDs in Win7 recovery command prompt?

Win7 won't finish loading on my laptop, and I'm trying to find a way to get any tool, like smartctl, onto a USB stick so that I can check the hard drives.   I've used wmic which says the drives are OK, but I wanted to see if I could dig any deeper.  The problem with smartctl is that I can only download the Windows setup exe, which is no help since I've only got my laptop and a linux machine to work with. Obviously I should have installed smartctl before I had this issue :(  hdtune would have been good as well, but I can't run it from the command prompt, even if i could get it installed.  This question is a result of my earlier question   I've seen this question below but can't use any of the solutions (except wmci)


Using Photoshop arrays to multiply a layer around a center point

I've been researching for hours seeking a decent explanation on Photoshop arrays for 2020+ PS versions. Several tutorials explain the obvious about setting the center point. However, all tutorial's shortkeys and next steps fail somehow.  How can I create a selected number of circles to occupy the outer rim in a perfectly symmetrical way without manually adding each one?    Also is there a way to place the center point perfectly? (like by number or direct center etc)


How to insert the letters Ɵ , Ƣ , Ə , ʐ , Қ and Ң

To print Ɵ , Ƣ , Ə , ʐ , Қ and Ң letters, which package and which control sequences should I use?


I was trying to declare 64bit variable in C with unsigned long long datatype but it not working and behaving similar to uint32 bit variable. What is the solution to access / check the bit above 32 ? #include <stdio.h> #include <stdint.h>  int main() {     // Write C code here     printf("Hello world");     unsigned long long temp = 0x1234567890123456ULL;     unsigned long long temp2 = temp >> 1;          uint64_t var = 0x1234567890123456;           printf("\n%x", (long long) temp);      printf("\n%x", (long long) temp2);      printf("\n%x", 1ULL << 31ULL);     printf("\n%x", 1ULL << 32ULL);          printf("\n%x", var);           return 0; }  Output:  Hello world 90123456 48091a2b 80000000 0 90123456


What is the origin of the term, “to 86 someone”?

I came across a phrase, “86 to sb.” in the following paragraph of an article titled “The owner of the Red Hen explains why she asked Sarah Huckabee Sanders to leave,” in the Washington Post (June 23), that comes with a picture of an actual paycheck issued by the restaurant showing the code, “86” above the name of a recipient. The paragraph reads;  If you ever heard the term “to 86 someone,” it comes from the restaurant industry – code to refuse service, or alternatively to take an item off the menu.  I’m curious to know why the number 86 came to represent the refusal of service at service establishments. Does someone know the provenance? Addendum I noticed that my post duplicates with the similar question posted in 2011, but I dont' think I find a convincing source of its provenance (first appearance, sources, usage trend, currency). It seems that the word gained recency and life with the restaurant owner's refusal to serve  Sarah Huckabee in her Mexican restaurant. Is there any new source of its origin than  ones I saw on the previous post? I checked both Cambridge and Oxford online dictionaries for this word. Cambridge doesn't carry this word. Oxford Dictionaries define "eighty six" as;  1.(informal) Eject or bar someone from a restaurant, bar etc. 2.Reject, discard or cancel.  Origin: 1930s (as a noun) used in restaurants and bars to indicate that a menu item is not available or that a customer is not to be served. Perhaps rhyming slang for nix, which sounds like a bit overstretched assumption to me. The currency of the word or number - 86 is unexpectedly high based on google Ngram. The usage can track back to earlier than 1800 (at 0.002% level) and keeps rising up to 0.00672% level in 2000.


Let $f \colon [a,b] \to \mathbb{R}$ be a continuous function on $[a,b]$. Prove that there exists $c \in (a,b)$ such that $\frac{1}{b-a}\int_a^b d(s)\,ds = f(c)$.   I understand there is an easy way of doing this, I just want to check if my working to a more complicated method is correct.  $f$ continuous on $[a,b] \implies $ Riemann Integrable on $[a,b]$ $\implies $ makes sense to write $\int_{a}^{b}f(s) ds$  Define $A(x)=\int_{a}^{x}f(s) ds$ then by the Fundamental Theorem of Calculus $A$ is differentiable on $(a,b)$ and $A'(x)=f(x)$ ($f$ is continuous on $[a,b]$)  $A$ differentiable on $(a,b) \implies A$ continuous on $(a,b)$  $\lim\limits_{x \to a+} A(x)=0= A(a) \implies A$ is right continuous at $a$  $\lim\limits_{x \to b-} A(x)=\int_{a}^{b}f(s) ds$ (which exists as $f$ is Riemann Integrable on $[a,b])$$ = A(b) \implies A$ is left continuous at $b$  So $A$ continuous on $[a,b]$ and differentiable on $(a,b)$  By Mean Value Theorem $\exists c \in(a,b)$ st.  $\frac{A(b)-A(a)}{b-a}=A'(c)=f(c) $  (F.T.C) $\implies$  $\frac{\int_{a}^{b}f(s) ds}{b-a}=f(c)$


Grep not working as expected, not sure what's wrong

Below is the command I'm running grep -i -e "useCss()|useXpath()" abc.txt  abc.txt contains below text .useCss() .useXpath()  I'm getting output blank but when I run one by one without pipe its giving the output. grep -i -e "useXpath()" F:\abc.txt  output .useXpath()  Similarly I can get output for useCss but when I try to run both them in an or condition it returns null, could someone please help me what's wrong? Thank You!!


Proof for exponentiation in modular arithmetic

If  $e$ is a natural number, then this is true:  $$m^e \bmod\ n = (m\bmod\ n)^e\bmod\ n$$  This is often used when encrypting, especially with RSA, since one can avoid directly calculating $m^e$, which can be a very big number.  However, I haven't been able to find any documentation/proof for this conjecture, can anyone give a source or explain it?


how do I know if SSD disk can be used with my motherboard

I'm trying to find how to check if particular SSD disc can be used on my motherboard:  Motherboard: Gigabyte EX58-UD3R  SSD: Samsung Electronics 840 EVO-Series 250GB 2.5-Inch SATA III Single Unit Version Internal Solid State Drive MZ-7TE250BW  What do I need to look, or search in order to be sure if I can install SSD drive in my PC.  Thanks in advance.


Explaining the contents of the ~/.profile file

# ~/.profile: executed by the command interpreter for login shells. # This file is not read by bash(1), if ~/.bash_profile or ~/.bash_login # exists. # see /usr/share/doc/bash/examples/startup-files for examples. # the files are located in the bash-doc package.  # the default umask is set in /etc/profile; for setting the umask # for ssh logins, install and configure the libpam-umask package. #umask 022  # if running bash if [ -n "$BASH_VERSION" ]; then     # include .bashrc if it exists     if [ -f "$HOME/.bashrc" ]; then     . "$HOME/.bashrc"     fi fi  # set PATH so it includes user's private bin if it exists if [ -d "$HOME/bin" ] ; then     PATH="$HOME/bin:$PATH" fi   Can anyone explain the contents of the ~/.profile file? So when you enter into the ~/.profile file what does all the writing mean?


What is the most efficient way to write the old-school:  StringBuilder sb = new StringBuilder(); if (strings.Count > 0) {     foreach (string s in strings)     {         sb.Append(s + ", ");     }     sb.Remove(sb.Length - 2, 2); } return sb.ToString();   ...in LINQ?


Getting error in console Uncaught ReferenceError: fnSubmit is not defined at HTMLInputElement.onclick

I am using many credential of same type. When I am clicking on submit button with particular credential I am getting error on browser console Uncaught ReferenceError: fnSubmit is not defined at HTMLInputElement.onclick but from all other credentials submit button is working successfully. In browser element's js function is not displaying for particular user from which I am unable to submit the form and else all user js function is displaying. Why am i getting this error for only one user. Please help. This is the production issue. Thanks, Pritam Sinha


I have following javascript that I came across. I don't understand the process flow of the code execution.  var val = 'ap';  function func() {     if (!val) {         var val = 'ple';     }     console.log(val); } func(); console.log(val);   The output that I thought would be was, 'ap' then 'ap'. But I get 'ple' and then 'ap'. How is this happening?


Keep question unanswered... even after bounty

My currently bountified question,  is nearing its end of extra publicity and I don't think it will have a favourable answer any time soon.   By the looks of how the question went, the problem needs more research and related updates from time to time until I, or some other person, gets it right.   It will be better not marking any answer right now and making the question visible to others when updates happen.   Can anything be done about this by the moderators?


Why openjdk-10 is missing in 18.04 PPA where openjdk-11 is available?

$ sudo apt install openj openjade                 openjdk-11-jre           openjdk-8-doc            openjdk-8-jre-zero openjdk-11-dbg           openjdk-11-jre-headless  openjdk-8-jdk            openjdk-8-source openjdk-11-demo          openjdk-11-jre-zero      openjdk-8-jdk-headless   openjfx openjdk-11-doc           openjdk-11-source        openjdk-8-jre            openjfx-source openjdk-11-jdk           openjdk-8-dbg            openjdk-8-jre-dcevm       openjdk-11-jdk-headless  openjdk-8-demo           openjdk-8-jre-headless     My question is ubuntu shows openjdk-11 in their ppa, but why it doesn't show openjdk-10, although openjdk-10 is stable release and openjdk-11 is in development.


Does “upshot” denote something positive, negative, or neutral?

I’m a non-native speaker of English, and I’ve always felt that “upshot” was used to denote positive results. But I’ve come across a few cases recently where negative or neutral outcomes were enumerated after the use of “upshot”. For example,  “The upshot was that everyone got an incurable disease.”  Is “upshot” intended for positive outcomes only? Or mostly? If yes, what word is used for negative outcomes?


I want to format year to this format yy = 17 i tried with this code but not working it is wrong format .  <select id="CreditCardExpiryDateYear" class="dropdown form-control">        @for (var iYear = DateTime.Now.Year; iYear <= DateTime.Now.Year + 10; iYear++)           {            <option value="@iYear.ToString("yy")" @(DateTime.Now.Year == iYear ? " selected" : "")>@iYear.ToString("yy")</option>           } </select>


Trying to evaluate an infinite sum using method of residues

I am trying to show that $\sum_{n=1}^{\infty} \frac{ (-1)^{n-1} }{(2n -1)^3 } = \frac{ \pi^3}{32 } $. I can use the following fact: IF $f(z)$ is meromorphic with finite number of poles none which lie on the integers, then   $$ \sum_{n= - \infty}^{\infty} (-1)^n f(n) = - \sum \left( residues \; \; of \; \; \pi \csc( \pi z ) f(z) \; \; at \; \; poles \; \; of \; \; f(z) \right) $$  Notice, back to the problem, that   $$ \sum_{n=1}^{\infty} \frac{ (-1)^{n-1} }{(2n -1)^3 } = \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1-2n)^3}$$ and  $$ \sum_{n=- \infty}^{\infty} \frac{ (-1)^n}{(1-2n)^3} = 1 + \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1-2n)^3} + \sum_{n= - \infty}^{-1}  \frac{ (-1)^n}{(1-2n)^3} = $$  $$ = 1 + \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1-2n)^3} + \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1+2n)^3} $$  So, I know I can find the left hand side of above equations using the result in the first line. However, I am still suck on trying to see how to evaluate $ \sum_{n=1}^{\infty} \frac{ (-1)^n}{(1+2n)^3} $. Any suggestions? Should I add the two series on the right hand side ?


Can I use "crack around the door" in the following situation? If I am wrong, could you give me the correct expression? Thank you.  The door of Dad's room was half-open. Through the crack around the door, the wind came in and blew the book shut, then open.


Prove that a tree has at least two vertices of degree 1.

Given a graph $G=(V,E)$ that is a tree and $|V|\ge 2$, prove that $G$ has at least two vertices of degree $1$.


Blender VSE - import multiple rendered PNG frames?

I usually use the Blender VSE for my normal video editing (for lack of After Effects).  I also usually render directly into AVI format, not PNG sequences of frames. I would however like to move to PNG sequences, because it's a lot easier to sort out any mistakes and to edit that way.  I would therefore like to load the sequences I render into the VSE quickly and easily (30fps) - which would normally require tweaking of every frame because they normally when added add an image strip which is 25 frames long (and I want each frame to be 1 frame long) - I can also only add one frame at a time.  How can I load a frame sequence into the VSE?


Multiple axis and filling between curves

I am currently using multiple axis environments in a single tikzpicture environment. It all works quite well. However, if I want to fill the area between two curves, only the first call of fill between is executed.  Using the command twice in one axis environment works.  The following code returns two identical plots, where only in the left window the area between the lines is filled.   Do I have to reset fill between in some way?  Issue appeared with pgfplots v1.12  \documentclass{article} \usepackage[paperwidth=150mm, paperheight=80mm, margin=0cm]{geometry} \usepackage{pgfplots} \usepgfplotslibrary{fillbetween}  \begin{document} \begin{tikzpicture}  \begin{axis}[ shift={(0cm,0cm)}, xlabel=x, ylabel=y, xmin = -10, xmax = 10, ymin = -10, ymax =10,  width=5cm, height=5cm,  scale only axis=true, ] \addplot[name path=A, black, dashed, ultra thick] coordinates { (-5,5) (5,5) }; \addplot[name path=B, black, dashed, ultra thick] coordinates {(-5,-5) (5,-5)}; \addplot[gray] fill between[of=A and B]; \end{axis}  \begin{axis}[ shift={(7cm,0cm)}, xlabel=x, ylabel=y, xmin = -10, xmax = 10, ymin = -10, ymax =10,  width=5cm, height=5cm,  scale only axis=true, ] \addplot[name path=C, black, dashed, ultra thick] coordinates { (-5,5) (5,5) }; \addplot[name path=D, black, dashed, ultra thick] coordinates {(-5,-5) (5,-5)}; \addplot[gray] fill between[of=C and D]; \end{axis}  \end{tikzpicture} \end{document}     As mentioned below, here is an MWE with groupplots and version 1.13 which does have the very same issue:  % arara: pdflatex  \documentclass{article} \usepackage{pgfplots} \pgfplotsset{compat=1.13} \usepgfplotslibrary{fillbetween,groupplots}  \begin{document} \begin{tikzpicture}  \begin{groupplot}[group style={group size=2 by 1}] \nextgroupplot     \addplot[name path=A] coordinates { (-5,5) (5,5) };     \addplot[name path=B] coordinates {(-5,-5) (5,-5)};     \addplot[gray] fill between[of=A and B]; \nextgroupplot     \addplot[name path=C] coordinates { (-5,5) (5,5) };     \addplot[name path=D] coordinates {(-5,-5) (5,-5)};     \addplot[red] fill between[of=C and D]; \end{groupplot} \end{tikzpicture} \end{document}


I have a textfield that inputs date in this format: yyyy-mm-dd, how can I add a day to that users input? I have the following code but it doesnt work...  users_date = document.getElementById('users_date').value;     var date = new Date(users_date); var next_date = new Date(); next_date .setDate(date.getDate()+1); document.getElementById('next_date').value = next_date;   The first problem is the format of the date in the second is like 'Mon Aug 05 2013 16:24:40 GMT-0500 (Hora est. Pacífico, Sudamérica)'  The second problem is that when the user input the fist day of the month like '2013-01-01' or '2013-08-01' it displays 'Sun Sep 01 2013 16:26:06 GMT-0500 (Hora est. Pacífico, Sudamérica)' ALWAYS  For example if user inputs 2013-01-01 I want another textfield to be 2013-01-02 or 2013-08-31 it displays 2013-09-01, how can I do that?  Thanks!!  ITS NOT DUPLICATE BECAUSE THE OTHER POST DOESN'T FORMAT THE DATE!!!!


Why the leverage is the diagonal elements of the Hat matrix? I know the meaning of leverage, just do not know the relation with the formula. Any proof? Or intuitive explanation?


How to improve single-language site SEO for both google's worldwide TLD and ccTLD?

I'm a web developer from Myanmar (Burma). Google delivers a ccTLD  to the people searching from our country.   I have a website which is a single language site (English) and it targets the global audience. I have also Facebook page and Twitter page related to my website. When I search my website using some related keywords in  (without ), my site including Facebook and Twitter pages are listed in the first SERP. However, when I search it with the same keywords in , I could not entirely find the site.  So far I have learned about Google SEO, there is an option  which can be enabled/flagged from Google Webmasters Tool. And I know that it is only for geographic data and it is not suitable for my case.     This setting is only for geographic data. If you're targeting users in   different locations—for example, if you have a site in French that you   want users in France, Canada, and Mali to read—don't use this tool to   set France as a geographic target. A good example of where it would be   useful is for a restaurant website: if the restaurant is in Canada,   it's probably not of interest to folks in France. But if your content   is in French and is of interest to people in multiple   countries/regions, it's probably better not to restrict it.   What are the best possible ways to solve this issue to list my site in google.com.mm as well?


What is the size of Skull Island in Kong:Skull Island (2017) movie?

Gargantuan apes once thrived on the island for millions of years, before they were almost wiped out by Skullcrawlers, except for Kong. These beasts coexisted with other bizarre and large lifeforms on Skull Island. So what is the size (area) of the island based on the map in the movie?  The size can be given in square kilometers, or it could also be said in reference to real world landforms (like the size of Texas, Sumatra etc).


Write function in one line into ~/.bashrc

Why when I try to write a function just in one line into .bashrc file,  list(){ ls -a }   I get error?  bash: /home/username/.bashrc: line num: syntax error: unexpected end of file   but when I write it in multi line it's ok?  list(){     ls -a }


Printing integers starting with 0's - java

The issue is that I do not understand how to make two 0's appear before the 7, after the print. the print keeps coming up with just the 7 after the + bond is used in the print line.  int bond = 007; System.out.println("insert what ever you want " + bond); insert what ever you want 7  What i want it so say is   insert what ever you want 007


Geometry parameters not working on Windows but working on Mac

I tried to get the following example working on Windows 10 (Texmaker V5.0.1);   I used it for a long time on Mac OS and it worked very well. But on Windows 10 the geometry parameters seam not to work. The page is DIN A4 but not in a smaller size for kindle as I expect.  What can I do?  Thank you!  P.S.: I use MikTex 2.9 (64 bit)  P.P.S.: The minimal example:  \documentclass[8pt]{memoir}  \usepackage[utf8]{inputenc} \usepackage[paperwidth=9cm, paperheight=11.5cm, top=0.5cm, left=0.5cm, right=0.5cm, bottom=0.5cm]{geometry} \usepackage{graphicx} \usepackage{tikz, blindtext}  \makechapterstyle{box}{   \renewcommand*{\printchaptername}{}   \renewcommand*{\chapnumfont}{\normalfont\sffamily\huge\bfseries}   \renewcommand*{\printchapternum}{     \flushright     \begin{tikzpicture}       \draw[fill,color=black] (0,0) rectangle (2cm,2cm);       \draw[color=white] (1cm,1cm) node { \chapnumfont\thechapter };     \end{tikzpicture}   }   \renewcommand*{\chaptitlefont}{\normalfont\sffamily\Huge\bfseries}   \renewcommand*{\printchaptertitle}[1]{\flushright\chaptitlefont##1} }  %Begin Decorative packages \usepackage{type1cm} \usepackage{lettrine} %End decorative packages  \usepackage[T1]{fontenc} \usepackage[scaled]{helvet} \renewcommand*\familydefault{\sfdefault}  \frenchspacing \sloppy \pagestyle{empty}  \chapterstyle{box} \begin{document}  \title{Latex Template for Kindle} \author{by YOUR NAME} \date{} \maketitle \newpage  \newpage \chapter{Preface}{}  \lettrine[lines=3,slope=4pt,findent=-3pt]{O}{nce upon} a time, lala lala lalala lalalala.   \newpage \chapter{Introduction}  \lettrine[lines=3,slope=4pt,findent=-3pt]{O}{nce upon} a time, lala lala lalala lalalala.   \end{document}


JQuery: how to convert the below string into following date format?

i am new to JQuery.I need to convert the below string into following dateTime format.How to achieve this?  string value:   var w = "/Date(1388514600000)/"   Expected Date format Example:-  "Wed Jan 01 2014 00:00:00 GMT+0530 (India Standard Time)"   I need to achieve above without jQuery DatePicker UI and anyother UI?  Is this possible to achieve my Expected value in given string?  i am tried like this:-   var d=date.parse(w);  console.log(d);   output:-  NaN   Any help or an idea will be more helpful?  Thank you.Please give me a suggestion!  how to achieve above in JQuery?


How to show $\sqrt{p_1}$ is not in $Q[\sqrt{p_2},...,\sqrt{p_n}]$ if $p_1,...,p_n$ are distinct primes? Intuitively, this is pretty clear, but it makes me very uncomfortable to just believe. Any idea to prove this rigorously? I want this result because I am trying to compute the Galois group of $(X^2-p_1)...(X^2-p_n)$. If I know the statement is true, then the Galois group of this polynomial will be direct product of separate Galois group.


Does light in vacuum actually travel at the speed of light?

I know my question sounds like a joke (and I suppose on some level it is) but I'm confounded by the following:  As the thought experiment goes, if I'm in a spaceship flying rapidly the people on earth are aging "faster" than me because relative to them my time is slower.  As I approach light-speed time for me keeps slowing down.  So far so good.  But then we reach what *seems like a paradox (to me) in that if "I" (I get that physical things can't do this, but "I" can be a photon here) reach light speed then my frame = 0, but if my frame = 0 doesn't the rest of the universe around me immediately jump right to its "end of time" (whatever the heck that means).  So, am I not understanding the relationship between the way things are moving through time? Or does *nothing actually travel at the *actual (0 frame) speed of "light" including light?  [EDIT] I can tell that I'm not asking this in a way that triggers the explanation I'm seeking so I'll try it from a slightly different angle.   We conducted an experiment in which we flew atomic clocks around and they came back .   This is attributed to both their speed and their distance from earth's mass.   So there's some equation by which we can calculate the rate of difference between the progress of time for me (on earth) and the progress of time for an atomic clock flying around.   So, if I understand correctly, if that atomic clock were to reach the speed of c its time would actually stop.  This seems paradoxical.  If I were a photon and I persisted at c for 1 hour of my time, how much time will have elapsed on earth? Intuitively it feels like the answer should be infinity (and further it shouldn't take an hour - it should be the instant I reach light speed and my time stops).  So, my desire is to forgo the analysis of light speed (as such) since the speed itself is not important. The only thing I'm curious about here is if time actually stops for particles traveling at light speed and if it does, then how does the surrounding universe (which is traveling forward in time) not leave those particles behind.


Install Ubuntu 14.04 over 11.10 from CD OR USB

In my laptop I have first installed Windows 7. Then, installed Ubuntu 11.10. Now my laptop contains two Operating Systems. I don't have internet connectivity in home. But I have Ubuntu 14.04 ISO with me,   i need to upgrade Ubuntu 11.10 with Ubuntu 14.04 without uninstalling Windows 7 and Ubuntu 11.10  . How to achieve this...  please help..am new one to Ubuntu.


How do I remap the Caps Lock and Ctrl keys?

I'd like to remap my keys such that Ctrl behaves as the Caps Lock key and vice-versa. Also, if possible I'd like the settings to be available only within the currently logged-in user. How can I achieve this?  I'm a vim user, unlike the other people who use this machine, so I'd like those settings only for my account.


I wanted to know if I can execute a command from the terminal and right after the command started I send its PID to another command to be monitored.  I need to do something like this,  dd if=/path/of/file of=/path/of/destination   And then I need to monitor its execution using pidstat, but pidstat takes a pid and I don't know how to make one send the pid to the other.  I need to monitor disk usage, memory usage, cpu usage and time elapsed. Does any one know of a way to do that?


May I write a letter to support my girlfriend's application?

My girlfriend and I am in the same college, but different major. She is a law school master student.  She just graduated from the master program and wanted to transfer to juris doctor in the same college.  I am wondering if it is appropriate for me to write the dean of law school a letter in support of her application.  Also, I am not sure what to write in the letter if appropriate. I would imagine saying that I would love to be able to continue studying with my girlfriend in the same college and things like that. Would you have any suggestions?  Thank you in advance!


Can you travel to India with a valid visa in the old passport?

It was possible to enter India with a new passport and the valid visa in the old passport last year. However I can't get any official confirmation on the current status.  Notably, Timatic used to explicitly say that "Valid visas in expired passports are still acceptable, provided accompanied by a valid passport of the same nationality of the expired passport", but currently it doesn't seem to say it anymore. I've checked United one.  Indian consulate in Chicago :     Transfer of visa to a new passport is not needed in emergency and the   applicant can travel to India with old passport having Indian visa,   along with new current passport.   Emphasis is mine. I do not have an emergency, and in any case I wouldn't trust embassy web sites as they update very slowly.  So anyone flew to India recently with a visa in an old passport? Was there any hassle/issues during checkin or immigration in India?  I'd transfer the visa, but the process is incredibly annoying, and paperwork-wise is the same as getting a new visa.  Update: things get more interesting. Apparently there seem to be two different versions of TIMATIC.   For example, :     ... This does not apply to passengers with a PIO    card.      Valid visas in expired passports are still acceptable,  provided accompanied by a valid passport of the same   nationality   of the expired passport.   However the one available at  and  do not have this wording, and both explicitly omit this phrase:


Showing that (-1, 0 0) is the maximum of f(x, y, z)


Solve the following equation in positive integers $x$ and $y$

What are the solutions in positive integers of the equation:  $${1+2^x+2^{2x+1}=y^2}$$ I tried to factorize the equation but it didn't help much. Clearly $y $ is an odd integer. Substituting $y =2n+1$, we get  $2^x+2^{2x+1}=(2n)\cdot{(2n+2)}$ $\Rightarrow (2^{x-2})\cdot(1+2^{x+1})=(n)\cdot(n+1)$ Which is the product of 2 consecutive integers. Does it help? I don't know.


Bounty not awarded after the end of the grace period?

The bounty to one of my answers wasn't awarded to me when in fact the user that asked the question accepted my answer 2 days before it ended. Why would this happen? The bounty help states that if the user that asked the question selects an answer that the user who answered the question would receive the bounty.  This is the question:    The notice says:     This question had a bounty worth +[x] reputation from [user] that ended yesterday. Grace period has ended


How this function: (function(){}()) works?

I am reading some question where i find this code, it seems to be easy but i can't understand how this function:(function() {} ()) works.    Please help me to understand that how the value of var foo=6 and bar=9 is only consider in bar=bar+foo  <!DOCTYPE html>


Nonabelian dihedral groups and a question in number theory

I'll use a concrete definition of a dihedral group $D_{2n}$ which emphasizes its group structure:      $D_{2n}$ consists of distinct elements $r_0,...,r_{n-1},s_0,...,s_{n-1}$ so that for any $i \in \mathbb{Z}$ we have $r_{i + n} = r_i, s_{i + n} s_i$ and for any $i,j \in \mathbb{Z}$ we have $r_ir_j = r_{i + j}, r_is_j = s_{i + j}, s_ir_j = s_{i - j}, s_is_j = r_{i - j}$.   It's easy to see that all $r_i's$ commute in $D_{2n}$, hence the only elements for which it is possible not to commute are $s_i$ and $s_j$ or $r_i$ and $s_j$.  $s_is_j = s_js_i$ whenever $i - j \equiv j - i \bmod n$ and $r_is_j = s_jr_i$ whenever $i + j \equiv i - j \bmod n$, hence $D_{2n}$ is noncommutative if and only if either   there is $0 \leq j < n$ so that $n\nmid 2j$, or there are $0 \leq i,j < n$  so that $n\nmid 2(i - j)$.   Using this result, it's not hard to establish that $D_2$ and $D_4$ are abelian.  I wonder how we can use this to prove that $D_{2n}$ is not abelian for $n \geq 3$. I'm not interested in a possible geometric proof.


Coulomb's Law: why is $k = \dfrac{1}{4\pi\epsilon_0}$

This was supposed to be a long question but something went wrong and everything I typed was lost. Here goes.   Why is  $k = \dfrac{1}{4\pi\epsilon_0}$ in ?  Is this an experimental fact?  If not, what is the significance of this definition?


How can I show that the conditional expectation $E(X\mid X)=X$?

I tried to show that $E(X\mid X=x)=x$, which would lead me to get $E(X\mid X)=X$ but I am having trouble doing so. I know that the definition of conditional expectation (continuous case) is: $$E(X\mid Y=y)=\int_{-\infty}^{\infty}x f_{X\mid Y}(x\mid y)\,dx$$ This led me to write: $$E(X\mid X=x)=\int_{-\infty}^{\infty}x f_{X\mid X}(x\mid x)\,dx$$ but I don't know what $f_{X\mid X}(x\mid x)$ is (if that's even a valid notation...)  I do note though that I don't know anything about $\sigma$-fields or Borel sets, as someone had tried to explain me once. Is it possible to prove this in an "elementary" way?


I am trying to prove that:  (uv)R = vRuR  where R is the reversal of a String defined recursively as:  aR = a   (wa)R = awR  I think I have the base case right, but I am having trouble with the inductive step and final proof.  here is what I have:  Base Step  prove for n = 1 where |uv| = 1  (uv)R = uReR = uR = u (where e is the empty string)  I dont really know where to go from here, any help would be great.  Thanks


Simple way to see a list of installed iOS apps with their storage space size?

The storage on my iPhone is nearly full. Most of the space is used by apps. I'd like to see which apps consume the most space on my device.  Is there a way to get a list of the apps with their corresponding used space? By "used space I mean the installation size (bonus for added user data).


Aligning pieces of equations on the right

I would like to write an environment to write linear system of equations that could be used with  \begin{linearSystem} 2x&+y&=&2\\ x&-3y&=&1 \end {linearSystem}   and should display  2x +y=2  x-3y=1   Every piece of equation should be aligned on the right and no spacing should be added.  I have tried to use the aligned environment with  \[\left\{\begin{aligned}[c] 2x&+y&=&2\\ x&-3y&=&1 \end{aligned}\right.\]   But I get something like  2x+y  =2  x-3y =1   which is not what I want. Is there a way to have an "aligned" environment that justifies everything on the right and that does not introduce any spacing every 2 "pieces" of equation.


How to remove youtube application from launcher?

the first time i visited Youtube with Firexox, it asked me to install Youtube launcher application, i've accepted but now I want to remove it. Every time I open youtube.com in Firefox, also appear a Youtube application button in the launcher. If I right-click on the button i can only block it on the launcher, open a new tab or quit, how can I remove it? Thanks


I have a HP laptop with Windows 8.1 and Ubuntu 14.04 dual booted. I used to use F9 key to enter boot menu and chose Ubuntu and then GRUB would appear where I would chose Ubuntu again. This was working fine all this while. Either a hardware change or a Windows update has caused the Ubuntu option to go missing from the boot menu itself.  How do I fix this and boot into Ubuntu again?


How could Gandalf become the White and Saruman have no colour?

In The Lord of the Rings: The Two Towers Gandalf cast Saruman out of the order; he had become the White. How could  Saruman have no colour? What is the requirement for being White in the order and what is the crime for which someone can lose his colour in the council?


Print screen short-cut not working (Ubuntu 14.04 LTS)

The print-screen short-cut is set to be the Print-screen button, but when I press on it, it does not work. Any clues?  Any help will greatly be appreciated  Thank you


For example you have a HashMap<String, String>  how can you sort values in the hashmap and print them to console  what would be the best ways to do it?


I am trying to understand the key differences between GBM and XGBOOST. I tried to google it, but could not find any good answers explaining the differences between the two algorithms and why xgboost almost always performs better than GBM. What makes XGBOOST so fast?


Should a high-school student invest their (relative meager) savings?

I am a high school student, I don't really have much money, between one and two grand in my savings account. However, I have friends who are investing in both penny stocks and stocks. I do not really know much about the subject, but I do find it interesting. I receive no interest from my checking account, so I have been told I am misusing my money by not doing anything with it. From the suggestions of other people and myself I have narrowed down my options to:   Investing in stocks Investing in penny stocks Investing in bonds Saving up for college Save up for emergencies Start thinking about retirement (which I have been told is never too early to start thinking about)   Do you think investing in stocks with a small budget would be a good option?


What is the purpose of '/var/lib/dpkg/available' file in Ubuntu/Debian?

What is the role of the /var/lib/dpkg/available file in Ubuntu and Debian machines?


How do you calculate how heavy you feel from negative g forces?

My physics tacher told me that to calculate the weight that you feel from negative g forces you have to devide your mass by the negative g force, but then my friend told me that it did't make sense and now I'm confused... Please help!


If I setup the following template method of a template class foo:func  template<typename T> class foo{   public:     template<typename U> static void func(){} };  int main(){   foo<int>::func<long>(); }   everything works fine. When I try to call foo::func from a template class  template<typename T> class foo{   public:   template<typename U>   static void func(){} };  template<typename T,typename U> class bar{   public:     bar(){       foo<T>::func<U>();     } };  int main(){   bar<int,long> b;   foo<int>::func<long>(); }   I get the following compile error:  main.cpp: In constructor ‘bar<T, U>::bar()’: main.cpp:13:19: error: expected primary-expression before ‘>’ token      foo<T>::func<U>();                    ^ main.cpp:13:21: error: expected primary-expression before ‘)’ token      foo<T>::func<U>();                      ^   How can I call foo::func from the template class bar?


Run a command for a specified time and then abort if time exceeds

I want know how I can run a command for a specified time say, one minute and if it doesn't complete execution then I should be able to stop it.


How to convert array into comma separated string in javascript

I have an array   a.value =  [a,b,c,d,e,f]  How can I convert to comma seperated string like   a.value = "a,b,c,d,e,f"  Thanks for all help.


Executing a Java application in a separate process

Can a Java application be loaded in a separate process using its name, as opposed to its location, in a platform independent manner?  I know you can execute a program via ...  Process process = Runtime.getRuntime().exec( COMMAND );   ... the main issue of this method is that such calls are then platform specific.   Ideally, I'd wrap a method into something as simple as...  EXECUTE.application( CLASS_TO_BE_EXECUTED );   ... and pass in the fully qualified name of an application class as CLASS_TO_BE_EXECUTED.


Removing file / folder link after using "Save As..." then "Web Page, complete"

When you right-click save-as a web page in FF, the page is saved along with a folder containing any associated media that page needs (images, js, etc).  My problem is that I want to reorganise the associated media folder, but wherever I move this folder, the saved .html file is moved as well. ARGH!   I can rename each folder, which breaks the "link" between html file and media folder, but there must be a cleaner way to do it. Does anyone else know?


Difficult limit evaluation: $\lim_{x\to\infty}(\sqrt{x^2+4x} - x)$

I'm struggling to find the solution of the following:  $$\lim_{x\rightarrow\infty}(\sqrt{x^2+4x} - x)$$  I come to the answer of $0$.  The book has an answer of $4/1$.  The book explains a part of the question briefly. Looking at the brief answer information given I then come to an answer of $2$...  What is the answer?


Identify fictional book/story: where to ask?

Science Fiction and Fantasy has a highly active  tag but where should I ask for identification of fictional stories that are of neither science-fiction nor fantasy genre?


I know that there are formulas for switching from and to sourdough and or preferments, but even though my library grows I haven't found such a formula. I have a general idea of the fact that a sourdough bread usually requires around 40% of sourdough and a regular yeasted bread requires something from .1% to a stunning value of 2% of yeast. Other that this general idea I have not found anything in the literature I have at home since most of the books usually treat these subjects separately.  Is there a formula that transforms a recipe from fresh yeast to sourdough and vice versa? What about preferments?  EDIT: The question is under the assumption that a started is intended as a 100% hytration one, if you know of a conversion for a 50% hydration starter or pasta madre feel free to pitch in.


If $(X_n)$ is i.i.d. and $ \frac1n\sum\limits_{k=1}^{n} {X_k}\to Y$ almost surely then $X_1$ is integrable (converse of SLLN)

Let $(\Omega,\mathcal F,P)$ be a finite measure space.  Let $X_n:\Omega \rightarrow \mathbb R$ be a sequence of iid r.v's  I need to prove that if:  $ n^{-1}\sum _{k=1}^{n} {X_k} $ converges almost surely to $Y$ then all $X_k$ have expectation.  If I understand correctly then $X_k$ has expectations means $X_k$ is in $\mathcal L^1(\Omega)$.  And I know that on finite measure space Converging in expectations is converging in $\mathcal L^1(\Omega)$ and it's stronger than almost sure convergence.  And I know that from linearity of expectation even if one of the sequence is not in $\mathcal L^1(\Omega)$ then $Y$ is not in $\mathcal L^1(\Omega)$.  How do I continue?


How can I launch windows 10 usb on ubuntu 3.7

I am using Ubuntu, but I have bought Windows 10 USB stick. There are some .exe files to launch it. I cant open them on ubuntu. How can I launch the Windows 10?


I will have a flight from Boston (USA) to Hanoi (Vietnam) via Toronto (Canada). My first flight will be from Boston to Toronto with Air Canada (2h 45m transit), the second flight will be from Toronto to Tokyo with Air Canada (1h transit) and the last one will be from Tokyo to Hanoi with Vietnam Airlines.    I want to know if I need a Canadian visa just to transit in Canada without going out at the airport?    I have my US visa but it expired six months ago. My nationality is Vietnamese.


How to remove one commit within some sequential commits in git

If I commit many changes, then I realize one of these commits is not correct. How could I remove just that commit. For example, below is the git log (with some arguments to make it easy to check), I commit 3 changes, and I want to remove the change from test2, also I want to remove the commit record from git log as well. How could I do that?  * 28b3c19 2014-10-21 | test3 [Xinyu Hou] * 73ca35d 2014-10-21 | test2 [Xinyu Hou] * 2785334 2014-10-21 | test1 [Xinyu Hou] * 9729226 2014-10-21 | cleaned up .gitignore   I hope the result could be something like below  * 28b3c19 2014-10-21 | test3 [Xinyu Hou] * 2785334 2014-10-21 | test1 [Xinyu Hou] * 9729226 2014-10-21 | cleaned up .gitignore   I tried git revert, apart from the conflict, it doesn't seem to remove the commit record in log.  Thanks, Jerry


Use the Inclusion-Exclusion Principle to show that for any non-negative integers $m, r, n$ such that $m≤r≤n$...

Use the Inclusion-Exclusion Principle to show that for any non-negative integers $m, r, n$ such that $m≤r≤n$,  $${n-m\choose{r-m}} = \sum_{i=0}^m(-1)^i {m\choose{i}} {n-i\choose{r}} $$   We have had one lecture on the Inclusion-Exclusion Principle and I am really unsure as how to approach this problem.We have done several permutation related exercises from this section but none that have been presented as a proof. Any help is appreciated.


AC-coupling capacitors for high-speed differential interfaces

Can you explain me why and where I should put AC-coupling capacitors (usually around 0.1uF) on high-speed (1...5 GHz) differential serial interfaces (like SerDes for Gigabit Ethernet SFP modules)?  From what I have read, the caps should be placed as close to receiver pins as possible. Any legit references are welcome.  [CHIP1 RX+]--||-------------[CHIP2 TX+] [CHIP1 RX-]--||-------------[CHIP2 TX-]             0.1uF   [CHIP1 TX+]-------------||--[CHIP2 RX+] [CHIP1 TX-]-------------||--[CHIP2 RX-]                        0.1uF   Thank you in advance  UPDATE:  Got a reply from the IC manufacturer and it advised me to put the caps closer to the transmitter. So it seems that the actual place depends on how the particular IC works. A while ago, there was a completely opposite advise from another manufacturer.


Delete files except n files with the "bigger" name?

I want to create a shell script that deletes old release files except last n files. In other words, only mantain last n releases when I deploy a new release.  File names have this format:  appname_releasenumber_date.tar.gz   Maybe there's an easy soluction to do this, but I cannot figure out how to do this.   I've found this solution  but I need to generate some files first in order to keep the number of files I want to.


What happens when a Hexed Ooze splits in two?

Many oozes have a reaction to split in two upon receiving slashing damage. If an ooze previously targeted by a Hex (or Hunter’s Mark) splits in two, what happens to the spell ?  1) Considered as if the initial target is dead (thus possible for the caster to transfer it as a bonus action to another foe)  2) Applied to both of the new oozes  3) Applied to one of the two new oozes, at random


I'm new to Ubuntu. I used Mint in the past ages ago. I decided to jump back to Linux and decided on Ubuntu because of newbie user friendly and support. Anyway, I'm currently dual booting macOS Big Sur and Ubuntu 20.04. I'm running a 2015 MBPro w/ AMD R9 390X.  My question is do I need to search and install AMD drivers? Or Ubuntu 20.04 has AMD drivers already installed? Thank you!


For positive integers $𝑛$, $𝑎$ and $𝑏$ with $𝑎𝑏 = 𝑛^2$ and $\gcd(a,b)=1$, show that $a$ and $b$ are squares

Let $𝑛$, $𝑎$ and $𝑏$ be positive integers such that $𝑎𝑏 = 𝑛^2$. If $gcd(𝑎, 𝑏) = 1$, prove that there exist positive integers $𝑐$ and $𝑑$ such that $𝑎 = 𝑐^2$ and $𝑏 = 𝑑^2$.    I'm a bit lost. I know that $1 = ac + bd$, and I can simplify $ab = n^2$ to $a = \frac{n^2}{b}$ and $b = \frac{n^2}{a}$, but I don't know where to go from there. I try substituting $a$ and $b$ but cannot figure out how to get that $a = c^2$ and $b = d^2$.


Outlook 2007 Contacts Tab Empty, but TO: field Populates Addresses

In Outlook 2007 when creating a new message I am able to type a letter or name in the "To:" field and have suggestions auto-complete. However, in the CONTACTS tab of Outlook 2007 there are no contacts listed at all. I am needing to EXPORT my contacts list (all the names and email addresses that show in the auto-complete "to:" field) to a new laptop and I'm switching to Thunderbird (Outlook 2013 is a mess to look at).  Where are these contacts stored that are auto-completed?  I have researched only to find answers of people having the reverse problem (contacts are in the CONTACTS tab but not showing up in the auto-complete).  I have also exported the .PST file and imported on another laptop with Outlook 2003, and no contacts are imported and the "to:" field does not have an auto-complete.


How to generate document with 6 grid images, chapter header and table of contents

I am trying to generate a booklet with a grid of 6 or less images in a grid, and a text caption below it.  I would like each page to display the chapter in the header, and have the table of contents link to the first page of the chapter.  This is the basic idea of what I'm after (it doesn't need to match the exact color scheme or anything):    This is my attempt at doing this:  \documentclass[12pt]{scrreprt} \usepackage[final]{pdfpages} \usepackage{hyperref} \usepackage{fancyhdr} \usepackage{graphicx} \usepackage{subfigure} \usepackage[letterpaper, margin=1in]{geometry}  \pagestyle{fancy} \lfoot{\today} \rfoot{\thepage} \cfoot{} \rhead{} \lhead{\leftmark}  \begin{document}\thispagestyle{empty} \clearpage\phantomsection \tableofcontents  \clearpage\phantomsection \addcontentsline{toc}{chapter}{Chapter 1} \begin{figure}[htbp] \subfigure[t=0]{\frame{\includegraphics[width=150px]{569J-12}}} \subfigure[t=10]{\frame{\includegraphics[width=150px]{80_Gas_Furnace}}} \subfigure[t=20]{\frame{\includegraphics[width=150px]{90_Gas_Furnace}}}\\ \subfigure[t=0]{\frame{\includegraphics[width=150px]{569J-12}}} \subfigure[t=10]{\frame{\includegraphics[width=150px]{80_Gas_Furnace}}} \subfigure[t=20]{\frame{\includegraphics[width=150px]{90_Gas_Furnace}}} \end{figure}  \includepdfset{pagecommand=\thispagestyle{fancy}} \end{document}   The following is what I get with this code:


how to print a string containing both single and double quote in php

I have have string  in php as follows:  shows that he/she is a firm believer in “If it ain’t broke, don’t fix it” or “leave well enough alone”        when I print this string it output something like this:  shows that he/she is a firm believer in â€œIf it ainâ€™t broke, donâ€™t fix itâ€ or â€œleave well enough aloneâ€  How can i print this exactly as the first one? is there any solution?


Full screen apps (games) cause screen to turn on and off, but only if computer ran overnight

The problem: Running any game in full screen causes the screen to turn on and off. It goes completely black for 1-2 seconds, then turns back on. This will keep happening at uneven intervals. Sometimes it will stay on for a minute or two, sometimes it will stay on for just a few seconds. Everything else continues to work while it's off - sound work, mouse and keyboard input works, etc. While the screen is on there are no visible issues - fps is steady, no video artifacts, etc.   The weird part: This only happens if I leave the computer running overnight. A restart fixes it every time and I've never experienced the issue within the same day that I've restarted or turned it on. There are also no issues with anything that's not full screen, exiting the game stops the behavior. It also doesn't happen if playing in windowed mode.  I've checked the event log and I don't see anything being logged when this happens. This is a desktop running windows 10 with a GeForce GTX 1070 in it that's connected via display port to a single monitor. I don't have any sort of sleep settings set up where the monitor, hard drives, or any peripherals turn off after X minutes, at least everywhere I've checked.  What are some troubleshooting steps I could take to try and narrow this down?


Is this inequality true ? How to prove it ? $\frac{1}{2}(e^x + e^{-x}) \leq e^{\frac{x^2}{2}} $

Is this inequality true ? How to prove it ?  $$\frac{1}{2}(e^x + e^{-x}) \leq e^{\frac{x^2}{2}}$$


How to convert a lengthy Word document to a single image?

In my Microsoft Word 2007 document there is a text format board. I want to convert this document to an image but can't take a screenshot of the entire file due to its length. How do I accomplish this?


First of all, let me tell you, I have gone through  which gave me the right answer about exceeding daily review limit of "Suggested Edit". But, in the same day I saw someone has exceeded the daily limit of "Low Quality Posts". As you can see, it is exceeded by 7.    Exceeding limit of "Suggested Edits" happened to me when I reached the daily limit before someone suggested an edit on my post and I approved it. As the question in the link says:      If someone suggests an edit on one of your own questions or answers, you can still approve or reject the suggested edit, even if you have reached the limit for the day. And it still counts as progress in the queue.   My question is : How this could happen in "Low Quality Posts". As you can see a moderator had reviewed 27 low quality posts on the same day. I guess everyone in SO (including moderators) has the same daily limit for reviewing.


$A$ is integrally closed if and only if $A_P$ is integrally closed for all maximal ideals $P$ of $A$.

I've managed [with help from the wonderful people lurking on this site :)] to prove that for an integral domain $A$, if $A$ is integrally closed, then $S^{-1}A$ is integrally closed for all multiplicatively closed subsets $S$ of $A$.  The problem that I want to apply this to is:     $A$ is integrally closed if and only if $A_{P}$ is integrally closed for all maximal ideals $P$ of $A$.   So far:  $(\Rightarrow)$ If $P$ is a maximal ideal of $A$, then $A\setminus P$ is multiplicatively closed, because maximal ideals are prime. So by the result mentioned above, $A_{P} = (A \setminus P)^{-1}A$ is integrally closed.  Update:  Attempting to prove the contrapositive.  Assume there is some $\frac{r}{s}$ in $F$ (the field of fractions of $A$) such that $\frac{r}{s}$ is integral over $A$ but not in $A$.  I feel like I haven't done hardly anything at all with your hint, but I suppose that I would want to somehow get a maximal ideal of $A$ from this $\frac{r}{s}$ such that $A_{P}$ is not maximal, thus proving the converse.


Very basic question.  Please show where I'm wrong in the following reasoning.  The movement of an object in function of time could be described as $$ x(t) = v t + x_{i} $$ if velocity is constant.  If velocity is not constant then $$ x(t) = v(t)\cdot t + x_{i} $$ where $$ v(t) = a t + v_{i} $$ with a being constant.  Now if I substitute $v(t)$ in $x(t)$ it results $$ x(t) = at^2 + v_it + x_i $$  But the general equation for an accelerated object is $$ x(t) = \frac{1}{2}at^2 + v_it + x_i $$  Where does the $\frac{1}{2}$ come from?


Will I die if I lose enough life to kill me from an effect that also heals me?

What happens if I dip below 1 life from an effect that will also heal me after the damage is dealt?  For example:   If I bolt myself while I'm at 3 or less with a  on the board? Will I die while at 3 or less if I -2 , targeting myself? Will I die if a creature with my  on it damages me? Will I die if I target myself with enough damage to 'kill' me with a ?   and so on and so forth. You get the idea. I'm pretty sure there's a relatively simple answer that I just don't know about.


command to show list all users and date the logged in

Which command to shows list of all users and date the logged in a Linux system. I have tried last -a but its not showing the list of all users and date the logged.


I already have a 'custom structure' for my 'Posts', e.g. example.com/newsarchive, so my 'Posts' follow: example.com/newsarchive/welcometonovember  Now I am expanding and created a new custom post type called: Movies  I want the permalinks for these items to be:   example.com/moviearchive/favouritemoviepost   However, at the moment I am getting:  example.com/newsarchive/moviearchive/favouritemoviepost   How can I change that?


We've got a few subdomains setup, and I want to simplify some apache configuration - particularly as these particular subdomains are volatile. Anyway, I'm trying to get a rewrite rule that include the host.  So far, I've got:  RewriteEngine On  RewriteCond %{HTTP_HOST} ^(.*).net.au$ RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%1.net.au$1 [R=302,L]   This is based on  and   However, the pattern in the first condition isn't written into the rewritten address, and I end up being sent to .net.au/wherever (wouldn't let me post with the https in front) - have I missed something?  Running apache 2.4 on Ubuntu 14.04


How to deal with a mix of binary and continuous inputs in neural networks?

I'm using the nnet package in R to attempt to build an ANN to predict real estate prices for condos (personal project). I am new to this and don't have a math background so please bare with me.  I have input variables that are both binary and continuous. For example some binary variables which were originally yes/no were converted to 1/0 for the neural net. Other variables are continuous like Sqft.    I have normalized all values to be on a 0-1 scale. Maybe Bedrooms and Bathrooms shouldn't be normalized since their range is only 0-4?  Do these mixed inputs present a problem for the ANN? I've gotten okay results, but upon closer examination the weights the ANN has chosen for certain variables don't seem to make sense. My code is below, any suggestions?  ANN <- nnet(Price ~ Sqft + Bedrooms + Bathrooms + Parking2 + Elevator +              Central.AC + Terrace + Washer.Dryer + Doorman + Exercise.Room +              New.York.View,data[1:700,], size=3, maxit=5000, linout=TRUE, decay=.0001)     UPDATE: Based on the comments below regarding breaking out the binary inputs into separate fields for each value class, my code now looks like:  ANN <- nnet(Price ~ Sqft + Studio + X1BR + X2BR + X3BR + X4BR + X1Bath         + X2Bath + X3Bath + X4bath + Parking.Yes + Parking.No + Elevator.Yes + Elevator.No          + Central.AC.Yes + Central.AC.No + Terrace.Yes + Terrace.No + Washer.Dryer.Yes          + Washer.Dryer.No + Doorman.Yes + Doorman.No + Exercise.Room.Yes + Exercise.Room.No          + New.York.View.Yes + New.York.View.No + Healtch.Club.Yes + Health.Club.No,     data[1:700,], size=12, maxit=50000, decay=.0001)   The hidden nodes in the above code are 12, but I've tried a range of hidden nodes from 3 to 25 and all give worse results than the original parameters I had above in the original code posted. I've also tried it with linear output = true/false.  My guess is that I need to feed the data to nnet in a different way because it's not interpreting the binary input properly. Either that, or I need to give it different parameters.  Any ideas?


If one wishes to add "non" in front of a hyphenated adjective, should one add a hyphen after "non?"


How many integers less than $1000$ can be expressed in the form $\frac{(x + y + z)^2}{xyz}$?

How many integers less than $1000$ can be expressed in the form $$\frac{(x + y + z)^2}{xyz}$$ where $x, y, z$ are positive integers?


I'll be landing at Roissy (Charles de Gaulle) airport in Paris at 9:40 tomorrow (a Saturday) and leaving on another flight from Orly at 13:35 (latest check-in 13:15). That gives about 3.5 hours, including getting off the plane, collecting bags, getting out of the airport, delays, and so on.  What are my options for transferring between airports?  How long do they take and how much do they cost?  Do you think there's enough time to pop out somewhere in the city for a quick coffee and baguette or to sit in a park? Where?


Does using @user in a question or answer send an inbox-notification to that user?

Let's see if anyone can answer this in under 4 seconds. I know a notification is sent by using @user in a comment, but what about questions and answers?  I was going to make a fake user and message myself to try it, but I figured a question is the more acceptable way to find out the answer.


If you're traveling on a US passport leaving Dubai returning to the USA with a 2 hour layover changing planes in Doha, Qatar, do I need a Transit Visa?


There are 26 red cards and 26 black cards on the table which are randomly shuffled and are facing down onto the table. The host turns up the cards one at a time. You can stop the game any time (even at the beginning of the game). Once you stops the game, the next card is turned up: if it is red, you get $1; otherwise you pay the host one dollar. What is the payoff of this game?


Show that there exists a constant $c$ such that $\left|\int_0^b\frac{\sin ax}{x}dx\right|\le c$

Show that there exists a constant $c$ such that $$\left|\int_0^b\frac{\sin ax}{x}dx\right|\le c$$ In fact, show that the smallest such number is $c=\int_0^\pi\frac{\sin x}xdx$.    Well, I'm thinking of a change of variable $y=ax$, and we want to show $\left|\int_0^B\frac{\sin x}xdx\right|$ is bounded. Then consider the intervals $[n\pi,(n+1)\pi)$ for natural number n. Thank you.


how to convert string into JSON in javascript

I am trying to convert the below string value to JSON:  var yourmsg =  '{"yourid":{"latlng":[123,456],"data":{"id":2345," name ":" basanta ","status":"Available"}}}';   Please help me out.


difference between printf and println in java?

Just came to know that java does has a method named printf, then what is the difference between printf & println?


Determine if string is in list in JavaScript

In SQL we can see if a string is in a list like so:  Column IN ('a', 'b', 'c')   What's a good way to do this in JavaScript? It's so clunky to do this:  if (expression1 || expression2 || str === 'a' || str === 'b' || str === 'c') {    // do something }   And I'm not sure about the performance or clarity of this:  if (expression1 || expression2 || {a:1, b:1, c:1}[str]) {    // do something }   Or one could use the switch function:  var str = 'a',    flag = false;  switch (str) {    case 'a':    case 'b':    case 'c':       flag = true;    default: }  if (expression1 || expression2 || flag) {    // do something }   But that is a horrible mess. Any ideas?  In this case, I have to use Internet Explorer 7 as it's for a corporate intranet page. So ['a', 'b', 'c'].indexOf(str) !== -1 won't work natively without some syntax sugar.


How to make menu-bar auto-hide/appear faster?

There is a 0.5s delay and then the animation starts to roll the menu bar down. I know it doesn't sound a lot but in practice it gets annoying when I multitask and trying get tasks done fast.  Is there a way to remove the delay and trigger the animation instantaneously? Also, is there way to make the animation faster, or perhaps disable it?


Problem with fancyhdr aligned text and show

I am using the package fancyhdr to edit the header of my Phd Thesis. I want the header to contain on (say) odd pages something like  "CHAPTER 2. This is the second chapter" aligned to the left,  while on even pages something like  "2.5. This is the fifth section of the second chapter" aligned to the right.  So far, with the settings below, I manage to have the "CHAPTER 2. This is the second chapter" on both odd and even pages, with correct alignment.  I know it has to do with LE,RO and similar, but every time I change something, this results in both the Chapter title and the Section title to appear simultaneuosly on both even and odd pages with alignement switched  (odd pages have chapter title on the left and section title on the right, while even pages have chapter title on the right and section title on the left) The commented      \renewcommand   and      \fancyhead   lines are my tries at achieving this,  but when doing this I get an error like "undefined control sequence "section"..." pointing to the first section of the whole document.  how can I modify my fancyhdr settings in order to achieve what I want?      \documentclass[12pt]{book}     \usepackage[dutch,english]{babel}     \usepackage{graphicx}     \usepackage[T1]{fontenc}     \usepackage[utf8]{inputenc}     \usepackage{lipsum}     \usepackage[a-1b]{pdfx}     \usepackage{verbatim}     \usepackage{amsfonts}     \usepackage{lineno}     \usepackage{hyperref}     \usepackage{subfigure}     \usepackage{mathrsfs}     \usepackage{wrapfig}     \usepackage{lscape}     \usepackage{array}     \usepackage{rotating}     \usepackage{feynmp}     \usepackage{ifpdf}     \usepackage{indentfirst}     \DeclareGraphicsRule{*}{mps}{*}{}     \usepackage{epsfig}     \usepackage{fancyhdr}     \pagestyle{fancy}     \fancyhead[LE,RO]{\textsl{}}%\small\rightmark}}     %\fancyhead[LE]{\textsl{}}%\small\rightmark}}     %\fancyhead[RO]{\textsl{\small\leftmark}}     \renewcommand{\chaptermark}[1]{ \markboth{\MakeUppercase{ \chaptername}\ \thechapter. \ #1}{}}     %\renewcommand{\sectionmark}[1]{ \markleft{\MakeUppercase{ \sectionname}\ \thesection. \ #1}{}}     \fancyfoot[C]{\thepage}     \begin{document}     \chapter{First Chapter}     \lipsum     \section{First section of first chapter}     \section{Second section of first chapter}     \end{document}


I want to lengthen the double vertical line

I need to use the symbol ||\frac{1}{2} W||_F.  I know if lengthen a vertical line, i can use the command \big|. But how to lengthen the double vertical line ||?


If $T^m(\alpha)=0,$ with $\alpha \in V$ and $m \in \mathbb{N}$, then $T(\alpha)=0$

I am not so sure how to prove this exercise, please help me:  Let $V$ be a finite dimensional vector space with inner product $\langle,\rangle$. Let $T$ be a linear normal operator on $V$, then:  If $T^m(\alpha)=0,$ with $\alpha \in V$ and $m \in \mathbb{N}$, then $T(\alpha)=0 $


Finding Global Inverse of $ f(x,y,z)= \left( \frac{x}{a+x+y+z}, \frac{y}{a+x+y+z}, \frac{z}{a+x+y+z} \right).$

Let $a\in \mathbb{R}$, $a\neq 0$, and $E=\{(x,y,z)\in \mathbb{R}^3:a+x+y+z\neq 0\}$ and $f:E\rightarrow \mathbb{R}^3$ defined by  $$ f(x,y,z)= \left( \frac{x}{a+x+y+z}, \frac{y}{a+x+y+z}, \frac{z}{a+x+y+z} \right).$$  Compute the inverse of $f$.    I know I can use the Inverse Function Theorem to show local invertibility, however, that does not necessarily imply global invertibility. Thus, even though I can invert the Jacobian of the function, it does not follow that I can recover the inverse function from its Jacobian. Therefore, I have no idea what to try for this problem. Could you please provided a small hint on something to try for this problem? Thank you in advance.


When using xrightarrow, I sometimes gets weird artifacts on the arrow: it looks like the arrow is somewhat "doubled" in the middle. But this only happens when zoomed out; when I zoom in very close, the artifact disappears. This happens with all the PS and PDF viewers that I've tried.  \documentclass{minimal} \usepackage{amsmath} \begin{document} $\xrightarrow{\quad}$ \end{document}   Result (for SumatraPDF when compiled as a PDF, the results are similar if not identical for other viewers, PDF and PS alike):    Here I just put space to make the arrow longer, but it happens no matter what I put on the arrow. Is there a way around this issue, or an alternative to xrightarrow?


I created a temp table which resides in the temp table folder. The problem is the name is unacceptably long which make it almost impossible to efficiently work on querying some field from it. Is it any way to have a shorter name like db.#SPR1 instead of the long one as below?   dbo.#SPR1_______________________________________________________________________________________________________________000000003A3E


How to delete files owned by other users windows 7?

I have an external hard drive that I used to install programs on, I have since formatted my c drive and use the external drive as a storage only drive. There are however two remnants left over from the previous install on the external hd.  One is a folder full of Windows update files and the other is a Program files folder. I tried to delete the folder but it would give me the "need permissions" dialogue box and would then tell me I need permissions from user "S- ... #####". I did an ownership change on the folder and sub folders/files but that didn't work. Its still says I need permission from the new owner, even though I am the owner ... it does not make any sense. I cannot format the drive either as I have other files on it.   How can I force these folders to deletion?


How to merge multiple query sets in DJANGO

I have to merge the querysets below in a single list:      result_list_1 = Col.objects.defer("tags").filter(producer__username__icontains=crit)  result_list_2 = Col.objects.defer("tags").filter(name__icontains=crit) result_list_3 = Col.objects.defer("tags").filter(description__icontains=crit) result_list_4 = Col.objects.filter(tags__name__icontains=crit) ...   Each result_list contains items, which have a unique numeric id I can use to make sure there are no dups.  I can't use | while querying the DB or Q objects.   How do I merge the resulsets in one single list?