Show equivalent form of $\backsim\left(\forall x {\in} S,P(x) \vee Q(x)\right)$

Question:  ${Let S = \{x_1, x_2, x_3, ..., x_n\}}$  Show that  ${\backsim\Bigl(\forall x {\in} S,P(x)  \vee  Q(x)\Bigr) \Leftrightarrow  \exists x {\in} S, \Bigl( \backsim P(x)  \wedge  \backsim Q(x)\Bigr)}$    This is what I have done so far ...  ${\backsim\Bigl(\forall x {\in} S,P(x)  \vee  Q(x)\Bigr) \Leftrightarrow  \exists x {\in} S, \Bigl( \backsim P(x)  \wedge  \backsim Q(x)\Bigr)}$  ${\exists x {\in} S,  \backsim P(x)  \wedge  \backsim Q(x)\Leftrightarrow  \exists x {\in} S, \Bigl( \backsim P(x)  \wedge  \backsim Q(x)\Bigr)}$  And then I have no I idea how to continue from here.  Any hint will be appreciated.


How to recover a deleted /etc/passwd file?

I deleted the /etc/passwd file and cannot login now. I don't know the root password and tried lots of passwords, but none of them worked.  How can I fix this?


The Package system is broken The message I get when trying to run the software updater is as follows:  If you are using third party repositories then disable them, since they are a common source of problems. Now run the following command in a terminal: apt-get install -f Transaction failed: The package system is broken  The following packages have unmet dependencies: libc6-dbg: Depends: libc6 (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1.3 is installed libc6-dev: Depends: libc6 (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1.3 is installed Depends: libc-dev-bin (= 2.27-3ubuntu1.4) but 2.27-3ubuntu1.4 is installed  I disabled all third party repositories and ran the command: Sudo apt-get install -f  and I got:  debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable (Reading database ... 310312 files and directories currently installed.) Preparing to unpack .../libc6_2.27-3ubuntu1.4_amd64.deb ... De-configuring libc6:i386 (2.27-3ubuntu1.3) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_amd64.deb (--unpack): new libc6:amd64 package pre-installation script subprocess returned error exit status 1 Preparing to unpack .../libc6_2.27-3ubuntu1.4_i386.deb ... De-configuring libc6:amd64 (2.27-3ubuntu1.3) ... debconf: DbDriver "config": /var/cache/debconf/config.dat is locked by another process: Resource temporarily unavailable dpkg: error processing archive /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_i386.deb (--unpack): new libc6:i386 package pre-installation script subprocess returned error exit status 1 Errors were encountered while processing: /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_amd64.deb /var/cache/apt/archives/libc6_2.27-3ubuntu1.4_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)  So I am stuck. How can I recover from this serious crash? I am using Ubuntu 18.04.5 LTS Many thanks


Probabilities : A red die, a blue die, and a yellow die (all six-sided) are rolled.

A red die, a blue die, and a yellow die (all six-sided) are rolled. We are interested in the probability that the number appearing on the blue die is less than that appearing on the yellow die which is less than that appearing on the red die $P(B < Y < R)$.  I know one way to calculate this is:  E = event that no two dice land on the same number:  $$P(E) = \frac{6 \cdot 5 \cdot 4}{6 \cdot 6 \cdot 6} = \frac{5}{9}$$  F = event that B < Y < R and no two dice land on the same number  $$P(F) = P(E) \cdot P(B < Y < R|E) = \frac{5}{9} \cdot \frac{1}{6} = \frac{5}{54}$$  Is there another way to find the number of outcomes where $B < Y < R$ using the formula $N(E)/N(S)$, where $N(S) = 6 \cdot 6 \cdot 6 = 216$?


I have installed java and it is working, but when i try to retrieve Java home it shwing empty

I installed Java in my red hat machine and when I run java -version, it is showing my installed java version.  However, when I run echo $JAVA_HOME, nothing is displayed.


How to calculate the total number of days between two date pickers and display the result in another text field?

   Check-In   <input type="date" name="checkin" class="form-control" id="checkin" />

   Check-Out   <input type="date" name="checkout" class="form-control" id="checkout" />


Step in Finding MLE for Uniform Distribution

Let $Y_{1}, \ldots, Y_{n}$ be a random sample from from a $U(0,2 \theta)$ distribution. The probability density function for each $Y_{i}(i=1, \ldots, n)$ is given by: $f_{Y_{i}}(y \mid \theta)=\left\{\begin{array}{ll}\frac{1}{2 \theta}, & 0 \leq y \leq 2 \theta \\ 0, & \text { otherwise }\end{array}\right.$ The likelihood function for $\theta$ given the sample $Y=y$ may be written as: $ L(\theta \mid y)=\prod_{i=1}^{n} \frac{1}{2 \theta} I\left(y_{i} \leq 2 \theta\right)=(2 \theta)^{-n} I\left(y_{n} \leq 2 \theta\right) $ where $y_{n}$ denotes the sample maximum, $I$ is an indicator function. I need to find the MLE for $\theta$ The text I'm following starts by pointing out that the likelihood function takes strictly positive values for $2 \theta \geq y_{n}$ or else $\theta \geq y_{n} / 2 .$ Specifically: $ L(\theta \mid Y=y)=\theta^{-n}, \quad \theta \geq y_{n / 2} $ If I accept this, which I don't see where it's coming from, then... since the likelihood is decreasing in $\theta,$ I can maximise at $y_{n} / 2 .$ And hence the MLE for $\theta$ would be $\hat{\theta}^{M L E}=Y_{n} / 2$ But then again, this intermediate step is not entirely clear.


Instructions to install pepper flash on ubuntu 12.04

Can anyone show the way to do this step-wise instead of all in one paragraph?


Question about the meaning of Variance/Standard Deviation

I know that these two functions have statistical significance, but I'm finding it hard to grasp any intuition about them. I understand that in their own way they represent some type of 'average' distance an arbitrary data point has from the dataset’s mean.  In my head, if I wanted to know the average distance a point has from its dataset’s mean, I would do something like this:  $\frac{\sum|X_i - \mu|}{N}$  which  literally turns out to be the mean distance from the mean of the dataset. But variance does not take an absolute value to get rid of the sign, it takes a square, which makes me lose grasp on what the actual meaning of the end number is. And standard deviation just square roots the end result of variance, mucking up the waters for me even more.  Can anyone give me some type of intuition on these two values?


Control Android with broken screen from PC

My rooted Galaxy Nexus has a broken screen. How can I use my PC (ie, via ADB) to control the phone?  androidscreencast would be the ideal solution, but its keyboard/mouse control feature does not work in Jelly Bean. Perhaps someone knows why and we can patch the code? (see: )  Installing a VNC server is another, but for the love of me I can't get it to work. Eg, using Droid VNC Server, I install the apk, and am supposed to execute /data/data/org.onaips.vnc/files/androidvncserver but there is no files directory inside org.onaips.vnc (instructions from here: ). VMLite is another VNC server that can be started with a special Windows utility (and doesn't need root!) but it's not OSS so I can't get the apk in order to install (Google Play is not pushing apps to my phone prob because I disabled some service--let me know if I can force Google Play to update itself from ADB or install the app). fastdroid-vnc is a binary (not apk) and it runs fine via shell, but something is broken and it shows nothing.  What are my options? Let's make this a community wiki, to help anyone who's broken their screen!


I am little confused and not sure, how to add the cat << EOF style to my script. Would really appreciate a little feedback and help.  Here is my script  !/bin/sh #This is a disk mailer script for hdfs     DU_RESULTS_HOME=$(sudo -u hdfs hadoop fs -du -s /user/* | sort -r -k 1 -g | awk '{ suffix="KMGT"; for(i=0; $1>1024 && i < length(suffix); i++) $1/=1024; print int($1) substr(suffix, i, 1), $3; }'| head -n 22 |awk '{ print $1"\t\t\t" $2 }')  DF_RESULTS_HOME=$(sudo -u hdfs hadoop fs -df -h /user) HOSTNAME=$(hostname -s)  MESSAGE_SUBJECT="Disk usage" MESSAGE_SENDER="xyz" MESSAGE_EMAIL="abc"  DU_RESULTS_HEADER_USER="Dir size             User"  MESSAGE_BODY="Team:  High level Disk Usage Report for: /user  Please take a moment to clean out any old data, and write temp files to an appropriate filesystem, such as /tmp.  Thanks  if [[ --debug == "$1" ]]; then     echo debug on      printf '%s\n\n\n\n%s\n\n%s\n%s\n\n\n\n\n%s\n%s\n%s' "$MESSAGE_BODY" "$DF_RESULTS_HOME" "$DU_RESULTS_HEADER_USER" "$DU_RESULTS_HOME" else                      echo debug off      printf '%s\n\n\n\n%s\n\n%s\n%s\n\n\n\n\n%s\n%s\n%s' "$MESSAGE_BODY" "$DF_RESULTS_HOME" "$DU_RESULTS_HEADER_USER" "$DU_RESULTS_HOME" | /bin/mail -s "$MESSAGE_SUBJECT" -r "$MESSAGE_SENDER" "$MESSAGE_EMAIL"                         fi


In addition to showing reputation scores, SO should rank users. In the users section, users are ordered by the reputations they have.  Each user should also have a unique rank, since many users can have the same reputation score.  Rank must follow the order laid out by reputation, but for those having similar reputation, an additional formula should be defined which can rank users based on tags, time since registration, frequency of activity and/or helpfulness of their answers.  What are your thoughts on this?


If someone can help me with this. I'm complete -n o o b, only started to learn and got stuck.  If I'm asking this -   Scanner buck = new Scanner(System.in); String fname; System.out.println("Please Enter your Name "); fname = buck.next();   which command do I use to make specific name only to be entered as an answer. For example name would be Vani.  If name is "Vani" than "you are in". If any else name "than you go out".  I understand this with numbers but not with letters.  Any help would be appreciated.


Install full Ubuntu and bootloader on USB drive

I have a request for Ubuntu: I need the team to update the Ubuntu iso on the download page with an updated installer, so that Ubuntu can successfully be installed on my USB drive.    I don’t like dualboot systems on my PC’s hard drive, so I decided I'd install the system on a flash drive; a safer way to install and use systems.  I did so, but the bootloader (GRUB) is installed on my PC instead of my destined USB drive, with the rest of the Ubuntu system, no matter what, so I can’t use Ubuntu on any other PC, like other systems like Chromium OS systems.   I can bootload Pop! OS an any PC because it does not depend on a bootloader/GRUB to access the system. But I don’t like Pop!_OS like I do Ubuntu.   Ubuntu team, please fix this in your isos so that GRUB won’t be installed on the PC and I can use my USB drive to use Ubuntu on any PC.


Can we perform frontend validation with lightning:inputField?

I'm creating some small lighting components for use with Quick Actions.  While "Never trust the client" means I will have backend validation, for a good user experience, I'd prefer to prevent bad data from even getting submitted.  The  seems to a convenient choice for receiving input and getting it take forward data to my server is working beautifully.  However, it isn't clear whether or how I might do any sort of validation on this data.  Or, if if I use some other input elements for the UX, will I be able to use them with lightning:recordEditForm?  (This question is different from the possible duplicate because the actual text of the question seemed to be about conditionally modifying the form to include additional fields instead of about validation.  And the provided answer was focused on the same goal.  Reading comments, I was able to glean enough information, but it a badly titled question and not a true duplicate.)


Check if a Windows ListBox contains a string c# ignorecase?

if (!lstFieldData.Items.Contains(ItemValue))         MessageBox.Show(ItemValue + "Item not found.");   Above code is to get the list of items that is not in the list. Now i want to check this with ignoring the case. How do i?


How to remove The Red 'Error' Text and the Exclamation mark from apex page message

I want to remove the red 'Error' text and the exclamation mark from apex page message and want to show only the Message. Please see image below:    Providing sample code for reference:  Page:  <apex:page controller="Cntl_ApexMessageTest" >         <apex:form >         <apex:pageMessages />         <apex:inputText value="{!val}" html-placeholder="Enter value" />         <apex:commandButton value="Submit" action="{!submit}"/>     </apex:form> </apex:page>   Controller:  public class Cntl_ApexMessageTest {     public integer val {set; get;}     public Cntl_ApexMessageTest () {         }      public void submit() {         if(Math.mod(val,2) == 0){             ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.CONFIRM,'You have provided an even number!'));         } else {             ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.ERROR,'Please provide an even number!'));         }     } }


