javascript strange comparison of strings

I have an ajax function that sends an email to somewhere and receives a response from the server from a json object with type = either success or error  $("#submit_btn").click(function(event) {      event.preventDefault();      var post_data = {         'email': $("#email").val()     };     $.post( "sendEmail.php", post_data ).done(function(response){         if(response.type == 'success'){             $("#sentmail").fadeIn("slow")             setTimeout(function(){                 $("#mail").val("Enter your email here");                  $("#sentmail").fadeOut("slow")               },3000);         }         else{             $("#sentmailfail").fadeIn("slow")             setTimeout(function(){                 $("#mail").val("Enter your email here");                  $("#sentmailfail").fadeOut("slow")               },3000);         }     },"json") });   The interesting part is that if I console.log(response) I get for instance {"type":"success","desc":"something"} and then straight after that console.log( (response.type == "error") ) // TRUE  if I take the consoled log from response and assign it to a variable for instance a = {"type":"success","desc":"something"} then a.type == "error" is false.  Can someone explain this?


<?php function CreateDatabase($username, $database) { global $con; if($con) {     $createdatabase = $con -> prepare("                                               CREATE DATABASE ?");     $createdatabase -> execute(array($database));     $createdatabase = $con -> prepare("                                         GRANT ALL                                          ON                                              ?.*                                          TO                                               ?@'localhost'");     $createdatabase -> execute(array($database, $username));     $createdatabase = $con -> prepare("                                         FLUSH PRIVILEGES");          $createdatabase -> execute();     return true; } return false;   }   For some reason this code won't run the way it should. I quadrupled checked that the strings $username and $database are correctly passed on.  Can you see any errors here? Any hints, tips on how to resolve this? Just started learning PDO today, so if I'm doing it wrong or do it in a bad practice, please tell me.  I'm creating a database management system for my clients, where they can create a user if it doesn't already exist, then create a database and look over the info. If anyone is interested in helping out finishing it, I would be most grateful!


How to shallow copy of a list given as generic without knowing the items generic type parameter?

I got as far as: T clone(T source) {     if(source != null && source.GetType() == typeof(List<>))     {         Type listType = source.GetType();         Type listElemType = listType.GetGenericArguments()[0].GetType();         var listClone = (T)Activator.CreateInstance(listType.MakeGenericType(listElemType));         ...         return listClone;     }     ... }  Now, how to fill the clone? As I said, I just need a shallow copy. Thanks.


Did I correctly derive this recurrence equation formula

I started with the recurrence equation $\space\space  x_{n+1}=ax_n+b \space \space$ and turned it into the formula at the bottom to allow us to find the value of any nth term in the form $\space \space x_n=f(n)$  Here is how I derived my formula for $f(n)$:  $$x_0=x$$ $$x_1=ax+b$$ $$x_2=a^2x+ab+b$$ $$x_3=a^3x+a^2b+ab+b$$ $$x_n=a^nx+a^{n-1}b+a^{n-2}b...a^2b+ab+b$$ Refer to the geometric progression equation: $$\sum_{k=1}^{n}a^{k-1}b=\frac{b(1-a^n)}{1-a}$$ $$x_n=a^nx+\frac{a^nb-b}{a-1}$$ $$x_n=\frac{a^{n+1}x-a^nx+a^nb-b}{a-1}$$ $$x_n=\frac{a^n(ax-x+b)-b}{a-1}$$ Final simplification and substitution of $x_0=x$ $$x_n=\frac{a^n((a-1)x_0+b)-b}{a-1}$$ Side Note: This idea originally came from problems I encountered in the Collatz Conjecture, eventually leading to create a general formula. Could this potentially be helpful to have other than my own personal use?


Can I use a lens for Canon EF mount on an EF-S camera body?

Just a quick question (not too open ended).  Is the Yongnuo YN 50mm f/1.8 Lens for Canon EF compatible with the Rebel T2i (550D)? And if so, would you recommend the lens?  Thanks in advance for any help.


Is it possible to have one or more extra TZs in the status bar, as I'd asked  (that was for Unity, though, so it's not a dupe).


SEO: How to stop specific sections of a page from being crawled?

I would like to display customer reviews from another website (with their agreement) own my own site for certain product pages.   Using these 3rd party reviews would be helpful for users, though there's an issue with duplicate content as I'll be republishing these reviews from the other website.  I don't want to noindex the whole page as many of these product pages already rank well.  One option I'm considering is to place the review content in an iframe and then block the iframe's URL in the robots.txt, though I'm unclear as to whether this would be frowned upon by search engines.  Is there a best practice, recognized and accepted by Google, for noindexing or blocking crawling of certain sections of a page?


If the brain stem is left intact, does severing the head from a zombie render it harmless, or would it become a lurker?

In Romero's zombie lore, destroying a zombie's brain kills the zombie. Merely severing a zombie's spine won't kill them. If you severed the head from a zombie, and the neck was still attatched to the zombie's head (leaving the brain stem undamaged), would it make the zombie's head dead, or would the head remain undead? Put another way: Would the severed zombie head with its neck still connected be a zombie lurker?


How can I verify my root password, when I know it but I need to check it?

I know my password on my server, but is there a command to check the password?  I can't use ssh because my ssh key is already copied, so is not useful.  I need something to ask me for the root password, and then tell me if it's wrong or not.   The question is not about checking whether a password is valid or right, but if the password is the real password, because when you login with ssh keys, you don't really use the password.


I tried in this way.$\tan(a+b)=\frac{(\tan a + \tan b)}{1 - \tan a \tan b }$value of $\tan \frac{\pi}{7}$ is coming in decimal.what to do


Did the Enterprise, Voyager or DS9 have a cleaning crew and janitorial staff? Or is it like the Japanese where everyone would devote time to clean? Or do you think they use the transporters to beam the dirt off ship or whatever mess they have to clean at the time? I wonder if they had space age Roombas like in Star Wars.


Let $k$ be a ﬁeld and let $A$ be a $k$-algebra. Denote by $End_A(A)$ the set of all $A$-homomorphisms of the regular $A$-module $A$ into itself. Fix $a ∈ A$, and deﬁne the $A$-module homomorphism $r_a : A → A$ by $r_a(x) = x*a$.  $\\$ Show that $End_A(A)$ = {$r_a$ | $a ∈ A$}  $\\$ Answer: $\\$ Obviously I can see that, for any $a$ we have $r_a$ is in $End_A(A)$, but how do I go about the other direction? Namely why is it that any endomorphism at all has this very simple form? I just don't see it...


Given a debian package name, how do I get a URL to the latest .deb URL?

Say for example I wish to install the latest Debian package "libgcc1" for Jessie on AMD64.  How can I determine the correct URL to download from    For example, in this case, clicking manually through the  website gets me ultimately to the correct download, which is:    IMPORTANT NOTE: I do NOT have apt available. I am writing some code that manually extracts the dependency names from .deb packages, but I am now stuck trying to work out the next steps, which is to get the correct actual .deb package for the package name.  So for example I need to go from these bits of information:   package name: libgcc1  version: latest  architecture: amd64  debian release: jessie   to:    How can I determine this relationship?  EDIT: for all the people asking "Why not use apt?", the answer is that the core problem I am trying to solve is to install apt. I can't use apt because I am trying to install apt.  thanks


Let $a_1, a_2, ..., a_k$ are real numbers greater thah $1$. Prove that   $$\frac1{1+a_1}+\frac1{1+a_2}+...+\frac1{1+a_k}\ge\frac k{1+\sqrt[k]{a_1a_2...a_k}}$$   I have this inequality proved by Sturm's method. Is there another way? May be  Jensen's inequality.


As a module developer, how do I handle outputting user defined strings with regards to translatability?

A module I maintain is introducing the ability to customize some messaging that is output to users on the site. Up until now, that messaging has been hard-coded and output using the TranslatableMarkup class. I'm now allowing these strings to be customized in configuration.  Is it still appropriate to just dump whatever the configured string is into the TranslateMarkup class? It seems like I should not do that.  I found this  that seems to be related to what I'm discussing, but there's no clear conclusion on what to do.


If I'm not sure about the gender of Brown may I write "Brown was merry and their cat was sad"?

If I'm not sure about the gender of Brown may I write:     Brown was merry and their cat was sad.   ... ? I met such a construction in "Harry Potter", but I don't know whether native speakers are happy with it.  In particular, is it ok to use they after we have actually used the name of a specific individual and it is clear that the case in point is a single person?


How do I troubleshoot screen configuration failure on a new install?

I installed Ubuntu on a 2008 MacBook Pro yesterday and can't get any display or x server booted. I can boot from the CD into rescue mode, so I can see that:    The syslog has an error, GdmLocalDisplayFactory: maximum number of X display failures reached: check X server log for errors In /var/log/Xorg.1.log (and the other Xorg logs) I see "Fatal server error: [27.266] (EE) no screens found(EE)"  Earlier in the log out also says "screen 0 deleted because of no matching config section." several times. It also says "Screen(s) found, but none have a usable configuration."    I'm guessing there's a ... screen configuration issue? But I don't know where to start troubleshooting it.  Note: I did discover  which I walked through, but holding down right-shift doesn't do anything. It just lands me in a silver screen (light grey, I guess) with an arrow cursor and nothing else.   I can boot to rescue mode from the CD,


How do I hide a community from my network profile?

I want to hide an account from my .  I would like to reference my Stack Exchange profile in a professional setting. I do not want one of my accounts publically displayed for employers to see.   I've heard that it's possible to add accounts to a list of hidden communities, but I haven't been able to find any way to add them from my network profile page.  How can I hide a community from my Network Profile?


This is a question taken from some notes, and I do not know how to solve it, nor I know how to start. Can anyone help me?  Prove that $|E| \geq \lfloor \frac{|V|}{2} \rfloor ^2 $ implies the graph $G$ has at least one triangle.


type=button and type=submit with pressing enter

I noticed that when I create a button with type=button (on an example login button) to script it with JavaScript without refreshing the page, then I can't press Enter to move forward.  Is there a workaround?


I want to send an email attaching a file from the FTP folder. I have set up an automation that includes several steps SQLactivity- data Extract- transfer activity - Send email. How can I attach the file in send email?


I haven't been able to do this exercise:     Let $f: A \rightarrow B$ be any function. $f^{-1}(X)$ is the inverse   image of $X$. Demonstrate that if $f$ is surjective then $X = f(f^{-1}(X))$ where $X \subseteq B$.   Since $X \subseteq B$, all the elements in $X$ belong to the codomain of $f$.  Since $f$ is surjective, it means that all elements in the codomain $B$ have some preimage in $A$. Given that $X \subseteq B$, all elements in $X$ must also have a preimage in $A$.  Have $\triangle = f^{-1}(X)$, $\triangle$ is now a set containing the preimages of the elements in $X$. Because of this, $\triangle \subseteq A$.  If we evaluate $f(\triangle)$, we...... nope, I don't know what I'm doing now.    What do you think?


