Insert id from from one table and insert it into another one. Mysql + PHP

I am working on a register user form and I have two tables in mysql. What I want to do is when a new user has registered, take the id (which primary key) of that user and insert it into another table. What is the best way to do that?  Thanks in advance.


"more than one does" or "more than one do"?

However, if no x satisfies the equation or more than one x does—that   is the solution is not unique—the problem is said not to be well   posed.   In the line(source: ) above it uses "more than one does", but logically and intuitively it should be "more than one do" since "more than one" means two or more, then it is plural. I have tried my best to interpret it as it is, but hardly can I convince myself to make "more than" collocate with "does" as an adv., which may only make it make sense.


Isomorphism between finite fields adjoining a root

Let $p(x)=x^3+x^2+1$ and $q(x)=x^3+x+1$ be polynomials over the field $\mathbb{Z}_2$. Let $\alpha$ be a root of $p(x)$ and $\beta$ be a root of $q(x)$. Now let $K=\mathbb{Z}_2(\alpha)$ and $F=\mathbb{Z}_2(\beta)$. I am asked to find an explicit isomorphism $\phi: K \rightarrow F$.  I know that since $p(\alpha)=0$ and $q(\beta)=0$ then $\alpha$ and $\beta$ are algebraic over $\mathbb{Z}_2$. I'm rather stuck after this point, and my other problems are somewhat similar to this one, so if there is a key fact that I'm missing then it might allow me to solve the others.


I have created an app that would change CampaignMemeber Status Values by calling our web application api and storing info in custom objects. In my developer org where the package is created works fine but on our clients sandbox they get the error      System.QueryException: Non-selective query against large object type   (more than 200000 rows).   I know the reason that they get is because the query is not selective or that they have a lot of record. The error is occurring in a trigger. Below i have my trigger. Could anyone suggest a way to make my query more selective(i know about indexed field and tire that already) or any other way around the issue?    trigger SynchronizeTrigger on Attendee__c (after update, after insert) {      Map<String,String> matchedRegistration = new Map<String,String>();      Map<String,String> matchedCheckin = new Map<String,String>();      Set<String> matchedEmails = new Set<String>();      Map<String,String> matchedSurnames = new Map<String,String>();      CampaignMember[] cmList = new CampaignMember[]{};      List<Fail__c> flist = new List<Fail__c>();        Public Authentication__c auth = new Authentication__c();     auth = [SELECT Authentication_Campaign__c FROM Authentication__c LIMIT 1];        public Integer attendeesAttended = 0;     public Integer attendeesDidNotShow = 0;     public Integer attendeesAccepted= 0;     public Integer attendeesCancelled = 0;     public Integer attendeesfailed = 0;      for(Attendee__c a : Trigger.new){         matchedRegistration.put(a.Attendee_Email_Address__c,a.Attendee_Registration__c);         matchedCheckin.put(a.Attendee_Email_Address__c,a.Attendee_Checkin__c);          matchedEmails.add(a.Attendee_Email_Address__c);     }       for(List<CampaignMember> cms : [SELECT Id,Campaign.Id, Contact.Email,Status                            FROM CampaignMember                            WHERE  Campaign.Id =: auth.Authentication_Campaign__c AND  Contact.Email  IN: matchedEmails]){         for(CampaignMember cm : cms){            if(matchedRegistration.get(cm.Contact.Email)=='1' && matchedCheckin.get(cm.Contact.Email)=='1'){                cm.Status = 'Attended';               cmList.add(cm);               attendeesAttended++;            }else if(matchedRegistration.get(cm.Contact.Email)=='1' && matchedCheckin.get(cm.Contact.Email)=='0'){                cm.Status = 'Did Not Show';               cmList.add(cm);               attendeesDidNotShow ++;             }else if(matchedRegistration.get(cm.Contact.Email) =='1' && String.isEmpty(matchedCheckin.get(cm.Contact.Email))){                cm.Status = 'Accepted';               cmList.add(cm);               attendeesAccepted ++;            }else if(matchedRegistration.get(cm.Contact.Email)=='0'){                cm.Status = 'Cancelled';               cmList.add(cm);               attendeesCancelled ++;                 }      update cmList;       }     }     for(List<CampaignMember> cms : [SELECT Id,Campaign.Id,FirstName,LastName,Contact.Email                            FROM CampaignMember                            WHERE Campaign.Id =: auth.Authentication_Campaign__c AND Contact.Email NOT IN: matchedEmails]){              for(CampaignMember cm : cms){              fList.add(new Fail__c(Fail_Firstname__c = cm.FirstName, Fail_Surname__c = cm.LastName, Fail_Email__c = cm.Contact.Email,Fail_Campaign_Name__c = cm.Campaign.Name ,Fail_Campaign__c = auth.Authentication_Campaign__c));             attendeesfailed ++;             upsert fList Fail_Email__c;           }   }     ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Confirm, 'Attended: ' + attendeesAttended + ' Delegate(s)' + ', ' + 'Did Not Show: ' + attendeesDidNotShow + ' Delegate(s)'+ ', ' + 'Accepted: ' + attendeesAccepted + ' Delegate(s)' + ', ' + 'Cancelled: ' + attendeesCancelled + ' Delegate(s)'));   ApexPages.addMessage(new ApexPages.Message(ApexPages.Severity.Error, 'Failed Syncs: ' + attendeesfailed + ' Delegate(s)')); }   Thanks


Can you be refused a visitor visa to US if you have bad Credit there?

I did my 3 years of College in the US, 2010-2013 due to finance issues I was unable to pay my credit card bill of a certain bank, which still lie unpaid.  However I plan on visiting the US later this year; could I be denied visa for having an unpaid bill ?


How to render casted shadow on surface only

How can i render a character + the shadow it cast on a surface but not the surface itself?  I would use it to    Render my background only once (if nothing moves in background) so i would be saving a lot of time  Better effects with transparency gif


I'm tying to get expected rendering results from many days but not able to get it as seen in image. I have attached image of expected results.


Probability doubles if you switch cards when the third card is revealed, How?

So I was watching the show Numb3rs, and the math genius was teaching, and something he did just stumped me.  He was asking his class (more specifically a student) on which of the three cards is the car. The other two cards have an animal on them. Now, the student picked the middle card to begin with. So the cards looks like this  +---+---+---+ | 1 | X | 3 | +---+---+---+   The X Representing The Picked Card  Then he flipped over the third card, and it turned out to be an animal. All that is left now is one more animal, and a car. He asks the student if the chances are higher of getting a car if they switch cards. The student responds no (That's what I thought too).  The student was wrong. What the teacher said is "Switching cards actually doubles your chances of getting the car".  So my question is, why does switching selected cards double your chances of getting the car when 1 of the 3 cards are already revealed. I thought it would just be a simple 50/50 still, please explain why the chances double!


Solution of equation $\frac{x\cdot 2014^{\frac{1}{x}}+\frac{1}{x}\cdot 2014^x}{2} = 2014$

Solution of equation $\displaystyle \frac{x\cdot 2014^{\frac{1}{x}}+\frac{1}{x}\cdot 2014^x}{2} = 2014$   $\bf{My\; Try::}$ Clearly Here $x>0$, Now Using $\bf{A.M\geq G.M}$  So Here $\displaystyle x\cdot 2014^{\frac{1}{x}}>0$ and $\displaystyle \frac{1}{x}\cdot 2014^x>0$ .  So $\displaystyle \left(\frac{x\cdot 2014^{\frac{1}{x}}+\frac{1}{x}\cdot 2014^x}{2}\right)\geq \left(x\cdot 2014^{\frac{1}{x}}\cdot \frac{1}{x}\cdot 2014^x\right)^{\frac{1}{2}} = \sqrt{2014^{\left(x+\frac{1}{x}\right)}} = 2014$   And equality Hold , When $\displaystyle x = \frac{1}{x}\Rightarrow x= 1$  Can we solve it  without Using $\bf{A.M\geq G.M}$  If Yes, Then please explain me.  Thanks


I have a pivot box that I access only through SSH.  It has a small hard disk and I will never use GUI apps on it so I want to purge those.  Ubuntu 16.04.  Please recommend a safe way to do this.    EDIT:  Some people think that this is a duplicate of .  Reading them both makes it clear that it is not.  That one is about Ubuntu 10.04, not 16.04.  And the answer there doesn't work on Ubuntu 16.04 but anyway why would it?


IS RadeonDriver support for ubuntu 16.04

I am a Amd user of Ubuntu 14.04 LTS. I want to upgrade to Ubuntu 16.04 LTS. After referring some sites, I found that Ubuntu 16.04 LTS doesn't have drivers which will support RadeonDriver.   According to these sites AMD users had to wait for a while. Can you please tell me for what time should I wait to upgrade to Ubuntu 16.04 LTS? Can you please tell me the waiting time?  This is my amd driver    00:01.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Richland [Radeon HD 8650G] [1002:990b]   Do I have any support at present?


Is there any difference between "offense" and "offence"?

"Offense" vs. "offence", which is more correct? If both are correct, are there any differences in shades of meaning and/or usage?


I need to change all names of all files in specific directory to lowercases, using bash script. Moreover I don't want to change names of subdirectories, as it was proposed in


What would happen if the value of the gravitational constant would become twice as large?

If the gravitational force in  would be twice as large, then so would be the gravitational force between two massive objects and hence their acceleration toward each other. However, if according to  a force cannot be unequal to the counter force it feels or is able to evoke, and their acceleration toward each other is opposed by their inertia, then would the inertia of the objects become twice as large or would a change of the value of the  affect the pace of time? (Ignoring the fact that gravity in general relativity isn't a force) (Though my question is not entirely unrelated to , I think that it is more general so its answer may be more interesting.) Though the gravitational constant obviously is constant; it could as well have a different value. My question is how a universe (where the physical laws are the same) with a twice as large value of the gravitational constant would look like, if it would be different from our universe and, if so, how.


I can not log in using this code. What is the error?

@Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_log);      Name = (EditText)findViewById(R.id.ETNAME);     Password = (EditText)findViewById(R.id.ETpassword);     Info = (TextView)findViewById(R.id.TVinfo);     Login = (Button)findViewById(R.id.BTlogin);      Info.setText("No of attempts remaining: 5");      Login.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             validate(Name.getText().toString(), Password.getText().toString());         }     }); } private void validate(String UserName, String UserPassword){      if((UserName == "Starlite") && (UserPassword == "abc123")){         Intent intent = new Intent(LOGActivity.this, InterfaceActivity.class);         startActivity(intent);      }else{         counter--;         Info.setText("No of attempts remaining: " + String.valueOf(counter));          if(counter == 0){             Login.setEnabled(false);         }     }  }   }  This is my code and I created it to log to a profile. But I can not login with it. What is the error of it? The following are the top code. I done with it with tutorials. But it not working.It was verified in 5 times. But can not log to it.


SharePoint search using Wildcard suffix matching