Why does the gravitational field for certain configurations, at certain points in space, diverge to infinity?

I recently came across this , in David Morin's weekly problem set. The solution to which I figured, as explained . But I also came across the solution explained in this . Here the author solves the problem in n dimensions too and concludes that in 2-dimensional space, the object that gives maximum field would a thin circular plate, and not the planar cross-section of the 3D object found to give maximal field before.   I tried to verify this by calculating fields for the 2 different candidates, but I found the field for a uniform circular plate on a point on the circumference diverges to infinity. Same is the case for various objects, like a uniform semicircular plate at the centre. Why does this happen? Why is it that the field does not diverge for a uniform sphere at the surface of the sphere but it does for other objects? Also, will this be practically experienced?


So this is a question with which I have been stuck for a while and it all revolves around the concept of volt.  I have posted a LOT of questions on physics forums while trying to understand the concept of volt and potential difference. This is hopefully going to be the last one.  What do you exactly mean when you say that a battery is 2.5 V. I know that it says that the potential difference between the 2 terminals of the battery is 2.5 V  but then what is the potential of the 2 ends of the battery? Is there a unit of potential and not just potential difference?  Also volt = work/charge but how can work/charge express the difference of potentials across the 2 terminals?


Is it possible to use an iPhone without a SIM card as an iPod touch?  I have an old iPhone 3G that no longer has a SIM card and I want to use it as an iPod touch.  How can I achieve this?


I know there's a lot of questions about downloading .tar.gz files, but I haven't found any that explain my problem. When I'm trying to install these files, using the   ./configure make sudo make install.   But when I use ./config, it returns bash: ./config: No such file or directory. Same with make and sudo make install. Am I doing wrong, or is there just an error with my computer? As I said, this is not the same question as "how to download .tar.gz files" because I tried their solution and it didn't work. There is no ./configure file to cd into.


The line $l_1$ has the equation $r=(6i+2-2k)+\lambda(4i+5j-k)$ and the plane $\pi_1$: $2x-y+4z=4$, the line $l_2$ is the reflection of $l_1$ in the plane $\pi_1$. Find the exact vector equation of line $l_2$   So the line intersects the plane when $\lambda=-2$, giving the point $(-2,-8,0)$ which will be common on $l_1$ and $l_2$. But I am unsure on how to find the direction vector for $l_2$. Any help would be appreciated.


Why is there a pattern for making orders of perfect squares (first one, second one, third one) by simply adding two to the next adding each time?

For example, if I had a perfect square of $16$, which is the fourth perfect square, I would add nine to get to the fifth perfect square, $25$.  This is probably how it goes:$$1+3=4+5=9+7=16+9=25+11=36+13=49+15=64+17=81+19=100$$and it goes on forever.  It looks like the amount being added each time gets added by two each time as they move on to the next and the next and the next and the next.


Newbie question: Where is my rendered PNG saved to?

macOS Mojave 10.14.4  I set /Users/username/Documents/BLENDER/rendering as output path.  Is the filename from the .blend files used?


Understanding the 95% confidence interval

I am new to statistics, and recently came over interval confidence, but did not understand very well. Will you please explain this to me. to better understand, i will put an example as well: Lets say there are 5000 products in a store and we are checking the expiry date of them. We selected 113 products and from these 113, we found that 61 of them were expired. How to determine the 95% confidence interval of the proportion for this, and what does it mean. I am used to R, so solving this problem in R will help me. Thank you.


Given the matrix $A$ such that $A^3=0$. Determine if matrix $A^2-A+I$ is invertible, and if it is, find it's inverse.  Is it possible to directly evaluate matrix $A$ from the condition $A^3=0$? If not, can we use Cayley-Hamilton theorem?


Currently I'm doing some unit tests which are executed from bash. Unit tests are initialized, executed and cleaned up in a bash script. This script usualy contains an init(), execute() and cleanup() functions. But they are not mandatory. I'd like to test if they are or are not defined.  I did this previously by greping and seding the source, but it seemed wrong. Is there a more elegant way to do this?  Edit: The following sniplet works like a charm:  fn_exists() {     LC_ALL=C type $1 | grep -q 'shell function' }


Elements with infinite roots in $p$-adic integers

Let $\mathbb{Q}_p$ the $p$-adic completion of $\mathbb{Q}$ and $$S=\{x\in\mathbb{Q}_p:1+x\mbox{ has $n^{th}$ roots in }\mathbb{Q}_p\mbox{ for infinitely many }n\in\mathbb{N}\}$$ I have to show that $p\mathbb{Z}_p\subseteq S\subseteq \mathbb{Z}_p$ where $\mathbb{Z}_p=\{x\in\mathbb{Q}_p:|x|_p\le 1\}$.  Any hint on how to start? I'm totally stuck at the moment, trying to find out the structure of those $n^{th}$ roots but going nowhere.


Show that random variables $X$ and $Y$ are not independent, but nevertheless Cov$[X,Y] = 0$

Let $Z$ be a random uniformly distributed variable on $[0,1]$. Show that the random variables $X = \sin 2\pi Z$ and $Y = \cos 2\pi Z$ are not independent, but nevertheless Cov$[X,Y]=0$.  This is a homework assignment, but I'm a bit stuck.  My thoughts  We can see that $X$ and $Y$ are not independent, since both depend on $Z$. If we want to show this explicitly, then we need to show that $$f_{X,Y}(a,b) \neq f_X(a)\;f_Y(b),$$ where $f_{X,Y}(a,b)$ is the joint probability distribution function. But how can I find the (joint) probability distribution function(s) $f_X, f_Y$ and $f_{X,Y}$?   If I can find these functions, I can also solve the covariance problem. Is this the right way? Or is there a 'better' way to solve this problem?


Given positive integers $a$, $b$ and $c$, I'd like to ask whether we may adopt some variant of the Euclidean algorithm to calculate $\gcd(c^a+1,c^b+1)$ fast?


Where can I find the flagging summary on my profile?

I cannot find the flagging summary on my user profile.  I have seen many questions about flagging system: , , , etc.  I know the results of my flags are not of my business and moderators are responsible for the follow up, but I would like to see the summary as there are other things involved, such as Deputy and Marshal badges.


Probably everybody who is very active on SO has experienced cases of random, serial upvoting as the expression of thanks from a (usually newbie) user. The pattern is usually 5 or more upvotes on your latest answers. The upvotes will be detected within 24 hours, and removed. (Or so I assume.)  No harm done except maybe a minor irritation for people after one of the "rep cap" badges because they are shown a higher reputation than they actually have. Still, I was thinking whether, in an attempt to channel the positive attitude into more productive areas, it would be worth showing a tooltip on the third upvote for the same person within time frame x:  Please use one upvote, a comment, or some quality content of your own, to say thank you Large numbers of upvotes for the same user may become invalid as part of our spam detection mechanisms.  Does this make sense? Maybe it is too localized and rare, but it has happened to me three or four times in the last two weeks alone. You decide.  Clarification: I am not advocating putting up any kind of barrier on upvotes. . I'm suggesting informing people of the barrier and the futility of their ten or so upvotes for a single person because those votes are likely to be revoked.  Update: @devinb makes the good point that "saying thanks" is not the only possible reason for serial upvoting, and the message wouldn't make sense then. The point still stands: Your votes aren't going to count, and when it comes to up voting (which is always some sort of positive behaviour, however misguided if done indiscriminately) I think it's fair to inform people of this.


Is there any way to decrypt .locky files?

I would like to help to my friend.  She opened a email, and after that, all files is transform to some encrypt format on she computer.  Every image, document extension replaced by .locky.  Now, after hours and hours searching on google I dosen't find any trusted way for she get back they files.  I hope we can find out something.  What I already tried:   Remove virus with programs: Malwerebytes, Hitmanpro, they dosen't find any result. I tried restore the system from the control panel.-Gess what, no restore points.. I tried shadowfile explorer, which capable search shadow files-No results. I tried rename files from .locky to original format like:png,jpg, etc.- Dosen't work either.   At this point I gived up, I need some help from a experted person.  We would like to target one specifick file types, images, like jpg, jpeg, png and others.  Is there anyway for we can recover this files, without for we need to pay to the hacker?  My friend does not have any backups of the files in question.


I don't understand why I've got this error: line 1: #!/bin/bash: No such file or directory  while running any piece of bash script like this: #!/bin/bash echo "pouet"  I've tried running it on a Fedora 19 and everything went well. I'm on Debian 7, I've tried parsing the first line to search for \n\r but everything was clean (every script I've made so far seems to behave the same way). My $PATH looks like this: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin. I've tried it with a normal user or root, same result. But the rest of the script seems to behave normally (echo is interpreted). And yes, /bin/bash exists and is executable. Edit: $ LC_ALL=C sed -n l < tesT.sh \357\273\277#!/bin/bash$ echo "pouet"$


Hello I'm trying to use string in SOQL query where clause for multiselect picklist.  I need to get records of CustObj__c where Multipicklist__c fild have 'abc' or 'xyz' values.  String str = '\'abc\',\'xyz\''; for(CustObj__c cust : [Select Id, Name, Multipicklist__c FROM CustObj__c WHERE Multipicklist INCLUDES (:str)]{ somelogic }   However I get no records.  What is wrong in this query?  Ok I tried using list too, here I'm getting all record of all Public Groups where user is assign. and saving those Public Groups names in   List<String> groupIds = new List<String>(); List<String> groupNames = new List<String>();  for(GroupMember gm :[SELECT Id,GroupId,UserOrGroupId FROM GroupMember WHERE UserOrGroupId = :userIds[0]]){             groupIds.add(gm.GroupId);         }         for(Group g :[SELECT ID,Name FROM Group WHERE Id IN :groupIds]){             groupNames.add('\'' + g.Name + '\'');         }  for(CustObj__c cust : [Select Id, Name, Multipicklist__c FROM CustObj__c WHERE Multipicklist INCLUDES (:groupNames)]){ somelogic }   It still not working  I get error in Dev console : Invalid bind expression type of List for column of type String


What is the difference between "chmod +x" and "chmod a+x"?

What is the difference between chmod +x and chmod a+x?  I know both of these commands make a file executable but what is the difference between these two commands?