Integrating a function wrt different measures

Suppose that $(\Omega, \mathcal E, P)$ is a probability space and $X\colon \Omega \to \mathbb R$ is a RV defined on $\Omega$. Denote as $\mu\colon \mathcal B \to [0,1]$ the probability measure on $\mathbb R$ defined as $$\mu(I)=P(X^{-1}(I)).$$  Suppose that $\mu << dx$, by Radon-Nikodym theorem there exists $f \colon \mathbb R\to [0,+\infty]$ ($f$ is exactly the PDF of $X$) such that $$\mu(I)=\int_I f(x)dx.$$  Is it correct that, given $g\colon \mathbb R \to \mathbb R$, $$\int_\mathbb R g d\mu=\int _\mathbb R g(x)f(x)dx?$$ And if it is, why?


For infinite products I know the following theorems:  Theorem I. If $a_n \geq 0$ for all $n$ then $\prod (1+a_n)$ converges if and only if $\sum a_n$ converges.  Theorem II. If $-1 < a_n \leq 0$ for all $n$ then $\prod (1+a_n)$ converges if and only if $\sum a_n$ converges.  My question is what are necessary and sufficient conditions (possibly including more restrictions than in I and II) for $\prod (1+a_n)$ convergence/divergence as related to  $\sum a_n$ convergence/divergence  if the sequence of terms $a_n$ can switch signs repeatedly but always stay greater than $-1$.  I already know the trivial equivalence of $\prod(1+a_n)$ and $\sum\ln(1+a_n)$.


After upgrading to 15.04, I have had lots of fun getting to know systemd. I think I have everything working except I am unable to stop mysql.service; the systemctl command just hangs and mysql just keeps on running. Has anyone else experienced this or might know what's going on?


Video lectures on graduate level Classical Electrodynamics

This is a rather broad question. Does anyone know of good video lectures for graduate level classical electrodynamics?


How can I have a significant overall F-test but any significant P values for the individual coefficients? Graphical intuition, please?

From :     Typically, if you don't have any significant P values for the   individual coefficients in your model, the overall F-test won't be   significant either. However, in a few cases, the tests could yield   different results. For example, a significant overall F-test could   determine that the coefficients are jointly not all equal to zero   while the tests for individual coefficients could determine that all   of them are individually equal to zero.   Could you please provide a graphical and/or real life example?


-I'm looking for an introductory books in "Graphic Designing" for beginners, Please help!   A little note to Admins: If the post violates your rules... Kindly, Edit it to be in keeping with the rules... Instead of, Putting it [on Hold]... BTW, I don't mind.


This is from a c# .net (.aspx.cs) file associated with an aspx file. Why is "this" ok but "this" (in another method) is not? i included a snapshot image  to show the red line in the second method to show that the compiler does not like what does not show an error in the first method.


How are stock market gains treated within an inherited IRA (when I eventually distribute)?

I inherited my mother's inheritable IRA in 2011; present value $200k. I'm now 60.  I've been buying and selling mutual funds within the IRA, making a little profit, and also buying a specific stock.  If the stock hits really big this year, I want to sell it and distribute it from the IRA. Will it be taxed as ordinary income?


I want to render a scene where light shines through a ball with holes so I get a dot-pattern similar to a disco ball. (see pictures) The problem I have at the moment is that my render is very noise and I just can't find a way to get rid of it. I tried quite a lot of different "solutions" that are supposed to fix it but with no success. Using more samples also doesn't really help. (I'm using 500 samples) I hope someone can help me with it.  I uploaded the pictures here:  and the .blend file here:   (I couldn't use blend-exchange because the file was to big)


I'm using the Wrox WordPress plugin development book as a primary reference for getting started with a new plugin and I understand all settings can be saved as 1 array but the book does't give an example of this and all the stuff I'm finding on the web seems so different from one example to another. The second half of a  gets me close but I'd really like to see a more complete example with multiple fields.


Disable HTTPS for a domain that shares IP with another domain that is under HTTPS