Can anyone please guide me whether I can perform a wildcard suffix matching in a SharePoint 2013 Search. For eg. *card which should return search results ending with the word "card".   The KQL(Keyword Query Language) in SharePoint Search gives successful results for the wildcard prefix matching viz. card* returning results starting with the word "card". So is there any solution where I can perform wildcard suffix matching to get the desired results?


How to assign vertex groups and bone weights through Blender's Python API?

I'm making a script to import custom objects, it is still at early stage but so far vertices, faces and uv are created correctly. I want to do weight painting through Blender's Python API but I don't know how to do it properly.  Below an extract of the code that create the objects, how I could add vertex group and relative weights? I know how to extract vertex indices and weights from the input model but don't know how to use them,   (Blender version is 2.72)      for i in range(0,self. subsetCount):         subset = self.subset[i]         coords = subset.getV3(0)         faces = subset.getIndices()         me = bpy.data.meshes.new(subset.name+"_Mesh")          ob = bpy.data.objects.new(str(i).zfill(2)+'_'+subset.name, me)         ob.location = (0, 0, 0)         bpy.context.scene.objects.link(ob)          me.from_pydata(coords, [], faces)         me.update(calc_edges=True)          mat = bpy.data.materials.new(subset.name)         mat.diffuse_color = (random.uniform(0.0, 1.0), \                              random.uniform(0.0, 1.0), \                              random.uniform(0.0, 1.0))         me.materials.append(mat)          for f in me.polygons:             f.material_index = 0             f.use_smooth = 1          # vert_uvs = subset.getV2(0x28)         # if len(vert_uvs) > 0:         #     me.uv_textures.new("UV0")         #     uvlist = [uv for pair in [vert_uvs[l.vertex_index] for l in me.loops] for uv in pair]         #     me.uv_layers[-1].data.foreach_set("uv", uvlist)   edit  found this to add the group:          vxgroup = ob.vertex_groups.new("group")   still don't know how to set weights for vertices (best would be at once)  edit  I was hoping to use something like a foreach_set but can't figure out how to use it, instead solved this way:          for grp in ob.vertex_groups:             grp.add(range(0,len(me.vertices)), 1.0, 'REPLACE')   is just an example and set all vertices weight in all groups of the object ob (if you try it in console select another mesh then back to see the weights applied).


Why autocorrelation affects OLS coefficient standard errors?

It  that OLS residuals autocorrelation is not always an issue, depending on the problem at hand. But why residuals autocorrelation would  the coefficient standard errors? From the :      While it does not bias the OLS coefficient estimates, the standard   errors tend to be underestimated (and the t-scores overestimated) when   the autocorrelations of the errors at low lags are positive.


How to keep private notes/useful links (per profile) to help answering questions?

While answering questions, adding comments and even more during reviews or edits, I often find myself in the need to quote some external reference, that I know of without remembering the exact URL. Some are often needed, like RFC2606 or RFC6302 for tokens to use in obfuscation, or various software documentation, etc.  It would be handy if I could have a page, in my profile, completely private, where I could basically fill out a free-form text box where in my case I could put my "most needed links". Already like that it would be useful, as tied to my account, and a further improvement would be if it could be made available in some way at the time we are on a question, like with a small search text box that would hit this page or something like that.  Of course I can reach almost the same goal by having all the resources as bookmarks in my browser (which is what I am doing right now failing to have a better solution), but it would be more convenient to have them in each Stack Overflow site (because I may use different computers/browsers that are not necessarily linked on the bookmarks-level together, or using the Stack Overflow  mobile application, etc. and I may not like using a cloud application for that).  I am also open to suggestions from other active participants that have the same problem and how they solve it, as I may have missed obvious ways to do that.  Update 1: Ok for the duplicate question, I have searched before posting, but this question with a score of -9 never popped up in results. The answers there do not 100% answers my question anyway...  Update 2: Let me re-emphasize again that the core idea is to store a list of links that I often need when replying to questions on Stack Overflow. It is not for storing unrelated texts. And even better if they are easily available when answering questions.


Probability of drawing the Jack of Hearts?

You have a standard deck of cards and randomly take one card away without looking at it and set it aside. What is the probability that you draw the Jack of Hearts from the pile now containing 51 cards?      I'm confused by this question because if the card you removed from the pile was the Jack of Hearts then the probability would be zero so I'm not sure how to calculate it.    Edit: I asked this question about a year ago because I was struggling to get an intuitive understanding of an important concept in probability, and the comments and answers were really helpful for me (especially the one about "no new information being added so the probability doesn't change").


Prove that $\lim_{n\to\infty}a_n^2=a^2$ when ${a_n}$ is a sequence in $\mathbb{R}$ with $\lim_{n\to\infty}a_n=a$

Question:  Let ${a_n}$ be a sequence in $\mathbb{R}$ with $\lim_{n\to\infty}a_n=a$  Prove that  $\lim_{n\to\infty}a_n^2=a^2$  Attempt: Without using any properties of limits (this is a question in a section of the book that came before any list of any limit theorems)  By definition:  $|a_n^2-a^2|<\epsilon$   $|a_n^2-a^2|$ $\leq$ $|(a_n+a)(a_n-a)|$ $\leq$ $|(a_n+a)| |(a_n-a)|$ $\leq$   $(|a_n | + |a|)(|a_n -a|)$ $<$ $\epsilon$  And since I know that $\lim_{n\to\infty}a_n=a$, I'll subsitute that in for $|a_n|^2$ as $a^2$   $\therefore$ $a^2-|a|^2 < \epsilon$ which is true since $a^2-|a|^2$ in my case.  I wonder if this is a possible solution?


Retraction formulation of the homotopy extension property

Hatcher's algebraic topology (p. 14) defines that a pair $(X, A)$ where $X$ is a topological space and $A$ an arbitrary subset has the homotopy extension property (HEP) if:     Given a continuous map $f : X \to Z$ to some topological space $X$ and a homotopy $\bar{H}: A \times I \to Z$ of $f|_A$ on $A$ there exists a homotopy $H: X \times I \to Z$ of $f$ such that $H|_{I \times A} = \bar{H}$   (We use the notation $I = [0, 1]$) The book then proceeds to given an equivalent characterization of this property as:     There exists a retraction $r: X \times I \to X \times \{0\} \cup A \times I$   Let's call this condition (R). It's easy to prove (HEP) $\Rightarrow$ (R) and (R) $\Rightarrow$ (HEP) to be pretty easy, too: $(x, 0) \mapsto f(x)$ and $\bar{H}$ as in (HEP) agree on $X \times \{0\} \cap A \times I = A \times \{0\}$, so they glue to a map $F: X \times \{0\} \cup A \times I \to Z$ which we can compose with the retract $r$ from (R) to obtain the desired extension $H: X \times I \to Z$.  However, there is one caveat: The glue map $F$ need not be continuous.   For example, for $X = [0, 1]$, $A = [0, 1)$ and $Z = \mathbb{R}$ we can choose $f$ to be constant $0$ on $[0, 1]$ and $H : [0, 1) \times [0, 1] \to \mathbb{R}$ to be given by $H(x, t) = t/x$. Obviously $H$ can not be extended to $[0, 1]^2$. Note however, that this pair $(X, A)$ does not admit a retraction $r: X \to A$.  Questions: Is the claim (R) $\Rightarrow$ (HEP) in Hatcher correct? That is, can we somehow use the existence of the retraction $r$ to conclude that the glued map $F$ is continuous, or at least that $F \circ r$ is continuous?  If the answer is negative, what are some conditions we can impose on $X$ or $A$ to ensure the equivalence?  What I've got so far:    Obviously, if $A$ is closed the continuity of $F$ is guaranteed. If $X$ is compact, the existence of the retraction $r$ together with the compactness of $X \times I$ implies that $X \times \{0\} \cup A \times I$ and hence also $A$ are closed. If $X$ is Hausdorff, (R) also implies that $A$ is closed: Suppose $x \in \overline{A} \setminus A$. Then $r(x) \neq x$ and since $X \times I$ is Hausdorff, we find disjoint open subsets $U, V \subset X \times I$ such that $x \in U$ and $r(x) \in V$. Since $x$ is in the closure of $A$, the open set $U \cap r^{-1}(V)$ contains a point of $A$ which is then not mapped to itself by $r$, contradicting that $r$ is a retraction.


I would like to select in python the visible perimeter of a mesh. My idea is to get only the external vertices, not all visible.   Any idea or link that can help me?


I want to extract all occurrences of a pattern in Python. Here is what i have done  import re  string="Any information
sent to the server as clear text
, may be stolen and used later for
identity theft
 or user impersonation. In addition, several privacy regulations state that sensitive information such as user
 credentials will always be sent encrypted
 to the web site."  regex='
.*
' # obviously it matches starting
 to the last
  if re.findall(regex, String):     print(re.findall(regex, string)) else:     print('no match found')   I want to extract all the occurance of paragraph tags. I mean the output should be a list which looks like this  ['
sent to the server as clear text
', '
identity theft
', '
 credentials will always be sent encrypted
']   I've found few similar questions but not serving the purpose


Evaluating $\sum_{i = 0}^{\lfloor n/2 \rfloor} {n \choose 2i}p^{2i}(1 - p)^{n - 2i}$

Let $0 \leq p \leq 1$, $n \in \mathbb{N}_0$ and consider $$\sum_{i = 0}^{\lfloor n/2 \rfloor} {n \choose 2i}p^{2i}(1 - p)^{n - 2i}$$ Has anyone a hint for me how I can calculate the sum?


At the risk of a series of down votes but I have just installed QGIS 2.0 after using 1.7.4 and 1.8 previous.  It looks great but there are a lot of plugins missing.  I understand from the install that  I may need to install them again for fear of system conflicts.  However some really good plugins are missing. The following are the main ones:   Numerical Vertex Edit  Easy custom Labelling  OpenLayers Plugin  OpenStreetMap  QGIS Cloud  Remove Empty Layers  Spatial Query   This list is not exhaustive but I am sure they are built in somewhere and can't find them.


$$\frac{4}{abcd}\geq\frac{a}{b}+\frac{b}{c}+\frac{c}{d}+\frac{d}{a}$$  Given: $a+b+c+d=4$ and $a$, $b$, $c$ abd $d$ are positives.  How to prove the above inequality using Arithmetic Geometric Mean Inequality?  I tried the following but, I am getting stuck after last step.


Why is there no lens that is perfect for any situation?

My friend was talking about the 28mm, 70mm, and 200mm Nikon primes that he considers to be the "holy trinity" of lenses. Another friend asked why not just make a single 28-200mm zoom lens instead? I know typically zoom lenses aren't quite as sharp as prime lenses, but even so, some zoom lenses like the Nikon 28-70mm are very high quality. So I wondered, why not produce a lens that can be ideal for shooting in almost any setting; Something with a huge focal range and a super low F/stop, like a 18-300mm f/1.2 with IS?  Surely it would be expensive and a lot of glass, but lots of people would be willing to pay for such a versatile lens. What would the potential drawbacks of making a lens like this?


I often read that one should not use xspace package, but why? Can someone give an example of problems caused?


Why are programming libraries off-topic?

I'm sure this subject has been done to death and I'll be down-voted into oblivion, but I've just had a question put on hold because:     Questions asking us to recommend or find a tool, library or favourite off-site resource are off-topic for Stack Overflow   My main objection to this is my personal experience - there have been many answers I've found very useful that suggest a library for solving a problem and I've also noticed that these types of questions have often been marked off-topic. Thankfully those questions aren't deleted as I've gained something from them. Here's an example of a question I gained useful information from recently (although I admit that it is phrased a little too heavily toward opinion):  I am now using the AFOAuth2Client library, thanks exclusively to this question.  In the case of my question, it didn't seem anyone has asked how to solve this specific problem before. I also implied in the question that the solution may be an external library (as opposed to API code) but that either would do. It seems that if I had done LESS research into whether it could be achieved using the built in API and left the question more open ended it would have been left open.  So, given that these questions are clearly helpful to the community (based on my own experience and the up-votes such answers receive) provided they are phrased correctly (and thankfully we have old ones that weren't censored) - why are we closing them?  For reference, my question:


Hi guys I'm like of course many others getting started on investments. Current college student, reading the intelligent investor.  My question is: how can I learn where to get started? I'm overflowed with information but they all teach you about concepts. For example, I was reading about bonds, but, let's say I wanted to invest 5% in them, where do O do it?? I trid nadex and that's very volatile, not what I'm looking for, and it doesn't have a long term, it goes by minutes or hours. So where do warren buffet invest that he can put the money and grow over the years and it's not like a 5 minutes binary? (Don't confuse it tho, I'm not asking for warren's formula lol) I don't know if I explain myself correctly, let's say I also want to buy a share of a company X, where do I buy it? For how long can I have it, etc?  Thank you 😊


How to sign out of iCloud on iPhone and Macbook without having access to rescue email and with Find my iPhone and Find my Mac turned on?

I have an iPhone 7 Plus and a Macbook Pro 15" 2014. I was trying to make calls from Facetime Audio on Mac from my iPhone. My Apple ID was asked on Facetime on Mac. I entered my details and it told me that your account has been locked due to security reasons. So please enter the answer to your security questions which I don't remember. I entered twice and it greyed out this option of security questions. Now the only thing I was left with was to email myself (through Apple) the reset link so as to reset the password. But here's the bad thing that happened to me: The email that I was using with iCloud and Apple ID was my previous employers email and since I left the job, I couldn't access it anymore. So I couldn't get the reset link. Same thing happened with me on both iOS and Macbook.  Now I can't have iCloud sync between both these devices, can't download anything from the appstores on both the devices. I tried signing out of iCloud on my iPhone (and on Mac) but since my Find my iPhone(Find my Mac on Mac) was ON, it didn't let me sign out. I backed up my iPhone and tried erasing all my iPhone so that I could log in with some new Apple ID but since FInd my iPhone was ON, I couldn't erase my device either. Also tried restoring through iTunes, but all in vain since Find my iPhone was ON.  What should I do now? My Macbook and my iPhone are my primary devices and I can't live without iCloud syncing on.


My echo command doesn't accept switches (echo -n or echo -e)

I have an echo statement in my script as below:  echo -ne "Check Script";   I was expecting it to print   Check Script   but I am getting the below output  -ne Check Script   But when I run the same script on some other machine I get the expected output. What could be machine specific variables or properties because of which the script is behaving differently.


In the render preview or when i render the scene this black boxes show up. they look different and change form from from every angle. All objects are imported  as images as planes.  some produce these black boxes, some do not. please help, thanks.


How could I identify plain text website addresses and wrap them in an href tag?

I have a text field and when the page loads, I need to wrap any websites listed in that field with an href tag.  www.google.com needs to be changed to   <a href="www.google.com"><\a>   Not sure if this can be done with jquery or if I'd have to use regular expressions.


Can I use blender for creating a 3D integrated scene?

Is blender good for compositing? I want to integrate my models in to real life footage and am expecting realistic results. Or can I make a 3D characters-integrated-real-life-scene which will look decent and professional?


Different bibliographies entries with bibtex

I have 2 different .bib files. In one file I have the publications I appear on and the other one is for the references I have used. Right now, I include each file separately but I only get one bibliography section.  What I would like to have is two different entries: One, with the publications I appear on and  two, the references I have used to write my thesis.  Is it possible to do it?  Thanks.


What's the proper usage of apostrophes in plural abbreviations?

If I were to abbreviate the word university, I would most likely write uni — or would uni’ be more correct?  If I wanted to say universities, would I write unis or uni’s?  My gut instinct would be to go with unis, but are there any particular rules regarding this?


How to politely take back a request to be on an exam committee?

I need to have three faculty members on my Qualifying Exam committee, with one non-adjunct faculty of my department to be chair. On our department guidelines webpage, the 'non-adjunct' bit was not specified.   I had therefore emailed three professors, two from another departent (CSE), and one adjunct from mine (EE). One of the CSE professors agreed, the EE professor agreed but told me he couldn't be chair because he was adjunct. I therefore got another EE professor to be chair. Now I will have to email the other CSE professor to tell him I don't need him to be on the committee anymore since I've got people already. This wouldn't have happened had I known about the rule for chair.   How do I email him in the politest way possible? He's currently out of country so meeting in person isn't possible.


How can I receive FM radio broadcast signals on an iPhone 4?

I know I can download apps such as Wunder Radio or iHeartRadio that tune in to the same signal over the internet as is being broadcast over commercial FM stations, but I want to use my iPhone to receive input from a real FM tuner.  Many times smaller stations do not stream and often other services, such as audio of TV on a Gym, some museums and traffic warning stations as well as conferences where live translations in several languages are broadcast over different FM frequencies.   Is there a particular app for this or maybe a third-party device I can purchase?


What does 100Ohm @ 100MHz exactly mean in ferrite beads?

I am trying to understand the parameters of ferrite beads and having trouble in understanding the impedance vs frequency parameter.   What does 100Ohm at 100MHz exactly mean? Does it mean that the bead will provide impedance of 100Ohm for frequencies in the 100MHz region (depending on its graph)?  I do understand that bead is highly resistive at higher frequencies.  Any help will be appreciable.


SQL server Read Only permission automatically for new databases

When I setup my database I create a sql user that my application runs as.  The sql user gets read only access to all the databases on the server. The problem is the user won’t have read only access to any new created databases in the future. There is another app that creates these new databases for users and I don’t have a way to add my user script into the templates database created.  Is there a way to automatically update the sql user for read only for the future ones?  SQL server 2014.


Do COBE, WMAP, or Planck data show time-variance of the CMB's anisotropies?

What limits on the time-variance of the CMB do the COBE, WMAP, or Planck data put?  In other words, I am looking for a peer-reviewed paper that would answer this question: If I made maps of, say, WMAP Month 1, Month 2, Month 3, … data, would the timescale of the time-variance between the maps of the different months be much less than than cosmological timescales (say, the Hubble time)?  I do not want an answer that involves cosmology. I want a purely observational answer.


how to remove widgets from widgets page?

I'm trying to remove widgets from the widgets page.  I was able to find the code to remove them, for example:      unregister_widget('WP_Widget_Meta');   That removes the Meta widget. Removing default WP widgets is easy because I can find the names of the widgets to remove.    BUT I'm having trouble finding the names of 3rd party widgets.  Does anyone know how to find the names of 3rd party widgets so I can target them and unregister them?


How to add more than 1 user role to sub-menu pages

I create a plugin with 6 submenu pages. I need 4 of them  to be accessible by administrator and a custom user role i created say 'coach' user. Then the 2 of them to be accessible by administrator and another custom user role 'player'. How would i do that to add 2 user role?


Question  how to prove that given f(x) and g(x) is continuous then $f*g(x)$ is also continuous   All I have is that because we already know that f(x) and g(x) is continuous then $|x-a|<\delta \implies |f(x)-f(a)| $ and $|g(x)-g(a)|<\epsilon$  And I also know that   $\lim{_{x\to a}}{f(x)}g(x)=\lim{_{x\to a}}{g(x)}*\lim{_{x\to a}}{f(x)}=f(a)*g(a)$ but I don't know what to do with those information


For my java class, I am suppose to create a SlotMachine class that generates 3 arrays of 3 random numbers and checks if all of the numbers match, if so they are declared a winner. I also have to create a another program to run 1000 slot machines and count the winners. The problem is every time I run the SlotMachine class and the main method, I get an exception error that I can't figure out how to fix.   The exception error:   Exception in thread "main" java.lang.NullPointerException     at SlotMachine.isWinner(SlotMachine.java:41)     at Play1000SlotMachines.main(Play1000SlotMachines.java:14)     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)     at     sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147)   The SlotMachine class:  // import statements import java.util.Random;  public class SlotMachine {   // fields private int[] row1; private int[] row2; private int[] row3;  // methods public SlotMachine(){     playMachine(); }  public void playMachine(){      Random random = new Random();      int row1[] = new int[3];     int row2[] = new int[3];     int row3[] = new int[3];       for (int i = 0; i < 3; i++) {         row1[i] = random.nextInt(10);     }      for (int i = 0; i < 3; i++) {         row2[i] = random.nextInt(10);     }      for (int i = 0; i < 3; i++) {         row3[i] = random.nextInt(10);     } }  public boolean isWinner(){      if (row1[0] == row1[1]){         if (row1[0] == row1[2]){             return true;         }      }      if (row2[0] == row2[1]){         if (row2[0] == row2[2]){             return true;         }     }      if (row3[0] == row3[1]){         if (row3[0] == row3[2]){             return true;         }     }     return false; } }   The main method:  public class Play1000SlotMachines{  public static void main(String[] args){      // comment     SlotMachine slotMachine = new SlotMachine();      // comment     int count = 0;      // comment     for (int i = 0; i < 1000; i++){         slotMachine.playMachine();         if (slotMachine.isWinner())             count++;     }      // comment     System.out.println("From 1000 slot machines, " + count + " were winners"); } }


aov() and lme() give completely different results in analyzing repeated measures

I have data consisting of two measures per subject (variable score, measured at Day 0, and Day1 per each subject).  There are two groups, and each subject belongs to one of them (variable Group). I would like to know if there are differences in the score values between these two groups of subjects. I tried aov and lme in R, and I got completely different results.   Why is the Group:Day effect significant using aov, and it is not significant using lme? Here is the code I used:  > demo1.aov <- aov(score ~ (Group*Day) + Error(Subject/Day), data = demo1) > summary(demo1.aov)   Error: Subject        Df Sum Sq Mean Sq F value Pr(>F)        Group      1    0.2   0.198    0.15    0.7        Residuals 50   65.9   1.318                 Error: Subject:Day        Df Sum Sq Mean Sq F value Pr(>F)   Day        1    0.3    0.34    0.45  0.507   Group:Day  1    4.0    4.02    5.29  0.026 * Residuals 50   38.0    0.76                  Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  > demo1.lme<-lme(score ~ (Group*Day), random = ~ 1|Subject/Day, data = demo1) > anova(demo1.lme)      numDF denDF F-value p-value     (Intercept)     1    50   0.394   0.533     Group           1    50   0.078   0.781     Day             1    50   1.225   0.274     Group:Day       1    50   2.064   0.157