The question is that simple, Why isomorphisms are important ? I know how we define mathematically isomorphisms, and I know what it means, if two things are isomorphic they are essentially the same thing. I want you to give some examples where they answer the question "Why isomorphisms are important ?" because I am an undergraduate I don't have that much experience to give my self that example. I think isomorphism like the analog of matrix similarity, meaning if we want to find a big power of a matrix we don't calculate all the matrix multiplications we just find the Jordan form or the diagonal matrix, and we take it from here. So we make problems easier and faster to calculate by connecting them with isomorphisms. Do you have in mind a fundamental example? Or one you think condenses the beauty of mathematics. Thank you.


Does Mirror Image affect spells that have no attack roll?

I have two questions concerning the  spell.   If I am under the effect of mirror image and was targeted by a spell like , do I roll a 1d20 to determine whether myself or an image was targeted? It doesn't make an actual attack, but common sense suggests that casting a spell still requires a solid target which has to be determined between me and my illusory images.  The same question, but about . I googled it and found nothing but theories. Does Magic Missile hit and destroy all images at once or just one? Rules say that you can choose several targets, but according to the mirror image description you cannot target the image exclusively.


How can I improve the chance of Solar Eclipse happening in Terraria

Is any way to improve the chances of a solar eclipse happening (apart from killing the mechanical bosses).  Basically I want to get broken hero swords to be able to forge the terra blade...


What is the difference between Non-preemptive, Preemptive and Selective Preemptive Kernel?

What is the difference between a "Non-preemptive", "Preemptive" and "Selective Preemptive" Kernel?    Hope someone can shed some light into this.


Let $v$ denote a nonzero vector in $\Bbb R^n$  Show that $P = \{x \in \Bbb R^n  \mid  x \cdot v = 0\}$ is a subspace of $\Bbb R^n$. Show that $\Bbb Rv = \{t \cdot v  \mid   t \in \Bbb R\}$ is a subspace of $\Bbb R^n$  I looked through my textbook but couldn't find an example similar to this. How would i solve this?


is there an easier way of doing corners like this?

im doing models of interiors and one of the parts used molding around doors. is there a easy way of doing my corners other than having to get 2 frames and work inwards towards eachother?


I'm at the moment studying quantum physics and I came across $$E=hf.$$ My question is: how come there are only certain energies allowed if in this formula $f$ can be any number, and therefore, energy could be any number? Are there only certain values of $f$ allowed?  What am I not understanding correctly?


How do I write a better xpath of this element?

I am working on a project and building automation test suite for a webpage. A certain part of the webpage looks like this.  The corresponding HTML is as follows:
                                                                        Try us out for 14 days. If you aren't satisfied, we'll refund your money.
                                                                                Our customer service team is available Monday to Friday,
                                                                                8AM - 12AM (Midnight) EDT, via phone, email or live chat.
  I want to write an XPath for just the text "Our customer service team is available Monday to Friday,". In particular, I want to verify the text in my automation suite of the corresponding line. Is there any way to write an xpath using contains() or text()? P.S. I tried the following xpath //p[@class='customer-service']/text()[2]  and this was the result.


Why every update of most Applications means just redownloading the entire program

Why even the most popular applications are asking its users to just redownload the entire program for just performing the updates.  For example consider FireFox. They are pushing updates with no major changes(most are security patches). So that would mean small changes. Then why can't the app be only modified only for that small change without downloading the whole program again?  What's preventing them from implementing that?


How to make Google ignore where I am in the world?

Whenever I travel around the world Google always assumes I want to use the region I am in as the search engine.  I just want to always search Google.co.uk wherever I am in the world. I don't want to see foreign results and foreign languages and foreign countries results.  How do I default Google and Chrome to this?


How to convert list into different format using f{} and add string between them

The list are below second_list = ['C'] first_list =  ['A', 'B'] third_list  = ["D"]  Expected out is below the firstlist is A,B the second_list is C and thirdlist is D psudo code print (f'the firstlist is {j for j in first_list } the second_list is {for j for j in second_list} and thirdlist is {for j for j in third_list')


When Ubuntu 21.04 will release? I'm waiting from the beginning of this year.


Logical/Etymological reason for unique conjugation of third person singular present tense

In most English verbs, there is a consistent pattern in the conjugation of present and past tense.  For past tense, the same inflection is used for each grammatical person, but in present tense, third person singular stands apart from the rest. For example, with run:  Past tense: I ran / you ran / we ran / they ran / she ran Present tense: I run / you run / we run / they run / she runs  There is an exception, which is To be.  The pattern of unique conjugation for the third person singular present tense can be seen in this chart, along with the irregularity of to be.  Setting aside to be (at least for now), is there a logical or etymological reason for the unique conjugation of the third person singular present tense?


How to change permissions of all files that will be uploaded to a folder in future?

I upload files using a form in php to a folder in my Ubuntu 16.06. I've used sudo chmod -R 777 /opt/lampp/site/file_content But when I upload the file, its permissions weren't set to 777.  I need help to change the uploaded file permissions to 777.


Is Inclusion–Exclusion Principle still valid if $\cap$ and $\cup$ are exchanged?

The principle for the case of three sets, states: $$|A\cup B\cup C|=|A|+|B|+|C|-|A\cap B|-|A\cap C|-|B\cap C|+|A\cap B\cap C|$$ I wonder whether there exists a similar formula, where $\cap$ and $\cup$ are exchanged; for example: $$|A\cap B\cap C|=|A|+|B|+|C|-|A\cup B|-|A\cup C|-|B\cup C|+|A\cup B\cup C|$$ If yes, is there a way to find the cardinality of the intersection of n sets?


Cannot find the graphviz package in apt on 18.04.1 LTS

I'm trying to install graphviz on 18.04 but when I try to install it it says it is unavailable, despite being listed as having been released for 18.04:   I ran apt-get update and it is still missing from the repos. Does anyone know where to find it, or a PPA I could add to install it from?


The sequence 1/(n-1) is apparently unbounded yet convergent. What am I missing here?

For the sequence 1/(n-1): x1 is undefined. I think that makes the sequence unbounded. However I can prove from definition that the sequence is convergent. And there is the theorem that all convergent sequences are bounded. So what am I missing?


Is $BB^{\top}+ c I$ an invertible matrix?

Let $B$ be an $n\times m$ real matrix, $c$ be a positive constant, and $I$ be the identity.  Is $B\cdot B^{\mathrm T} + cI$ guaranteed to be invertible?


I just saw this, I have two Stackoverflow profiles, one tied to Facebook & one tied to Gmail. Is there a way to merge?


XMLHttpRequest send (POST) a parameter with "+"

I've discoverd that XMLHttpRequest with xhttp.send() don't send correctly a variable that contains a + inside. xhttp.open("POST", "page.php", true); xhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded"); xhttp.send("paramx=" + paramx + "&paramy=" + paramy);  If, for example, paramy is equal to try+10 in php $_POST["paramy"] will be equal to try 10 (unwanted space in place of plus) How can I send and obtain variables with + too? (So in this example try+10) Thanks


I'm trying to make a page with a box in three steps, and each step needs to be loaded by ajax, the steps change after each click in the button "next". I'm changing the class of the button for each step so I can load the next, do not know if there is a better method. but when I click to go to the second step carries me the first step.       /**** THIS WORK FINE *****/     // First Click on Next Button load first step      $('.next-button').on('click', function(){         $('.first-step').load('includes/selecione-torcida.html');         $('.next-button').addClass('next-torcida');     });     /**** THIS DON'T WORK *****/    // Second Click on Next Button load second step but in the class "next-torcida"     $('.next-torcida').on('click', function(){      $('.first-step').load('includes/selecione-amigos.html');    });


I would like to know how to create a Sprite Sheet

I have 40 images, and I would like to group them into 1 picture (sprite sheet). 4 lines by 10 column with a transparent font.


Do users see notifications on answer edits?

I have not asked that many questions, so I do not really know. Basically I just revamped one of my answers where I corrected the sheer ignorance in it and actually found the answer to the question (or at least I believe I got very close), but I do not know if the user who asked the question already sees an alert that I edited it or do I need to notify him with a comment?


What is the Advantage of using Do While PHP

I am searching advantage of using Do While, most of blogs and tutorials say its depends on requirement, without that is there any advantage we get from Do While ?  <?php $i = 0; do {      echo $i; } while ($i > 0); ?>


I was wondering how to reset Ubuntu's theme to default because I installed a new theme and now everything is broken despite already resetting the theme.  When I logout it goes to a blank screen and says low graphics mode and I can't do anything else so I have to reboot.    I am unable to show you the login screen and in gnome session nothing loads it is blank.  Ubuntu 13.10


I have a Lenovo Yoga Pro 2 with a 3200x1800 screen. I've got most of the system working with HiDPI, but nautilus is still really tiny. What can I do to make it usable?


Is the origin of giants explained anywhere in Tolkien's fiction, notes or letters?

In The Hobbit, there is a brief mention of giants playing games by tossing enormous boulders whilst the twelve dwarves, Gandalf, and Bilbo make their way through a pass in the Misty Mountains. Where did giants come from? I do not recall them from The Silmarillion. Does Tolkien ever address their origins elsewhere?


I am going to Purchase LM7805 for 5V supply for my school project and I now know how to connect it. Now I want to know that will excess current damage my circuit?  As per datasheet output current is 1.5A. Can you tell that will my IC work on it? ICs are -: 7404,7432,7438. And how do I know what is max current limit for a certain IC? Is that is related to iol and Ioh?


Unable to Update hardware support software

Here is the error text I get when clicking install:  The following packages have unmet dependencies: libgl1-mesa-glx-lts-trusty: Depends: libglapi-mesa-lts-trusty (= 10.1.3-0ubuntu0.1~precise1) but 10.1.3-0ubuntu0.1~precise1 is to be installed                             Depends: libx11-6 (>= 2:1.4.99.1) but 2:1.4.99.1-0ubuntu2.2 is to be installed                             Depends: libxdamage1 (>= 1:1.1) but 1:1.1.3-2build1 is to be installed xserver-xorg-lts-trusty: Depends: xserver-xorg-core-lts-trusty (>= 2:1.11) but 2:1.15.1-0ubuntu2~precise1 is to be installed


Can every Banach space be given an inner product homeomorphically?

Let $(X,||.||)$ be a real Banach space , then is it true that there exists a norm $||.||_1$ on $X$ coming from an inner product such that $||.|| , ||.||_1$ generates same topology on $X$ or atleast $(X,||.||)$ and $(X,||.||_1)$ are homeomorphic ?


Button that can be placed on a colored block

How can I use the /give @p command to give me a button that can only be placed upon red stained clay in Adventure mode? I am using this command, but it's letting me place it on any block.  /give @p minecraft:wooden_button 1 0 {CanPlaceOn:["stained_hardened_clay:14"]}


jQuery on click not updating after editing html

I have a drop down menu that lets users filter through different types of items in an online store.  Currently, whenever a user clicks the add button, an alert should pop up with the index of the item.  This works when the page first loads and no filter is selected, but once the filter is applied, the onclick doesn't work.    Javascript that creates the html      function createProductData(product, index){     var trow = "
";         trow += "" + product.name + "	";         trow += ""+product.description + "	";         trow += ""+product.price + "	";         trow += "<button class='btn btn-primary addme ' data-index='"+ index +"'>Add</button>
";     return trow; }      Click function  /* *adds an items index to the 'cart' array, calls the displayCart function */ $('.addme').on('click', function(){     var thisButton = $(this);     var index = parseInt(thisButton.data('index'));     cart.push(index);     alert(index);     //displayCart(); })//end onlcick   The class name doesn't change when a new list is put out, so I'm not entirely sure what's causing the hiccup.