I am running into a weird problem trying to disable HTTPS for one domain, but the other domain has HTTPS. They both are different websites running on a dedicated server, sharing the same IP address for the domains.  However, I have a domain that does not have a SSL certificate, but the other does. I want to disable HTTPS for the non-certified domain while leaving the other domain with HTTPS on.  I have two different separate vhosts in /etc/nginx/sites-enabled/,   domain1.org (no HTTPS)  server {      listen                      80;     server_name                 www.domain1.org domain1.org;     root                        /var/www/domain1.org;     index                       index.html index.php index.htm;      error_log                   /var/www/logs/domain1.errors.log;      [ ... ]   domain2.com (with HTTPS)  server {      listen                      443 ssl;     server_name                 domain2.com www.domain2.com;      # INCLUDE SSL CERTIFICATE     include                     sites-enabled/domain2_ssl_include;       root                        /home/domain2/www/www;     index                       index.html index.php index.htm;      [ ... ]   I've included a listener to the port 443 for domain1.org, but once I do that, I get an aborted error from Firefox saying (when accessing ):     This Connection is Untrusted      You have asked Firefox to connect securely to domain1.org, but we can't confirm that your connection is secure.   I opened the technical data, it appears that the domain1.org is using the domain2.com SSL certificate:     domain1.org uses an invalid security certificate.      The certificate is only valid for the following names:    *.domain2.com , domain2.com        (Error code: ssl_error_bad_cert_domain)   So I added this to domain1.org vhost configuration:  server {      server_name                 domain1.org www.domain1.org;      listen                      443 ssl;      rewrite ^ http://domain1.org permanent; }   Which still gets me prompted with the Firefox error.  Now... when I access to , I get an 400 error from nginx saying this:     400 Bad Request      The plain HTTP request was sent to HTTPS port   I am not entirely sure what to do, disabling the https with ssl off; has no effect. How can I actually disable HTTPS for domain1.org but not for domain2.com?  I am using Ubuntu 12.04 running nginx 1.2.6.


Food safety after pork loin left in crock pot that was turned off

Possible Duplicate:          I cooked about 2lbs of pork loin in the crock pot for 8 hours on low last night.  It was on low from 12:00am to 8:00am.  From 8:00am to 12:00pm, the crock pot was turned off, and at 12:00pm the food was 'warm' but above room temperature.  Is this still safe to eat?  The crock pot was covered, but its anyones guess (guestimating using some math) how long the loin was at the safe high temperature.  I immediately threw it in the refrigerator, but if I do keep it, should it be brought up to 135°F asap?  I'm waning towards throwing it out.  My wife is pregnant, and we have small children in the house too.


I am new in the programming world and I am stuck with a simple if statement I have some enviroment variables given by gitlab, and i have some if statment and depending of the variable value it will be deploy to Openshift import os  if (os.environ['CI_JOB_STAGE'] is 'master'):     #deploy to Openshift master (Production enviroment  )     print(os.environ['CI_JOB_STAGE'])  if (os.environ['CI_JOB_STAGE'] is 'test'):     #deploy to Openshift test(Test enviroment )     print(os.environ['CI_JOB_STAGE'])   but the above code doesn't return anything. Anyway I print out  the current os.environ['CI_JOB_STAGE'] variable to check its value and I got this print(os.environ['CI_JOB_STAGE']) Output : test That means the variable is not empty but I do not understand why the if statement does not return anything


Why, after seeing Rogue One, in New Hope, does Leia send the plans to Obi-wan and not just send R2 back to the Alliance.


How to perform an operation at a specified rate

I have a function that I want to call, say, 10 times per second. I start out with code like this:  while True:     the_operation()     time.sleep(1.0/TIMES_PER_SECOND)   This works ok but the_operation is called slightly less often than desired, because the time to do the operation itself. We can make the code look like this instead:  while True:     t = time.time()     the_operation()     time_to_sleep = 1.0/TIMES_PER_SECOND - (time.time() - t)     if time_to_sleep > 0:         time.sleep(time_to_sleep)   This is better, but still not good enough -- the time to execute the loop is not considered, and if the_operation happens to take significantly longer than 1/TIMES_PER_SECOND in one iteration, our throughput will be too low. The operation on average takes less than 1/TIMES_PER_SECOND, but the code needs to handle the cases where it does take longer.  What is a good pattern for calling the_operation at the specified rate?


Motivation  I often need to reinstall different operating systems on different computers. Instead of having to download the OS from the NET each time, I would like to save it on the USB. Then I could plug the USB stick into PC, boot from USB (with the help of BIOS settings), and install the OS. It would also help me to quickly reinstall my own OS, if something gets corrupted (that has already happened to me).  At boot time I want to have an option of selecting which OS to load from USB, just as I have an option of selecting which OS to load from disc.  The reason why I want to have everything in one place is because I have a nice tiny USB stick, which has 32 GB of storage, and which can be easily carried in my wallet.  What's done so far  I succeeded installing a single OS into Kingston Data Traveler 32GB USB stick. After changing the boot order in BIOS settings, everything works.  Now I want to try install multiple OSes using another Windows program called YUMI.  My BIOS boot order is: USB FDD, USB HDD, USB CDROM, HDD1, Ubuntu, Windows, [rest]. When I use YUMI to make a multi OS USB and try to install the same OS as before (just one OS so far but using YUMI program now), the problem occurs. The BIOS no longer recognizes that the USB stick contains OS, and therefore prevents from booting into it. What happens is that the standard boot menu appears with Linux and Windows available, and nothing more, just as it would appear without any USB stick connected.  One of the 2 possible reasons I believe this could happen is:    Kingston Data Traveler USB does not have an option to contain multiple OSes. The OS is stored in the USB using the wrong format: some path to the OS directory is missing, or whatever.    Questions  Is it possible to have multiple OS'es on Kingston Data Traveler? Do you think the problem could be one of the 2 above? How to solve it?


Why does storing a long exposure photo take almost as long as the exposure time itself?

Last night I took some night sky shots, and I've noticed that with long exposure times (15s, 30s) the time it took to store the images in the camera memory card (jpeg) took roughly as long?  The actual file size is fairly small at 1 to 3MB per file.  Any idea why this is?


Enable & Disable a Div and its elements in Javascript

I am looking for a method to Enable and Disable the                                           div id="dcalc" and Its children.

   I want to Disable them at loading the page and then by a click i can enable them ?  This is what i have tried   document.getElementById("dcalc").disabled = true;


I was in argument with someone who claims that length contraction is not "real" but only "apparent", that the measurement of a solid rod in its rest reference frame is the "real length" of the rod and all other measurements are somehow just "artificial" and "apparent". Seemed to me like a bad conversation about poorly defined words and not really relevant to physics, but then some quotes were offered:  ...so that the back appears closer to the front. But of course nothing has happened to the rod itself.  (Rindler)  The effects are apparent (that is, caused by the motion) in the same sense that proper quantities have not changed.  (Resnick & Halliday) At the same time, the  insists that length contraction and time dilation are "real", with observable consequences:  Time and space dilation are often referred to as ‘perspective effects’ in discussions of STR. Objects and processes are said to ‘look’ shorter or longer when viewed in one inertial frame rather than in another. It is common to regard this effect as a purely ‘conventional’ feature, which merely reflects a conventional choice of reference frame. But this is rather misleading, because time and space dilation are very real physical effects, and they lead to completely different types of physical predictions than classical physics. [...] However, this does not mean that time and space dilation are not real effects. They are displayed in other situations where there is no ambiguity. One example is the twins' paradox, where proper time slows down in an absolute way for a moving twin. And there are equally real physical effects resulting from space dilation. It is just that these effects cannot be used to determine an absolute frame of rest.  I went through a lot of Einstein, Minkowski and Lorentz original material, and didn't find anything about what is "real" and what is not. Finally, I know about muons, where the effects of SR seem to be very real (from , but I had seen it in a physics class before):  When a cosmic ray proton impacts atomic nuclei in the upper atmosphere, pions are created. These decay within a relatively short distance (meters) into muons (their preferred decay product), and muon neutrinos. The muons from these high energy cosmic rays generally continue in about the same direction as the original proton, at a velocity near the speed of light. Although their lifetime without relativistic effects would allow a half-survival distance of only about 456 m (2,197 µs×ln(2) × 0,9997×c) at most (as seen from Earth) the time dilation effect of special relativity (from the viewpoint of the Earth) allows cosmic ray secondary muons to survive the flight to the Earth's surface, since in the Earth frame, the muons have a longer half life due to their velocity. From the viewpoint (inertial frame) of the muon, on the other hand, it is the length contraction effect of special relativity which allows this penetration, since in the muon frame, its lifetime is unaffected, but the length contraction causes distances through the atmosphere and Earth to be far shorter than these distances in the Earth rest-frame. Both effects are equally valid ways of explaining the fast muon's unusual survival over distances.  So which is which? Why do Rindler, Resnick & Halliday use the word "apparent"?


How to Reset Sharepoint 2010 Web Analytics reports

I have been testing Sharepoint Foundation 2010 web application, now its time to move site to Live. Customer is asking to reset the web analytics counter to 0. I tried stopping web analytics data processing service and Web Analytics Web service. They both stopped sucessfully and started sucessfully, but data still exists in site collection.   Any ideas on how to complete this task.  Thank You


$f(X)$ is uncountable and hence $X$ is uncountable.

My question: let $f : X \to \Bbb R$ be a non-constant continuous function on a connected metric space and assume that $f(X)$ is uncountable; then $X$ is uncountable.  We know continuous image of a connected metric space is connected. Since connected space in $\Bbb R$ are intervals and the function is non-constant continuous function so $f(X)$ is an interval in $\Bbb R$ and hence uncountable.  Is the proof correct?? How does it follows that $X$ is uncountable?


How to see python symbolic names of objects on cursor hover of menu items in Blender 2.8

in Blender 2.79 one could hover over a UI element and see the symbolic python name of said element. How would one accomplish the same with Blender >= 2.8?


when I copy a pose (ctrl + c) and then flip it with this shortcut(shift+ctrl+c) the I see some weird result don't know why.    then this happens after I've pasted it    You can check the  if you want. I've uploaded it in my google drive.


I have ubuntu 18.04 running on lenovo P53s(5.3.0-59-generic). I have Bose QC 35 II headset paired using bluetooth. The audio is working good, but I am facing a problem when trying to use them as input device. I have two profiles listed for audio output: High Fidelity Playback (A2DP Sink) and Headset Head Unit (HSP/HFP). The former has much better audio quality. If I go to Sound Settings my headphones are listed as input device (I have two options - Internal Microphone - Built-in Audio and Bluetooth input - Bose, the former is selected). However selecting the headphones as input device automatically changes the profile of audio output to Headset Head Unit (HSP/HFP).  This profile results into significantly worse quality of the audio and also I hear the message Call from from time to time. If I try to change the audio profile back the input device also changes back. I would like to be able to use the microphone and at the same time use High Fidelity Playback (A2DP Sink) audio profile. Is this possible?


how do you prove that $A\times (B\setminus C) = (A\times B) \setminus (A\times C)$?

This is what I have come up with so far, but I am rather lost at lines 3-4...  $$\begin{align} (a,b)\in A\times (B\setminus C)\iff& a\in A \land b\in (B\setminus C)\\ \iff& a\in A \land (b\in B \land \lnot(b\in C))\\ \iff& (a\in A \land b\in B) \land (a\in A \land b\notin C)\\ \iff& (a\in A \land b\in B)\setminus (a\in A \land b\in C)\\ \iff& (a,b)\in (A\times B)\setminus ((a,b)\in A\times C)\\ \iff& (a,b)\in (A\times B)\setminus (A\times C) \end{align}$$


How to combine Bash's read with HERE-document when shopt -os errexit is in place?

I am trying to make use of the solution presented in one of the answers of   In Bash version 4.2.47(1)-release when I execute the following code it prematurely exits because read fails when it encounters EOF:  shopt -os errexit  function foobar {     local desc=     read -d '' -r desc <<EOF bla bla EOF     echo "$desc" }   In order to return success if read fails at EOF I have rewritten the line as read -d '' -r desc || true <<EOF but now the script indefinitely waits.  Do you know how to make this code work?


Scheduled turning the device off and on has apparently been discontinued in Android 8.  Edit: At least for my device thats the case.  Given that it was one of my favorite functionalities in android 7, I would like to retain it through the update to 8.1.  Is there a similar function on 8.1 or an app i can use to emulate it?  Taskr and Automateit require root access to be able to shut down the device.


I've read conflicting information on how many eggs one can eat per day:       How many eggs a day can you safely eat? Apparently, as many as you want, if you pay attention to your total calorie intake and are careful about carbohydrate intake. If you have diabetes, you can safely eat eggs too, but will need to be particularly attentive to carbohydrates and blood sugar control.        A 2008 report from the Physicians Health Study backs up Smith’s suggestion, finding that eating one egg per day is generally safe—but that more than that can increase your heart disease risk later in life. (Note that we’re talking about yolks here. You can have unlimited whites.)     More details:   The individual is healthy, BMI of 20, has no major medical condition, and regarding sports activities walks 30 minutes per day. Eggs are large chicken eggs (50 grams) I am looking for an approximate upper bound on the number of eggs one can eat per day on average while staying healthy in the long run


Missing Date and Time from top panel on Ubuntu 16.04

I recently upgraded my system to Ubuntu 16.04 but after the up gradation I notice the date and time widget has disappeared from the top panel.  I tried the commands sudo killall unity-panel-service but didn't work. I Re-installed it but that too didn't work  I tried setting it on GUI on but the clock tab in Time & Date appears dead.   It would really nice if someone could help me with it.


So below i have an issue that i cant wrap my head around as to why its not working. The first block of java code works exactly how i wanted it to (e.g. set salary amounts to whatever, and if its not in range give an error and repeat the initial question.)  My problem is this in the second block of code I assumed making a boolean again and emulating the above code to check whether or not my inputs were == "", and if not rinse and repeat like before but it doesnt? i wrote it out exactly the same (of course changing the values) but i simply cant get t to function.  If anyone can help or point me toward the right path id appreciate it :)           //First Block.....  boolean salaryState = false;          while (salaryState == false){              System.out.print("Salary: ");          salary = (input.nextDouble());                  if(salary >= 45000 && salary <= 49999) {    //if salary amount in this range                 this.coachCategory = "Junior";          //then set coaches category to this                 salaryState = true;          }             else if(salary >= 50000 && salary <= 59999) {   //if salary amount in this range                 this.coachCategory = "Youth";               //then set coaches category to this                 salaryState = true;          }             else if(salary >= 60000 && salary <= 70000) {   //if salary amount in this range                 this.coachCategory = "Senior";              //then set coaches category to this                 salaryState = true;           }             else {  //if invalid salary amount then print error                  if (salary <= 45000 && salary >= 70000);                     System.out.println("ERROR: Salary range needs to be within 45 000 - 70 000.");   //Second Block...           boolean isName = false;      while (isName == false) {          System.out.print("Name: ");      name = (input.nextLine());         if(name != "") {             this.name = name;             isName = true;         }         else {             if(name == "");                 System.out.println("ERROR: Please enter a name.");         }


How do I install "Double Commander" or "Midnight Commander" file managers in Ubuntu 18.04?  I tried to install Midnight Commander with sudo apt-get install mc but got   Reading package lists... Done Building dependency tree Reading state information... Done Package mc is not available, but is referred to by another package.  This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'mc' has no installation candidate   Is there some working file managers for Ubuntu 18.04?


How can I test the fairness of a twenty sided die (d20)?  Obviously I would be comparing the distribution of values against a uniform distribution.  I vaguely remember using a Chi-square test in college.  How can I apply this to see if a die is fair?


What's pressure in the stress-energy tensor?

This is a question about Einstein's field equations. In Einstein's field equations, there's a term called the stress-energy tensor. The 3 elements of the diagonal of the tensor are pressure terms. What does pressure mean here? It couldn't mean atmospheric pressure (obviously). Also, I'd like to know the meaning of other elements in the stress-energy tensor.


What's the desired navigation path from the communities to the top site "StackExchange"?

When browsing within one of my communities I sometimes would like to navigate back to the top site "StackExchange" (= ) to see the hot questions for example, but I don't see a proper navigation element for that path.  Doesn't it make sense to have this link in the top navigation as well? Or do I oversee something?


Why I should use Bayesian inference with uninformative prior?

I am a Ph.D. student and currently I am studying Bayesian inference concerning vector autoregressive models. A lot of researchers when talking about uninformative prior, conclude that the results of inference are equal to what we can obtain using OLS. My question is: if this is true, why I should use Bayesian inference instead of OLS?


In hook_user_login is there a way to know if this is the first time the user has logged in?

I'm overriding hook_user_login to redirect users to a specific page when they log in. The problem is I'm using the verification email setting on registration which requires the user to set their password on first login, but I redirect them so some users aren't able to login the 2nd time to the site.  Is there something I can check in hook_user_login that will tell me if this is the first time the user has logged into the site?


Elementary Functions, Differentiation, Integration

Why is it that differentiation of a function that is a composition of elementary functions (such as $\sin \:2^x$ or $\ln(\mathrm{arcsec}\: x^3)$ or $x^{1/x}$) always produces a composition of elementary functions, while integration sometimes does not? For example, the derivative of $\sin \:x^2$ is $2x\cos \:x^2$, but the integral of $\sin \:x^2$ produces the Fresnel sine function, the definition of which is simply the integral? To put it loosely, why does differentiation make functions simpler and integration make functions more complex? I guess what I'm trying to get at is what fundamental aspect of integration sometimes produces a non-elementary function from an elementary function?


Maximize a window on to dual monitors in Windows?

I have dual monitors and I want to span my current window so that it appears as one giant window on both monitors. Does anyone know how to do this natively in Windows?


I had a midterm exam today about group theory and I were asked to prove the following theorem:     Let $G$ be a group. Prove that if $X,Y\triangleleft G$ and $G=XY$ that $X\cap Y=\{e\}$ then $G\cong X\times Y$.   I really have no idea where to start proving this theorem. Also I tried to find a previous thread about this question but without any luck.  How to prove this theorem?


OpenGL using quaternion to rotate camera to avoid gimbal lock

I read in many sources about using quaternion to avoid gimbal lock but I can't apply this practically in my code, so I have a camera class I want to rotate it with mouse so I have Euler angles Pitch and Yaw, I have a camQuat qauaternion to store the rotation quaternion each frame, so I have the initCamera method which initialize the camera:  void Camera::initCamera(glm::vec3& pos, glm::vec3& center, GLfloat yaw, GLfloat pitch) {     view = glm::translate(view, center - pos);     camQuat = glm::quat(glm::vec3(glm::radians(pitch), glm::radians(yaw), 0.0));     camQuat = glm::normalize(camQuat);     glm::mat4 rot = glm::mat4_cast(camQuat);     view = view * rot;     view = glm::translate(view, pos - center); }   then each frame I update the camera by this method  void Camera::rotate(GLfloat xoffset, GLfloat yoffset, glm::vec3& c) {     xoffset *= this->mouseSensitivity;     yoffset *= this->mouseSensitivity;     view = glm::translate(view, c);     glm::quat q(glm::vec3(glm::radians(yoffset), glm::radians(xoffset), 0.0f));     q = glm::normalize(q);     glm::quat temp(q);     q = q * camQuat * glm::conjugate(q);     camQuat = temp;     glm::mat4 rot = glm::mat4_cast(q);     view = view * rot;     view = glm::translate(view, -c); }   this makes the rotation but with gimbal look, what is the bug in my code or what is the right way to use quaternion to prevent the gimbal look?  Edit: the first image is the normal camera FPS the rotation should be around the x and y axis only (No Rolling), once I rotate around any axis (as I read until the angle becomes 90) the gimbal lock appear and the camera begins to roll around z like the second image. enter image description here     Solution: due to DMGregory link below this code works fine:  void Camera::rotate(GLfloat xoffset, GLfloat yoffset, glm::vec3& c, GLboolean constrainpitch) {     xoffset *= this->mouseSensitivity;     yoffset *= this->mouseSensitivity;     glm::quat Qx(glm::angleAxis(glm::radians(yoffset), glm::vec3(1.0f, 0.0f, 0.0f)));     glm::quat Qy(glm::angleAxis(glm::radians(xoffset), glm::vec3(0.0f, 1.0f, 0.0f)));     glm::mat4 rotX = glm::mat4_cast(Qx);     glm::mat4 rotY = glm::mat4_cast(Qy);     view = glm::translate(view, c);     view = rotX * view;     view = view * rotY;     view = glm::translate(view, -c); }   I get the quaternion for both x and y then post multiply the QX by the view matrix then pre multiply the QY by the view matrix, the idea is rotating pitch globally and yaw locally to avoid unwanted creeping roll.


My friend and I live pretty far apart.We really want to play on a LAN world, but it won't let me see it.Can someone help please?


Driving Someone Else's Car Across US/Canada Borders

What are the ramifications of driving someone else's car across  borders?  I'm planning a road trip from the US into Canada and back. My girlfriend has offered to let me use her car but I am not listed on her insurance as a driver and she will not be coming with me.    has already done a good job of covering the issue of driving someone else's car without insurance, but it does not address the issue of actually crossing the border in someone else's car.    Will customs officials take issue with the fact that the car I'm driving is registered to someone else?  Could I be denied entry or arrested for this?


Michael Cohen  something which said:     let’s gut her   "her" is referring to Megyn Kelly.   He later said that this was not a threat to her safety, as the definition of "gut" is:     to make (something) no longer effective   I looked at , and it defines "gut" as:        to remove the internal organs from (a fish or an animal)   to destroy the inside of (a structure)   to destroy the power of (something) : to make (something) no longer effective         [...]      Examples of gut in a sentence         The salmon is already gutted and filleted.   Critics claim that these reforms will gut the law.      I knew that both definitions exist, but I didn't know that the second definition - to make something no longer effective - could be used when referring to a person, I always thought it could only be used when referring to things such as laws and regulations. So my questions are:   Can "to gut" be used like this, referring to a person? Is it commonly used this way? Is that how most native speakers would interpret the sentence?


If $u_{2n}$, $u_{2n+1}$, $u_{3n}$ are convergent sequences then $u_n$ is a convergent sequence

The proof is:  Show that if $u_{2n}$, $u_{2n+1}$, $u_{3n}$ are convergent sequences then $u_n$ is a convergent sequence  I don't know where should I start to justify this correctly...  I tried to apply the property that "if $u_{2n}$, $u_{2n+1}$ are convergent than those limits will be the only sublimits of the series", and because of that if $u_{3n}$ is a sublimit then the 3 sublimits are equal and the sequence is convergent...  But this is not correct I guess because we can have 2 sublimits equal but the other one can be different...   Can someone give a hint?   Thanks!


$$A = \begin{pmatrix} 2 & 0 & 1 \\ 0 & 3 & 0 \\ 1 & 0 & 2  \end{pmatrix}$$  I need to diagnolize this matrix, I found that the characeristic polynomial is $x^3-7x^2+15x-9$ and that the eigenvalues are 3,3 and 1.  I also found that the eigen vectors are for $Ker (A-3I) = span\{(0,1,0), (1,0,1)\} $ and $Ker (A-I) = span(1,0,-1)$ So I figured that the inverse matrix P when $P^{-1}AP = D$ is $$P=\begin{pmatrix} 0&1&1 \\ 1 & 0 & 0 \\ 0 & 1 & -1 \end{pmatrix}$$ (the eigen vectors as columns).  so $$P^{-1} = \begin{pmatrix} 0&1&0 \\ \frac{1}{2} & 0 & \frac{1}{2} \\ \frac{1}{2} & 0  & -\frac{1}{2} \end{pmatrix}$$  But when multiplying $P^{-1}AP$ i'm not getting a diagonal form, does the order of the columns in $P$ matter? also what an I doing wrong?


sshd_config: Match for requested domain?

Like a virtual host declaration at a web server, I'd like to control sshd when a connection with a certain domain name gets established. That is, multiple domain names point to the sshd machine, which has only a single IP address. Is it possible at all? Following doesn't seem to work: Match Host some-domain.com   ChrootDirectory /some/dir  If I connect from my local machine with ssh some-domain.com I'm not rooted to /some/dir. Can it be done anyhow? According to this (old)  and its answers it is not possible...


Multicolor barcodes around windows and context menus

Two days ago, after putting my computer for less than one hour in sleep mode, I noticed weird lines of different colors around all windows as you can see on this screenshot:    Lines are both horizontal and vertical, from different colors, they look like barcodes and on the edges horizontal and vertical lines are scrambled. Those lines appear whether the window is active or not, in the foreground or not.  The lines also appear on the "X" "-" "|_|" icons on the top left hand corner of each window.  The bug also happens in search results in Chrome for instance, actually in any input field with autosuggestion on an HTML webpage:    It also happens when a context menu is open. For instance after a mouse right click there are lines all around the menu.  I use Ubuntu 16.04. I upgraded from Ubuntu 14.04 last week. When I upgraded to Ubuntu 16.04 I had a graphic issue (Computer in low graphics mode, solved with:  ), but after solving the initial issue everything was fine and I don't think I installed anything special after.  If I reboot my computer, the problem is solved. But it reappears after sleep mode.  Specs:   Asus N56VM BIOS: N56VM.206 01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 630M] (rev a1)   Kernel driver in use: nvidia Kernel modules: nvidiafb, nouveau, nvidia_375_drm, nvidia_375  00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)   Kernel driver in use: i915 Kernel modules: i915


Restore Time Machine backup from Sierra to El Capitan

I'm currently running Sierra and would like to revert back to El Capitan. Is there any way I could use a backup done on a newer OS with Migration Assistant?


Should I follow the Android guideline or keep my app's own style when porting it from iOS?

My new project is to port an iOS app to Android platform. Before get started, I'm quite confused on whether I should follow google's guideline since some big titles on Android platform still keep the same look as iOS version. Style here means the entire design of the app, such as app navigation, theme, and layout.   Please help if you have any suggestions!


Backup file from SQL Server 2012 to 2008

I have a backup file of SQL Server version 2012 but I want to restore that backup on SQL Server 2008.  Question: Is this possible ?


bash profile works for user but not sudo

I've modified my .profile to include a folder if a flash drive is plugged in. When running the command as the user it works fine but tells me the scrip must be run by sudo (this is what i want). However, when i try to run it with sudo i get "command not found"  I have a symlink (flash) in my /var/www folder pointing to my /media/flash drive. (nevermind this setup since is just for dev)  this is my user's .profile :   # set PATH so it includes flash scripts if [ -d "/var/www/flash/scripts" ] ; then     PATH="/var/www/flash/scripts:$PATH" fi   when trying to run as sudo i get:  sudo: script: command not found       any ideas?


Would Belle still be a Disney Princess if her husband was a duke?

In the original plans for the animated Beauty and the Beast, the Prince was to be a Duke. If they had kept that in, Belle would’ve been a Duchess when she married him, so would she still be a Disney PRINCESS? Edit: Also, would Duke Adam be ruling over a Duchy in France if he was a Duke?


How do you pronounce the decimal numbers in this sentence?

In a professional context, if you say the following :      The current value is 0.8, it's 0.3 more than the previous version.   Do you say both number the same? Do you say "point 8", "O point 8", "O 8", "zero point 8" ?  Does it depend on what you're talking about? (millimeters, currency, software version, ...) In my sentence, it's a dimension.  Is "point 8" too casual for a professional conversation?   Isn't it a little heavy to say "zero point ..." if you say a lot of numbers in a row ?


If S is a compact subset of R and T is a closed subset of S,then T is compact. (a) Prove this using definition of compactness. (b) Prove this using the Heine-Borel theorem.  My solution: firstly I should suppose a open cover of T, and I still need to think of the set S-T. But if S-T is open in R,it can be done because the open cover of T and S-T is a open cover of R. The reality is S-T is not necessarily a open set in R. My question is that How we can find a open cover which covers S-T but misses T! I don't know how to do this thing! in terms of part (b), I know it is bounded, but How to prove it is closed for T.


$G$ is an abelian group and $x=a_1a_2...a_n$

Assume that $G$ is an abelian group of order $n$ and $a_1,a_2,...,a_n$ are its elements and we have $x=a_1a_2...a_n$. If $G$ has more than one element such as $b\neq e$ and $b^2=e$, prove that $x=e$.  Answer: Assume that $a\neq b$, $a^2=e$, $b^2=e$, $a\neq e$ and $b\neq e$. $$(ab)^2=(ab)(ab)=a^2b^2=e$$ If $$ab=e\implies a=b^{-1}\implies a=b$$ But we assume that $a\neq b$. contradiction! So, $ab \neq e$ and $(ab)^2=e$. So, what should I do now? STUCK!


Do files actually contain an End Of File (EOF) character?

The  from the National Oceanic and Atmospheric Administration (NOAA) contains the following rather wordy description of a plain text file (§4.3) (emphasis mine):     The Unix text file format is used in a small subset of the Level 1b and 2+ semi-static source data files. The Unix text file format, less the end-of-file character, is embedded in GRB metadata packets to store the XML-based netCDF Markup Language (NcML) representation of the netCDF file specifications, which   includes the values for product metadata.      The Unix text file format is a sequence of lines (i.e., records), potentially variable in length, of electronic text. For the GOES-R ground system, the electronic text, newline, and end-of-file characters conform to the American Standard Code for Information Interchange (ASCII). At the end of each line is the newline character. At the end of file, there is an end-of-file character.   Is this an accurate description of the contents of a file?  I thought that the end of file was a condition that the operating system or a library routine was returning when no more data can be read from a file (or other stream).  Is this byte actually contained in the file?


Should I postpone my trip to Paris in 2nd week of Jan in light of recent protests?

I’ve a date and I really waited long to make this happen. My gifrfriend is a bit worried about the security issue in Paris. Which locals think that the media is exagerrating the issue and the issue is small and non-threatening for tourists?


Evaluate the line integral  $$\int_C xe^{y}\, {\rm d}s,$$  where $C$ is the line segment from $(-1,2)$ to $(1,1)$.  I do not get this part of calculus at all please show me how this is solved and if you give me hints is ok too. Please help me. Thanks


What do you call an 'unselfish' action made with a selfish reason?

There are many examples of this, and I'd like to give a few:   A person who puts a lot of effort to help the community and earns reputation points. But that reputation is the motivation behind helping the community, not because they really want to. A student approaches a professor, and helps them in their teaching and doing research in order to have a good LOR (letter of recommendation). To a SEO, the content of the website must be good (well, this one is a little tricky, but you get the spirit.)   I'm not saying that the reputation/LOR/high-ranked is not deserved. It is. I just want to focus more on the selfish reason(s) behind that.  Any kind of answer can be accepted: single word, phrase, proverb or idiom.


Currently I'm writing a project in Danish. Almost everything in LaTeX works as intended so far.   However, in the Danish language "aa" is alphabetically the same as an "å", and should therefore be sorted last in the bibliography, instead of first as an "a".   Hope some smart mind knows how to force LaTeX to sort "aa" as an "å".  Updated info: OS: Windows 10, client: ShareLaTeX, biber version is unknown.  Is there any reason why a "G", "K" and "S" is sorted before both "Aa" and "Å"?  MWE from the project:  \usepackage[ backend = biber, style = authoryear, natbib = true, ]{biblatex} \addbibresource{bibliography.bib}  @online{aalborgkommune16, author = {{Aalborg Kommune}}, title = {Team Vandkunstens forslag til udviklingsplan valgt som det bedste}, year = {2016}, url = {https://stigsborghavnefront.dk/nyheder?id=28}, urldate = {2017-10-11} }


I want to understand :  How index work in oracle.  How they are stored in the disk.  How they increase the efficiency of a query?  By third point I means how Index contribute to the efficiency of query such as in joins,group by clauses.  One more point is How index behave in Flashback queries.


In this phrase, excerpted from ,      "$\alpha$ being ... very far from rational (a Diophantine number), ..."   what is a "Diophantine number"? He contrasts it with a . Thanks!


What should a physics undergrad aspiring to be a string theorist learn before grad school?

The question I guess is pretty clear. I am a physics undergrad wishing to pursue research in quantum gravity(string theory?). What are the subjects I should learn other than the usual compulsory undergrad courses such as quantum mechanics, and GR, etc? Things that come to my mind are QFT, lie algebras, differential geometry, algebraic geometry etc? Other than this, could you suggest any topic that are not entirely essential but interesting in mathematical physics, gauge theory etc (e.g. solitons, monopoles etc). Actually I am looking for a mini project of sorts which would give me an idea of what these fields really are. I have done some lie algebras, classical field theory and am currently studying QM.


Road displays up to node, not up to starting point and ending point

SELECT id FROM table ORDER BY st_distance(the_geom, st_setsrid(st_makepoint($slng,$slat), 4326)) limit 1 ; get source and similar for target ; and then apply in dijkstra algo SELECT pgr_a('SELECT id AS id, source, target,length AS cost, x1, x2, y1, y2 FROM ways',$source,$target,false,false)) SELECT id_0, st_AsText(geom) FROM table w, a a WHERE w.id = (a.pgr_a).id2  and getting linestring but it is not perfect up to staring point and ending point... it is display up to node not up to point b