Double back slashes escape code formatting in comments (but not answers)

I recently posted on answer on Stack Overflow which mentioned the discrepancy between windows and linux path separators in the answer. I enclosed both in inline code snippets like so: \\ and /. These render fine, both in the editor, and in the answer itself.   However, when I commented a similar remark on the answer (to ping the asker about the important discrepancy), the code formatting did not work. I eventually had to run the two together, because the backtick at the end would not close the first code snippet. (see comment section of this answer for an example).   For the record, when I type the inline code snippets (seen above), I write  `\\` and `/`   -exactly as show above. This is also exactly what I type in the comment below this post.  It appears that the way to get this code to format correct in the comments is to use double backticks on the first code block, as so:  ``\\``   This also works fine in the answer and editor itself: \\, however the discrepancy of rendering the original snippet in questions/answer/editor vs a comment should still be considered a bug in my opinion.


How to compare a long variable with a numerical digit in Java

double bonusScore = 10;   if (bonusScore > 0) { //code body }   I want to compare bonusScore which is double with 0, how should i do, because if done in above way it is not accurate and I do not know why.


When I'm adding subdivision modifier my object freaks out. I'm new to blender and don understand why :o if somebody knows why, it would be greatly appreciated.  here is with subdiv modifier   here is without


Should read-only Boolean grid columns be aligned to center?

My understand is text should be left-aligned; dates, times, and numbers should be right-aligned; images should be centered.  What about Boolean strings "Yes"/"No"? My hunch says to center them.


How to redirect users to custom lostpassword page?

How to redirect users to custom lostpassword page when they click on the Error: Lost your password?. Because I set a redirect for wp-login.php to my custom login page. when a user click on Error: Lost your password? it requests for wp-login.php and then automatically redirects to custom login page. I know the function is present on wp-login.php file but I don't know what changes shall I make to make this possible. Please help. I have also renamed wp-login.php.


Why are keyframes in global coords, instead of local coords? (Blender 2.70a)

So, I've been using Blender for several years, including a fair amount of animation, and in the past it's always been useful to align an object with its local coords. I.e. having the y-axis pointing down the nose of an airplane makes it much easier to animate.  However, I recently noticed that the keyframes aren't recorded in local coordinates (anymore?), but in global coordinates. This makes animating off-axis rotation very difficult.  Changing the rotation mode doesn't seem to help (Euler, quaternion, etc.).  Unfortunately, I can't upload any examples because the project is proprietary, and I don't really have time to setup another animation, but the example goes something like this: I want to animate a record rotating in a record player, but the player is not sitting flat, it's tilted at an angle. Normally, this wouldn't be a problem. Just model the record with z up, and you can tilt the record at whatever angle you need so that it sits on the tilted player, and still rotate the record around its own z-axis, right? Unfortunately, this is not what's happening. Instead, I animate it rotating 180d twice and it wobbles all over the place because it's interpolating global coordinates, not local coordinates.  EDIT: Here's a demo afterall:   It maybe a little hard to see because it's so fast, but the second time I animate the cube, it wobbles instead of rotating around its own z-axis like I expect it to.  Does anyone know what magic button I pressed that did this?  Or am I just crazy and remembering something that has never been possible? It's happened before...  EDIT: In fact, I KNOW this has worked before, cuz I just went back and looked at some old stuff, and I know I animated using the local coordinates then... I'm gonna go see if 2.70 behaves differently from 2.70a...  EDIT: Nope, 2.70 behaves the same way.


Does the series $\sum \sin(100n)$ converge?

Does the following series converge?  $$\sum \sin(100n) = \sin(100) + \sin(200) + \dots$$


Prove that every convergent sequence has a monotone subsequence

So if a certain sequence $a_n$ is convergent then its bounded.So from Bolzano-Weierstrass $a_n$ has a convergent sub-sequence, but where do I continue from here?


How do I prevent imap-mail.outlook.com-.txt from consuming disk space?

, my MacBook became unstable due to limited disk space caused largely by a single 330 GB text file ~/Library/Containers/com.apple.mail/Data/Library/Logs/Mail/imap-mail.outlook.com-<GUID>.txt  I have successfully deleted this file, but a mere day later this file is already nearly 1GB. How do I prevent this file from growing so large?


Simple way to change mysql_query() to MySQLi or PDO or more secure method?

I'm pretty new to PHP and am trying to learn more in the area of making my forms secure so that my DB are more difficult to mess up via SQL injection and such. The current web programmer/php guy at our company quit with short notice so my boss has placed me in the php programmers position temporarily with only a single week of training under the previous programmer (I do lots of html and css work, but no php prior), until they can find a real replacement.  Anyways, I read that using mysql_query() is a depreciated function and it should be avoided because that method is vulnerable. I see that my two options are to now use PDO or MySQLi. Being new to PHP, I'm having trouble figuring out what exactly I need to do to convert the code I am currently using (which sends info from a request a quote form on the site and stores it in the database incase of email troubles) into a more secure method of sending data to the database via PDO or MySQLi.  The current line of code I'm using is:      $query = mysql_query("insert into request_for_quote(rfq_company_name, rfq_name, rfq_email, rfq_phone, rfq_end_user) values ('$rfqCompanyName', '$rfqName', '$rfqEmail', '$rfqPhone', '$rfqEndUser')");   Which is mostly powered by $_POST variables.                  $rfqName = mysql_real_escape_string($_POST['rfq_name']);                 $rfqEmail = filter_var($_POST['rfq_email'], FILTER_VALIDATE_EMAIL);                 $rfqPhone = mysql_real_escape_string($_POST['rfq_phone']);                 $rfqCompanyName = mysql_real_escape_string($_POST['rfq_company_name']);                 $rfqEndUser = mysql_real_escape_string($_POST['rfq_end_user']);   Now, my code does what I need it to, it just seems like it is extremely vulnerable to database attacks, and I want to learn how to fix that, but it seems all examples I'm finding online aren't using the setup of "insert X,Y, and Z variables into the table Columns as values A, B, C".  Are there any simple changes I do to make my database submission query more secure?


What is the grammatically correct: "Languages Services" or "Language Services"?

Is "Languages Services" correct for when you offer multiple services for multiple languages? Or should it still be "Language Services"? Why? Thank you guys!


I am sure this has something to do with my nodes... but I got the label to be transparent.. however.. it's making the actual object it's placed on transparent NOT the label itself.. I think. Please see picture.


I remember reading somewhere that if a unit is abbreviated as one character, there must not be a space between the number and the unit (e.g., 5m, 26K). If the unit is abbreviated as two or more Characters, there must be a space between the number and the unit (e.g., "10 km", "USD 5").   Can you please help me find the source again? Is this recommendation correct?


I always drain the water I soaked the beans in overnight and cook them in fresh water. But I've been noticing that the water gets a mild dye of the beans so I was wondering if I'm throwing parts of the baby with the bath water, to be proverbial.  Should beans be cooked in the same water they soaked in?


I installed Ubuntu Gnome 14.04 a month back. It all worked perfectly but after two days I repeatedly got the notification      File system root low disk space 0 MB left.    I had installed everything correctly, with root space 21 GB. However, I reinstalled Ubuntu to get rid of this, this time with root as 100 GB. It all worked fine for 20 days. But today I started getting the notification again. File system root low disk space- 1 GB left.  I can't find how to resolve this issue. Why is root filling up so fast? Wherever I read, it says 15-20 GB is enough, but even 100GB is apparently not sufficient in my case!


Please help me identify the ICs on this Board

I have the following module which can be found on this website :-   It is simply a bidirectional Uart TTL to RS485 converter. I have included the images below. The 8 pin small ic (U1) is RS485 which is itself unidirectional. I need help in identifying the second chip (U2), the one with 14 pins. This ic is responsible for switching between transmission and reception mode of the 485 ic. I have the module with me but the name of the ic has been erased. Plus there is no datasheet for the module available on the website. Could anyone please suggest what is the name of this ic??


How to turn a Windows XP partition into a VirtualBox virtual machine?

How can I turn a hard drive with XP into a VirtualBox virtual machine?


Meaning of "from whose known good sense he fully expected to have just such" from "Persuasion" by Jane Austen

I don't understand the structure of the bold part of the sentence below. It's from  by Jane Austen.     Mr Shepherd, a civil, cautious lawyer, who, whatever might be his hold   or his views on Sir Walter, would rather have the disagreeable   prompted by anybody else, excused himself from offering the slightest   hint, and only begged leave to recommend an implicit reference to the   excellent judgement of Lady Russell, from whose known good sense he   fully expected to have just such resolute measures advised as he meant   to see finally adopted.   Might I have an explanation.


How can I copy a file from another directory to the current one?

I have this problem as part of a school assignment:  NOTE: In case it's hard to read in the image above, here's the directory tree: $ tree . `-- sample_dir1     `-- sample_dir         |-- admin         |-- cambridge         |   |-- cafeteria         |   |-- library         |   `-- security         |       |-- annex         |       |-- building         |       `-- parking         |-- faculty         |-- history.exe         |-- markham         |   |-- annex         |   |-- building1         |   `-- parking         |-- oxford         |   |-- outline.doc         |   |-- programming         |   |   `-- report.pdf         |   `-- security         `-- stenton             |-- gen_ed             `-- lib_arts                 |-- english.txt                 `-- match.doc  15 directories, 11 files  I tried doing the command: $ cp ../cambridge/security/parking ./parking2  ...but it isn't working. The question in the image above states that the current directory is stenton, and that we need to make a copy of the file named parking (from the security directory), and to name the new file parking2, and place it in the current directory, stenton, using relative pathnames. What am I doing wrong? My cp command seems to be correct.


Texas Holdem confusion on winning hand in recent game played

[Player 1] has an A♠ & a 2♥ as their hole cards. [Player 2] holds a 3♣ & a Queen♠.The community cards are as follows : 3♠,J♦,J♣,8♥,8♦ Please explain to me why player 1 thinks he beats player 2 on a high card when player 2 clearly has a 2 pair (3's & J's)?


"Disk Not Ejected Properly" after MBP went to sleep

I have an external HDD connected to my MBP (2016 model). Everytime the machine goes to sleep I get the "Disk Not Ejected Properly" message, which I find annoying. There doesn't seem to be a real problem. The drive is reconnected and accessible so it seems to be just annoying.  The questions are:   Is this really just something annoying, or is there an actual problem with this? How can I make the notifications go away?   The HDD is a "LaCie Porsche Design Mobile Drive - 1 TB"  I have seen this question:  but it is rather old, blames the behavior on a special brand of hdd and also is about the drive not being usable, so I think my question is different.


Why does change in speed of a wave make it refract?

When a light wave enters a medium with a higher refractive index (e.g. from air to standard glass) and its speed decreases, why does that make it refract/bend?  I understand that wavelength decreases and frequency stays the same and therefore its speed decreases, but I can't find anywhere whatsoever why the speed decrease cause the wave to refract. So could someone please explain this?


Finding eigenvector of linear map defined by matrix whose columns each add to $k$

Let $M$ be an $n \times n$ matrix over $\mathbb F$, where $\mathbb F\in \{\mathbb C, \mathbb R\}$. Define the linear map $T: \mathbb F^n\rightarrow \mathbb F^n$ by $Tv= Av$.  Suppose the sum of the entries in each column of $M$ is equal to $k$.  I want to determine that $k$ is an eigenvalue and find a corresponding eigenvector.  I am able to show that it's an eigenvalue indirectly, namely by showing that the map $T-kI$ is not invertible.  But I think that I should show that $k$ is an eigenvalue by obtaining an eigenvector. This way I find the eigenvector I want, too.  However, I cannot come up with one. How could I find such an eigenvector? Note that I am following Axler's book, which avoids using determinants when dealing with eigenvalues. So I would appreciate an explanation that does the same.  Edit: I was linked to a possible duplicate. The question is similar to  mine, but the only direct answers involved this fact: $[1, \ldots, 1]A= [k, \ldots, k]=k[1, \ldots, 1]$. The problem here is that the operator $T$ I defined above has the form $Av$. So I would want $Av =kv$ for some $v$. This means that $v$ must be a column vector, not a row vector as described in the possible duplicate.  I am specifically looking for a nonzero vector $v$ such that $Tv=kv$, were $v$ is considered as a column vector.


I am having a problem on the appendix part of my research paper because the text starts to look like this    The following is the code snippet that generated the line:  \bibitem{featureEngineering} Discover Feature Engineering, How to Engineer Features and How to Get Good at It \url{http://machinelearningmastery.com/discover-feature-engineering-how-to-engineer-features-and-how-to-get-good-at-it/}.  (Accessed October 23, 2015)   Here is my preamble:  \documentclass[11pt,a4paper,oldfontcommands]{memoir}  \usepackage[utf8x]{inputenc} \usepackage[T1]{fontenc} \usepackage{microtype} \usepackage[dvips]{graphicx} \usepackage{xcolor} \usepackage{times} \usepackage{amsmath} \usepackage{amssymb} \usepackage{cite}  \usepackage[ breaklinks=true,colorlinks=true, %linkcolor=blue,urlcolor=blue,citecolor=blue,% PDF VIEW linkcolor=black,urlcolor=black,citecolor=black,% PRINT bookmarks=true,bookmarksopenlevel=2]{hyperref}  \usepackage{geometry} % PDF VIEW % \geometry{total={210mm,297mm}, % left=25mm,right=25mm,% % bindingoffset=0mm, top=25mm,bottom=25mm} % PRINT \geometry{total={210mm,297mm}, left=20mm,right=20mm, bindingoffset=10mm, top=25mm,bottom=25mm}  \OnehalfSpacing %\linespread{1.3}  %%% CHAPTER'S STYLE \chapterstyle{bianchi} %\chapterstyle{ger} %\chapterstyle{madsen} %\chapterstyle{ell} %%% STYLE OF SECTIONS, SUBSECTIONS, AND SUBSUBSECTIONS \setsecheadstyle{\Large\bfseries\sffamily\raggedright} \setsubsecheadstyle{\large\bfseries\sffamily\raggedright} \setsubsubsecheadstyle{\bfseries\sffamily\raggedright}  \setlength{\parskip}{1em}  %%% STYLE OF PAGES NUMBERING %\pagestyle{companion}\nouppercaseheads  %\pagestyle{headings} %\pagestyle{Ruled} \pagestyle{plain} \makepagestyle{plain} \makeevenfoot{plain}{\thepage}{}{} \makeoddfoot{plain}{}{}{\thepage} \makeevenhead{plain}{}{}{} \makeoddhead{plain}{}{}{}   \maxsecnumdepth{subsection} % chapters, sections, and subsections are numbered \maxtocdepth{subsection} % chapters, sections, and subsections are in the Table of Contents


What are the main reasons to split a Data Warehouse into multiple databases?

I'm working with a colleague who's proposed to split our 1 instance-database into about 7 databases (divided by data domain) for development and 7 identical databases for production. I get the test-production duality logic, but in what case or what advantages are there to splitting our 1, relatively straightforward database into 7 databases? Our data warehouse is only consumed/ used by ONE business intelligence application, period.  I am concerned about this direction so hopefully you can discuss the general reasons proposed for this split, and I can give you a run down of the current properties of the database.  1 database Data Warehouse: 352 GB total, 203 tables, 170 views  Proposed split:  A: 280 GB B: 43 GB C: 28 GB D: 1 GB E,F,G: < 1 GB combined   As you can see, this is already a head-scratcher in terms of proposed benefits as the storage won't even be remotely evenly split, with 80% remaining on 1 database. Apparently partitioning our db by schema isn't possible (from a hardware perspective) because we do not have Enterprise level SQL Server.  Reasons given for split:   Current db is poorly optimized, little documentation, sub-optimal datatypes, sub-optimal indices.   My rookie thoughts: Aren't these problems irrelevant to splitting the database? They are simply problems that need to be solved on their own either way.   There are 372 objects in the current database which makes it slow.   My thoughts: This hardly seems large in my opinion.   One database is harder to document and draw schema diagrams for than 7 databases (we will have views that will span multiple database).   My thoughts: .... This seems completely ridiculous to me, but maybe I'm wrong. We've already organized our data warehouse by 13 'source system' schemas.   One database will lead to more database deadlocks.   -- Isn't this problem also completely irrelevant to having multiple databases? It's my understanding that deadlocks occur at the table level (actually usually even just the row level, but eh). Even then, all our data inserts happen at midnight, all our selects downstream to the BI happen at 2 am. Having two processes update the same table is irrelevant to multiple databases, is it not (deadlock would happen either way)? Also, I personally have seen no evidence of table deadlocks occurring during normal operations.   Database technical ownership/ ownership.    It's only the two of us that work on the database. It's possible he wants to really segregate our 'fiefdoms'. Really, hasn't been an issue, but can't user permissions be determined at the schema level anyway?  What ARE valid reasons for splitting a Data Warehouse into multiple databases?  Would love to further my knowledge here about databases in general. Yes, I happen to be doing a lot of work on one with gaps in my knowledge, but well the job is what it is, what I've been thrust into. Stuff has been working great so far (knock on wood).


How to map my ipv4 address to external address in iptables

I want to run a minecraft server (port 25565) and have it send to my external address for others to play, then to my hostname (I am assuming this is automatic - Do I need a rule for this too?).  But I need to map my ipv4 address (or port 25565) to my external address. I have opened the ports on my router config, so this is all I need. Thanks!


Find the least positive integer that can be added to the product of any four consecutive integers such the result is always the square of an integer.

Do I need to use some kind of formula or just plug in numbers and find the one that works best?   What I tried doing so far is plugging in random numbers but whenever I multiply the four consecutive integers they always give me a square so adding $2$ makes it a non square root number (i.e.: $1 * 2 * 3 * 4 = 24 + 2 = 26$. $26$ does not have a square root.).


I'm having the following issue: I am creating a visual calendar in php with the following code  <?php class Calendar{      public $numberOfDays;      function _construct(){         $this->$numberOfDays =  cal_days_in_month(CAL_GREGORIAN, date("m"), date("Y"));     }   public function drawCalendar(){       echo '
';     for( $i=0; $i< $numberOfDays;$i++){              echo '

';     }     echo '
';     } } ?>   The problem is somehow $numberOfDays is not available in the for loop ? And I am getting a Undefined variable: numberOfDays error. What am I doing wrong


May I discuss a paper I have only seen as a referee?

Recently I refereed a paper in pure mathematics. Although I recommended a "major revision", I was quite impressed with the paper, and indeed I would like to: (1) describe his results in a grant proposal I am writing, and (2) eventually apply the author's techniques in my own work.  The author has not yet made his paper publicly available (e.g. on the arXiv or on his personal website). Ethically speaking, may I now freely refer to his paper in my proposal, and later in my work? Or am I bound to wait until the paper is published or until the author has otherwise made it available to the public?  I e-mailed him recently, let him know that I was a referee for his paper, and asked his permission to do this. If he writes back to offer (or deny) me permission, then that settles the issue. But what if I do not hear back?


I have a Windows Server 2008 R2 DC and inside this I have 10 Windows Server 2008 Standard Edition SP2. If I understand correctly, I can run as many OS as possible, but how do I activate these OSEs?  thanks


What is the interpretation of $a \equiv b$ mod $H$ in group theory?

I.N. Herstein has defined:     Let $G$ be a group, $H$ a subgroup of $G$; for $a,b \in G$ we say $a$ is congruent to $b \mod H$, written as $a \equiv b  \mod H$ if $ab^{-1} \in H$.   Let $G$ be a group, $H$ a subgroup of $G$; for $a,b \in G$ we say $a$ is congruent to $b \mod H$, written as $a \equiv b  \mod H$ if $ab^{-1} \in H$.  When dealing with integers $a \equiv b  \mod n$ means $n \mid (a-b)$, what is the meaning of $a \equiv b  \mod H$ in context of group theory? And why and how has $ab^{-1} \in H$ been used as a condition to define this relation?


Batch Test class not calling execute method

I have created below batch apex class. I have also created test class for this. But this test class is only covering 27% of batch apex class. Also, it is not calling execute method of batch apex class.  Batch Apex class:    global class LeadDuplicateRemove implements Database.Batchable < sObject > {       global Database.QueryLocator start(Database.BatchableContext bc) {         return Database.getQueryLocator('select Id, CreatedDate, Phone, Status, Email from Lead Where convertedbusiness__c != null and LeadAudit__c = null  and isDeleted = false order by CreatedDate ASC Limit 1');     }      global void execute(Database.BatchableContext bc, List < Lead > scope) {         for (Lead lead: scope) {             Database.QueryLocator leadQueryLocator = Database.getQueryLocator([Select Id, CreatedDate, Phone, Status, Email from Lead where convertedbusiness__c != null and LeadAudit__c = '1' and isDeleted = false order by CreatedDate ASC Limit 1]);              Database.QueryLocatorIterator iterator = leadQueryLocator.iterator();             while (iterator.hasNext()) {                 Lead leadObj = (Lead) iterator.next();                  if(lead.ConvertedBusiness__c == leadObj.ConvertedBusiness__c){                     lead.ConvertedBusiness__c = null;                 }             }         }      }     global void finish(Database.BatchableContext bc) {     } }   Test class:  @isTest global class LeadDuplicateRemoveTest {     @testSetup      global static void setup() {          Lead lead1 = new Lead(LastName='testlead1 ', RAF_Nurture_Campaign__c = 'None',                               company='test', Email='testemai@email.com.invalid',Phone = '1111111111',Status ='Completed');          insert lead1;         insert new Lead(LastName='testlead1', RAF_Nurture_Campaign__c = 'None',                                company='Vtest', Email='testemai@email.com.invalid',Phone = '222222',Status ='Open');      }     @isTest global static void TestRun() {                  Test.startTest();         Database.executeBatch(new LeadDuplicateRemove());         Test.stopTest();      }  }


I wanna replace my HDD but before doing that I wanna know where exactly is my Windows 7 Home Premium OEM license located. Into the BIOS or HDD recovery partition, where and how can I know?  I found very interesting articles about how to replace a HDD and a tool that can retrieve your Windows SERIAL KEY number which I don't need because I have the sticker at the bottom of my laptop.  The thing is when I replace the HDD, I don't want to have problems with the license registration. I guess when I change the HDD, Win7 will require me to change the serial number by phone. But I wanna be sure of that.  Thanks in advance.


My current code looks like the following:   var cacheWork = new UnitOfWork();  Log.Info("Caching Cable Entity");  cacheWork.GetRepository<CableEntity>().All();  Log.Info("Caching CablePart Entity");  cacheWork.GetRepository<CablePartEntity>().All();  Log.Info("Caching CableType Entity");  cacheWork.GetRepository<CableTypeEntity>().All();  Log.Info("Caching Country Entity");  cacheWork.GetRepository<CountryEntity>().All();  Log.Info("Caching Filesystem Entity");  cacheWork.GetRepository<FilesystemEntity>().All();  Log.Info("Caching Host Entity");  cacheWork.GetRepository<HostEntity>().All();  Log.Info("Caching Location Entity");  cacheWork.GetRepository<LocationEntity>().All();  Log.Info("Caching NodeCable Entity");  cacheWork.GetRepository<NodeCableEntity>().All();  Log.Info("Caching Node Entity");  cacheWork.GetRepository<NodeEntity>().All();  Log.Info("Caching Person Entity");  cacheWork.GetRepository<PersonEntity>().All();  Log.Info("Caching Tier Entity");  cacheWork.GetRepository<TierEntity>().All();  Log.Info("Caching User Entity");  cacheWork.GetRepository<UserEntity>().All();  cacheWork.Dispose();   What i want is to get rid of the explicit declaring of type for each of these classes. I am able to retrieve all of the types and return it as a list.  What i now want is to do something like this:  var ns = typeof(T).Namespace; var types = typeof(T).Assembly.GetExportedTypes() .Where(t => t.Namespace == ns);  var cacheWork = new UnitOfWork(); foreach (Type t in types)     cacheWork.GetRepository<t>().All(); cacheWork.Dispose();   So i already know that that this syntax does not work, But i'm figuring it has to be a way of doing this via for example reflection. Anyone That can help me with this?  EDIT:  From the already answered SO question i came up with the following solution:              var ns = typeof(BaseEntity).Namespace;         var types = typeof(BaseEntity).Assembly.GetExportedTypes()         .Where(t => t.Namespace == ns);          var cacheWork = new UnitOfWork();         types.ForEach(x =>         {             Log.Info("Caching " + x.Name + "...");             MethodInfo repoMethod = typeof (UnitOfWork).GetMethod("GetRepository");             MethodInfo generic = repoMethod.MakeGenericMethod(x);             var repository = generic.Invoke(cacheWork, null);              MethodInfo getAllMethod = repository.GetType().GetMethod("All");             getAllMethod.Invoke(repository, null);          });         cacheWork.Dispose();


(Robert Heinlein?) story about a corporation made rich by investing in unlikely research projects

In this story, a corporation or group becomes extremely rich by investing in  long-shot research projects that, against all odds, keep succeeding. Almost like a science fiction version of Brewster's Millions. :-) The group keeps investing in increasingly far-out research and eventually develops interstellar space ships.  I think it might have been a Robert Heinlein or Isaac Asimov story. I haven't read it, so I may have some details (very) wrong.


Prove that $\sqrt{p_n}\not\in \mathbb{Q}(\sqrt{p_1}, \ldots, \sqrt{p_{n-1}})$

Let $p_1,\ldots,p_n$ be a sequence of distinct primes $>0$. How to prove that  $\sqrt{p_n}\not\in \mathbb{Q}(\sqrt{p_1}, \ldots, \sqrt{p_{n-1}})$. I tried to prove it be the principle of the mathematical induction but i could not. Also, i could not complete a proof by contradiction. I will be grateful if someone helps me solving that.  Thanks in advance.


How to attach a delegate when adding a new record

I have a form where i attach the OnChange method like  $(document).ready(function () {     $('#fieldId').change(function () {     ...    } }   But i have the case when i add a new record with the Id "fieldId" from a function as   function addTeamMember() { var newItem= "<input  id='fieldId' type='text'>" $("#other").append(newItem); ... }   But the Change is not fired when i change the newly added field. Can somebody help me with an idea?  Thanks.


A generalization for Binomial Theorem, Leibniz General Rule other like functions.


Showing that these two rings $\frac{R[T]}{(aT-1)}, R[a^{-1}]$ are isomorphism.

Let $R$ be an integral domain and $0 \neq a \in R$. I need to show that: $$\frac{R[T]}{(aT-1)} \cong R[a^{-1}].$$  My Works:  Let us define the ring homomorphism $\phi: R[T] \to R[a^{-1}]$ which is defined by $T \mapsto a^{-1}$. It is easy to show that $\phi$ is an epimorphism and $(aT-1) \subset \mathrm{ker} (\phi)$. I do not know how to get the inverse inclusion. In the case that $R$ is a field, we may use the Euclidean algorithm to show that every $g \in \mathrm{ker} (\phi)$ is a multiple of $aT-1$. But since $R$ is not a field, I do not know how to show that $g$ must be a multiple of $aT-1$.  Thanks for your help.


Set qoutes on numbers in a CSV list with regex

I have a long list of numbers where need to quote each number, but I am not sure how to put together a reqex to do it.  I have a list like this  6240, 6261, 6270, 6280, 6510   Which I want to look like this  "6240",1,"6261",1,"6270",1,"6280",1,"6510"   to be able to import it correctly in another tool.  regex is my Nemesis :-)


Lightning Component OR operator only evaluating first two parameters

Running into the issue and wondered if I am doing something wrong, have incorrect expectations, etc.  When using the or operator in a lightning component (including lightning out) to evaluate values in either an if statement or isTrue property I am observing that if you have more than two variables the or is not evaluated correctly.  Take the below example that illustrates this:  <aura:component description="myORExample" implements="flexipage:availableForAllPageTypes">      <aura:if isTrue="{!or(false,false,true)}">
Three Or Evaluations with last true
     </aura:if>      <aura:if isTrue="{!or(true,false,false)}">
Three Or Evaluations with first true
     </aura:if>      <aura:if isTrue="{!or(false,true,false)}">
Three Or Evaluations with second true
     </aura:if>      <aura:if isTrue="{!or(false,true)}">
Two Or Evaluations with one true
     </aura:if>  </aura:component>     Placing this on a page layout you will see that the first example is evaluated to false and thus does not display. It clearly should evaluate to true as the third value is true.  Seems that only the first two variables are evaluated in the or operator.  Bug or working a designed?


Does Marketing Cloud automatically switch all relevant user accounts when Day Light Saving time occurs? (i.e. their user account timezone is changed)


How to have PRTG Server running beside Apache?

We used to work with a local Apache instance (WAMP) as a development environment, but we installed recently a PRTG server on the same machine, so it listens to the same port, as it is a web-based tool.  We are not able to reach our Apache server anymore as web requests on the server IP keep going to PRTG.  I changed the PRTG listening port to 8080 so that we would have 2 web servers listening to 2 dfferent ports.  It doesn't seems to work well: when I try to reach xxx.xxx.xxx.xxx:80 with a browser (Firefox, Chrome) it instantly changes to xxx.xxx.xxx.xxx:8080, and I get to PRTG home page.  Why does it changes from what I requested ? Should I use a totally different non-standard port ? What solutions do I have ?


How can the universe expand faster than the speed of light?

In Neil deGrasse Tyson's Astrophysics for People in a Hurry, he writes:  By now, one second of time has passed. * The universe has grown to a few light-years across...  If nothing can move faster than the speed of light, then it seems to follow that it should take a year after the big bang to reach a radius of one light-year. This line of thinking brought me to another apparent paradox: the age of the universe is 13.8 billion years but it's radius is 46.6 billion light-years. How is this possible?


I am trying to Clone a lead when certain condition is arrived using before trigger but i am not able to see cloned record.   for( Lead ld : Trigger.new ) {                          if(ld.Integration_Source__c == 'Hubspot' && Trigger.isUpdate){         Lead LeadBeforeUpd = Trigger.oldMap.get( ld.Id );         if(ld.Program__c != LeadBeforeUpd.Program__c ){            Lead ClonedLead = new Lead();            ClonedLead = LeadBeforeUpd.clone(false, false, false, false);         }     }  }


Can I visit other countries than the country issuing my visa during my trip to Europe?

I have a Business Class Schengen visa type C, single entry, to Austria. The issuing country is also Austria. I have a few days free in between my meeting dates. I want to travel to other nearby EU countries for one-night stays in each.  Can I do this with the visa I have? If yes, then do I just book a plane ticket and travel. Or do I need some documents for that?  I got only a single-entry visa with a period of stay of 20 days.  I'm traveling first to Austria; then I booked a flight to Paris, France. Is that possible or should I travel only by train or road, since my visa is only single-entry? Can I fly to other Schengen countries with a single-entry visa?  As I have to get back to Austria after my second meeting, can I come back to Austria on a single-entry visa?


Possessive and plural suffixes for proper nouns ending in -s

With a name that ends in -s, such as Travis or Lewis, where and when should you use -es, -'s, -s or just leave it alone to both pluralise, and to infer belonging to?  E.g., if the ball belongs to Travis, which suffix would be used in      The ball is Travis[es/'s/s/].   And, referring to a group of people all named Travis, which is correct:     Here come the Travis[es/'s/s/].


I'm trying to install . I'm using Ubuntu (trusty 14.04 with LXDE) on my Chromebook (via ). It has an ARM processor (not Intel or AMD) so I can't use the .deb because that's built for Intel architecture.   I've attempted to follow the instructions  but cannot seem to get it to compile. Using the Terminal, how can I compile Atom?  Update: The errors I am getting  Following , I can get to step 3 but when I type script/build I get the error:  /usr/bin/env: node: No such file or directory   I cloned atom into /home/username/atom if that helps.  Update 2  Thanks to the comments below I was able to start the build process. Unfortunately, I'm now getting the following errors:  gyp: name 'chromeos' is not defined while evaluating condition 'target_arch=="arm" and chromeos==1' in deps/breakpad/breakpad.gyp while loading dependencies of binding.gyp while trying to load binding.gyp gyp ERR! configure error  gyp ERR! stack Error: `gyp` failed with exit code: 1 gyp ERR! stack     at ChildProcess.onCpExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/configure.js:343:16) gyp ERR! stack     at ChildProcess.EventEmitter.emit (events.js:98:17) gyp ERR! stack     at Process.ChildProcess._handle.onexit (child_process.js:797:12) gyp ERR! System Linux 3.8.11 gyp ERR! command "node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "rebuild" gyp ERR! cwd /home/henrywright/atom/build/node_modules/minidump gyp ERR! node -v v0.10.25 gyp ERR! node-gyp -v v1.0.2 gyp ERR! not ok  npm ERR! cb() never called!   Does anyone know how to solve these errors?


Working with systems with Perfect Multicollinearity

I am working with a time-series dataset that is based on demand-supply dynamics with variables: Production, Ending Stocks, Exports, Imports etc. I was working on a regression with this data and wanted to find the relative importance of regressors using relaimpo package in R. However, I soon realized I can't use regression setting because of near to perfect collinearity in my dataset - the standard errors will be inflated and hence will be the relative importance of each regressor. Is there a way to go around this? Or, can I use any other method (instead of regression)? Any suggestions will be useful.


Pronunciation: ‘lousy’ vs. ‘mousy’. Why?

Inspired by comments on :  The word lousy is traditionally pronounced with a /z/ sound, as though it were louzy.*  Contrastingly, the word mousy is always pronounced with an /s/ sound.  The difference seems to be pretty consistent and well-established: these are the only pronunciations listed in the OED and Merriam-Webster for each.  But their root words, louse and mouse, are pronounced identically, both with /s/.  Indeed, these words are parallel in almost every other way: they form analogous plurals — lice, mice — and have very similar origins.  So how and why did the pronunciations of lousy and mousy diverge?  And are there any other analogous words that also form analogous adjectives?  (House doesn’t form *housy; and blousy exists, but blouse is not analogous to the other words.)  *: It seems that recently, since the literal meaning “infested with lice” has become rare, it may sometimes get pronounced with /s/ in this sense, as a .


Why we need eigenvectors and eigenvalues

Given a matrix A, what do eigenvectors and eigenvalues of A imply? I know how to calculate them but I want to understand WHY do we need to find them? In what application this is important  Thank you


Using where clause for arcgis analysis in ArcPy?

I am trying to write a python code for select analysis.  FIPS: column in feature nameofinputfeature whose values needs to be compared with OFIPS  OFIPS: variable whose value is known each time the code is run.  I am having a problem in syntax of the {where clause}   my code is:  arcpy.Select_analysis("nameofinputfeature", "C:\\a.shp", '"FIPS" = %OFIPS%')


Can we determine uniform continuity from graphs?

Can we know from the graph of a function that whether the function is uniformly continuous or not? If the set on which the function is defined is not compact, so what one can say in that case?


I have an Asus laptop that has a special key that can be configured to launch any software (at least on Windows).        The general question is: how can I detect any key press (globally)?  Then, how can I detect when the user press this key?


From       Amped Up      share a link to a question on social media that gets 5 clicks   I share  on   with the share link under the question. Below is the twitter stats:    More then 12 hours has been passed since I crossed 5 link clicks, but still I did not get the hat.  So why I didn't got the hat yet?


Trying to install jdk 8.0 in ubuntu 16.04 but getting error

When I try to install jdk 8.0, I am getting everytime the same error:  download failed Oracle JDK 8 is NOT installed. dpkg: error processing package oracle-java8-installer (--configure):  subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing:  oracle-java8-installer E: Sub-process /usr/bin/dpkg returned an error code (1)


Resistor value calculations for measure negative and positive voltages using Arduino ADC

In order to measure negative and positives voltages with Arduino I found this solution.  I need to understand how to calculate R1, R2 and R3 according to specifications below. Specs are: The impedance has to be < 10K according to arduino ADC specs. VOutput min voltage 0v and max voltage 5v. VMeasure voltage range goes from -25v to +25v In the solution ground can be shared without problems.  I tried to simulate in LTspice after I chose some values, but I cannot get output values on a dc sweep. It only gives me constant voltage in the output of R2 and R3. Does anyone know the reason?


Removing document icons from a Bibtex bibliography in Beamer

I'm preparing a Beamer presentation that includes (on the final slide) a short bibliography in the Harvard style (agsm).  This works fine, but I find the article icons accompanying each reference annoying, especially as they are appearing behind the author name (rather than beside it).  Is there a simple way to remove the icons?  \begin{frame}{References} \bibliographystyle{agsm} \bibliography{bibliography}{} \end{frame}


Can QGIS 3.0 identify tool give labels as well as band values for selected raster pixels

I'm using QGIS 3.0 for comparison of several landcover grids. These have a set style with 72 categories of landuse. The Style menu allows you to give a text label for each value within a band. The Identify tool gives the band and value for a particular pixel but does not give the label - which forces you to remember or look-up value labels.   Is there some setting to show the associated labels with the Identify results?


I have the RCA Galileo Pro and it is very slow, is there a way to upgrade?  I have always had a Samsung, so this is a big change.


How can I explain what a kilogram is using Planck's constant?

I want to understand what $1\ \mathrm{kg}$ represents. For example: I know that $1$ second is equal to $9\,192\,631\,770$ transitions from the microwave radiation that a cesium-133 atom (at $0\ \mathrm K$) emits, if it's excited just right. I can imagine that. I can see how you would "count" these 9 billion transition until you know, that exactly $1$ second has passed.  Now I would like to know if there is a similar explanation for the kilogram.   I understand how Planck's constant has be redefined using methods such as the Kibble balance. I would like to know how I can explain what $1\ \mathrm{kg}$ is using $h$. Here is what I've got so far:  Knowing that $E=hf$ and $E=mc^2$, if both of those energies are equal, this gives $m=\frac{hf}{c^2}$. So if we want to know what $1\ \mathrm{kg}$ is, we find the frequency $f$, that gives $\frac{hf}{c^2}=1\ \mathrm{kg}$, which would be $1.3564 \times 10^{50}\ \mathrm{Hz}$.   What does this frequency represent? Is it the frequency of light that you would need to "push" an object with a force equivalent to the weight of $1\ \mathrm{kg}$? Sorry if my thinking is completely off.  Edit: the answer of the question  explains in detail how the new units get defined and what their relations are, but does not give a satisfying explanation as to what e.g. a kilogram represents.


Copying Files with Invalid Characters from CD

Recently I was asked to talk to a group about some work I did 20 years ago.  I've had to go to backup CDs to get content.  The company worked on Macs and many of the filenames have illegal characters in them.  For example there's a file named cos2r<sin3theta.tiff.    When I try to copy these files I get an error saying, "The file name you specified is not valid or too long.  Specify a different file name."  I can't get past that.    Does anyone know of a way I can copy them?  Updates I'm on Windows 10, but I also tried on Windows XP. The CD file system is CDFS


When I was looking at someone's Verilog code, I found "+:" in Verilog. It looks like an arithmetic function but I'm not sure. I never seen before. Does anyone know this usage?  Update:  csum= csum + one_cnt[i* ('DPC_shift +1) +: ('DPC_shift +1)];   I have a query, is this synthesiable?


Ok, so I have a document where I made use of \autoref.  I've been told now, that we want all chapters, sections, subsections, etc. capitalised.  Since there is no \Autoref and I couldn't get its implementation from     to work, I tried going with another answer therein and replaced all \autoref{foo} instructions with \Cref{foo} from the cleveref package.  But now all references show up as ??.  I'm use the memoir document class and texmaker, I run  \usepackage[nameinlink,capitalise,noabbrev]{cleveref}   and I compile the document with Texmaker's  PdfLaTeX + Bib(la)tex + PdfLaTeX (x2) + show PDF   command.  How do I make \Cref work?


I am trying to retrive all items that are under  a certin folder, in a document library.  this is what i have so far  List DocumentsList = clientContext.Web.Lists.GetByTitle(list); CamlQuery camlQuery = new CamlQuery(); camlQuery = new CamlQuery(); camlQuery.ViewXml = @"<View Scope='Recursive'>                         <Query>                             <Where>                                 <eq>                                     <FieldRef Name='FileDirRef'/>                                     <Value Type='Text'>                                         /ecm/Business/Business/Projects/IDECO_P01030000                                     </Value>                                 </eq>                             </Where>                         </Query>                         <RowLimit Paged='TRUE'> 30 </RowLimit>                     </View>"; ListItemCollection listItems = DocumentsList.GetItems(camlQuery); clientContext.Load(listItems); clientContext.ExecuteQuery();   it is definately a caml query problem i am just unsure of how to fix it as yet any ideas would be helpfull


This  suggests that NSLog in production is a really bad idea. I'm trying to understand why. Here are some of my theories.   NSLog, logs only on the main_thread (UI Thread) hence even logging from other threads is a bad idea (A thread switch is involved). NSLog, writes to a output stream, blocking the process entirely.   Can anyone tell me what other theories exist? Or if someone knows the exact solution.


Windows, HDD, Accidentally clicked on format but cancelled now left with RAW disk

I have a Western Digital external HDD of 1 TB.  I accidentally used the following commands in diskpart onto my HDD:   select disk 2 (my HDD partition)  select partition '1'  clean  create partition primary  active format fs=fat32 and then cancelled at 00% because I was supposed to apply these commands on to my pendrive and by mistake I did it on my HDD. Now I am left with a RAW drive but not yet formatted. Windows detecting it but tells me to format it.   Can I repair the drive to state in which it was before? the disk is still not formatted i.e I just initiated and canceled.  P.S. No physical damage in the drive also data is not overwritten.


Multiple bibliographies (reference lists) using embedded bibliography database

I would like to have multiple bibliographies (reference lists) as described in   ().   However, I'd like to use with a single .tex file, which would contain the bibliography database embedded, as in  ...   Now, I want to use letter documentclass, for which the bibliography needs to be defined ()   So what I end up is with this example (code below, compiled with just pdflatex, no bibtex(which I'd like to avoid in this case)):     ... obviously, something works (multibib recognized primary and secondary cites, assigning them number "1" as start) -- however I don't get two, separate primary and secondary list of references; would that be possible in this context? (doesn't have to be with multibib, but I'd like to avoid a separate .bib file and a bibtex call)  EDIT: I'd also like separate cite keys (i.e. rendered as [a1] and [b1]; not yet sure if multibib can do that; edit: no it cant,  says "You can also edit the .bbl files created by BibTEX and add 'a', 'b',. . . to the labels, but your changes will be overwritten by subsequent BibTEX runs." and recommends \cite[a]{key}) - how possible would that be?     The code is this:   \documentclass{letter}  % Environment thebibliography undefined when using letter: http://www.latex-community.org/forum/viewtopic.php?f=4&t=3359 \makeatletter \setlength \labelsep {.5em} \newcommand\newblock{\hskip   .11em\@plus.33em\@minus.07em} \let\@openbib@code\@empty \newcommand\refname{References} \newcommand\section{\@startsection   {section}{1}{\z@}%   {-3.5ex \@plus -1ex \@minus -.2ex}%   {2.3ex \@plus.2ex}%   {\normalfont\Large\bfseries}} \newenvironment{thebibliography}[1] {\section*{\refname}%   \@mkboth{\MakeUppercase\refname}{\MakeUppercase\refname}%   \list{\@biblabel{\@arabic\c@enumiv}}%   {\settowidth\labelwidth{\@biblabel{#1}}%     \leftmargin\labelwidth \advance\leftmargin\labelsep \@openbib@code     \usecounter{enumiv}%     \let\p@enumiv\@empty \renewcommand\theenumiv{\@arabic\c@enumiv}}%   \sloppy \clubpenalty4000 \@clubpenalty \clubpenalty   \widowpenalty4000%   \sfcode`\.\@m} {\def\@noitemerr {\@latex@warning{Empty       `thebibliography' environment}}%       \endlist} \makeatother  \usepackage{multibib} \newcites{pri}{Primary sources} \newcites{sec}{Secondary sources}  \begin{document}   \begin{letter}{Addressee} Blah, blah - content...  Primary cite: \citepri{lamport94} ...  Secondary cite: \citesec{lamport94} ...   \begin{thebibliography}{9}  \bibitem{lamport94}   Leslie Lamport,   \emph{\LaTeX: A Document Preparation System}.   Addison Wesley, Massachusetts,   2nd Edition,   1994.  \bibitem{lamport95}   Leslie Lamport,   \emph{\LaTeX: A Document Preparation System}.   Addison Wesley, Massachusetts,   2nd Edition,   1995.  \end{thebibliography}  \end{letter}   \end{document}