modified 3SUM algorithm doesn't work well with floating point

So I've been attempting to solve the 3SUM problem and the following is my algorithm  def findThree(seq, goal):     for x in range(len(seq)-1):          left = x+1         right = len(seq)-1          while (left < right):             tmp = seq[left] + seq[right] + seq[x]             if tmp > goal:                 right -= 1             elif tmp < goal:                 left += 1             else:                 return [seq[left],seq[right],seq[x]]   As you can see it's a really generic algorithm that solves it in O(n2).  The problem I've been experiencing is that this algorithm doesn't seem to like working with floating point numbers.   To test that my theory is right, I gave it the following two array  FloatingArr = [89.95, 120.0, 140.0, 179.95, 199.95, 259.95, 259.95, 259.95, 320.0, 320.0] IntArr = [89, 120, 140, 179, 199, 259, 259, 259, 320, 320]   findThree(FloatingArr, 779.85) // I want it to return [259.95, 259.95, 259,95] >> None // Fail findThree(FloatingArr, 777) // I want it to return [259,259,259] >> [259, 259, 259] // Success   The algorithm does work, but it doesn't seem to work well with floating point numbers. What can I do to fix this?   For additional information, my first array is originally a list of string of prices, but in order to do math with them, I had to strip the "$" sign off. My approach in doing so is this  for x in range(len(prices)):     prices[x] = float(prices[x][1:]) // return all the prices without the "$" sign. Casting them to float.    If there is a much better way, please let me know. I feel as if this problem is not really about findThree() but rather how I modified the original prices array.  Edit: Seeing that it is indeed a floating point problem, I guess my next question would be what is the best way to convert a string to int after I strip off the "$" ?


How do the sides of a conical container supports the fluid it holds?

The base area and water depth is supposed to be the same for all three containers.   The pressure in a static fluid arises from the weight of the fluid and is given by the expression $P=\rho  gh$.  The expression tells us that the fluid pressure at the bottom of all three containers is the same because the depth is the same. If the pressure is the same then the normal force exerted by the bottom of the container on the fluid is the same since $F = P\times A$. But the normal force is also equal to the weight of the fluid which is different for all three containers. How is this possible? While I was trying to find an answer to this question on the internet, I found a couple of forums that said the reaction forces from the sides of the containers are responsible for this, but I can't see exactly how. If anyone could show the math of how that would work out, that would be helpful.


How do you backup all your emails, by copying the 'Outlook' folder? (Outlook 2013)