How to insert a contact record of particular recordtype while creating parent record?

I have two objects Account&Contact,both objects contain 3 recordtypes India,UK,USA.  Whenever i create a new account with any of these recordtypes a contact should be created automatically with the same recordtype.  i.e If i select recordtype 'India' in account, contact should be created with 'India' recordtype in contact obj.  If i select 'UK', contact should be created with 'UK' recordtype in contact obj. If i select 'USA', contact should be created with 'USA' recordtype in contact obj.   I tried the following code but what is the condition that i have to put in for the above senario  Can anyone please provide the code for the above scenario.  trigger AccRecTypeTrigger on Account (after insert) {        //Map<Id,Schema.RecordTypeInfo> m1 = Schema.SObjectType.Account.getRecordTypeInfosById();    // Id IndiaContactRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByName().get('India').getRecordTypeId();     //Id USAContactRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByName().get('USA').getRecordTypeId();     //Id UKContactRecordTypeId = Schema.SObjectType.Contact.getRecordTypeInfosByName().get('UK').getRecordTypeId();         List<Contact> conlst = new List<Contact>();        List<RecordType> r = [select id,name from RecordType where SObjectType='Account' and isActive=true];         Map<Id,String> m = new Map<Id,String>();             for(RecordType rt : r){               m.put(rt.id,rt.name);             }      for(Account a : trigger.new){          String name = m.get(a.recordtype.id);          List<Recordtype> r1  = [select id,name from RecordType where Sobjecttype='Contact' and isActive = true];           for(RecordType rt : r1){            if(a.recordtype.name == name){                 Contact con = new Contact();                  con.accountId = a.id;                  con.lastname = a.name;                 con.recordTypeId = rt.id;                       conlst.add(con);             }            }          }      insert conlst;  }


I am an American and will be moving to the UK next month and I would like to drive around in a week's time to look for houses.   I am sub-consciously oriented to driving on the right side of the road and I was wondering if there are any games or simulators that are effective to re-wire the muscle memory for driving on the left?  I am looking especially for simulators or games because I am not fully sold on the idea of "learn-as-you-make-mistakes" idea yet.


Meaning of the phrase "Four pounds if he's an ounce"

In The Thirty-Nine Steps, Sir Walter is describing a fish and says "Look at that big fellow. Four pounds if he's an ounce." I've heard similar phrases before but never understood what is being said beyond the emphasis of size.  I've struggled to parse this sentence and I am tempted to believe that it's a contraction of an older phrase. Any clues to the origin as well as the meaning would be much appreciated.


Can ffmpeg merge multiple m4a files into one ~chapterized~ file?

Given a folder full of 'm4a' files, I can merge them all into one big m4a file using ffmpeg like so:  ffmpeg -f concat -i <(for f in ./*.m4a; do echo "file '$PWD/$f'"; done) \ -c copy ../OUTPUT.m4a   However, what I would like to do is have OUTPUT.m4a contain chapters for each one of the original input files (each chapter just needs a number, not a name).  I have tried googling for this, but everything I have found seems to be about merging video files and MKVs, not m4a files.  Ideally, I would like to be able to do this via the command line, as I have 60+ folders, and would like to be able to script this rather than loading it into an app of some sort.  Any help would be appreciated.


Why isn't calibre starting below? nicholas@mordor:~$  nicholas@mordor:~$ sudo apt install calibre Reading package lists... Done Building dependency tree        Reading state information... Done calibre is already the newest version (4.99.4+dfsg+really4.12.0-1build1). The following packages were automatically installed and are no longer required:   linux-headers-5.4.0-51 linux-headers-5.4.0-51-generic linux-image-5.4.0-51-generic linux-modules-5.4.0-51-generic   linux-modules-extra-5.4.0-51-generic Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 232 not upgraded. nicholas@mordor:~$  nicholas@mordor:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description:    Ubuntu 20.04 LTS Release:    20.04 Codename:   focal nicholas@mordor:~$  nicholas@mordor:~$ calibre Traceback (most recent call last):   File "/usr/bin/calibre", line 20, in <module>     sys.exit(calibre())   File "/usr/lib/calibre/calibre/gui_launch.py", line 73, in calibre     main(args)   File "/usr/lib/calibre/calibre/gui2/main.py", line 543, in main     listener = create_listener()   File "/usr/lib/calibre/calibre/gui2/main.py", line 514, in create_listener     return Listener(address=gui_socket_address())   File "/usr/lib/calibre/calibre/utils/ipc/server.py", line 110, in __init__     self._listener._unlink.cancel() AttributeError: 'NoneType' object has no attribute 'cancel' nicholas@mordor:~$   It's always run fine in the past, although I don't recall running it from this machine on which Ubuntu was recently installed.


I have 2 users test(has access to sudo) and testuser1 (has no access to sudo). I need to make child3 and file.txt ownership and permissions only for testuser1 (which are created by user test) /home/test/some_test/parent1/child3/file.txt  However when I do sudo chown testuser1:testuser1 -R child3 sudo chmod 700 -R child3  I get drwx------ 2 testuser1 testuser1 4096 Sep 30 00:39 child3  So I can't access to folder as another user (which is correct) but I can't also delete folder as testuser1, only test user can


Naive question about particles and spinor fields

What is the difference between the "real" particle electron (for instance) and the spinor field of electron? I mean, which means that the electron have been described by a spinor field?My question is based upon a phrase from Geroch's book [  ]      Particles with half-integer spin (electrons, neutrinos, etc.) are described by   mathematical objects called spinor fields


Refresh a lightning web component when a record is edited

How to refresh a lightning web component when a record is edited. For Eg: If I have lightning web component (Account details) on Contact when I edit a contact how does the LWC will get refreshed. Any help is greatly appreciated.


I saw a news headline that reads: he admits accident was caused by drunk driving. My question is why they use present tense (admits) instead of past tense (admitted). The news was written after the confession. Shouldn't it be: he admitted that accident was caused by drunk driving


Is it possible to create multiline anonymous function in Matlab?  There are no appropriate examples , but also no direct denials. In web discussions I found some derisions of askers as if it silly wish. Nowadays, when most languages introducing lambda expressions with multiline capability this looks strange.


Automatically generating an index with acronyms

What I'd like to do is that, every time I reference an acronym, it should be rendered with an \index{} using the same value as either the acronym's short or long form.  M(not)WE:  \documentclass{article}  \usepackage{acronym} \usepackage{makeidx}  \makeindex  \begin{document}      \begin{acronym}         \acro{SE}{StackExchange}         \acro{TDD}{Test-Driven-Development}     \end{acronym}      lorem ipsum \ac{SE} dolor met \ac{TDD}      % should list "SE" and "TDD", or "StackExchange" and "Test-Driven-Development", or both     \printindex \end{document}   I tried adding an \index{} inside the \acro commands (as in \acro{TDD}{\index{TDD}Test-Driven-Development}, but that does not work.  One workaround would be using a custom command as below, but I would like to think that there's a better solution (which also works for acronym usage other than just the regular \ac).  \newcommand{\SE}{\index{SE}\ac{SE}\xspace}   Any solutions are appreciated, although those that don't require switching to a different "acronyming" or indexing package would be preferable.  Note:  question is indeed nearly identical, but it still requires overwriting each variant of \ac (\acs, \acl, \acf etc.) separately. I'm hoping there's a shorter solution, but that might be too optimistic.


Significant Difference in prediction when using library and coding from scratch in Multiple Linear Regression

I have been trying to implement multiple linear regression from scratch after implementing it using sklearn. The values predicted using sklearn is very accurate whereas the values predicted by the code which I have coded from scratch is not so much accurate. This is the dataset that I am using (I have provided the entire dataset in my Github link mentioned below along with the source code of my implementation)  I am predicting profit of an organisation by seeing the 4 independent variables. Notice that we also  have a categorical value here, on which I have done 1 hot encoding, and I have also scaled all the data. I am using gradient descent to reach the optimal values for slope for the independent variables. The  function I have written for gradient descent updation is as follows. #building the model  #lets start with a random value of m and c  m_1=0 m_2=0 m_3=0 m_4=0 m_5=0 m_6=0  c=0  l=0.0001 #l is the learning rate    n=float(len(X_train)) # n=number of training data, we are converting it to float since we will need to divide n  mse=[]  #we are creating a list for storing mean square errors for each iteration so that we can plot it  for i in range (0,20000):     Y_pred=m_1*X_train[:,0:1]+m_2*X_train[:,1:2]+m_3*X_train[:,2:3]+m_4*X_train[:,3:4]+m_5*X_train[:,4:5]+m_6*X_train[:,5:6]+c          mse.append(numpy.sum((Y_pred-Y_train)**2)/n)     D_m_1= (2/n) * sum(X_train[:,0:1]*(Y_pred-Y_train))     D_m_2= (2/n) * sum(X_train[:,1:2]*(Y_pred-Y_train))     D_m_3= (2/n) * sum(X_train[:,2:3]*(Y_pred-Y_train))     D_m_4= (2/n) * sum(X_train[:,3:4]*(Y_pred-Y_train))     D_m_5= (2/n) * sum(X_train[:,4:5]*(Y_pred-Y_train))     D_m_6= (2/n) * sum(X_train[:,5:6]*(Y_pred-Y_train))     D_c= (2/n) * sum(Y_pred-Y_train)          #Andrew Ng has not taken 2/n but instead 1/n as his cost function is multiplied by 1/2 to reduce complexity          m_1=m_1-l*D_m_1     m_2=m_2-l*D_m_2     m_3=m_3-l*D_m_3     m_4=m_4-l*D_m_4     m_5=m_5-l*D_m_5     m_6=m_6-l*D_m_6     c=c-l*D_c            plt.plot(mse)  #see the plot below, we can see the point where MSE stabilises. Run the above loop till that point and take MSE  This is the function that I have written, and in the other code where I have used sklearn library the code looks like this, #now we will fit the linear regression model  from sklearn.linear_model import LinearRegression import matplotlib.pyplot as plt  regressor= LinearRegression()  regressor.fit(X_train,Y_train)  #predicting the test results Y_pred=regressor.predict(X_test)  But there is a significant difference between the predicted value of the 2 code and as obvious the sklearn is producing good results. I am not getting why the code which I have written from scratch is having low accuracy. I am providing the dataset as well as the code (where I have written the gradient descent) below. Link to code and dataset-->


Not able to execute a .sh file: /bin/bash^M: bad interpreter

I wanted to execute a shell script:  -rwxr-x--x 1 root root   17234 Jun  6 18:31 create_mgw_3shelf_6xIPNI1P.sh   I tried to do a standard procedure, but I got this error:  ./create_mgw_3shelf_6xIPNI1P.sh  localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0  DEBUG   cd/etc/opt/ldapfiles/ldif_in ; ./create_mgw_3shelf_6xIPNI1P.sh  localhost 389 -l /opt/fews/sessions/AMGWM19/log/2013-06-06-143637_CLA-0 **ERROR  sh: ./create_mgw_3shelf_6xIPNI1P.sh: /bin/bash^M: bad interpreter: No such file or directory**   What does it mean? I was doing this as the root user under the root group.  Does it mean that the file does not have the correct permission for the root user?


What does the user limit in Win Srv 2019 Essentials apply to, concurrent connections or existing accounts?

I have one Windows Server 2019 Essentials which logs errors and automatically shuts down because of license problems. It logs the following:  Bei der Überprüfung der Benutzeranzahl wurde eine Bedingung in der Umgebung festgestellt, die nicht mit der Lizenzierungsrichtlinie konform ist. Der Server erfüllt nicht die Microsoft-Software-Lizenzbedingungen. Diese erlauben maximal 25 lokale Benutzerkonten. Der Computer hat 29 lokale Benutzerkonten.  Didn't install that OS in German myself, but the last sentences actually simply mean that too many accounts are CREATED. It doesn't mean that too many accounts are concurrently connecting to the server or accessing it's services. And that's the point: Many of those accounts are only special users created for backup purposes or tests or alike. They are NOT all connecting to the server concurrently, most of those won't access any file or printer services ever at all. Reading about the user limits of that Win Server edition I had the impression that it's about concurrent usage by users, NOT the pure existence of a number of user accounts itself.  explicitly wrote so as well:  it's a 25 connected/logged in users limit.  Though, that doesn't seem to be the case and instead it seems that the number of available accounts itself, regardless of if and how they are used at all, is the limit already. So, what exactly does the 25 user accounts limit apply to? Thanks!


The comprehension axioms follows from the replacement schema.

I hope to show that the comprehension axioms follows from the replacement schema.  This is a solution that professor wrote.  $P(u,u)$: every set $u$, exists an unique $u$ such that $\psi(u)$.  Then exist a set $y=\{u:P(u,u) \text{ and } u \in X\}$  Let $F=\{(u,u) : \psi(u)\}$. Then $F(X) \in u$ and $y=\{u \in F(x) : \psi(u)\}$  I took some notes but I think that there are much errors.  Thanks in advance.


In Windows if you are in a program and press Super+← for example the program would take up half of the left side of the screen. Extremely useful when wanting two programs to sit side by side.  Super key being the special key in Linux then. And the ← being the arrow left key.  What is the Ubuntu version of this? I have no idea what this is called and hence my Google results have come out with no result.


Cannot Update the system : E:Malformed line 1 in source list /etc/apt/sources.list (dist parse)

This is my problem  I was changing ubuntu 12.04 to 12.10. All the downloads and installations were OK. Then after the restart, my touchpad and my wireless card were unable to use.   I could solve the problem which was with the touchpad.  I was thinking that the problem with the wireless will able to solve with upgrade, and update commands. So I opened the terminal and entered the commands. But I cannot update the system. I tried several times but not succeeded.  This is what the details said about my problem :  E:Malformed line 1 in source list /etc/apt/sources.list (dist parse)


I need to find a good configuration for my computational kernel, which forces me to find some integer solutions to the following simple equation:  $a \cdot x - b \cdot y = c$,  where $a$, $b$ and $c$ are constant positive integers, and $x$ and $y$ are my unknown, that I need to also be positive integers.  I thought I could solve this using the Diophantine solution, but I'm not sure how to proceed due to one of the addends to be negative.  What is the best way to find all solutions to such an equation?


I have created an application which uses .NET 3.5. However, some Windows XP machines give the following error:     Could not load file or assembly 'System.Core, Version=3.5.0.0,   Culture=neutral, PublicKeyToken=b77a5c561934e089' or one of its   dependencies. The system cannot find the file specified.   It's because they have installed a version older than 3.5. How could I check the .NET version decently? I mean I can't check it from my application itself since it's looking for the 3.5 DLL files when the program is launched.  What I thought of, is creating a very simple program using .NET 2.0, and then checking what versions are installed (this program as a launcher). However I'd like to hear your opinions.


I am currently using the following code within single.php (after the_content) This gets the store_name from custom field as $merchant from the post and then returns a list of products from that merchant from and external script.  <?php $merchant = get_field('store_name'); echo '<h3> Random products from ' . get_field('store_name') . '</h3>'; $external_baseHREF = "http://www.website.com/store/"; $external_path = "/home/website/public_html/store/"; $_GET["q"] = "merchant:".$merchant; require($external_path."searchExternal.php"); ?>       This is working fine, however I cannot move the position of where the products are appearing, they currently appear after the main post.  I would like to have them appearing further up the post, and one solution I have considered is adding them via a shortcode so I can position them as I like eg  [merchant-name merchantname="Adidas"] or something similar  Can you please assist in creating this shortcode? Or offering alternative solution.  Thanks Richard


I want to try out Linux Mint. I am on Ubuntu 11.10 now. How can I mount .iso file on USB? And also, will my other files disappear in USB when I mount it? Thank you.


FreeIPA : Installer not resolving domain name from hosts file

I have been having an issue while installing FreeIPA. The problem is that every time I run the installer the FreeIPA application does not read from the host file rather tries to resolve the domain name (my machine's hostname) with a DNS query. I'm Working with CentOS Linux release 7.3.1611 (Core)   Following are the entries in my /etc/hosts file :  [root@ipa ~]# cat /etc/hosts 127.0.0.1   localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1         localhost localhost.localdomain localhost6 localhost6.localdomain6 192.168.28.5 ipa.example.com ipa   Entries in /etc/resolve.conf  [root@ipa ~]# cat /etc/resolv.conf  # Generated by NetworkManager search example.com   If I add a DNS entry in the above, the domain example.com is resolved from that DNS and following error is observed as would be expected if an external DNS is queried.  Please provide a realm name [EXAMPLE.COM]:  Checking DNS domain example.com., please wait ... ipa.ipapython.install.cli.install_tool(Server): ERROR    DNS zone example.com. already exists in DNS and is handled by server(s): a.iana-servers.net., b.iana-servers.net.   So I choose not to add a DNS and use an empty resolve.conf file as shown above. I have also tried setting the nameserver to my machines IP but to no luck.  To get it to force read from my hosts file I changed the nsswitch config to only read from the hosts file but that was still in vain. kindly see below the my /etc/nsswitch configuration.  [root@ipa ~]# grep hosts /etc/nsswitch.conf hosts:      files   Running the installer  [root@ipa ~]# ipa-server-install --setup-dns -a <passwd> -p <passwd>   now with the current config returns the following :  Please provide a realm name [EXAMPLE.COM]:  Checking DNS domain example.com., please wait ... Please provide the IP address to be used for this host name:   So again, the hosts file was ignored and installer asks for an IP against the domain.  Following are some test which show hostname to IP resolution is succesful  [root@ipa ~]# ping ipa.example.com PING ipa.example.com (192.168.28.5) 56(84) bytes of data. 64 bytes from ipa.example.com (192.168.28.5): icmp_seq=1 ttl=64 time=0.126 ms ^C --- ipa.example.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 0.126/0.126/0.126/0.000 ms  [root@ipa ~]# getent hosts ipa.example.com 192.168.28.5    ipa.example.com ipa  [root@ipa ~]# telnet ipa.example.com Trying 192.168.28.5...   Apologies for the long post, I'm quite stuck with this and I'm having trouble figuring out what I'm missing. Any assistance on this issue would be greatly appreciated. Thankyou.  PS : The setup is not for a live environment, its for testing purposes.


When is a cyclotomic polynomial over a finite field a minimal polynomial?

When is the cyclotomic polynomial $f(x)$ over a finite field $\mathrm{F}_q$ also the minimal polynomial of some element $\alpha \in \mathrm{F}_q$?


I am confused on how to get this problem started. I want to say that they are associated, but I am not sure if that is correct.   Let $G$ be the subset of $F[x]$, $F$ a field, consisting of all the polynomials whose constant term is nonzero.      Show that $a_0+a_1x+\cdots+a_nx^n$ is irreducible iff $a_n+a_{n-1}x+\cdots+a_0x^n$ is irreducible.    Like I said, I am not sure how to get started on this... A hint would be great, with a hidden answer would be much appreciated. I haven't been able to think of a way to get started on this.


Disclosing Asperger's Syndrome in cover letter for scholarship

If I want to apply for a PhD scholarship that requires a cover letter, should I disclose that I have Asperger's Syndrome? If so, how detailed should I describe my condition? It's not something that I enjoy talking about, . Since I was only diagnosed recently, I'm thinking of writing a few sentences that mainly highlight the positive aspects, and how it could really benefit the research group. (I have worked as a teaching assistant, and have never gone through  so it should be OK.)  I have already told my professor about the AS, but was hoping to get further advice from folks in this forum.  Edit: This is what my careers advisor thinks. I want to show that I can add value to the research group -- these attributes are directly and indirectly related to AS.     I certainly think if it is something that you can manage well you don't need to disclose it at the beginning of the application process. If it's something that affects your working then you should disclose it. Either option I would present it in a positive manner. Ultimately you want to sell yourself for what you can do for them and how you can add value. Whether you disclose it in your letter or at a later stage of the process is up to you. Just keep it positive.


How to model the rounded outline of a column

I need a good way to model the rounded shape of a capital, just like in     My problem is, that it should be precise for architectural modeling. I could use paths, but that would be really painful to do ;) And Bevel is not precise enough I would say.  So what would be the best way to model a capital ?


I very recently earned the below badge. But I am sorry, I do not understand it.    It says      Earned at least 100 total score for at least 20 answers in the java tag.   But I have answered 140 questions under Java tag and pretty sure would have earned more than 100 points. Then why did I receive it so late. Currently I have 3.3K points on SO.  Secondly if so, I have answered about 41 questions under Scala tag, then why didn't I receive this badge for Scala?


Goto specific page in embeded google drive document?

Hi amazing HeroStacks So as title suggest, I have an embedded google drive document (.pdf), where my webpage loads a window with a 36 page interactive brochure. My goal is to be able to link to a specific page in that .pdf document from the outisde. So say for instance a button/link click from my webpages footer area (or newsletter), goes to a specific products page or perhaps headline withing the document. Is that doable? The interactive pdf, allready have links within the document and that works great. And I know I have to make the document viewable for everyone with a link etc, else the embed window will show some access limitied window, but how do I jump to a page or section from the outside?


I have data from infrared measurements in a file with 194 rows and 194 columns, each value representing the temperature at a certain pixel.  As the image from the camera does not look nice, I would like to plot it with pgfplots in a similar way. This means for each value in my data matrix, a certain color should be plotted.    The data matrix looks like this:  22.93   22.97   23.07   23.11   23.11 23.1    23.05   23.1    23.12   23.12 23.11   23.3    23.3    23.17   23.18 23.08   23.11   23.3    23.17   23.18 23.12   23.1    23.18   23.22   23.14   My most promising try was the following code:  \begin{tikzpicture} \begin{axis}  \pgfplotstableread{pictures/test.txt} \datatable \addplot3[surf, shader=interp, mesh/rows=5]table from \datatable;  \end{axis} \end{tikzpicture}   That's the outcome.   I wish to obtain a density plot as shown in the following picture (the colorbar on the right is not a problem, I found the solution with groupplot...):


How do I level up special dragons past level 10?

I have many special dragons and I can't figure out how to level them past ten.


I am getting the exception "No mapping exists from object type MyType to a known managed provider native type." How do I provide a mapping?  I am sending the data to SQL Server through ADO.NET. I am basically going to transform MyType into an integer. I don't need it to come back as MyType. It's fine for it to come back as an int, though it would be nice for it to come back as MyType.  EDIT for those who insist on seeing code:  I have a type:  class MyType {     int field1;     int field2; }   And I want to send a variable paramValue of type MyType to the database:  using (SqlConnection connection = new SqlConnection(connectionString)) {     SqlCommand command = new SqlCommand(queryString, connection);     command.Parameters.AddWithValue("@param", paramValue);      connection.Open();     SqlDataReader reader = command.ExecuteNonQuery(); }   EDIT  Let's say I have a function:  class MyType {     int field1;     int field2;      public int dbValue() {         return field1 + field2;     } }   I want to use:   command.Parameters.AddWithValue("@param", paramValue);   instead of:  command.Parameters.AddWithValue("@param", paramValue.dbValue());   Because I don't want to have to put .dbValue() everywhere I send it to the database. This is just postponing the inevitable day that I forget to put .dbValue().


How can I space the lines in the whole document?

How can I space the lines in the whole  document ?


I'm used to working on Unix/Linux and recently moved to Mac. In used to be able to do this: derick@linux1:~$ ssh -X linux2 derick@linux2's password: derick@linux2:~$ xclock  I've install X11 from maxports and I can do the same from my mac. If I try the reverse by ssh-ing into my mac from linux I can only run certain apps:  /usr/X11/bin/xclock works fine  Something like /Applications/Preview.app/Contents/MacOS/Preview opens the GUI on the mac. It seems that this is not possible on a mac? If not, how do I run an application remotely (on a mac) with a local (linux) display? Do I need some third-party app?   Update: To be more precise: I have synergy and use Mac for coding. On my linux PC I would like to see another application's display (GUI) from Mac. Thus, 'live screen sharing' apps like VNC will not work. For example I'm working on my mac in app A (say Word) and want to see the output of Excel (running on mac) on my linux PC next to me. (Simulating a dual screen via the network). It worked nicely on linux, hoping for a solution for mac.


I have looked everywhere and I cannot find a good mouselook script that limits the up and down rotation of the camera.  I've already found many scripts that do not limit it. I want one that stays steady and does not wobble one you are not moving your mouse.


What is the difference between EF and EF-S lenses?

This is specific to Canon, but what is the difference between EF and EF-S lenses?


I got the following exercices: Determine the average distance  for all addresses, and concat the average distances by address in a csv like column “CSV_Avg” as can be seen in table Address _Distances.   This is how the table looks    This is what query should do    So far i've done this but i can't find a way how to concatenate all rows in a single column  This is how my query looks like   SELECT DISTINCT         [id_address]           ,sum([distance])/count([distance]) as "AVGDistance"       ,CONCAT([id_address],'=',[distance]) as "CSV_AVG"   FROM [Test].[dbo].[View_2]   WHERE [id_address] IS NOT NULL    Group by [id_address],[distance]


What’s the best way to capitalise the first letter of each word in a string in SQL Server.


Limit as $n \rightarrow \infty$ of $(1+\frac{3}{n})^n$

$$lim_{n \rightarrow \infty} (1+\frac{3}{n})^n$$  $lim_{n \rightarrow \infty}\ \frac{3}{n}=0$, and $lim_{n \rightarrow \infty}\ 1^n=1$, which is why I thought the above limit would evaluate to 1. The answer is apparently $e^3$. Why is this?  Any help will be greatly appreciated, thanks in advance.


That's my problem: Can every triangle be divided into five isosceles triangles?  I've got to give evidence why this is true or not true...  (sorry for possible language mistakes - I'm from Germany)  Thanks in advance  Markus


Supremum and infimum of powers with rational exponents.

I asked this question earlier and got a very useful hint, but I still can't get the full solution. Here is the original question:  I'm trying to show that for $b>1$, $x>0$ and $x$ irrational,  that $$\sup \{b^p:p\in Q,\;0<p<x\} = \inf \{b^q:q\in Q,\;x<q\}$$  I know this follows immediately if we define $b^x=\exp (x\log(b))$  and use the fact that the exponential function is strictly increasing and  continuous over $\mathbb R$, but I'm not allowed to do that. In fact, I only have  that $b^{m/n}=(b^{1/n})^m$, where $b^{1/n}$ means the positive $n^{th}$ root of $b$;  $b^x$ is not yet defined for irrational $x$.  I know that the supremum and infimum both exist because if $b>1$ and $p<q$, then $b^p<b^q$.  Also, by assuming that the inf $<$ sup, I got a contradiction. The part I'm stuck on is deriving  a contradiction from assuming that sup $<$ inf. Does anybody have any ideas?  The hint I got, courtesy of Greg Martin:  Try this one: let $S$ be the sup and $I$ be the inf. If $S<I$, then set $\epsilon =I−S$. Choose $p<x$ rational such that $b^p > S-\frac\epsilon{100}$ (say) and $q>x$ rational such that $b^q<I+ \frac \epsilon{100}$. Then with $r=\frac12(p+q)$, use some inequalities to show that $b^r>S$ and $b^r<I$, contradiction.  This was my reply:  I have the inequality $S-\frac\epsilon{100}<b^p<b^r<b^q<I+\frac\epsilon{100}$, and I'm trying to show that for all $n$, $S-\frac\epsilon{n}<b^r<I+\frac\epsilon{n}$. This would show that $S<b^r<I$. But $p$ and $q$ depend on $n$, and $r$, being their midpoint, depends on $p$ and $q$, and hence $n$. How do I proceed from here? That is, how do I show that $r$ doesn't change when $n$ changes?  Can anybody help? Thank you.  The link to the question:


How to format string to Decimal without losing precission?

Lets take a look at this simple example let formatter = NumberFormatter() formatter.number(from: "0.945")?.decimalValue // result: 0.945 formatter.number(from: "0.94")?.decimalValue  // result: 0.9399999999999999  How can I achieve that "0.94" converts to Decimal with exact same value e.g. 0.94? I prefer solutions with NumberFormatter because I want to use this String to Decimal conversion also for amounts with currency, such as "$0.94" and "0.94€"


Magnetic induction (electron in hydrogen)

In hydrogen atom, the electron is making 6.6*10^15 revolutions per second in circular path of radius 0.53ang. what is the magnetic induction produced at the center of orbit?


If Else Statement Not Returning Right Value

I am trying to check if a playlist is simple or master by an index value. My problem is when I put the (True) URL it still returns a false statement "This is a simple Playlist".   Any tips on how I can fix this ?   String output = getPlaylistUrl(input); String mediaRecord = output.substring(399); String lastRecord = "gear4/prog_index.m3u8"; if (mediaRecord == lastRecord) {     System.out.println("This is a master playlist"); } else {     System.out.println("This is a simple playlist"); }


AMD graphics drivers not working on Ubuntu 16.04

I need some help with my graphics driver. None of my games are working properly (the colors do not load properly and some of the objects are either missing or invisible). I have a Radeon 6870 and I'm confused by all the different types of drivers available for Ubuntu 16.04.


Is the work-energy theorem only valid for conservative forces?

I have learnt that it states "The work done on a body is equal to the change in kinetic energy of the body" which we derived by considering a position-dependent force. However, if mechanical energy is not conserved and one can do work by friction forces, one can increase the internal energy of the body. From my understanding the work-energy theorem is thus not valid unless we consider the internal energy as kinetic energy.  Is the work-energy theorem only valid for conservative, i.e. position-dependent forces?


How can mass bend spacetime, if there's nothing to bend?

The Michelson-Morley experiment proved there was no aether, nothing that light moves through in space. Yet in GR, mass bends spacetime so that light travels in arcs around large masses. How can spacetime be bent, if there is nothing there to bend?  This question is not related to the factors that bend spacetime, which I noticed many physicists try to shuck it off to, to avoid giving a coherent answer, but the structure of spacetime itself.


My phone's power button has gone bad. Can I use my computer to send a USB command to start the phone up?

I got an old phone: an HTC WildFire S. Everything works fine, except that the power button has gone bad. Can I start the phone from my computer over a USB connection somehow?


Strong induction to prove every number can be expressed as sums and differences of powers of $3$

If I assume, by strong induction, that for all elements less than $n+1$, there exists a representation of $n$ as distinct powers of $3$, i.e $73=3^0-3^2+3^4$ and $81=3^4$, $328=3^0+3^1+3^4+3^5$, and I Want to show that it holds for $n+1$, then I considered the three representations of numbers $3k$, $3k+1$ and $3k+2$.  I didn't have a problem proving the first $2$ using strong induction, but the $n+1=3k+2$ case where I assume it holds for all $n<n+1$ is where I am stuck.


Figures: What is the difference between using subfig or subfigure

I tend to use \subfloats[]{} in my figures when I want to list multiple labelled figures of similar content in one bigger picture.  However, I see that some people use \subfigure.  What is the difference between these two options? Is one better than the other?  \documentclass{article} \usepackage{float} \usepackage[caption = false]{subfig} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \subfloat[caption]{\includegraphics[width= 2in]{something}}\\ \subfloat[caption]{\includegraphics[width= 2in]{something}} \end{figure} \end{document}  Or \documentclass{article} \usepackage{subfigure} \usepackage[demo]{graphicx} \begin{document} \begin{figure} \subfigure[caption]{\includegraphics[width = 2in]{something}}\\ \subfigure[caption]{\includegraphics[width = 2in]{something}} \end{figure} \end{document}  Since  is two years old, does Axel's solution still apply?  By this I mean, has nothing changed with subfig?  Are there only 2 'biased' pros for the use of subfig? Is the outcome still it is more advisable to use subcaption over subfig where I am using the latter subfig?


What is the difference between .tar files

What is the difference between .tar.gz and .tar.xz (is there more?)? I know that you can just open up Archive Manager and extract them. But what is the actual difference? Which should I use? What flags should I give tar to extract them in CLI? EDIT: What is the difference between the xz algorithim and the gz algorithim?


Given the curve $y=2x^3+3x^2−36x$ on the interval $− 1 ≤ x ≤ 4$ , find the absolute maximum?

I have found the first derivative which is $y′=6x^2+6x−36$.


I Want To Edit Some Files In C:\Program Files\WindowsApps Folder But I Cant Do So. I Changed The Owner To Everyone And Also Given Every User Full Access. But When I Try To Edit Files Or Create Some New Files I Cant. It Shows Me Error. Please Help Me. I Think This Is Due To The Entry In win://sysappid Which Is Shown As Curropted. If Yes, Then Please Tell How Can I Fix It.


How to use regex to match multiple line with reluctant

I have seen many answers pointing out use (?s) ahead of reg expression but it will match more than I expect. I'm using search in Eclipse Neon.  Ex:  Line 1: String[] str1 = new String[] {"a", "b", Line 2:     "c", "d"}; Line 3: String[] str2 = new String[] {"aa", "bb", Line 4:     "cc", "dd"};   Regex (?s)(\w+)\[\] (\w+) = new .+ (\{.*\}); will match line 1  to line 4, stops matching in the last };, while I want to make the match stop in the first }; so line1\2 and line3\4 can be matched separately.


In both Fallout 3 and Fallout: New Vegas, how can I repair my weapons and armor?


Here is the code:   public class OverloadingByObject {     public static void main(String[] args) {         // TODO Auto-generated method stub         Object object = null;         new OverloadingByObject().SayHi(null);         new OverloadingByObject().SayHi(object);     }      public void SayHi(String str) {          System.out.println("String called");     }      public void SayHi(Object obj) {          System.out.println("Object called");     } }   When I am passing null it should call the method of Object. What is the reason it is calling method of String ?


Proof that an infinite subset of $\mathbb{N}$ is countable

I want to prove that if $A$ is an infinite subset of the natural numbers, then it is countable.   I thought of an informal proof: put the elements of $A$ in increasing order. Then associate the smallest to $1$, the second smallest to $2$, the third smallest to $3$ and so on.   I've tried to formalise this proof in this way: consider the sequence $$ \begin{cases} A_1=A \\ A_n=A_{n-1}-\min{A_{n-1}}\end{cases}$$ The function $f(\min{A_n})=n$ has domain $A$ and codomain $\mathbb{N}$ and is a bijection, therefore $A$ is countable.  My questions are the following:   Is what I wrote correct? If so, how do you prove that $f$ is actually a function from $A$ to $\mathbb{N}$ and is also a bijection?


Multi-Line Dictionary to Single-Line Dictionary

How would you go about converting a multi-line dictionary into one dictionary?  For example, the current dictionary, if printed to the screen, is of the form:  {'keyword':'value'} {'keyword':'value'} {'keyword':'value'} {'keyword':'value'}   ...and so on for over 100 hundred lines. How do you convert this to the following form:  {'keyword':'value','keyword':'value','keyword':'value','keyword':'value'}


Difference of Assign projection, Reproject Layer, and Define layer projection in QGIS?

I have a point layer and a polygon layer that are all in UTM51N projection but do not align. Just want to know when should I use Assign, Reproject, or Define.  Experimented with a polygon in EPSG:4326 - WGS 84 - Geographic, which is the project CRS since this polygon is the first layer I loaded. Target projection is UTM51N.  Reproject - aligned  Assign - not aligned  Define - not aligned  Save layer as - aligned  Using 3.4 so there is no "on the fly projection" feature.


Auto-hosted apps are not supported by Microsoft from next month, June 2014 onwards, Microsoft is recommending auto hosted apps to be converted to provider hosted apps. Publishing a SharePoint hosted app is relatively simpler as it is web scoped and all components are included in .app package.  What are the steps involved in publishing provider hosted apps to SharePoint store/Office store/App marketplace?


New to me Chromebook, that wants linux without crouton

I'm running a samsung chromebook xe500c21 with a intel atom inside and was wondering the best way to get ubuntu on it? Or remix os for that matter on it? Without using the crouton.


The consequences of cheating on the badges?

For instance, the Enthusiast and Fanatic badges. Both are based on logging in daily. For an extended period, and I do check almost daily, but living in the real world means that there may be a day when I simply can not log in to stack.  Now as a programmer I instantly think: "What if I just automate it?", it would be super easy to reload the page automatically on schedule. But that's cheating. . . Right? I plan on checking anyway, but the fallback would be nice. But still cheating. . .  Now I haven't done that, but what happens if I did? How "bad" is it to cheat on those badges? I mean is there no real reason not too, or could it get a user banished? And I'm sure there are plenty of other easily cheated badges, those two just jump out at me as extremely easy.  I'm not looking for a discussion on the ins and outs of cheating, I can come up with a dozen ways to do it, but on the consequences, or lack there of. On one level the badges (unlike rep) mean very little, on the other hand, it's still cheating. Or is it? Isn't the point to show dedication? And wouldn't cheating show that? Are there rules somewhere about this? Is the precedent?


When it's raining, would you get less wet if you run or more wet?  I think you will get less wet, because rain is coming down in a constant volume and if you run you will have a shorter amount of time you will get less volume  I'm not too sure though, some people say when you run you are running into a more volume of rain because rain is not all coming up to down, it will hit you more horizontally