Can the lift generated by a helicopter be justified using Bernoulli theorem?

When the shaft of the helicopter rotates, it creates a low pressure. Because of the low pressure, the helicopter lifts. Is my understanding that this is just an application of Bernoulli's theorem?


Coruscant is entirely covered by a city, thus there isn't any land for farms (or if there are some farms, there wouldn't be much space for them). How does this planet with a population of billions get enough food to feed its sizable population? Do they import it all from offworld (something that would take a lot of ships)?


Could somebody help me in writing mathematical expression for ARIMA (1,2,2)(1,0,0) with seasonal length of 7. I have got the coefficients as AR1: -0.0053, SAR7: -0.6610, MA1: 1.2858 and MA2:-0.3213. I have an expression but when forecasted manually, not matching with system generated one. Thanks,Pranesh


Align floated div to bottom right with CSS

I've got a problem that has me stumped.  I want to get the blue div in the top right of the following snippet to align to the bottom right and still have the text wrap around it to the left.  I am able to edit the HTML but I am unable to nest anything inside the
 tag as this is dynamically inserted.    .container{   width: 500px;   border: 1px solid red;   overflow: auto;   position: relative; } .lower-right{   width: 150px;   height: 60px;   background-color: blue;   float: right; }

Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It       has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop       publishing software like Aldus PageMaker including versions of Lorem Ipsum.

     It seems like it should be simple but I just can't work it out.