[...] All versions of Outlook use pst files, but the disk location has changed over the years. Right-click your email account on the left in Outlook and select Data File Properties. Click Advanced to see the filename. Only the pst file is essential, but copy the whole folder to back up Outlook’s settings and preferences too. Just copy it back to restore it, or click File, Open, Open Outlook Data File. Outlook can work with any pst file stored anywhere.  Backing up your Outlook data file(s) is as easy as copying your .OST or .PST files over to another hard drive, cloud server, thumb drive, or some other storage medium. You remember how to locate your data files? Open the Mail control panel and click the “Data Files” button. Click “Open File Location…” and you can then back up your data files. [I don't display  here)  After following the instructions above, I arrive at:  C:\Users\[my username]\AppData\Local\Microsoft\Outlook  However, all Outlook Data Files here are .ost, and NOT .pst. In  File > Open & Export > Open Outlook Data File, 'Open Outlook Data File' only works for .pst. What is wrong here? Where's the folder with all the .pst files? How can I backup all my Outlook email accounts simultaneously?


Representations of a product of Lie groups

Let $G=G_1\times G_2$ be a product of two compact Lie groups. Is every finite dimensional irreducible representation of $G$ a tensor product of irreducible representations of $G_1$ and $G_2$? This seems to be true (at least in many cases) but I have been unable to find a reference. Could someone provide a reference or a proof for this?


Hide admin account from (Windows 7) login screen *without disabling* it

Can anyone please tell me how to hide admin account from the welcome screen without disabling it?  The method that uses the SpecialAccounts registry key does disable the account, so you can no longer enter the admin password to run elevated tasks from a limited account.  The solution should be usable by Home editions of Windows, so if it requires a group-policy, please also include the registry entry that the group-policy editor alters.


1 of my PSN accounts was lost is it recoverable as well as it's DLC's?

I feel like an idiot, but I had 2 PSN accounts on my PS3 which had all my online games. The other had all my money but recently I got a free DLC on my game account and my account with my money was deleted by accident. Is it possible to get that account back with all the DLCs and money?


Im trying to use Radio buttons to make a choice and then once a choice has been selected, i can then go ahead and use a button to run a certain method matching the radio button that has been selected.  Below is an example of what i would like to do:  final ToggleGroup group = new ToggleGroup();     RadioButton today = new RadioButton("Today");     today.setToggleGroup(group);     today.setSelected(true);     RadioButton yesterday = new RadioButton("Yesterday");     yesterday.setToggleGroup(group);     RadioButton duration = new RadioButton("duration");     duration.setToggleGroup(group);      group.selectedToggleProperty().addListener(new ChangeListener<Toggle>() {         @Override         public void changed(ObservableValue<? extends Toggle> ov, Toggle t, Toggle t1) {              RadioButton chk = (RadioButton)t1.getToggleGroup().getSelectedToggle(); // Cast object to radio button             if(chk.getText() == "Today"){               System.out.println("You've Selected Radio button 'Today'");             }             if(chk.getText() == "Yesterday"){               System.out.println("You've Selected Radio button 'Yesterday'");             } else{                    System.out.println("You've Selected Radio button 'duration'");             }         }     });   Thanks for your help :)


"Consider a language with a single object constant a, a single unary function constant s, and two unary relation constants p and q. We start with the premises shown below. We know that p is true of s(a) and only s(a). We know that q is also true of s(a), but we do not know whether it is true of anything else.  ¬p(a) p(s(a)) ∀x:¬p(s(s(x))) q(s(a)) Prove ∀x.(p(x) ⇒ q(x)). Hint: Break the problem into two parts - first prove the result for s(x), and then use that intermediate conclusion to prove the overall result."  I know I have to reach AX:(p(s(X)) => q(s(X))) and p(a) => q(a) first, but I'm struggling getting started. I also don't know if my first steps are correct. Any help? Thank you.


Inject outer scope when monkey-patching instance method in Ruby

I have a container class Foo with a method frob, and I want to add a similarly named method, which will delegate to the container, to each of the contained elements.  First I tried    self.children.each do |c|     def c.frob       self.frob     end   end   but this of course leads to SystemStackError: stack level too deep, as self is c at that point. I then tried    parent = self   self.children.each do |c|     def c.frob       parent.frob     end   end   but local variables aren't part of the closure of the newly defined method, so I get undefined local variable or method 'parent'.  I came up with the following hack, which works:    self.children.each do |c|     c.instance_variable_set('@parent', self)     def c.frob       @parent.frob     end   end   However, it pollutes the variable space of the child with something that's only needed by this one method. How can I get parent/self in there while keeping the newly defined method self-contained?


ToC, article class, adding a dot next to the number of section

Similar to  question I would like to add a dot after the section-numbers in my table of content. However I am using the article class for which the solution mentioned in the link does not work. Is there a workaround for this scenario?


Two days ago I got some upvotes on stackoverflow but my Tags report doesn't show it:  Is there a way to manually update it or should I wait for the site to update it automatically - btw how often are tags for answers calculated for each user?


Anti-cheat Javascript for browser/HTML5 game

I'm planning on venturing on making a single player action rpg in js/html5, and I'd like to prevent cheating. I don't need 100% protection, since it's not going to be a multiplayer game, but I want some level of protection.   So what strategies you suggest beyond minify and obfuscation?  I wouldn't bother to make some server side simple checking, but I don't want to go the Diablo 3 path keeping all my game state changes on the server side.  Since it's going to be a rpg of sorts I came up with the idea of making a stats inspector that checks abrupt changes in their values, but I'm not sure how it consistent and trusty it can be.  What about variables and functions escopes? Working on smaller escopes whenever possible is safer, but it's worth the effort?  Is there anyway for the javascript to self inspect it's text, like in a checksum?   There are browser specific solutions? I wouldn't bother to restrain it for Chrome only in the early builds.


I have a requirement to customize the Chatter Email templates.  Is there any way to achieve this?  Regards, Naveen


Random SSH entries in Auth.log out of date order

Running an Ubuntu Trusty 14.04.1 LTS server at Rackspace but recently after running updates for bash, then with the reboots for the xen host vulnerability, I have the following weird issue.  Some random auth.log entries are popping up out of date sync, for example:  Oct 14 12:12:10 myserver sshd[2097]: pam_unix(sshd:session): session closed for user Oct 13 12:58:30 myserver sshd[2522]: Failed password for foo from 21.21.21.21 port 1490 ssh2 Oct 14 12:21:28 myserver sshd[3389]: Accepted password for bar from 22.22.22.22 port 61173 ssh2   I have a seperate cron.log running too, (I changed the configs for rsyslog) but have random out of date sync entries there too, for example:  Oct 14 07:11:01 myserver CRON[32099]: (root) CMD Oct 13 03:16:01 myserver CRON[32226]: (root) CMD Oct 14 07:12:01 myserver CRON[32226]: (root) CMD   EDIT TO ADD:  I've noticed that it looks like some log entries are delayed being added to the *.log by rsyslog. Some entries show the following pattern:  Oct 12 09:19:07 myserver sshd[4792]: pam_unix(sshd:auth): authentication failure; Oct 12 09:19:09 myserver sshd[4792]: Failed password for x Oct 14 12:21:32 myserver su[3484]: pam_unix(su:session): session open Oct 12 09:19:12 myserver sshd[4792]: Failed password for x from 20.20.20.20 port 2158 ssh2   The above example shows the first two entries came in on time, but the last one (12 seconds) was actually delayed by two days!  I have checked the date on the server is correct, restarted SSH processes, restarted rsyslog.  Everything else on server is running fine - Apache, sync, varnish etc etc  Any ideas on what I'm missing here?


Record microphone and sound from application but only play application sound to headphones

For my podcast I want to record my voice and music coming from an application but not hear my own voice in my headphones.    I managed to create a virtual audio sink and merge the two audio signals to audacity. However, I struggle with connecting one input to two outputs (one for audacity, one for my headphones).    I fiddled around with Jack but couldn't find the correct tutorial to do what I want.  Basically I want something like  in Ubuntu since I'm switching from Windows.


How can I call a method using String in Java. For example,      String a = "call";     int b = a();      private static int call() {          return 1;     }   I know that it's got something to do with reflection, but I am not sure how to get it to work.


I am stuck on this problem, and was wondering if anyone could help me out with this. The question is as follows:  Let $n$ be an integer such that $n ≥ 1$. Prove that $6$ divides $n(n + 1)(n + 2)$. Note: An integer $a$ divides an integer $b$, written $a|b$, if there exists $q ∈ Z$ such that $b = qa$. Alternatively, $a|b$ if dividing $b$ by $a$, $b ÷ a$, results in an integer.  Should I do a proof by induction? All help/input is appreciated!


Differential Equation direction plot with pgfplots

In earlier thread Jake provided some code whom successfully draws the following differential equations in the range [0; 1]  dy/dx=2*x dy/dx=x*sqrt(x)   See:   I have not been able to determine how to change the range to [-1; 1] for both dimensions. My attempt  xmin=-1.1, xmax=1.1, % Axis limits ymin=-1.1, ymax=1.1, domain=-1:1, y domain=-1:1,   Also, I had some trouble with the notation for a differential equation that consists of y, example (dy/dx=x^2+y^2-1).   My attempt:  declare function={f(\x) = \x^2 + f(\x)^2 - 1;}


When I try to run "sudo apt-get install uuid-dev" I get the following error

Reading package lists... Done Building dependency tree        Reading state information... Done Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming. The following information may help to resolve the situation:  The following packages have unmet dependencies:  uuid-dev : Depends: libuuid1 (= 2.31.1-0.4ubuntu3) but 2.31.1-0.4ubuntu3.4 is to be installed E: Unable to correct problems, you have held broken packages.


How to redirect with "www" URL's to without "www" URL's or vice-versa?

I am using ASP.NET 2.0 C#. I want to redirect all request for my web app with "www" to without "www"  www.example.com to example.com  Or  example.com to www.example.com  Stackoverflow.com is already doing this, I know there is a premade mechanism in PHP (.htaccess) file. But how to do it in asp.net ?  Thanks


Export and import content from one drupal site to another?

I want to export content with comments and user data with content relation from one Drupal site to same version of another site. In another site there is no content and users data it has only some new module installed and it's configuration.   For this which is best way migrate/ node_export/ Backup and Migrate


Strange results with floating-point comparison

I have this simple test: double h; ... // code that assigns h its initial value, used below ... if ((h>0) && (h<1)){  //branch 1 -some computations } else{  //branch 2- no computations }  I listed my values as I got some really strange results and for example if: h=1 then the first branch is reached and I do not understand why since if h=1 I want branch2 to be computed. Am I getting confused by something so obvious?  Edit: This is how I compute and then use h: double* QSweep::findIntersection(edge_t edge1,edge_t edge2) {   point_t p1=myPoints_[edge1[0]]; point_t p2=myPoints_[edge1[1]]; point_t p3=myPoints_[edge2[0]]; point_t p4=myPoints_[edge2[1]];  double xD1,yD1,xD2,yD2,xD3,yD3,xP,yP,h,denom; double* pt=new double[3];          // calculate differences   xD1=p2[0]-p1[0];   xD2=p4[0]-p3[0];   yD1=p2[1]-p1[1];   yD2=p4[1]-p3[1];   xD3=p1[0]-p3[0];   yD3=p1[1]-p3[1];      xP=-yD1; yP=xD1; denom=xD2*(-yD1)+yD2*xD1; if (denom==0) {     return NULL; } else{ h=(xD3*(-yD1)+yD3*xD1)/denom; } std::cout<<"h is"<<h<<endl; if (h < 1) std::cout<<"no"<<endl; else std::cout<<"yes"<<endl; if (h==1) {     return NULL; } else{ if ((h>0)&&(h<1)){     pt[0]=p3[0]+xD2*h;       pt[1]=p3[1]+yD2*h;     pt[2]=0.00; } else{     return NULL; } }   return pt;    }  Edit: Okay, so it is clear how I should reformulate the condition. From: double h; if (h==1){    //computations here }  To: double h; if (abs(h-1)<tolerance){   //computations here }  When I use double numbers. But how do I reformulate this? double h; if (h<1){    //computations here }


How do the separation axioms follow from the replacement axioms?

It has come to my attention that the pairing axiom and the separation axiom schema are rarely listed since they follows from the replacement axioms. I see how this works for the pairing axiom, since we can take some set, say $A=\{\emptyset,\{\emptyset\}\}$, which exists by the power set axiom and the existence of the emptyset, and define a nominating formula on $A$ by $$ \phi(u,v)\colon (u=\emptyset\land v=a)\lor(u\neq\emptyset\land v=b) $$ to see that $\{a,b\}$ is a set for any sets $a$ and $b$. However, I don't see it for the separation schema. Could someone enlighten me on how they follow? Thanks.


jquery regex to get string between two brackets

I want to get every string between [ch] and [/ch]  var test = "[ch]Bm[/ch] Time flies by when[ch]A[/ch] the night is young[ch]C[/ch]" var testRE = test.match("\[ch\](.*)\[/ch\]"); alert(testRE[1]);   But, the result I get is:   h]Bm[/ch] Time flies by when[ch]A[/ch] the night is young[ch]C[/c   How to store every string inside an array? My desired result is become  chords = ["Bm","A","C"]


Proving that $f$ is a bijection from $N$x$N$ to $N$.

I am having trouble with the following problem:   $f: N\times N\rightarrow N$ and $f(i,j)=2^{i-1}(2j-1)$. Prove that $f$ is a bijection thus $N\times N$ and $N$ are numerically equivalent.   Work: I am told that Euclid's Lemma will be useful to proving injection and also that for any positive integer $n$, $n$ is a product of prime numbers.   For injection, I set $f(a,b)=f(x,y)\rightarrow 2^{a-1}(2b-1)=2^{x-1}(2y-1)$.  Then I distributed across to get $2^ab-2^{a-1}=2^xy-2^{x-1} \rightarrow 2^ab-2^xy=2^{a-1}-2^{x-1} \rightarrow 2(2^{a-1}b-2^{x-1}y)=2^{a-1}-2^{x-1}$.   From here, I am unsure how to apply Euclid's Lemma to arrive at the injection result.  I am even more unsure how to prove surjection.


com.apple.hiservices-xpcservice results in frequent hangs and freezes in my mac

Update (2019): The issue still persits even in macOS Mojave, tried everything I could find, nothing seems to solve the issue as of yet! Problem: com.apple.hiservices-xpcservice hangs repeatedly ever since I upgraded to macOS Mojave 10.14.1. Now,everytime the process hangs it is indicated by red colored fonts in the Activity Monitor. Due to the frequent hangs my system slows down and it's barely usable due to extremely slow performance. What I have done so far: I have already Googled it (The Process) and also contacted Apple regarding the usage of this process and the reason behind it's frequent hick-ups. Alas! they couldn't help much. So, I terminated the process. Temporary Solution: As soon as I terminated the process (com.apple.hiservices-xpcservice) my mac started running fast once again. But, whenever I restart the system or leave the mac idle for a few minutes and then if I start using it once again! out of no where, the process (com.apple.hiservices-xpcservice), shows up once again in the activity monitor resulting in slow performance issues along with hangs and freezes across macOS. System Info: Model iMac (27-inch, Mid 2014) Processor 3.5GHz quad-core Intel Core i5 processor (Turbo Boost up to 3.9GHz) Configurable to 4.0GHz quad-core Intel Core i7 (Turbo Boost up to 4.4GHz). Memory 8GB (two 4GB) of 1600MHz DDR3 memory; four SO-DIMM slots, user accessible Configurable to 16GB or 32GB. Storage 1TB Fusion Drive Screenshot Of The Process com.apple.hiservices-xpcservice


Why does Google junk mails from my server?

I have a send-only mail server setup on an Ubuntu VPS. The mail server is only used to send out registration e-mails from a web application. I have the following configured:   DomainKeys Identified Mail (DKIM) Sender Policy Framework (SPF) DMARC Resolvable hostname rDNS   I've also tested my mail server with mail-tester.com and gotten a 10/10 rating (See ). The following is from my mail.log:  Mar 13 14:44:16 server postfix/pickup[5922]: 8147712289A: uid=33 from=<noreply@my-domain.me>   Mar 13 14:44:16 server postfix/cleanup[6311]: 8147712289A: message-id=<43fd440eaa77a6bb9f4b28e608f4c335@bugs.my-domain.me>   Mar 13 14:44:16 server opendkim[943]: 8147712289A: DKIM-Signature field added (s=mail, d=connect-ats.com) Mar 13 14:44:16 server postfix/qmgr[1102]: 8147712289A: from=<noreply@my-domain.me>, size=982, nrcpt=1 (queue active)   Mar 13 14:44:16 server postfix/smtp[6313]: 8147712289A: to=<ralph@outlook.com>, relay=mx2.hotmail.com[65.54.188.72]:25, delay=0.38, delays=0.07/0.01/0.23/0.07, dsn=5.0.0, status=bounced (host mx2.hotmail.com[65.54.188.72] said: 550 SC-001 (BAY004-MC1F33) Unfortunately, messages from 159.203.23.75 weren't sent. Please contact your Internet service provider since part of their network is on our block list. You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors. (in reply to MAIL FROM command))   Mar 13 14:44:16 server postfix/smtp[6313]: 8147712289A: lost connection with mx2.hotmail.com[65.54.188.72] while sending RCPT TO   Mar 13 14:44:16 server postfix/cleanup[6311]: DD9C612350D: message-id=<20160313134416.DD9C612350D@server.my-domain.me>   Mar 13 14:44:16 server postfix/qmgr[1102]: DD9C612350D: from=<>, size=3860, nrcpt=1 (queue active)   Mar 13 14:44:16 server postfix/bounce[6314]: 8147712289A: sender non-delivery notification: DD9C612350D Mar 13 14:44:16 server postfix/qmgr[1102]: 8147712289A: removed  Mar 13 14:44:17 server postfix/smtp[6313]: DD9C612350D: to=<noreply@connect-ats.com>, relay=none, delay=0.21, delays=0/0/0.21/0, dsn=5.4.6, status=bounced (mail for my-domain.me loops back to myself) Mar 13 14:44:17 server postfix/qmgr[1102]: DD9C612350D: removed   I have gone over my configuration multiple times and the only thing I've found that may be an issue is the message ID, included in the log above. The web app is running at bugs.my-domain.me while I'm sending e-mails as noreply@my-domain.me and I don't have SPF settings for that domain,


As far as I know, the logic in conditional and loop statements are the same whether it is C# or Java.   class WhileLoops {  public static void main(String args[]){   Scanner input = new Scanner(System.in); String answer = ""; /*do{      System.out.println("Will you be my girlfriend?(Yes/No)");     answer = input.nextLine();     }while(answer != "Yes" && answer != "Yes");*/  while(answer != "Yes" && answer != "yes") {      System.out.println("Will you be my girlfriend?(Yes/No)");     answer = input.nextLine();     }  System.out.println("I promise to make you feel special.");     } }   as you can see in the code above I used do-while and while just setting either one as a comment when I will compile and run.   This is what happens when I run the program:


One Google Adsense account: two diverse websites. How to combine?

I have read a lot about it, but most of them are outdated so that's why I am going to ask it here.  I have two websites:   Website about politics   Website about sports   They have nothing in common, at all, yet I have just one Google Adsense account and I'd like to use this account to make ads for them.  My question is: is this even possible? Can I use my Google Adsense code for both of the websites? Let's say I have created an ad unit: can I just use this exact same piece of code (so the exact same ad) on both of the websites?  In other words: what should I do to achieve what I want? The reason I am asking this, is because I want to avoid being blocked by Google.


Sometimes in hotels one finds slippers in their room, in addition to toiletries and towels. Is one allowed to take them away, or are they supposed to stay in the room?


I have an old PC with 12.04 LTS on it, used headless for NAS.  It's set in the BIOS to boot on AC application and grub2 is set to continue after a 10 second wait time.  Every "X" number of boots (less than 10% of the time), the boot process hangs after the grub countdown finishes and a blank screen appears.  There is no hard drive activity.  The odd thing is that if I then press the power switch on the PC, it shuts off, and if I press the power switch again, the grub screen comes up with 1 second remaining (instead of the normal 10 seconds), and the boot proceeds normally.  I'd really appreciate suggestions on how to track this down.  What logs can I look at?  It's especially perplexing that it only happens every now and then.


How to change the system in four first order equations?

Consider the coupled spring-mass system with a frictionless table, two masses $m_1$ and $m_2$, and three springs with spring constants $k_1, k_2$, and $k_3$ respectively. The equation of motion for the system are given by:  $m_1\frac{d^2x_1}{dt^2}=-(k_1+k_2)x_1+k_2x_2$  $m_2\frac{d^2x_2}{dt^2}=k_2x_1-(k_2+k_3)x_2$   Assume that the masses are $m_1 = 2$, $m_2 = \frac{9}{4}$, and the spring constants are $k_1=1,k_2=3,k_3=\frac{15}{4}$.  I substitute all value in the system above, and able to get  $\frac{d^2x_1}{dt^2}=-2x_1+\frac{3}{2}x_2$  $\frac{d^2x_2}{dt^2}=\frac{4}{3}x_1-3x_2$  Then how to convert the system about into four first order equations?


When I run the code below, I use three inputs (in Ubuntu terminal):   abc(Ctrl+D)(Ctrl+D) abc(Ctrl+D)(Enter)(Ctrl+D) abc(Enter)(Ctrl+D)     The code reacts well in all cases. My question is: why in 1) and 2) I need two EOF?  #include <iostream>  int main() {   int character;    while((character=std::cin.get())!=EOF){}    std::cout << std::endl << character << std::endl;  }


MS Virtual PC will not Start a 64 bit Guest

I am running Windows 7, 64 bit.  I would like to install Windows 8.1, 64 bit, and have been attempting to use the MS Virtual PC hypervisor.  I attached the Windows ISO as the CD drive. It does try to boot Windows ISO, but I get the error:    This 64 bit application couldnt load becuase your PC doesn't have a 64 bit processor... error code is 0x000035a file is \windows\system32\boot\winload.exe .    I know my pc has a 64 bit processor and I know I went into the BIOS and enabled virtualization.  Have I configured the virtual machine in Virtual PC incorrectly and set it to have a 32 bit processor without realizing it?  Or is there another step I am missing to make this work as intended?


Shell scripting with cd that outputs 2 said directory

Like the title says I am trying to make a shell script to change the directory and I want the output to be in the directory I said to change it to.can Someone please point me in the right direction? appreciate it.  example using vim :  #! /bin/bash cd /etc    $pwd   /etc


Leave message to edit suggestor from edit approver about more improvements they could have made?

I think it would be a good idea to have an option for people reviewing suggested edits to leave a comment to the users who suggested the edits.  This would be useful for helping the newer users to learn how to edit better.  Example:   Thanks for the edit, but for next time remove the "I hope it's not a duplicate" as it doesn't add anything to the question   This is more useful for approved/improved edits as you may think the edit improves the question but more should've been done in the edit and you should let the editor know what other things they should look out for to improve for next time.


If an instruction next to a button says ‘do not push’, some people end up pushing it. Their desire to do the opposite overpowers the fear, if any, of repercussions. Is there any word for such a trait in a person?


How to add html, with click listeners on elements, dynamically using jQuery?

I need to add a form to a page when the user clicks a button. I am making a string of that html and then adding it to the div using jQuery. (I've read somewhere this is not the best method, so please tell me an alternative).  However, the problem is this - The new html that I am adding has a button with id id1. The script that I try to call, does not get called when I do this-  $(document).ready(function(){ $("#id1").click(function(){     alert("hi"); });   This may be happening because I have written this inside document.ready(), and by the time document gets ready, no element with id id1 exists. How can I mitigate this problem?


Can ($a == 1 && $a == 2 && $a == 3) ever evaluate to true?

Similar to this question  which was intended for javascript, it has spawned off numerous  for various different languages. I'm curious if the following can ever evaluate to true in PHP:  ($a == 1 && $a == 2 && $a == 3)   To follow up a bit more, it seems  will yield the desired result (This was not the case for javascript, due to the way type casting works in both languages). A few answers (in javascript) worked with === as well, so in PHP with typechecking (===), can the following ever yield true?  ($a === 1 && $a === 2 && $a === 3)


how to install driver for intel wireless-AC 3168 in ubuntu

I recently installed ubuntu 16.04 and i have hard time finding wifi driver I dont see any wifi driver in additional settings and i downloaded wifi driver from intel website it is in tar format but i dont know how to install it.I also moved it to lib/firmware folder and still it doesn't work.Help please


What is the highest ability score possible?

What is the highest ability score possible for a player character (including magic items and temporary effects)?


My terminal on osx 10.11.6 will not accept `[` character

Every time I type it the terminal flashes but doesn't insert it. If I paste in a command that has a [ it will paste everything except the ['s  This has been happening before I updated to 10.11, but has become a massive issue, I can't use jq at all because of it.  I also have the same issue with iTerm2.


What happens when "recommend deletion" and "delete" are mixed in LQP review?

In Low Quality Posts review, what happens when <20k users chose "recommend deletion", and 20k users chose "delete" for the same review? For example, if a post had 3 "recommend deletion" reviews and 2 "delete" reviews, would it be deleted?


What is the correct way to count the number of days between two dates in javascript

This question:  proposed the following way to calculate the difference between two dates:  var _MS_PER_DAY = 1000 * 60 * 60 * 24;  // a and b are javascript Date objects function dateDiffInDays(a, b) {   // Discard the time and time-zone information.   var utc1 = Date.UTC(a.getFullYear(), a.getMonth(), a.getDate());   var utc2 = Date.UTC(b.getFullYear(), b.getMonth(), b.getDate());    return Math.floor((utc2 - utc1) / _MS_PER_DAY); }   That's correct for some purposes, but not all purposes. Specifically, with day light savings time you could have a 24-hour span that does not pass midnight, which does not count as a full day for medical billing purposes, for example. How do I calculate specifically the number of midnights that occur between two dates in javascript?


What's the equivalence of os.fork() on Windows with Python?

This code works well in Mac/Linux, but not in Windows.   import mmap import os  map = mmap.mmap(-1, 13) map.write("Hello world!")  pid = os.fork()  if pid == 0: # In a child process     print 'child'     map.seek(0)     print map.readline()      map.close() else:     print 'parent'    What's the equivalent function of os.fork() on Windows?


How to change URL structure for custom post type in wordpress? Custom taxonomy + custom Post name

I want to change the url structure for custom post type  post type --> movies  This url structure sitename.com/movies/post-name need to change sitename.com/custom-taxonomy/movies/post-name     /%customtaxonomy%/%customposttype%/%postname%/


Python string.join(list) on object array rather than string array

In Python, I can do:  >>> list = ['a', 'b', 'c'] >>> ', '.join(list) 'a, b, c'   Is there any easy way to do the same when I have a list of objects?  >>> class Obj: ...     def __str__(self): ...         return 'name' ... >>> list = [Obj(), Obj(), Obj()] >>> ', '.join(list) Traceback (most recent call last):   File "<stdin>", line 1, in <module> TypeError: sequence item 0: expected string, instance found   Or do I have to resort to a for loop?


How do I remove all snaps and snapd, preferably with a single command

I'm currently using a Ubuntu 20.04 machine with a small root volume. The default snap setup occupies ~1G space, though with only a few packages. And when I tried to remove core from snap I got the following error. # snap remove core18 error: cannot remove "core18": snap "core18" is not removable: snap is being used by snaps gnome-3-34-1804, gtk-common-themes and snap-store.  I understand I can work around the issue by manually remove the dependants first, but is there a one-liner solution that manages the dependencies automatically so that all snaps and snapd can be removed in one go?


What does it mean X.Intercept equal to NA as a result of glm summary ? Thanks.  Coefficients: (1 not defined because of singularities)              Estimate Std. Error z value Pr(>|z|)       (Intercept)     1.98e+02   4.72e+01    4.18  2.9e-05 ***  X.Intercept.          NA         NA      NA       NA


I am new to Stack Overflow. I keep seeing so many beautiful posts/answers. It's really a great place for everyone getting to know about software programming. Lots of people post so much knowledge in terms of solutions and algorithms that may be proprietary/open source information.  The least amount of personal information I can provide is my email id, if I connect with Google, Facebook, etc. However, the email id itself reveals my association and the work I do.  This makes me believe that Personally Identifiable Information on Stack Exchange should be absolutely safe and not available to anyone, even the admins.   My concerns are:   Who can see my PII on SO? Is it safe from attacks?   Note:  It may be a paranoid / unimaginable aspect associated with how Stack Overflow works, but I think those who want to break things find ways to do it in unimaginable ways. Most people have work place information available publically on linkedin / facebook / google. Not all will use open id, hence the question.


What's the difference between installing and trying Ubuntu?

I was wondering what the difference between running and trying Ubuntu and I was also wondering if there was any downfall to running Ubuntu on a USB drive.


What's the story behind Rhaegar Targeryan and Lyanna Stark?

What is the story behind Rhaegar and Lyanna?  I remember reading in one of the books that Rhaegar won the tourney at Harrenhal and named Lyanna Stark the Queen of Love and Beauty. And there's also a mention elsewhere where Robert Baratheon says "if Rhaegar hadn't laid eyes on Lyanna, she would have been alive".  Was Rhaegar responsible for Lyanna's death/suffering directly or indirectly?


How to remove background from an image with Gimp?


Why has my authorship image been removed from Google SERPs

I recently added the relevant tags to my site and validated my email for Google Authorship. After around a week my image started showing up with results.   Today the image is no longer present and I haven't changed anything. The Structured Data Testing Tool  show that it should all be working.   Have I missed something or does anyone know why it would stop displaying?  Other questions ask about situations where the image has never appeared. My image has appeared but has since stopped appearing so is a different situation.


I have three lists: [A, B, C], [1], [x,y].  How to generate the following with python:  [A,1,x], [A,1,y], [B,1,x], [B,1,y], [C,1,x], [C,1,y]


How do we know for certain that space is expanding?  Let's say that in the year 1950, we observe that galaxy 1 is 5 billion light years away from us and galaxy 2 is 10 billion light years away from us, putting both galaxies at a distance of 5 billion light years from each other. Then in 2013, we observe that they are now 7 billion light years away from each other so we conclude space is expanding.  We see that galaxies are move away from each other but how does that prove that space is expanding? Could this illusion of expanding space simply be due to something larger in mass pulling the farther galaxy 2 away from galaxy 1? This larger mass could be accelerating the velocity of galaxy 2 faster then it's accelerating the velocity of galaxy 1.


how can I get a tilde under a variable in math mode?

s  ~  such like this, but I want them to be combined to identify a vector. thx for help~!


Slash + asterisk inside code results in the rest of the line commented out

How can I prevent this from happening. All I want is normal code - no comment.  /account/** = ssl, authc   Here nothing is grayed out in a comment-like fashion, but on stackoverflow /** = ssl, authc is.


Discussing with Mac owners, I got several versions of where Mac OS X comes from. It is known to have some root in BSD, but how much, and where?  Some say that Mac OS X has a FreeBSD kernel, with all the utilities above that makes it an OS being Mac specific. (Not speaking about user apps here, only all of the init, ls, cd, and others. binutils? )  Others say Mac OS X is a Darwin kernel, that is pure Mac, and that the OS utilities come from BSD.  Where's the truth?


I'm trying to downgrade subversion to 1.6 from 1.7, doing sudo apt-get install subversion=1.6.17dfsg-3ubuntu3. This does not seem to work.   Any idea on how to do this without breaking half the installation?


Windows cannot be installed on this disk. The selected disk has an MBR partition table. On EFI systems , Windows can only be installed to GPT disks

I want to format c drive and reinstall windows 8.  previously I've installed windows 8 and ubuntu together in same C drive in separate partitions.previously I've configured ubuntu grub to select which OS to boot .  So I deleted previous ubuntu partition and windows partition while windows 8 installation (using windows 8 DVD)  Then I try to select following a partition (Drive 0 Unallocated Space 130 GB)to continue the windows 8 installation    but then I cannot continue it and once I try to drive options(advanced) and then new   I'm getting error like below     Windows cannot be installed on this disk. The selected disk has an MBR partition table. On EFI systems, Windows can only be installed to GPT disks      then I Google about this error and I found most of  like below     Start Command Prompt      Type In:      DISKPART      LIST DISK and identify your disk number (from 0 to n disks)      SELECT DISK  where  is the disk number      CLEAN ALL (Will Take Some Time)      CREATE PARTITION PRIMARY ALIGN=1024      FORMAT FS=NTFS (Will Take Some Time)      ASSIGN LETTER=M      ACTIVE      EXIT      EXIT      [ Immediately Terminate Install Process Completely ]      And      Reboot using Installation DVD.   If you look at my partitions list(1st image) it has only 1 drive(which Drive 0) and 3 partitions.  when I follow above solutions I'm getting disk list like below    If I clean disk 0 it will clear all my data including other two partitions , how I can continue installation without losing data in other partitions   simply this is how to      Convert MBR to GPT without loosing Data and without OS   [p.s : now I don't have any OS since I deleted all my os partitions]


How to utilize miniMax algorithm in Checkers game

I am sorry...as there are too many articles about it.But I can't simple get this.  I am confused in the implementation of AI. I have generated all possible moves of computer's type pieces. Now I can't decide the flow. Whether I need to start a loop for the possible moves of each piece and assign score to it.... or something else is to be done.  Kindly tell me the proper flow/algorithm for this. Thanks    UPDATE:    Now I coded the algorithm but not getting correct moves. Please help me find out the logical error.


What determines the value/price of an ETF

An ETF is a collection of shares packaged into a single tradeable equity. But since the marketvalue of an ETF unit is determined by market forces, what impact does the change in value of an individual shares apart of ETF have.  e.g A Tech ETF holds shares of Apple, Google, and Amazon, if the share price of Google goes up, how is that reflected in the price of the ETF


Chat gives me really, really specific time gap notifications

So, I left my computer for a little while, and came back to this:    Note all the time gap notifications for merely minutes, and seconds.  Refreshing the chat window and it all goes back to normal. Can't reproduce either I'm afraid.


Why does StackExchange not use scaling (vector) graphics?

I just accidentally scrolled the size in my browser (FF24.2.0) and I noticed that the graphics in the stack exchange network (meta, se, android, code golf as far as I can see at least) don't scale and get blurry instead.  Before:   After:   I hope you can see the difference, if not try it for yourself (ctrl + scroll in most browsers). Even the upvote and downvote arrows get a bit blurry. I am an absolute beginner on the topics of graphics and I would not know the first thing about how to change this stuff, but I wanted to share my confusion.   Is there a particular reason this is not implemented? Is it just not possible? Or has this been answered before and I simply did not find it trough search?


What is an Oxford comma and how do you use it?

I didn't even know this existed. What is it? How do you use it?


How to remove profile picture in Google account?

I am looking for remove my profile picture and keep default Google account profile picture.


References are transformed in lowercase using IEEbib.bst

I am writing a paper using IEEEbib.bst. I remark that references are changed in lowercase.   \documentclass{article} \usepackage{spconf,amsmath,graphicx,array} \usepackage{multicol} \usepackage{xcolor} \usepackage{pgf, tikz} \newcommand{\argmax}{\arg\!\max} \newcommand{\subfigANDtitle}[2][.2\linewidth]{%     \begin{tabular}{@{}>{\centering\arraybackslash}p{#1}@{}} #2 \end{tabular}}  % % % % % % % % % % % % \usepackage{tikz} \usetikzlibrary{shapes,arrows} % % % % % % % % % % % %   % Example definitions. % -------------------- \def\x{{\mathbf x}} \def\L{{\cal L}}  % Title. % ------ \title{xxxxyyyyyyyzzzzzzz.} % % Single address. % --------------- \name{xx,yy} \address{xxxxxx,yyyyyy}  \begin{document}     \maketitle \section{section1} adaafasfaa \cite{4761608} \clearpage \bibliographystyle{IEEEbib} \bibliography{exbib} \end{document}


public boolean sendDeviceEvent() {     boolean status = false;     try {         device.sendEvent("blah...blah");         status = true;     } catch (Exception e) {         log.error("Failed to send NodeLowBattery Event - {} {}", createNodeLowBatteryNotification(), e.getCause());     } finally {         return status;     } }   I would like to know how the above code can be considered bad practise since it returns from finally.  Based on the byte code information, finally doesn't return abruptly and no values are set in finally. How can this be considered bad ?


How to prove that if $\lim_{n \rightarrow \infty}a_n=A$, then $\lim_{n \rightarrow \infty}\frac{a_1+...+a_n}{n}=A$

I'm wondering if I have a sufficient proof of the following:   If $(a_n)$ is a sequence such that $\lim_{n \rightarrow \infty}a_n=A$, then $\lim_{n \rightarrow \infty}\frac{a_1+...+a_n}{n}=A$.   My approach:  For all $\varepsilon > 0$, there exists $N$ such that for all $k>N$, $|a_k -A|<\varepsilon$. So we can break the limit up as follows $$\lim_{n\rightarrow \infty} \frac{a_1+...+a_k}{n} + \lim_{n \rightarrow \infty}\frac{a_{k+1}+...+a_n}{n} \overset{\epsilon \rightarrow 0}{=} 0 + \lim_{n \rightarrow \infty}\frac{nA}{n}=A$$  Is this on the right track, or am I missing something about breaking up the limit in the way I have?


Show that $A = a^{pq} - a^{p} - a^{q} + a$ can be divided by $pq$

Let $p$ and $q$ be two different prime numbers, and $a$ a positive integer. Show that $$A = a^{pq} - a^{p} - a^{q} + a$$ can be divided by $pq$   I started by rewriting $A$ as $((a^{p})^{q} - a^{p}) - (a^{q} - a)$ but I'm not sure how to go from here


How does trees know to balance themselves so that they never fall down

Well i was flying kites today I saw a tree and its branches were spread around in random directions... I would like to know that how do these trees know to nourish their branches in some direction so as it doesn't fall off due to gravity. I know it can get its strength from the roots inside the soil so that it does not fall. But if this strength were not enough the tree may fall due to weight of its own branches. Can this happen??  I am new to this site I don't know much about the rules here. Feel free to edit if I have done any mistakes(especially about tags)


i have a pretty nasty question. i was glancing through a few olympiad papers and stumbled upon this question:  prove that  $ i = \sqrt {-1}\ $.  i tried the conventional methods namely euler's formula  but could not figure what to do next. how do you actually proceed further? i have checked a few books and a proof is not available.are there any proof available for this


Questions on PCA: when are PCs independent? why is PCA sensitive to scaling? why are PCs constrained to be orthogonal?

I am trying to understand some descriptions of PCA (the first two are from Wikipedia), emphasis added:     Principal components are guaranteed to be independent only if the data set is jointly normally distributed.   Is the independence of principal components very important? How can I understand this description?     PCA is sensitive to the relative scaling of the original variables.     What does 'scaling' mean there? Normalization of different dimensions?     The transformation is defined in such a way that the first principal component has the largest possible variance and each succeeding component in turn has the highest variance under the constraint that it be orthogonal to the preceding components.   Can you explain this constraint?


Implications of the Help Center: "Plagiarism doesn't matter unless it's an answer"

When you actually read what's written in the , it strongly implies that only answers need to give attribution (see added emphasis):  Plagiarism - posting the work of others with no indication that it is not your own - is frowned on by our community, and may result in your answer being down-voted or deleted. When you find a useful resource that can help answer a question (from another site or in an answer on Stack Overflow) make sure you do all of the following  Can this be changed to be more inclusive of questions (and perhaps tag wikis)?  My best suggestion:  Plagiarism - posting the work of others with no indication that it is not your own - is frowned on by our community, and may result in your post being down-voted or deleted. When you use a resource in your post (e.g. from another site or in an answer on Stack Overflow) make sure you do all of the following


So there are a billion clearfixes out there. Does anyone have a collection of them with their browser support?


For any given $n$ determine the cardinality of the Euclidean $n$-space $$\mathbb{R}^n = \left\{(x_1, x_2, \dots, x_n) : x_i \in \mathbb{R} \text{ for all } i = 1, 2, \dots, n\right\}.$$ Are there ”more” points in the Euclidean plane $\mathbb{R}^2$, the Euclidean 3-space $\mathbb{R}^3$ or hyperspace $\mathbb{R}^4$ as on the real line $\mathbb{R}$? Can anyone solve it so to understand it? I didn't understand anything.


WIll EOL releases no longer be archived?

According to this  question, EOL releases are archived to .  But currently, I cannot see Ubuntu 12.10 and Ubuntu 13.04 to be available on this website, while all others(since 4.10) are available, as you can see in the screenshot below    So has canonical and/or Ubuntu devel-teams decided not to archive EOL releases any more? or is it work to be done?


So i am trying to match a number and a name.Can you explain the meaning of this symbol in this code? The question is inside the comments

my_array=[1,2,3]  my_array1=['John','Tom','Peter']  search=int(input("Enter your number"))  for i in range(0,3):     if search==my_array[i]: ### can you please point out the purpose of this '[i]' ? what does it do?              print(my_array1[i]) ### also this one


Problem:  prove $\max\{x,y\}=\frac {(x-y)}{2} + \frac {(x+y)}{2}$  $x$ and $y$ are max elements in two sets.   Here is what i have thought of so far as a concrete problem: $\max \{4,5\}=d(4,5)= 1$  I know that the $$\begin{align} \max\{4,5\} &= \frac{4-5}{2}+ \frac{4+5}{2} \\                               &= \frac{-1}{2}+\frac{1}{2}  \\ &= 0\end{align}$$  I am thinking of breaking it down to trichotomy: $x=y, x>y$, and $x<y$.  for $x=y$  what i got is.. $$ \begin{align}  \max\{x,y\} &= \frac{(x-y)}{2}+\frac{(x+y)}{2} \\              &=  0+x \\              &=  x \end{align} $$ (which is the max)  but why isn't this 0?  and am i even thinking in the right direction or am i mixing up two different concepts?


When to use "rather than" versus "instead of"?

I never really gave a deep thought at this but recently a teacher of talked about language and there was an implicit question in it. something like  there is a difference between "rather than" and "instead of" in usage. do you know it??  please help and explain with a few examples.


How are the factors obtained at *this point* in the solution of proving $2^{2^n}+ 1 \mid 2^{2^m} -1$

I understood everything up until "BUT".  My question is how are the factors on the right side for the bolded line of equation under the word "BUT" obtained?  I tried to get these factors using property (5), but I was unsuccessful, can someone please show me how to get those factors?  Thanks in advance.  This is example 2 from "Problems of Number Theory in Mathematical Competitions" by You Hong-Bing on page 2.  Some properties the example will be using are:   (1) If $b\mid c$, and $c\mid a$, then $b\mid a$, that is, divisibility is transitive.  (5) If $n$ is a positive odd number, then  $x^n-y^n= (x-y)(x^{n-1} + x^{n-2}y + \ldots + xy^{n-2} + y^{n-1})$  The problem, example 2 is as follows:   Let $\mathbf{m > n}$ and $\mathbf{n\ge 0}$, show that $\mathbf{(2^{2^n}+1)\mid(2^{2^m}-1)}$   The following is the proof from the book:   Take $x=2^{2^{n+1}}$,$\,\,y=1$ in factorization (5), and substitute $n$ by $2^{m-n-1}$  WE GET:   $2^{2^m}-1 = (2^{2^{n+1}}-1) \left[(2^{2^{n+1}})^{2^{m-n-1}-1} +\ldots +  2^{2^{n+1}}+1 \right]$  THUS,  $(2^{2^{n+1}}-1) \mid (2^{2^m}-1)$  BUT,  $\mathbf{(2^{2^{n+1}}-1) = (2^{2^n} - 1)(2^{2^n} + 1)}$ This is the equation I'm having trouble with so everything else after this didn't make much sense to me  HENCE,  $(2^{2^n} + 1)\mid(2^{2^{n+1}} - 1)$  FURTHER, BY PROPERTY (1) WE HAVE:   $(2^{2^n} +1)\mid(2^{2^m} - 1)$  REMARK: sometimes it is difficult to prove $b\mid a$ directly when dealing with divisibility problems.  Therefore, we can attempt to choose an "intermediate number" $c$ and prove $b\mid c$ and $c\mid a$ first, then use property (1) of divisibility to deduce the conclusion.


how to submit a form with file uploading using ajax...?

i created a form. Thats shown below...  <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>      <script> $(document).ready(function(){   $("#sbt").click(function(){     var re=$("#file").val();    $.ajax({             type: "POST",             url: "loadajax.php",             data: $("#data").serialize()+ '&photo=' +re,             success: function(data) {                  $("#datas").html(data);             },             error: function(){                   alert('error handing here');             }         });  }); });  </script>   Ajax response page  <?php echo "<pre>"; print_r($_POST);  var_dump($_FILES); ?>   All input values are returned.but file is not uploaded.I don't know how to upload file using ajax. Please help me...


Prove that there is no non-constant polynomial $p(n)$ with integer coefficients that only takes prime values

Attempt (so far):  Assume there exists a non-constant polynomial $p: \mathbb Z \to \mathbb Z$ with integer coeffecients that only takes on prime values. Let notate it as  $$p(n)=d_j n^j + d_{j-1} n^{j-1}+ \dots +d_1 n + d_0 $$  where $j\in \mathbb N$.  Let $k$ be some composite number with $r$-many factors. Then $$\begin{array} \ k &=& p(n_1)^{i_1} p(n_2)^{i_2} \dots p(n_r)^{i_r} \\ &=& (d_j {n_1}^j + d_{j-1} {n_1}^{j-1}+ \dots +d_1 {n_1}+d_0)^{i_1} \dots (d_j {n_r}^j + d_{j-1} {n_r}^{j-1}+ \dots +d_1 {n_r}+d_0)^{i_r} \end{array}$$    I don't really see how to progress from here unless I want to start doing ungodly amounts of computation. Could someone provide a hint of a path I should be taking?


How to talk to customer service TAP's to receive a refund

I booked a ticket in December (before the Coronavirus outbreak made it outside of China) to fly from Lisbon to Tel Aviv in May, on the 24th of March TAP cancelled the flight.   From what I understand I should be able to receive a full money refund according to the EU261 regulation. And also according to the flight contract with TAP (I read parts of it, preparing to talk with their customer service).  But I called their customer support (minimum of 30 minutes waiting time, answered me 5 out of 7 calls) and they just offer me a voucher, when I ask for the refund they refuse, and when I mention the laws they disconnect the call.  I decided to try to record them and told them I will, which resulted in claims that it is illegal, and then they disconnected me.  So my questions are: 1) (Important) How can I actually talk them into giving me my money back? 2) (Less important) Is it illegal to record a talk with customer service? Do I have to tell them I am doing it?  Thanks!  PS. right now I filed with my CC company to see if they can give me the money back, but in case that doesn't work, I would like to be able to talk better to customer support.


I am currently developing a plugin, which depends on another plugin (json-api). I use the following code to check for the presence during startup and in the constructor, in case the json-api plugin is deactivated later on:  require_once (ABSPATH . '/wp-admin/includes/plugin.php');  class MyPlugin {     public function __construct() {         // ...          // register a check for dependency         add_action('plugins_loaded', array( $this, 'dependency_check' ));      }      public function dependency_check() {         if (!class_exists('DEP_CLASS'))             $this->dependency_failed();     }      protected function dependency_failed() {         if (current_user_can( 'activate_plugins' ))             deactivate_plugins( plugin_basename ( __FILE__ ) );          add_action('admin_notices', array ($this, 'notify_dependency_problem') );     }      public static function notify_dependency_problem() { /* ... error message shown ... */ }      public function activate() {         if (!is_plugin_active('dep_plugin/start.php')) {             $this->dependency_failed();             return false;         }     } }  register_activation_hook(__FILE__, array('MyPlugin', 'activate')); new MyPlugin();   This works fine so far - however, Wordpress additionally shows a "Plugin Activated" notice, which is misleading to the user. Additionally, the buttons ("Activate", "Edit", "Delete") below the plugin are now missing as well.   How is it possible to get rid of the "Plugin Activated" Message (Note: Thanks to @toscho, this has been resolved via a unset($_GET['activate'])) and  how to get the buttons back?