How to stop Windows 10 from updating my GPU driver automatically?

I am running Windows 10 (build 1511) and my GPU is an ASUS AMD Radeon R7 260x. This particular model of the GPU suffers from a BIOS bug which causes the memory frequency to jump between 2D clocks (300 MHz) and 3D clocks (1600 MHz) randomly when not playing a 3D intensive game. This random flux causes the display driver to crash randomly, causing the whole system to hang up and whatever I've been working on to be lost.   The only workaround I've found for this issue is to use ASUS's own software called GPU Tweak II to alter the 2D clocks so that they are the same as the 3D clocks at all times. This method worked fine until AMD recently released their Crimson ReLive drivers. Ever since that update, the new drivers cause GPU Tweak (and any OC'ing software such as MSI Afterburner) to not accurately detect GPU information such as clock speeds, fan speed, etc. Without being able to read information accurately the given software cannot alter the GPU's clocks and the GPU returns to its erratic memory clock spiking.   I have older drivers with me but every time Windows updates to the latest GPU drivers I have to use DDU to uninstall them and reinstall the old drivers. Which, as you can imagine, is extremely tedious and not something I should have to deal with. Is there any way to disable the updating of GPU drivers automatically by Windows? If there exists some method to only disable GPU driver updates, that would be great, however, if it disables all hardware updates I'd be fine with that as well as all my other hardware are basically running smooth as butter and if need be I can manually download and install drivers as the need arises.  EDIT: I already Googled several results before coming here. I tried the registry trick (ExcludeWUDriversInQualityUpdate = 1) as well as setting Device Installation Properties to 'No' in System Properties. Neither helped, as when I went to check on Windows updates I see: "Advanced Micro Devices, Inc. driver update for AMD Radeon R7 200 Series - Waiting for Download".


I currently have a valid B1/B2 visa. I got this visa when I had applied for a visitor/tourist visa, stating the purpose that I'll be visiting US for pleasure.  Now I need to travel to US for a training and wondering if I can do it legally using B1/B2 visa ?


A congruence of sum of kth powers of first p-1 numbers

Problem: For $k < p-1$ where $p$ is an odd prime and $k$ is a natural number, prove that  $$1^k+2^k+\cdots+(p-1)^k \equiv 0 \mod p.$$   My attempt: It's obvious for odd $k$, as we can pair the terms 1 with $p-q$ and so on. But I can't come up with a proof for even $k$. It seems like pairing idea used for odd for odd will not work as for a given summand its negative residue may not be present not be be present.  For example for primes of the form $4k+3$, $-1$ will not be present  but 1 is present.  So, it looks like we will need some kind of expansions.  I found this problem as an unproved lemma, in the proof of an IMO shortlist problem.  I only know elementary number theory.  Please help me.


On convergence of Bertrand series $\sum\limits_{n=2}^{\infty} \frac{1}{n^{\alpha}\ln^{\beta}(n)}$ where $\alpha, \beta \in \mathbb{R}$

Study the convergence of $$\sum_{n=2}^{\infty}  \frac{1}{n^{\alpha}\ln^{\beta}(n)}$$ where $\alpha, \beta \in  \mathbb{R}$   I have proved that:   This series diverges when $\alpha \leq 0$. This series converges when $\alpha > 1, \beta > 0$ This series diverges when $0 < \alpha < 1, \beta > 0$ This series converges when $\alpha = 1, \beta > 1$      Question: What happens when $\alpha > 0$ and $ \beta < 0$?   There are other questions on MSE which ask about this series, but this question is distinct because   I would like an argument which does not rely on the integral test for series convergence, and this question considers all real $\alpha$ and $\beta$, while other questions ask only about $\alpha, \beta > 0$, where we can apply Cauchy condensation criterion