I am new to PHP and I need a function that enables me to remove an item from an array.   So far I have:   $ab = milk  $ba = apple  $ca = bread   array($ab, $ba, $ca).   Is there a function or method available to delete $ba from the list?         I.e  if (condition)==true       array_delete ($ab): ($ab, $ba, $ca)   Obviously the above does not work, or exist, but I am looking for something like it that does exist.   Any help would be huugely appreciated!  Thanks


Why does LuaTeX plus breqn quadruple output of \text{} when in display-math mode?

MWE needs to be compiled with LuaTeX to reproduce the problem:  \documentclass[11pt]{report}% \usepackage{amsmath,mathtools} \usepackage{breqn}                          \begin{document} $J^{\ast} = \text{JFK} \to \text{NO} \to \text{SFO}$ \[ J^{\ast} = \text{JFK} \to \text{NO} \to \text{SFO} \] \end{document}   Gives (no compile error or any warning) the following strange output    I have to use breqn package. If I remove it, then I get the expected output    Is there a way to work around this, so I can use breqn and get correct output?  TL 2015. filelist: (compiled with lualatex)  This is LuaTeX, Version beta-0.80.0.1 (TeX Live 2015) (rev 5863)   *File List*   report.cls    2014/09/29 v1.4h Standard LaTeX document class   size11.clo    2014/09/29 v1.4h Standard LaTeX file (size option)  amsmath.sty    2013/01/14 v2.14 AMS math features  amstext.sty    2000/06/29 v2.01   amsgen.sty    1999/11/30 v2.0   amsbsy.sty    1999/11/29 v1.2d   amsopn.sty    1999/12/14 v2.01 operator names mathtools.sty    2015/11/12 v1.18 mathematical typesetting tools   keyval.sty    2014/10/28 v1.15 key=value parser (DPC)     calc.sty    2014/10/28 v4.3 Infix arithmetic (KKT,FJ)  mhsetup.sty    2010/01/21 v1.2a programming setup (MH)    breqn.sty    2015/08/11 v0.98d Breaking equations    expl3.sty    2015/12/20 v6326 L3 programming layer (loader)  expl3-code.tex    2015/12/20 v6326 L3 programming layer  l3pdfmode.def    2015/11/11 v6250 L3 Experimental driver: PDF mode flexisym.sty    2015/08/11 v0.98d Make math characters macros   cmbase.sym    2007/12/19 v0.92 mathstyle.sty    2015/08/11 v0.98d Tracking mathstyle implicitly graphicx.sty    2014/10/28 v1.0g Enhanced LaTeX Graphics (DPC,SPQR) graphics.sty    2014/10/28 v1.0p Standard LaTeX Graphics (DPC,SPQR)     trig.sty    1999/03/16 v1.09 sin cos tan (DPC) graphics.cfg    2010/04/23 v1.9 graphics configuration of TeX Live   pdftex.def    2011/05/27 v0.06d Graphics/color for pdfTeX infwarerr.sty    2010/04/08 v1.3 Providing info/warning/error messages (HO)  ltxcmds.sty    2011/11/09 v1.22 LaTeX kernel commands for general use (HO) supp-pdf.mkii pdftexcmds.sty    2011/11/29 v0.20 Utility functions of pdfTeX for LuaTeX (HO) ifluatex.sty    2010/03/01 v1.3 Provides the ifluatex switch (HO)    ifpdf.sty    2011/01/30 v2.3 Provides the ifpdf switch (HO) luatex-loader.sty    2010/03/09 v0.4 Lua module loader (HO) epstopdf-base.sty    2010/02/09 v2.5 Base part for package epstopdf   grfext.sty    2010/08/19 v1.1 Manage graphics extensions (HO) kvdefinekeys.sty    2011/04/07 v1.3 Define keys (HO) kvoptions.sty    2011/06/30 v3.11 Key value format for package options (HO) kvsetkeys.sty    2012/04/25 v1.16 Key value parser (HO) etexcmds.sty    2011/02/16 v1.5 Avoid name clashes with e-TeX commands (HO) epstopdf-sys.cfg    2010/07/13 v1.3 Configuration of (r)epstopdf for TeX Live  ***********   Update  I found another case of duplication when using breqn, which does not involve \text at all. But the solution provided below also fixes this issue. I am adding this second case here for reference just in case it might be useful. Here is MWE  \documentclass[11pt]{article} \usepackage[T1]{fontenc} \usepackage{amsmath,mathtools} \usepackage{breqn} \begin{document} \[ \underset{\mathbf{S}} {\operatorname{arg\,min}}      \sum_{i=1}^{k} \sum_{\mathbf x \in S_i}       \left\| \mathbf x - \boldsymbol\mu_i \right\|^2  \] \end{document}   The output is    After adding the patch in the answer below the correct output is now given, which is


Let $f(z)$ be an analytic function on the unit open disc such that $|f(z^2)| \le |f(z)|$ for $|z|<1$. How can I prove that $f(z)=az^n$? Probably, I need to use the maximum modulus principle: namely, consider the annulus $C = \{z \in \mathbb{C} ~|~ r^2 < |z| < r \}$, then I know that the minimum of $f(z)$ on $C$ occurs on $|z| = r^2$ but I also know that $|f(z^2)| \le |f(z)|$ and therefore the inequallity should be strict (otherwise the function is constant). What else can I do?