Why is my function passing 10 as a parameter?

I would like to add onClick listeners to my buttons in Unity, C#. I have an array of these buttons. I am trying to loop through that array, and for each button, I am adding an onClick listener which calls a function that takes an index parameter. In that function, I print out the paramater that the function has received. However, when I click on one of these buttons, I get 10 as an output every time. for(int i = 0; i < roleButtons.Length; ++i) {     roleButtons[i].onClick.AddListener(delegate { changeEquipment(i); }); }  void changeEquipment(int index) {     Debug.Log(index); //Here I got 10 as an output after every single click. }


I have seen cases of using commas before adverbs. For example: Sentence #1: I urgently need the pen. Sentence #2: I need the pen, urgently. Are both the above sentences acceptable? Kind regards, Kumar


"me and the other" or "I and the other"?

this  says     I'm asking the same question as the linked one, I simply don't have enough reputation to comment yet, but hopefully, this one will more clearly explain what me and the other asker both mean   In this case, would "I" be better? or any other better expression?


If I enter the following mark-down source:  “*blah*”   into a question or answer, then it works, but in a comment it doesn’t. The asterisks remain literal and don’t turn into italics.


Hibernate: comparing current & previous record

I want to compare the current value of an in-memory Hibernate entity with the value in the database:  HibernateSession sess = HibernateSessionFactory.getSession(); MyEntity newEntity = (MyEntity)sess.load(MyEntity.class, id); newEntity.setProperty("new value"); MyEntity oldEntity = (MyEntity)sess.load(MyEntity.class, id); // CODEBLOCK#1 evaluate differences between newEntity and oldEntity sess.update(newEntity);       In CODEBLOCK#1 I get that newEntity.getProperty()="new value" AND oldEntity.getProperty()="new value" (while I expected oldEntity.getProperty()="old value", of course). In fact the two objects are exactly the same in memory.  I messed around with HibernateSessionFactory.getSession().evict(newEntity) and attempted to set oldEntity=null to get rid of it (I need it only for the comparison):  HibernateSession sess = HibernateSessionFactory.getSession(); MyEntity newEntity = (MyEntity)sess.load(MyEntity.class, id); newEntity.setProperty("new value"); HibernateSessionFactory.getSession().evict(newEntity); MyEntity oldEntity = (MyEntity)sess.load(MyEntity.class, id); // CODEBLOCK#1 evaluate differences between newEntity and oldEntity oldEntity = null; sess.update(newEntity);   and now the two entities are distinct, but of course I get the dreaded org.hibernate.NonUniqueObjectException: a different object with the same identifier value was already associated with the session.  Any idea?  EDIT: I tried the double session strategy; I modified my HibernateSessionFactory to implement a map of session and then...  Session session1 = HibernateSessionFactory.getSession(SessionKeys.DEFAULT); Session session2 = HibernateSessionFactory.getSession(SessionKeys.ALTERNATE); Entity newEntity = (Entity)entity; newEntity.setNote("edited note"); Entity oldEntity = (Entity)session1.load(Entity.class, id);  System.out.println("NEW:" + newEntity.getNote()); System.out.println("OLD: " + oldEntity.getNote()); // HANGS HERE!!!  HibernateSessionFactory.closeSession(SessionKeys.ALTERNATE);   My unit test hangs while attempting to print the oldEntity note... :-(


Geodesic Equation from variation: Is the squared lagrangian equivalent?

It is well known that geodesics on some manifold $M$, covered by some coordinates ${x_\mu}$, say with a Riemannian metric can be obtained by an action principle . Let $C$ be curve $\mathbb{R} \to M$, $x^\mu(s)$ be an affine parametrization of $C$. (Using same symbol for coordinates and parametrization here, but it's standard). The action yielding geodesics is:  $$ S (C) =\int_CL ds $$ where  $$ L\equiv \sqrt{g_{\mu\nu} \dot{x}^\mu \dot{x}^\nu} $$  Now the popular  makes the claim that variation of $$F \equiv \frac{L^2}{2}$$  Will yield the exact same action principle solutions. However, the reference above ONLY shows that:  $C$ solves euler Lagrange equation for $L$ $\implies$ $C$ solves euler Lagrange equation for $F$  And this can be shown through a direct brute force computation.   My question: Is the converse of the above true, and how does one go about proving it. In particular, how do we show that $F$ yields no extraneous solutions to the Euler Lagrange equations.


I currently use xchat as my default IRC program, but I don't really like GUIs, I prefer TUIs, is there an IRC program out there which has a TUI rather than a GUI? I am running Ubuntu GNOME 15.10 with GNOME 3.18.


How can I restart an app game from the beginning

I would like to restart two games, bubble safari and bubbleseason, from the beginning. When I delete the app and reinstall it from the App Store all my old data is on there and I start from the same level I left it at, I want to start all over from scratch.  Is this possible?