A Stack Overflow moderator, , just erased almost all answers I've given. They are valid though! They are in context with the questions made, and yes, they redirect people to use a library I have made. The answers redirect people for this library just like other answers that redirect people for a Microsoft or other library that would not work for this case and still were not deleted. I've taken care to answer only in the context where I know my library would work and the other options would not, or would be more difficult to implement. . These are questions where my answers were deleted:      and there may be others … And these are questions where I helped people to use the library – or questions where it was not me who answered about using the library:     Why were those answers deleted, and could they be undeleted?

Twice now I've seen questions on Stack Overflow where one of my company's products might provide an answer to the question.  One was a slightly vague connection about object-relational mapping, but the other was a specific question about workshop/event management where we have a product which is almost an exact match for the questioner's needs.  Of course the questioner should take a pinch of salt with anything I say about it, but it might be useful to have the product brought to his attention as one possible solution.  What are the rules and guidelines about answering with something I worked on?


Recently, I could not install some new software such as gnucash and vlc neither from Ubuntu Software nor from terminal, other software download just fine. I am using Ubuntu 17.04, is it because it is on EOL?

Recently I have installed an older version of Ubuntu on my old machine. Whenever I try to install any software, I get an error saying it couldn't be found:  $ sudo apt-get install vlc Reading package lists... Done                Building dependency tree        Reading state information... Done     E: Couldn't find package vlc


Not a duplicate of . Please actually read my question before marking it as a duplicate of something else. Regardless, it's been answered.    I have code like  for (var i = 0 ; i < 10000 ; i++) {      doSomething();      doSomethingElse();  }   And I want to know how much time each function inside the loop is taking overall. How do I measure that?

I need to get execution time in milliseconds.  I originally asked this question back in 2008. The accepted answer then was to use  However, we can all agree now  that using the standard  API is more appropriate. I am therefore changing the accepted answer to this one.


I tried to prove this with Valli's equation: $\frac{sinx}{x} = \prod(1-\frac{x^{2}}{(n\pi)^{2}})$ and use $\frac{d(ln(sin(x)))}{dx} = i + \frac{2i}{e^{2ix}-1}$.  Maybe it's better to use Taylor's transform?  The ended result: $\zeta(2n) = (-1)^{n+1}\frac{B_{2n}(2\pi)^{2n}}{2(2n)!}$

I recently, out of interest, tried to prove Euler's formula $\zeta{(2n)}=(-1)^{n-1}\frac{(2\pi)^{2n}}{2(2n)!}B_{2n}$ for all $n\in\mathbb{N}$. I adapted  Euler's original proof for $\zeta(2)=\frac{\pi^2}{6}$:  We have the well known formulas $\sin(x)=\sum_{k=0}^{\infty}\frac{(-1)^kx^{2k+1}}{(2k+1)!}$ and $\sin(x)=x\prod_{k=1}^{\infty}\left(1-\frac{x^2}{k^2\pi^2}\right)$. The product formula can be transformed into a series expansion as well but in order to keep it neat, some definitions first:  For the real sequence $\left(a_i\right)_{i\in\mathbb N}$ with $\sum a_i$ convergent, define $$ A_n:=\sum_{i=1}^{\infty} a_i^n $$ $$ \alpha_n:=\sum_{(x_1,\dots,x_n)\in M_n}\prod_{r=1}^{n} a_{x_r} $$ Where $M_n:=\{(x_1,\dots,x_n)\in\mathbb N\space|\space x_1<\dots<x_n\}$. Now we write $c_i=-\frac{1}{i^2\pi^2}$. When we expand the product, we get only odd exponents of $x$ and the coefficient of $x^{2k+1}$ for $k≥1$ is $\gamma_k$. By comparison of the coefficients, we obtain $\gamma_k=\frac{(-1)^k}{(2k+1)!}$. Now, through telescoping, it can be shown algebraically that for every sequence $\left(a_i\right)_{i\in\mathbb N}$ with $\sum a_i$ convergent we have: $$\sum_{i=1}^{n}{(-1)^{n-i}\alpha_{n+1-i}\space A_{i}}=A_{n+1}+(-1)^{n+1}(n+1)\alpha_{n+1}$$ For all $n\in\mathbb N_0$. Since $C_n=\sum_{i=1}^{\infty} \left(-\frac{1}{i^2\pi^2}\right)^n=\frac{(-1)^n}{\pi^{2n}}\zeta{(2n)}$ we have: $$ \sum_{i=1}^{n}{(-1)^{n-i}\gamma_{n+1-i}\space C_{i}}=\sum_{i=1}^{n}{(-1)^{n-i}\frac{(-1)^{n+1-i}}{(2n-2i+3)!}\frac{(-1)^i}{\pi^{2i}}\zeta{(2i)}}=\sum_{i=1}^{n}{(-1)^{i-1}\frac{\zeta{(2i)}}{(2n-2i+3)!\pi^{2i}}}=\frac{(-1)^{n+1}}{\pi^{2n+2}}\zeta{(2n+2)}+(-1)^{n+1}(n+1)\frac{(-1)^{n+1}}{(2n+3)!}=\frac{(-1)^{n+1}}{\pi^{2n+2}}\zeta{(2n+2)}+\frac{(n+1)}{(2n+3)!} \iff \sum_{i=1}^{n+1}{(-1)^{i-1}\frac{\zeta{(2i)}}{(2n-2i+3)!\pi^{2i}}}=\frac{(n+1)}{(2n+3)!} $$ For all $n\in\mathbb N_0$. Now we are ready to prove the formula $\zeta{(2n)}=(-1)^{n-1}\frac{(2\pi)^{2n}}{2(2n)!}B_{2n}$ with induction. With the equation above we can easily verify that it is true for $n=1$; therefore we assume that it holds for all $1≤i≤n$. The assertion $\zeta{(2n+2)}=(-1)^{n}\frac{(2\pi)^{2n+2}}{2(2n+2)!}B_{2n+2}$ is then equivalent to: $$ \sum_{i=1}^{n+1}{(-1)^{i-1}\frac{(-1)^{i-1}\frac{(2\pi)^{2i}}{2(2i)!}B_{2i}}{(2n-2i+3)!\pi^{2i}}}=\frac{(n+1)}{(2n+3)!}\iff \sum_{i=1}^{n+1}{\binom{2n+3}{2i}2^{2i-1}B_{2i}}=n+1\iff \sum_{i=0}^{2n+2} \binom{2n+3}{i}2^iB_i=0 $$ This identity can be proven by comparing the coefficients in the equation $\frac{e^x-1}{x}\frac{2x}{e^{2x}-1}=\frac{2}{e^x+1}$.   Is this proof valid? Nonetheless, if it is, it isn't very elegant. Are there faster ways to prove it?


I upgraded my Lenovo G550 2983 32bit to Windows 10 and upgraded my RAM from 3GB to 4GB. I see the entire 4GB of RAM, but only 2.93GB is usable. This is the old 3GB RAM setting. Why didn't it update when I installed the new RAM? How can I fix it? It should show at least 3.5GB usable RAM.

I recently upgraded my computer's RAM to 4 GB. My 32-bit Windows installation shows only 3574 MB of the memory. How can I make Windows use the full amount of RAM?


Using find (specifically the one on windows that comes with git) to search files. I specifically want to check my entire USB drive but not in folders that start with a dot (specifically .git and .vs) and not in a folder called photos (many many vacation and bday pics, my file isn't in there).  How do I ignore those directories?

I have a directory /srv/tftp/pxelinux.cfg and a file /etc/mtab. I want to exclude both from find. But whatever I do, either one always is not excluded  find /etc /srv -path /srv/tftp/pxelinux.cfg -prune -o \! -path /etc/mtab find /etc /srv \( -path /srv/tftp/pxelinux.cfg -prune -o -print \) -a \( \! -path /etc/mtab \)   Note: I find the -path /foo -prune -o -print syntax highly confusing and unintuitive


i am trying to add a text to my output   def as():        a = 0         return a   def d():     return d

Given a dictionary like so:  my_map = {'a': 1, 'b': 2}   How can one invert this map to get:  inv_map = {1: 'a', 2: 'b'}


I'm trying to understand what exactly purpose of a virtual specifier in base class. As said in the c++14 working draft we have:     For each distinct base class that is specified virtual, the most   derived  object shall contain a single base class subobject of that   type.   From this quote I'm assume that if we create an instance c of class C which is a derived class for A and B we're create an objects of A and B implicitly.   Question: How can I access to an instances of a base classes via an instance of derived class?

I want to know what a "virtual base class" is and what it means.  Let me show an example:  class Foo { public:     void DoSomething() { /* ... */ } };  class Bar : public virtual Foo { public:     void DoSpecific() { /* ... */ } };


With every pair of Bluetooth headphones I've owned I've had a latency of about 50 ms.  How do I get rid of or reduce this delay?  MacBook Pro with Retina, Mid 2015, macOS Mojave 10.14.3 (but I had the problem on earlier OSes).

I have a bit of an odd situation, and wanted to ask for ideas.   Recently started connecting a JBL Charge 2+ to my MBA 11 inch, mid-2013, via Bluetooth. I noticed that there's clear delay between sound event and sound being audible via the JBL.   The problems persists across applications (so for example, playing video via VLC means the sound isn't synced, same for youtube videos in different browsers, same for mp3s that start playing with a small delay, etc.)  The delay is minor, but noticeable, in the range of 0.5s I'd say.  At first I thought it might be a Bluetooth driver issues, but now I found out the following: just connected another JBL device, a Flip 3 to the same MBA, and the sound plays without noticeable delay. I'm not sure if they use the exact same drivers, but now I'm wondering:   Is there a chance that it's a hardware problem? Didn't really consider this a possibility, but now I'm not sure anymore. How to test, and, ideally, fix this issue? How can I isolate the reason for the audio lag with the Charge 2+?   Any help would be appreciated!


I've already partitioned of 86gb from windows and mapped it to F:, how do i go about installing linux to it and then booting to it? i can't find much support for this without the use of a USB drive or a CD

So basically as it stands I have a laptop which has no cd/dvd drive, and I don't have a usb drive.  The laptop has windows 7 installed with ubuntu 11.04 installed through wubi.  What I want to do is remove windows completely, and make ubuntu the only OS installed on the system.  Is there a way to do this without re-installing ubuntu? (i.e. can I take my wubi install away from windows?)  or is there a way to from inside ubuntu have it run the ubuntu iso somehow so I can just wipe the system and install it fresh? (even if it means I need to have an e.g. 2gb partition just for the image to reside in).


I suspect my question really is, "can I calculate the CR rating for a player character generated via the PHB rules for the purposes of determining combat/encounter difficulty for a party?"  A follow up question would be "How can I scale an NPC or monster up or down in difficulty".  I have not found any direct rules to convert a player character into an NPC and calculate the CR for the purpose of combat.  In the DMG, there are rules for creating NPC monsters (p.273) and rules for calculating encounter difficulty (p.82). However, if I have a level 5 wizard player character that was generated by following character creation in the PHB, that becomes an NPC that the players decide to attack or is wanted to be used as en encounter, is there a way to calculate the CR of this NPC and apply the Encounter calculation tables to determine difficulty vs. the party strength?  Commenters may (rightly so) see my question as a duplicate, as there are similar questions:         However, the answer seems to be that there is no direct way to calculate the CR from a player character generated by the PHB rules. The most accurate way to generate and size a foe seems to be to go through the process of generating from scratch using the Creating a Monster guidelines and sizing accordingly.  I also used the Monster Manual's NPC section on Mages (MM p.347), Priests (p.348) and Veterans (p.350) as a reference to design. I could not find rules on how to scale these up or down in hit dice and AC to tailor them for a party of a certain level. ().  Maybe the real answer is always to generate an NPC with the traits of what a Nth level PHB character would have, and size according to DMG p.273?

As part of an early quest, my PCs are likely to face off against a wizard.  The problem here is that the stat block for Mage NPCs listed in the Basic Rules has a Challenge Rating of 6, while the PCs are going to be five Level 1s. So, instead of messing with the stat block and risk weakening it too much/too little, I'm choosing to create a Level 1 Wizard PC and use it as an NPC for this quest.  The problem with that is that, as far as I can tell, there aren't any designated rules for assigning either Challenge Ratings or XP values to a PC. So, should I just give the wizard a Challenge Rating equal to his level (and thus have him give 200 xp when killed), or is there a better way to do this?  (This is different from , because he's asking for a way to assign a level to an NPC, while I'm asking for a way to assign an XP value/Challenge Rating to a PC (for use as an NPC). Similar questions, but different.)


@isTest public class PropRentTotalSumTEST {     @isTest     static void testFeeCalculation() {            Property__c prop = new Property__c();         prop.Name = 'Test';         prop.Monthly_Rate__c = 0;          insert prop;          List<Fee__c> fees = new List<Fee__c>();         Fee__c fees1=new Fee__c();         fees1.Name = 'Realtor';         fees1.Cost__c = 1000;         fees1.Property__c = prop.Id;          Fee__c fees2=new Fee__c();         fees2.Name = 'Lawyer';         fees2.Cost__c = 2000;         fees2.Property__c = prop.Id;         fees.add(fees1);         fees.add(fees2);          Test.startTest();      insert fees;     delete fees;          Test.stopTest();      Property__c propsProperty = [SELECT Monthly_Rate__c FROM Property__c WHERE Id =: prop.Id];          System.assertEquals(0, propsProperty.Monthly_Rate__c);      } }   public with sharing class PropRentTotalSum {     public static void RentTotal(List<Fee__c> fees) {          List<Id> ids = new List<Id>();         List<Property__c> properties = new List<Property__c>();         for (Fee__c fee : fees) {             ids.add(fee.Property__c);         }         for (Property__c property : [                 SELECT Id,Monthly_Rate__c, (SELECT Id, Cost__c FROM Fees__r)                 FROM Property__c                 WHERE Id = :ids         ]) {             Decimal sum = 0;             for (Fee__c fee1 : property.Fees__r) {                 sum = sum + fee1.Cost__c;             }             property.Monthly_Rate__c = sum;             properties.add(property);         }         try {             update properties ;         } catch (Exception e) {             System.debug('Exception :' + e.getMessage());         }     } }

This is a canonical question and answer developed by the community to help address common questions. If you've been directed here, or your question has been closed as a duplicate, please look through the resources here and use them to shape more specific questions. To browse all canonical questions and answers, including more unit test resources, navigate to the  tag.  This canonical question is intended to address several classes of common questions by providing a quick summary and links to comprehensive resources:   How is code coverage obtained and calculated? How do I increase my coverage?  Why can't I cover these lines? Why isn't the body of my loop or conditional statement covered?


Whenever light enters from air to glass its speed decreases but when it cross the glass and again come in air its speed increases. What is the reason behind this property? What is slowing it and what is speeding it?   I have also read that it is true for all electromagnetic radiations.

As I learned today in school, my teacher told me that when light enters a glass slab it slows down due to the change in density and it speeds up as it goes out of the glass slab. This causes a lateral shift and the light emerges out from the point different than that from where it should have actually emerged from.  Okay so what I mean to ask is, when light enters point A on glass slab and emerges from point C why does the light speed up? Where does it get the energy it has lost when it entered the glass slab?  P.S.: Also, if I place a very very very large glass slab and make a beam of light pass through it will the light never come out as all the energy was lost in place of heat?


This question is related to the solution in the answer here:   Quick description of my problem:     Let $(\Omega, \mathcal{F},P)$ be a probability space, and let $X, Y:  (\Omega, \mathcal{F})\rightarrow(\mathbb{R}^d,\mathcal{B}(\mathbb{R^d} ))$ be random variables. These varaibles may not be independent, but   we can get two new random variables $\tilde{X}, \tilde{Y}$, which are   independent, and $\mu_X(B)=\mu_{\tilde{X}}(B), B \in  \mathcal{B}(\mathbb{R}^d),\mu_Y(B)=\mu_{\tilde{Y}}(B), B \in  \mathcal{B}(\mathbb{R}^d)$. That is, we can get new random variables,   with the same probability distribution, but that are independent.   My question is, how do we get these two new random variables?  What I tried:  My only idea is to use some sort of measure extension. Since X and Y is not independent, the function $\mu_{(X,Y)}(B_2), B_2\in \mathcal{B}(\mathbb{R^{2d}})$ may not be the product measure $\mu_{X \times Y}$, but if we use the theory of measure extension etc., we can probably create the product measure here(I haven't look at all the details, but I assume it can be done). Then we just define $\mu_{(\tilde{X},\tilde{Y})}(B_2)=\mu_{X\times Y}(B_2)$, where the last is the product measure(gotten from Caratheodory etc.).  Now, from what I see these variables seems to be independent, do you agree? The problem is this, I have only gotten the probability distribution for the variables, but not what the varaibles are as functions of $\omega$? A random varaible is a function of $\omega$?, so how do I define $\tilde{X}(\omega),\tilde{Y}(\omega)$ to have the property I want?

I often see the sentence "let $X_1, X_2, \ldots$ be a sequence of i.i.d. random variables with a certain distribution". But given a random variable $X$ on a probability space $\Omega$, how do I know that there is a sequence of INDEPENDENT random variables of the same distribution on $\Omega$?


From my observation, many people ask something and simply go away. They sometimes even receive 3–4 answers, take the codes, and run away without commenting anything, without voting anything, and without picking any answer.   Is this a normal thing? (Is the forum not interactive in finding a solution?)  If it's not normal, what should be done against it?

They says that Stack Overflow is a community-driven web-site. But, as a matter of fact, it is not.  There is no community at all. It's more like an imageboard, as a number of participants makes them pretty much like anonymous to each other despite of registration.   Stack Overflow is a site of passers-by.  Passers-by who want to solve their silly typo problem and passers-by who eager to share their vast knowledge in spotting silly typos. And - oh - sometimes to perform a civic duty and vote to close a question they have no idea what to answer to and thus calling it "not a real question".  So, as a funny consequence, whatever question can get   answered upvoted downvoted closed deleted   depends not on its quality but only on the fluctuation happened to "community" at the given moment, at a pretty random rate.  It is not only quite discouraging. It makes the very idea of collecting and improving knowledge quite impossible.


Prove $(0,1)$ and $[0,1]$ have the same cardinality.    I've seen questions similar to this but I'm still having trouble.  I know that for $2$ sets to have the same cardinality there must exist a bijection function from one set to the other.  I think I can create a bijection function from $(0,1)$ to $[0,1]$, but I'm not sure how the opposite.  I'm having trouble creating a function that makes $[0,1]$ to $(0,1)$.  Best I can think of would be something like $x \over 2$.  Help would be great.

How to define a bijection between $(0,1)$ and $(0,1]$?   Or any other open and closed intervals?   If the intervals are both open like $(-1,2)\text{ and }(-5,4)$ I do a cheap trick (don't know if that's how you're supposed to do it): I make a function $f : (-1, 2)\rightarrow (-5, 4)$ of the form $f(x)=mx+b$ by \begin{align*} -5 = f(-1) &= m(-1)+b \\ 4 = f(2) &= m(2) + b \end{align*} Solving for $m$ and $b$ I find $m=3\text{ and }b=-2$ so then $f(x)=3x-2.$  Then I show that $f$ is a bijection by showing that it is injective and surjective.


I keep getting a pop up saying, congratulations iPad user' saying I have won something. I have tried hard reboot, I have factory reset my iPad and still I get the pop up.

When I went to a website in Safari, it opened up another website with popups claiming my iPad has a virus.  I deleted some of my apps to try and get rid of the virus, but the popup keeps showing up every time I open Safari. Can someone help me?


Title says it all. I know that you can use the following equation to find curvature (kappa) for a parametric curve, $$\frac{\|r'(t) \times r''(t)\|}{\|r'(t)\|} $$ but I don't know how to do this for regular functions. Answer is at the point $\left(\frac{1}{\sqrt2},\ln\big(\frac{1}{\sqrt2}\big)\right)$.

I used the equation   $$k = \frac{|f''(x)|}{(1+(f'(x))^2)^{3/2}}.$$  Just by looking at its would think the max is at $x = 1, y = 0$.  What is the correct answer?


When I was in an English class, I was assigned to write a summary of one theory in a group and after finishing it, I tried to make a title of it but I wondered if there should be an article before 'summary' because often I see some sentences without articles. I didn't add an article anyways... But is that actually correct?

It is said that "To give added punch, articles are often dropped in the titles"  Source:   Is there any general rule or reference about dropping articles, especially in academic research papers?


Suppose $\{A_n\}$ is a sequence of events such that $\lim\limits_{n\rightarrow\infty}P(A_n)=0$ and $\sum\limits_n P(A_nA_{n+1}^c)<\infty$, show that $P(A_n ~\text{i.o.})=0$.   I do not know how to prove this problem. Can anybody give some suggestions?    I find an answer which is easy to understand

If $P(A_n) \rightarrow 0$ and $\sum_{n=1}^{\infty}{P(A_n^c\cap A_{n+1}})<\infty$ then $P(A_n \text{ i.o.})=0$.  How to prove this? Thanks.


Let’s assume I have to show it for every element of my set. But when my set is empty, it is right. How can we say that this is true, because I could also say I had to show nothing, so it has to be false. Thank you for your answer.

$p$ : Every element in the empty set is greater than itself.  $\neg p$ : Some element in the empty set is smaller than or equals to itself.      I do not have the answers to this exercise, but it came out in my exams. I simply do not understand. There is nothing in an empty set! How can nothing be greater/equals/smaller/ to itself? If I had to choose an answer, it has to be $\neg p$ since nothing is equals to nothing...   What is the answer?


What is the difference between a window and a wall that makes a wall opaque but a window transparent, in terms of the molecules that make them up?

Once I asked this question from my teacher and he replied "Because it passes light.". "And why does it pass light?" I asked and he said, "Because it is transparent.".  The same question again, Why glass is transparent? Why does light pass through it, while for opaque objects, it does not?


We all have heard this proverb in Urdu and Hindi      धोबी का कुत्ता न घर का न घाट का   Literal translation      The dog of the washerman belongs to neither the riverbank nor the house    An alternative:     The dog that runs after two bones, catches neither   The original Hindi proverb suggests the idea if someone comments on you      धोबी का कुत्ता न घर का न घाट का   They mean to say you are caught between two things because you do not belong to either of two things, or because you try to do two different things and fails at both.  This proverb was used by Mirza Saud who was a renowned Urdu poet, for Mirza Mazhar Jaan-e-Janaan's poetry as a scorn. Mirza Mazhar was a renowned poet of Persian. He later on did some stupendous and chromatic poetry in Urdu as well, however, initially he was not very comfortable in Urdu poetry.  His instructor advised him to start poetry in Urdu instead of Persian as the days of Persian poetry in India were numbered in his view. Mirza Mazhar's initial experiment in Urdu poetry was a disaster. The Urdu poets of his time did not take his arrival in their domain with joy. He was barraged by insult and one such poetic insult became proverbial:   [cut off by OP]

I'm basically searching for the opposite of putting all your eggs in one basket, where the risk is total failure because you did not hedge your efforts. I'm searching for a phrase that encompasses splitting your efforts and evokes the prospect of failing at both. A bird in the hand is worth two in the bush also encompasses a sense of having focused your efforts, but only alludes to total failure. To satisfy the criteria, the phrase must cover:  attempting two things (or multiple iterations of one thing) both of which you might succeed at, if you addressed them serially but both of which you fail at because you address them in parallel  Here are the idioms/phrases that do not sufficiently cover the idea and why:  "A servant to two masters"  This has the sense of competing priorities, but not the sense of failing to achieve your goals.  "Jack of all trades. Master of none."  The sense is insufficiently pejorative. Being a jack-of-all-trades can be seen as an advantage; I'm trying to focus on the lack of mastery.  "The man who fancied himself a wit, and was half-right."  From Christopher Hitchens. Hilarious, but lacking the sense of split effort between two things.  "Walking and chewing gum at the same time."  An idiom for multi-tasking, not for failing to multi-task. Edit Addressing a few suggestions and another one that occurred to me:  "Hedging your bets" or "Betting against yourself"  In this case, you cannot win both bets, but you will almost certainly win one. You limit your upside, but also limit your risk. I'm looking in particular for total, catastrophic failure due to split attention/effort.  "Can't walk and chew gum at the same time"  Failing to do two fairly simple things that most everyone can do, not failing at two hard things because you tried to do both.  "Robbing Peter to pay Paul"  In this case, Paul gets paid. If you were to rob Peter to pay Paul, and get robbed yourself before you could get the money to Paul, that'd be closer. :)  "Spreading yourself too thin"  An actual English idiom, but missing the implied sense of failure.  "Too many irons in the fire"  "A lot of irons in the fire" can be viewed positively, so this is missing the sense of a strategic misstep.  "Between a rock and a hard place"  The sense is of needing to act but having no good alternative.  "Falling between two stools"  My favorite answer so far because it does appear to be an actual English idiom (not a proverb). In that sense, it's great, but some of the usages are closer to a failure of  than a failure of effort. And falling between two stools implies that the attempted action was simply sitting down.  "Chasing two rabbits and catching none."  This is the exact sense I was looking for, but it appears to be a cross-cultural proverb rather than idiomatic English like "putting all your eggs in one basket". I'll be accepting it, and using it in my work! But if there are other ideas, please let me know.


I am writing a scientific article using LaTeX, with a separate .bib bibliography file, generated via a Zotero Firefox extension collection.  When generating the .pdf document, I get the following error:     Empty 'thebibliography' environment on input line 3   The line 3 contains:  \usepackage{amsmath}   Thus, the Reference section is empty and every citation number in the text appears as [?]. I already tried several things:   Inserting a \nocite{*} in the document Changing var = {something} to var = {"something"} in the BibTex file Removing all Unicode characters from the BibTex file   But the error style persist. Any idea?

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


I tried to using $2^{999} = \sum^{999}_{i=1}\binom{999}{i}$ but I just don't know how to continue from here.

Find a combinatorial argument for the following binomial identity:   $$n(n+1)2^{n-2} = \sum_{k=1}^{n}k^2\binom{n}{k} .$$   Algebraic proofs can be found at  , and a related identity at  .


I baked a buttermilk pound cake which was a very thick batter.  The recipe said to dice 3-4 fresh peaches and put them on top of the batter just before it went into the oven.  I did as directed and all the peaches sunk to the bottom and stuck to the bundt pan.  It was delicious but very ungl.  Help!

I recently had the opportunity to cook a series of yoghurt cakes.  The first batch were tasty yet somewhat dense.  For the second batch, I (successfully) attempted to lighten the cake by first beating the egg whites until foamy before folding in the rest of the mixture.  Both times I used fruit (raspberries) in my mixtures.  For the dense batch, they 'floated' throughout the mixture.  In my second, lighter batch, they all sank to the bottom.  As I found the second, lighter mixture to be better in general, is there some trick to keeping fruit from sinking like that?


Question:- How we Can Calculate the following limit without using squeeze theorem?  $$\lim_{x\to 0} \frac{x}{3}\left\lfloor\frac{4}{x}\right\rfloor $$ Where, $\left \lfloor  \space \right \rfloor$ represents floor function Here is the method using squeeze theorem $$x-1< \left \lfloor x \right \rfloor \leq x$$ $$\implies \frac{4}{x} -1< \left \lfloor\frac{4}{x}\right \rfloor \leq \frac{4}{x} $$ If $x>0$ then we have, $$ \frac{x}{3}\bigg(\frac{4}{x} -1\bigg)<\frac{x}{3} \left\lfloor\frac{4}{x}\right \rfloor \leq \frac{x}{3}\bigg(\frac{4}{x}\bigg) $$ By squeeze theorem, we have $$ \lim_{x\to 0^{+}}\frac{x}{3}\left \lfloor \frac{4}{x}\right \rfloor=\frac43$$ If $x<0$ then we have, $$\frac{x}{3}\bigg(\frac{4}{x}\bigg)\leq \frac{x}{3} \left\lfloor\frac{4}{x}\right \rfloor < \frac{x}{3}\bigg(\frac{4}{x} -1\bigg)$$ By squeeze theorem, we have $$ \lim_{x\to 0^{-}}\frac{x}{3}\left \lfloor \frac{4}{x}\right \rfloor=\frac43$$ As Left hand limit=Right hand limit,Therefore the given limit exists. $$\lim_{x\to 0} \frac{x}{3}\left\lfloor\frac{4}{x}\right\rfloor=\frac43 $$

Calculate the following limit. $$ \lim_{x\to 0} x\left\lfloor\frac{1}{x}\right\rfloor $$ Where $\left\lfloor x \right\rfloor$ represents greatest integer function or floor function, i.e greatest integer less than or equal to $x$.  Thanks.


Let $f: I \rightarrow R$ differentiable and $a \in I$ such that's :   $$ \forall (x_n),(y_n) \in I, x_n \neq y_n, x_n \rightarrow a, y_n \rightarrow a \rightarrow lim_{n\to \infty} \dfrac{f(y_n)-f(x_n)}{y_n-x_n} = f'(a) $$   Prove that $f'$ is continuous.   I have taken  $z_n \rightarrow a$ but I cant prove that  $f '(z_n)$ converges for $f' (a)$. Thanks for read, exists another post but the solution I do not understand

Let $f:I \rightarrow \mathbb{R}$ derivable in set I. if $\lim x_n = \lim y_n =a \in I$ with $x_n \neq y_n$ and $\lim \frac{f(y_n)-f(x_n)}{y_n - x_n} = f'(a)$ proof that $f'$ is continuous at $a$  my attempt $x_n \neq y_n$ so by MVT $\exists z_n \in I$ like $x_n \geq z_n \geq y_n$ with $\frac{f(y_n)-f(x_n)}{y_n - x_n}=f'(z_n)$ for each $x_n$ and  $y_n$ then $f'(a) = \lim\frac{f(y_n)-f(x_n)}{y_n - x_n}= \lim f'(z_n)$   Using $\lim x_n = \lim y_n = a$ and $x_n \geq z_n \geq y_n \Rightarrow z_n \rightarrow a$  if $ \lim_{x\rightarrow a} f'(x) \neq f'(a)$ then $\exists \epsilon > 0$ such $\forall n\in \mathbb{N}$, $z_n \in [x_n,y_n]$ $0 < |z_n - a| < \frac{1}{n}$ and $|f'(z_n) - f'(a)| \geq \epsilon$. So $z_n \rightarrow a$ but will do not have $\lim f'(z_n) = f'(a)$  so $\lim f'(z_n) = f'(a) = \lim_{x\rightarrow a} f'(x)$ when $z_n \rightarrow a$  and thats implies $f'$ continuous at $a$  my question is, that's correct ? if not, can you help me? thanks


I am trying to make the color effect as seen above. I have considered color overlays but I think its more than putting a color overlay over a picture. Any help is much appreciated.  I am using Photoshop.  Also one more thing, what are these color effects called?

I have seen such an effect being used in many places however I haven't figured out how to replicate it via Photoshop.  I have tried desaturating the image, placing it under a layer of solid colour and then lowering the opacity of the colour. I have also tried a couple of blend modes, to no avail. The effect is nowhere near the same.  Can someone please tell me the effect used on these images?


I am having configuration AMD Sempron145 prosessor, with 2GB RAM and 512MB graphics. Already having win7 ultimate 32bit and want to use ubuntu 32bit with windows7 as dual boot!  How to do it!

I would like to see a full how-to guide on how to install Ubuntu.


class Name { private:     int size; public:     Name() {         size = 0;     }     int size() {         return size;     } }   How can I have a class with a variable size and a function size? Note that I really don't want to rename them.

class Test {        bool isVal() const {           return isVal;       }    private:        bool isVal; };   On Compiling this file it says      testClass.cpp:9: declaration of `bool   Test::isVal'      testClass.cpp:3: conflicts with   previous declaration `bool   Test::isVal()'   Although the same would work for java   class Test {    private boolean isVal;    public boolean isVal() {       return isVal;   }  }   Why does the compile error occur in C++ not in Java?


I started a book many years ago (probably about 30!) and I have never been able to remember the title.  All I do remember is a student navigator on a winter (icy) planet who climbs into his spaceship which I seem to remember is called Tycho Brahe - or not, but the name stayed in my head as being connected to the novel.  This young student is at a college for spacefarers or similar . I remember him going into a cafe and getting hot chocolate after ice skating. He was prematurely asked to pilot a ship (the Tycho Brahe, I believe) which involved a very cramped compartment and some sort of symbiosis with the ship itself - and then its a blank. Sorry its not much to go on. I will look at the suggestions made.

I'm trying to find a book I read long back. This book may have won a Hugo/Nebula (Trust me I've googled to death this one!).  Don't remember much of the story (that's why I want to re-read it). What I remember is that some of the powers in the book are called "Gods". And they have brains the size of the planets (or planets being their brains).  The protagonist in the climax, solves a theorem (The Great Theorem, perhaps) by remembering one of the obscure theorems (Jacuzi (?)) and incorporating it. This [Great] theorem helps spaceships helps find the shortest route from point A to B. He surprises the antagonist by reaching the vantage point quickly with the help of his new knowledge, and blasts his enemy's spaceship.  The ending of the book - as I remember it is - that the protagonist wants to become a God himself.  Please let me know the title & author of this book if you've read it.  PS #1:  BTW, It's not Asimov's The Gods Themselves :) PS #2:  It's published at the least before 1998


I'm looking for a beginner house to store unique items and other stuff, at level 1.

I'd like to find a place to store stuff while I'm out adventuring, without spending 5000 on a house (at least, until I can afford that...). Where can I safely store items without worrying about them disappearing?   There are two possible places that come to mind,  (to which I have the key and was told I could stay), and the small bedroom given to me at the  (which I was told was mine, despite seeing J'zaro sitting in it later). Can I store items safely in either of these places?


I want to know whether a function is exist or is defined before i call it.  I have this line of code:  function renderView(){  // some code }

How do you tell if a function in JavaScript is defined?  I want to do something like this  function something_cool(text, callback) {     alert(text);     if( callback != null ) callback(); }   But it gets me a     callback is not a function   error when callback is not defined.


Question: A floor is paved with rectangular bricks each of length $a$ units and breadth $b$ units. A circular disc of diameter c is thrown on the floor. Show that the probability that it falls entirely on one brick is $\frac{(a-c)(b-c)}{ab},( c<a, c<b)$   I tried to solve but ended up getting $\frac{\pi^2}{4ab}.$ What am I missing?Help!

A floor is paved with rectangular marble blocks,each of length $a$ and breadth $b$.A circular block of diameter $c(c<a,b)$ is thrown on the floor at random.Show that the chance that it falls entirely on one rectangular block is $\frac{(a-c)(b-c)}{ab}$  I thought over this problem,i found total number of cases as area of rectangular marble block,but i cannot find the favorable number of cases.Favorable number of cases cannot be area of rectangular marble block$-$ area of circular block,as the answer suggests.What should be the correct logic,please help.


I have a stored procedure that processes data from a source table and is executed many times (about 20,000 executions) throughout the day.  I believe it's getting choked up sometimes, due to parameter sniffing and I've been updating statistics on the relevant tables (8 tables) in the procedure to fix this.  When it gets choked up, a backlog of unprocessed data builds up (which I'm able to monitor the count on.)   Once I update the statistics the backlog is instantly cleared.  I find myself updating statistics about 10 times a day (almost once an hour). Does this seem normal or is there a bigger issue I should be looking to fix?

I've inherited a Maintenance Plans that does the following:   Cleanup old data Checks DB integrity Performs Database and Transaction Log Backups Reorganizes Our indexes Updates Statistics Delete old backups and Maintenance Plan files   Of the 23 minute Maintenance Plan, Updating the Statistics takes a staggering 13 minutes. During this 13 minute period, access to the database is blocked (or at least, replication from this DB to our others is paused).  My Question Is:  When should we be Updating the Statistics, and why?   This seems like the kind of thing we should do less frequently than every day. I'm trying to get us out of the "just because" mind-set of doing unnecessary Maintenance.


My Windows 10 system has been playing at least one kind of system sound lately, without me being able to determine what the hell is being communicated, if that's even relevant -- I don't know which process plays the sound, there are no visual alerts, like, for instance, notifications.  This drives me nuts.  I am not the type to install third party drivers or services, it's as vanilla as I can keep it. I can provide the list of services running, but there isn't anything strange, really.  Is there anything I can do to debug this to understand what and why plays the so far two sound clips I keep hearing?  I've tried Process Explorer to find a handle with search pattern "WAV", and it pointed me to two dozens of svchost.exe processes, which isn't really immediately helpful. I've tried to locate the sound in System Sounds, but it doesn't seem to be there.

My Windows 7 system makes an intermittent ding sound (like a single chime, or bell).  I don't know which process does it.  So, my question is: Is there software/method out there that can tell me which processes are currently sending output to the sound device?


In most situations, spell effects of the same name do not stack, per the rule on  added in the  (p. 252):  [...] when two or more game features have the same name, only the effects of one of them—the most potent one—apply while the durations of the effects overlap. [...]  However, the death ward spell may be an exception to the intent of the rule.  is unique compared to other durable buffs, because it both replaces its trigger and ends when it triggers (emphasis mine):  The first time the target would drop to 0 hit points as a result of taking damage, the target instead drops to 1 hit point, and the spell ends.  I can see two possible interactions with multiple castings of death ward: Scenario A  Carl has two instances of death ward active on him. Only the most recent one applies. Carl takes a hit that would drop him to 0 hit points. The active instance of death ward triggers, dropping Carl to 1 hit point instead and ending that instance of death ward. Because Carl did not drop to 0 hit points, the inactive instance of death ward does not trigger. Carl now has a single instance of death ward active.  In this scenario, Carl effectively has two stacks of death ward. Scenario B  Carl has two instances of death ward active on him. Only the most recent one applies. Carl takes a hit that would drop him to 0 hit points. Both instances of death ward trigger. The activation of death ward causes Carl to drop to 1 hit point instead of 0 hit points. Carl has no instances of death ward active anymore.  In this scenario, the instances of death ward do not stack. Note that this scenario is identical to the ones described in this Q&A:  Which of these scenarios is correct?

Haste states     When the spell ends, the target can't move or take actions until after its next turn, as a wave of lethargy sweeps over it.   However, let's say Character A cast Haste on Character B. In the 10th round (final round of haste if concentration not broken), Character B casts Haste on himself.  What happens during the next round?    Do they lose a round of the "new" haste while they are lethargic and lose movement and actions? Does the new haste override the lethargy until it ends? Is it some combination? Retain AC/Dex modifications but lose actions/movement? None of the above?


I have AMD processor with 1 GB DDR2 RAM. I have installed Ubuntu 12.04 LTS Desktop with 32 bit version. Many times when I open 3-4 applications, it hanged and need to restart my PC. Is it due to less RAM or other hardware?

I'm thinking about installing Ubuntu Desktop, but I don't know what flavor is the best for my system. What are the minimum and recommended hardware requirements? What kind of CPU? How much memory? Should I have Hardware Acceleration? What flavor should I use?  This is an attempt of a canonical answer. My answers have the "official  requirements", the recommended are a mix of official sources and opinion based (along with the answer it's told the source). You can comment or edit if you feel that the information is obsolete or incomplete. It is a good rule of thumb that any system capable of running Windows Vista, 7, 8, x86 (Intel) OS X will almost always be a lot faster with any Ubuntu flavor even if they are lower-spec than described below.


I've got "top 2% this week"  on the . I've read some posts about what does top x% this week means and I don't find the answer to this question.    In addition, on , my account is the first one this week.    How this 2% was calculated?

On my  I can see a link "top 7% this quarter".  When I click on it, some rankings appear. However, the "top 7%" is nowhere to be found. I can also switch to "month", "week" or "all time" pages. However, I can't find out what "top X% this week" is, for example.


I remember sometime reading that SO owns the copyright to my questions. However, in this case I posted the question merely to garner opinions on a system of doing things. One very good opinion makes me want to write an article on Code Project outlining the system. What attributions and or permissions do I need to do that?

I just found http://programmingfaq.w3ec.com/faq/4761/whats-the-hi-lo-algorithm which has an exact copy of this Stack Overflow question, , with all its answers and no difference in a single character. There is no reference to Stack Overflow.  Is this legal, or at least tolerated? Is this impertinent theft of information? I just can't see any sense in copying whole pages, particularly when not referencing the source.


For the following scenario, how can I get the size (3) of the array a via the pointer c? What is the pattern for solving this sort of problems?  struct struct_point {   int x;   int y;   int z; };  typedef struct struct_point point;  int test_void_pointer () {   point a[3] = {{1, 1, 1}, {2, 2, 2}};   void * b;   point * c;   b = a;   c = b;   /* get_size_p (c) */ }

I've allocated an "array" of mystruct of size n like this:  if (NULL == (p = calloc(sizeof(struct mystruct) * n,1))) {  /* handle error */ }   Later on, I only have access to p, and no longer have n. Is there a way to determine the length of the array given just the pointer p?  I figure it must be possible, since free(p) does just that. I know malloc() keeps track of how much memory it has allocated, and that's why it knows the length; perhaps there is a way to query for this information? Something like...  int length = askMallocLibraryHowMuchMemoryWasAlloced(p) / sizeof(mystruct)   I know I should just rework the code so that I know n, but I'd rather not if possible. Any ideas?


After getting a new SSD I went on and got windows 7 on that one instead of the HDD.  Now during boot up windows asks me to choose between two copies of Windows 7, where one does not work and the other is fully workable. It didn't bother me much except for the fact that I can't leave my computer while it's booting because it will choose the wrong Windows 7.  My question is how do I remove the faulty one? It's quite annoying to wait for this screen to popup before I can leave it alone.

After making an error installing windows, I now have two entries in the Windows 7 boot loader, one of which is incorrect.  How can I remove it? I've seen some entries recommending EasyBCD, but can't it be done easily without 3rd party software?


What's the best way to center several divs?  I can conceive of a few ways, but I'm looking for the simplest, most elegant.  Here is a link to a page that is doing it:    I am looking for something that is IE9+ safe.    Update 1  Just to clarify, I need to vertically center the row of divs, also.  Not a duplicate, the referenced questions centers horizontally only.    Update 2  This fiddle () almost does it, with minimal CSS, but I need to get those boxes centered horizontally.  align-items: center;    Update 3  Since the question has been closed, I'll put my answer here.  I knew there had to be a good clean way to do with with CSS3:    Basically,  display:flex;  align-items: center; justify-content: center;   Are the keys to doing it with the flex box model.

How can I horizontally center a
 within another
 using CSS?

Foo foo


The pattern is from the following Snippet.   private static Pattern specialDoubleRegex = Pattern.compile("((-)?infinityd?)|(nand?)", Pattern.CASE_INSENSITIVE);   I am a beginner. I am starting to use Pattern class to write my own regex. I saw this example in the .I don’t completely understand them. Are we using special construct (?<name>X)? According to  and javase 7 docs, ?infinityd?) is not special construct here. what is (-)?infinityd? about? Can I say that they are the pattern looks like ((X)?XY?)|(X?) pattern?

It is my understanding that the java.regex package does not have support for named groups () so can anyone point me towards a third-party library that does?  I've looked at  but its last release was in 2002 and it didn't work for me (admittedly I only tried briefly) under java5.


I'm using rxvt (urxvt) terminal with gnu/screen and I experienced that some escape sequences does not get through screen. eg. I issue echo -e '\033]777;qwerty\007' on bare rxvt, it gets through, but within screen, it does not. This ESC + "]777;" + string + BEL sequence is, btw, an rxvt specific escape sequence which triggers a user function in an rxvt extension (plugin). I'm confused why screen eats it, why does it not just let it through? Is there a way for screen to output it in order to be captured by rxvt?

I have a ruby terminal script that I would like to print out hyperlinks. I achieve that like so:  puts("\e]8;;https://example.com\aThis is a link\e]8;;\a")   This works perfectly fine in a "normal" terminal (gnome-terminal btw) window.  But I need to run this script within GNU screen, where the escape-sequence simply has no effect. Other sequences (like colors for example) work fine, the hyperlink one (which according to the  might be a gnome-terminal-only thing) doesn't. (screen is running inside gnome-terminal)  How can I get screen to acknowledge my link sequence and display it properly?


Why is the migration from Stack Overflow only allowed to  those specific sites?        Yes, these sites are closer to programming, but IMHO, TeX - LaTeX and SharePoint are rarely used; for example, the Server Fault, Programmers, Code Review are the better options to choose.  Maybe this list should be a read from the user's preferences.

I think there should be more Stack Exchange networks available when flagging a question to be migrated. For example I'd think that the following question:    ...would be a better fit on unix.stackexchange.com instead of Stack Overflow. But without the option to mark it so, I feel hesitant to mark it.


I am invested in IVV and was surprised today when I saw the S&P500 and VOO shoot up 0.7% in the morning, while my IVV shares only went up ~0.02%.  The day ended with the S&P 500 up 0.71% and VOO up 0.71%, but IVV it seems to depend who you ask.  On my profile with Schwab, it says I went up 0.08% ($0.24/share). If I look up the close friday it says it closed at 319.08. Since it closed at 319.32 today, the 0.08% makes sense.  If I look up the symbol in Schwab, it says it went up 0.58% ($1.84/share) If I look up the previous close here, without looking up a specific date, it says the previous close was 317.4778, which would make sense for the 0.58%.  And then Yahoo reports other numbers entirely. Previous close 315.00, open 319.00, todays close 319.32, and reports 4.32 up (1.37%)  I didn't do any buying or selling any time recently.  Why did I get 0.08% instead of 0.58%? Why do there seem to be different closing prices for Friday based on who you ask? Why did IVV, which is supposed to mirror the S&P pretty closely deviate so much from it?

I recently read through Graham's The Intelligent Investor and am looking at what index ETFs or Index Mutual Funds it makes sense for me to invest in.  As I was considering this I realized that, at least as I understand ETFs, some of the principles from value-based investing still may need to be considered.  As such I am wondering how to determine whether an ETF is trading at a good value?  As I understand it, when I contribute to a open-end mutual fund, I buy at a rate determined by the current value of the holdings of the fund, and more shares in the fund are simply created if needed, so it should accurately reflect the underlying value of the assets.  ETFs are traded like stocks and have a more fixed share count.  Thus, I imagine their price has potential to diverge from the underling value of the stock assets indexed.  The fourth point on  seems to corroborate my suspicion.  This would seem to make ETFs more risky than index funds?  Assuming the above is all correct, how do I assess whether an ETF is undervalued or overvalued?  NOTE: I do not know whether this question needs to be specific to index ETFs or whether the same advice is good for all ETFs.


The code below keeps throwing a dereference null object error. I've tried making changes to make sure the item isn't empty but I am still getting this error. It is driving me insane. This code is supposed to check if the value in the BillingPostalCode field matches a value in a field called "Name" in a custom object called DMA_Value__c, if it is it should return the value from the DMA_Value__c field in the custom object to a DMA field on the account.I have looked at the other questions that are said to be duplicates, but those do not give me the answer I need. I've tried putting the suggestions into the code to catch null values. Now that I have done that I'm confused as to how it could still have this error. Maybe a better explanation of what this error message means would help.  FIRST ATTEMPT   trigger UpdateDMAAccount on Account (before insert, before update) { //get set of Postal Codes from leads to be inserted or updated Set<String> BillingpostalCodes = new Set<String>(); for(Account l : trigger.new){ if(l.BillingPostalCode != null){     BillingpostalCodes.add(l.BillingPostalCode);  } } if(BillingpostalCodes.size() >= 0){ //create Map of custom object records with Name (PostalCode) as key Map<String,DMA_Value__c> validBillingPostalCode = new Map<String,DMA_Value__c>(); for(DMA_Value__c obj : [SELECT Id, Name, DMA_Value__c FROM DMA_Value__c WHERE Name IN :BillingpostalCodes]){     validBillingPostalCode.put(obj.Name,obj); } for(Account l : trigger.new){     if((Trigger.isInsert || trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode) && validBillingPostalCode.containsKey(l.BillingPostalCode)){         //not sure what this field is called         //Market2__c or Market_3__c         l.DMA__c = validBillingPostalCode.get(l.BillingPostalCode).DMA_Value__c;     }     else if(trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode && !validBillingPostalCode.containsKey(l.BillingPostalCode)){         //blank value if new PostalCode does not match a record in the Map         l.DMA__c = NULL;     }   }  } }   SECOND ATTEMPT  trigger UpdateDMAAccount on Account (before insert, before update) { //get set of Postal Codes from leads to be inserted or updated Set<String> BillingpostalCodes = new Set<String>(); for(Account l : trigger.new){ if(l.BillingPostalCode != null){     BillingpostalCodes.add(l.BillingPostalCode);  } } if(BillingpostalCodes.size() >= 0){ //create Map of custom object records with Name (PostalCode) as key Map<String,DMA_Value__c> validBillingPostalCode = new Map<String,DMA_Value__c>(); for(DMA_Value__c obj : [SELECT Id, Name, DMA_Value__c FROM DMA_Value__c WHERE Name IN :BillingpostalCodes]){     validBillingPostalCode.put(obj.Name,obj); } for(Account l : trigger.new){     if((l.BillingPostalCode != NULL && trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode) && validBillingPostalCode.containsKey(l.BillingPostalCode)){         //not sure what this field is called         //Market2__c or Market_3__c         l.DMA__c = validBillingPostalCode.get(l.BillingPostalCode).DMA_Value__c;     }     else if(l.BillingPostalCode != NULL && Trigger.isInsert && !validBillingPostalCode.containsKey(l.BillingPostalCode)){         //blank value if new PostalCode does not match a record in the Map         l.DMA__c = validBillingPostalCode.get(l.BillingPostalCode).DMA_Value__c;              }     else if(trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode && !validBillingPostalCode.containsKey(l.BillingPostalCode)) {         //blank value if new PostalCode does not match a record in the Map         l.DMA__c = NULL;     }   }  }

I keep getting the System.NullPointerException: Attempt to de-reference a null object on my trigger at line 21. I've attempted to add != null to that line and I get an error too. Please see the code below.  trigger UpdateDMAAccount on Account (before insert, before update) { //get set of Postal Codes from leads to be inserted or updated Set<String> BillingpostalCodes = new Set<String>(); for(Account l : trigger.new){ if(l.BillingPostalCode != null){     BillingpostalCodes.add(l.BillingPostalCode);  } } if(BillingpostalCodes.size() > 0){ //create Map of custom object records with Name (PostalCode) as key Map<String,DMA_Value__c> validBillingPostalCode = new Map<String,DMA_Value__c>(); for(DMA_Value__c obj : [SELECT Id, Name, DMA_Value__c FROM DMA_Value__c WHERE Name IN :BillingpostalCodes]){     validBillingPostalCode.put(obj.Name,obj); } for(Account l : trigger.new){     if((Trigger.isInsert || trigger.oldMap.get(l.Id).BillingPostalCode != l.BillingPostalCode) && validBillingPostalCode.containsKey(l.BillingPostalCode)){          l.DMA__c = validBillingPostalCode.get(l.BillingPostalCode).DMA_Value__c;     }     else if(trigger.oldMap.get(l.Id).BillingPostalCode != NULL || l.BillingPostalCode && !validBillingPostalCode.containsKey(l.BillingPostalCode)){         //blank value if new PostalCode does not match a record in the Map         l.DMA__c = Null;     }   }  } }


In the , the following example for scissors is given:     A small suture scissors was used to "fish" for the deeply embedded   hair.   However I find weird that it treats scissors as singular, being a plural noun.  Shouldn't it be Small suture scissors were used...?  Why is it correct to treat scissors as singular in that case (assuming it's indeed correct)?  Please note that I'm only interested in the use of the noun scissors, the ones that are used to cut, not any other meaning of the word. Thank you!

I never hear "scissor" or "pant" or "jean". It's always "scissors", "pants", and "jeans", respectively. Are they considered plural?


I have an issue with the if/else function in my Java code (Android / Eclipse).  When I'm in debug mode, checkGender is equal to "M", but goes directly to "else" instruction and considers that 'checkGender' is not equal to "M". I don't understand why? For information, searcher.getString("Gender") takes information from MySQL.  String checkGender = "";  checkGender = searcher.getString("Gender");  if(checkGender == "M") {     bGenderM.setChecked(true); } else {     bGenderF.setChecked(true); }   Debug info : checkGender = "M" (id=8300460...) value[0] = M  If I replace "searcher.getString("Gender");" by a simple "M", it works.  Thanks for your help.  Tom

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


I was wondering if there are formulas such as min$(a,b)=\displaystyle\frac{a+b-|a-b|}{2}$, etc. but for three numbers (a,b,c).

As we saw , the minimum of two quantities can be written using elementary functions and the absolute value function.  $\min(a,b)=\frac{a+b}{2} - \frac{|a-b|}{2}$  There's even a nice intuitive explanation to go along with this: If we go to the point half way between two numbers, then going down by half their difference will take us to the smaller one. So my question is: "Is there a similar formula for three numbers?"  Obviously $\min(a,\min(b,c))$ will work, but this gives us the expression: $$\frac{a+\left(\frac{b+c}{2} - \frac{|b-c|}{2}\right)}{2} - \frac{\left|a-\left(\frac{b+c}{2} - \frac{|b-c|}{2}\right)\right|}{2},$$ which isn't intuitively the minimum of three numbers, and isn't even symmetrical in the variables, even though its output is. Is there some nicer way of expressing this function?


i’m trying to track when British Airways flight BA 2158 from Grenada West Indies landed at Gatwick Airport. The flight was scheduled to depart on 30th December 2017 at 18:20, but departed on 31st December 2017 around 00:30. It flew straight to London Gatwick direct, not stopping at Saint Lucia. It landed at London Gatwick on the 31st December, but am unsure of the time. Many thanks.

Where can I find historical data on flights, specifically Delta international flights?  I need to find out about cancellations, diversions and any other flight data pertaining on particular route at a given time.  This source has to be official and stand up to legal scrutiny.


I am facing a problem here with PDO::execute(). The thing is that i have 3 databases and i want to build a Singleton class and a universal query method. So my DB class structure is this:  class DB{         private static $_instance = null;         private $_pdo1, $_pdo2, $_pdo3,                 $_query,                 $_results,                 $_error = false,                 $_count = 0;          private function __construct(){             try{                 $dns1 = 'mysql:host='.Config::get('mysql1/host').';dbname='.Config::get('mysql1/dbname').'';                 $dns2 = 'mysql:host='.Config::get('mysql2/host').';dbname='.Config::get('mysql2/dbname').'';                 $dns3 = 'mysql:host='.Config::get('mysql3/host').';dbname='.Config::get('mysql3/dbname').'';                 $username1 = Config::get('mysql1/username');                 $username2 = Config::get('mysql2/username');                 $username3 = Config::get('mysql3/username');                 $password1 = Config::get('mysql1/password');                 $password2 = Config::get('mysql2/password');                 $password3 = Config::get('mysql3/password');                 $this->_pdo1 = new PDO($dns1, $username1, $password1);                 $this->_pdo2 = new PDO($dns2, $username2, $password2);                 $this->_pdo3 = new PDO($dns3, $username3, $password3);             }catch(PDOException $e){                 die($e->getMessage());             }         }           public static function getInstance(){             if(!isset(self::$_instance)){                 self::$_instance = new DB();             }             return self::$_instance;         }           public function query($sql, $params = array()){             $this->_error = false;             if($this->_query = $this->_pdo1->prepare($sql) || $this->_query = $this->_pdo2->prepare($sql) || $this->_query = $this->_pdo3->prepare($sql)){                 if(count($params)){                     $x = 1;                     foreach($params as $param){                         $this->_query->bindValue($x, $param);                         $x++;                     }                 }                 if($this->_query->execute()){                     echo "Success";                 }             }         }     }   in Line 49 i get this error:  Fatal error: Call to a member function execute() on boolean in /htdocs/DatabaseStructure/classes/DB.php on line 49   line 49: if($this->_query->execute())  Also tried but without success:  if($this->_query->execute() == TRUE) if(!$this->_query->execute() == FALSE)   Any ideas why this is giving me an error?

Let's say I'm writing a PHP (>= 5.0) class that's meant to be a singleton.  All of the docs I've read say to make the class constructor private so the class can't be directly instantiated.  So if I have something like this:  class SillyDB {   private function __construct()   {    }    public static function getConnection()   {    } }   Are there any cases where __construct() is called other than if I'm doing a   new SillyDB()    call inside the class itself?    And why am I allowed to instantiate SillyDB from inside itself at all?


Can I view my compiler error in the pre-processed file? I am trying to figure out what a specific symbol is being replaced by after macro expansion. I am using Visual C++. Basically I would like to see the exact error causing line in the pre-processed file.

Let's say I have a source file with many preprocessor directives. Is it possible to see how it looks after the preprocessor is done with it?


I'm currently on a road trip in the USA from the UK using the 90 day visa waiver program - I'm here for 87 days. Then I fly home, do some travelling around Europe etc. and want to fly back for approximately another 90 days about two months after I return home. From the US I'll possibly then be going on to New Zealand or Australia, if not home.  Does anyone know if this is okay?

I am currently visiting the USA from the UK (I am a UK citizen) and am intending on staying here for the full 90 days under the Visa Waiver Program.     How long would I have to stay out of the US at the end of this period before returning again?    Would I have to return to the UK, or could I stay with friends in another country (such as Canada) for a while?


I need to restrict a particular php file from directly getting accessed. Not through htaccess any other method please.

I have a php file which I will be using as exclusively as an include. Therefore I would like to throw an error instead of executing it when it's accessed directly by typing in the URL instead of being included.  Basically I need to do a check as follows in the php file:  if ( $REQUEST_URL == $URL_OF_CURRENT_PAGE ) die ("Direct access not premitted");   Is there an easy way to do this?


In the summer of 2003 my parents decided to take my brothers and I to the US. I was 9 years old at the time. We entered the country legally with our visas, but exceeded our 6 month permit. I ended up staying in the US until May of 2014 (20 years old at the time). I left the country because I wanted to continue studying and it would be rather expensive to do so under such circumstances. I am now studying architecture here in Mexico, currently my second year. My family still lives in the US I was the only one who returned to Mexico. I want to reapply for a visa as I do have friends and family I would like to see. I never got into any sort of legal trouble with authorities the time I was there. And I really have no intentions of overstaying as I am devoted to my career. Now a lot of questions come to mind. Such as if there would be any sort of ban for my overstay (I really had no choice I was only a kid). Would that ban only come into effect for the time I overstayed after turning 18, so I would have overstayed 2 years in the US? Would the fact that my family still lives in the US affect my approval?

Background:  So I was brought into the US under the visa waiver program as an 11 year old child in January 2000. I voluntarily left the country on Sept. 2009 when I was  20 years, 9 months, and 3 days old.  I visited America twice since I left in 2009 under the ESTA VWP -  Once in June 2012 and another time in July 2014 via the Visa Waiver (ESTA) program with no problem. On Oct 2nd 2014 I came to visit my brother for his birthday and I was refused entry because of my previous overstay as a CHILD but given Parole to Depart for the duration of my holiday (so I still got to go on vacation.)  The guy told me that I could apply for a B2 visa when I get back to London but I would have to also apply to get my overstay waived. He said I would need to get my overstay waived at the same time as I apply for my visa. My older brother who is a US citizen (by birth) has put a petition for me to become a citizen a few years ago.  My Question:  I've filled in the B2 Visa application. I've disclosed the details above as it would definitely come up in the interview. My question is - is there a specific application that I would fill out to ask to get my overstay waived? Or is that something that is at the discretion of whoever I am talking to?  I'm asking this before I book my interview - thanks a lot.


I have tried every solution i could find here and nothing seems to be working. I'm a beginner I only know the basics. Can someone help me with it?    Here is the blend file:    If someone can fix it i would be so grateful.  Edit: i tried Remove Doubles, didn't work.

Here is the .  Picture:   It's nothing special but I cant figure out why I get problems rigging this mesh. It would be important and a great Help! Thanks for reading and I know there are a lot of guides answering this question but I tried all and it doesn't seem to work.


$\xi_A(\lambda)=det ( \lambda * I_n -A)$  Cayley-Hamilton stated that $\xi_A(A)=0_n$ Proof : $det (A-A)= det ( 0_n) =0$ Why is this proof wrong ?  First because we expect $\xi_A(A)$ to be a matrix not a scalar but I guess there is something else

Cayley Hamilton Theorem states that if $A$ is an $n \times n$ matrix over the field $F$ then $p(A) = 0$.  We note that $p(\lambda) = \det(\lambda I - A)$. Hence, why can't we just substitute $\lambda$ with $A$ and directly prove Cayley-Hamilton Theorem by saying that $p(A) = p(\lambda) = \det(\lambda I - A) = \det(AI - A) = 0$?


How to change the number of equations  to the desired effect? for example , (1-4)

Here is my MWE:  \documentclass[a4paper, 12pt]{report} \usepackage{amssymb, amscd} \begin{document}     \chapter{Test}      \begin{table}[h]         \center         \caption{Test}         \begin{tabular}{l | r}             Two & 2 \\             Four & 4         \end{tabular}     \end{table}      Test equation:     \begin{equation}         a+b=c^2     \end{equation} \end{document}   It produces this:    Now I would like to change equation numbering style. I want (1-1) instead of (1.1). How can I do that? Also, I want to preserve numbering style for tables and figures (Table 1.1:) , I don't want (Table 1-1:)


I remember a few months ago looking at a story about humans arriving on a planet and finding a microscopic alien race. This microscopic alien race lived on a different time scale where they aged a lot faster than the humans. A short time passes for the humans and by then, the aliens are technologically advanced enough to make contact but then decide not to give any information about technologies the humans haven't discovered yet. Hopefully anybody has an idea as to who the author is and what the title is?

A book I once owned and read back in late-80's or early-90's that I have not been able to identify title & author for:  It was a SF story concerning tiny native lifeforms, living on either a planetoid or possibly a dead/neutron star, that evolve at a seemingly accelerated time rate. Most of their story is told in the few days of observation (from orbit) by a human expedition to the planet, during which time-frame the race below progresses from stone-age tech level to being more advanced than the human observers, and eventually flying up to meet the humans in small advanced craft powered by micro-singularities... one of which accidentally 'disintegrates' the tip of a human scientist's nose in the process.


Is a goal scored if a goalkeeper holding the ball enters the goal, but keeps the ball out of the goal?

I have always wondered this.  Is a goalkeeper handball determined by where the ball actually is, or where the goalkeepers body is positioned at the point of contact?


This is the first time I try to use Bibtex for my thesis and I am quite desperate because I cannot get it running. Despite the many post about the undefined references error in this forum, I still am not able to solve this matter.  I have created a very simple .bib and .tex file:  The .tex file:  % test.tex \documentclass[a4paper,10pt]{article} \usepackage[utf8]{inputenc} \usepackage[english]{babel}   \title{Bibtex Test}  \begin{document}  Cite this\cite{testcite}  \bibliographystyle{plain} \bibliography{references} \end{document}   The.bib file:  % references.bib @BOOK{testcite,    author = "Mustermann Max and Kraut Karl",    title = "Fixing Bibtex",    publisher = "Springer",    year = "2015" }   Both files are located in the same folder and I run my mainfile multiple time. I use TexMaker combined with MikTeX2.9.  There is no error but the simple warning sequence:  LaTeX Warning: Citation `testcite' on page 1 undefined on input line 10 LaTeX Warning: There were undefined references.  I assume the error occurs somewhere in my TexMaker settings. Could you please help me?

I've browsed the forums and found a number of posts that have addressed this issue, but none of the solutions seem to work for me. I have the following script that I just copied from the bibtex home page to get familiar with it. Instead of the citation number I get a question mark. I compile using Latex+Bibtex+Latex+Latex+PDFLatex+ViewPDF just as has been previously suggested and the problem persists.   \documentclass[11pt]{article} \usepackage{cite}  \begin{document}  \title{My Article} \author{Nobody Jr.} \date{Today} \maketitle  Blablabla said Nobody ~\cite{Nobody06}.  \bibliography{mybib} \bibliographystyle{plain} \end{document}   My bibliography (Bib.bbl)  @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }    Looking at previous posts one thing that is concerning is that my .bbl looks empty as shown below. Further, I don't have a .blg  \begin{thebibliography}{}  \end{thebibliography}


Hagrid states:     there wasn’t one wizard that went bad that wasn’t in Slytherin   But I don’t think it’s true. Are there any known wizards who 'went bad' that were in Gryffindor?  I prefer answers from canon. Also I want to know them, and if they were significant to the HP story.

In the HP universe, Gryffindor house is somewhat a metaphor of righteousness and morality. On the other hand, Slytherin house represents the dark side. However, there are a few exceptions on the Slytherin part such as Merlin, Professor Slughorn, Severus Snape etc. The only known Gryffindor Dark wizard (as far as I could find) is Peter Pettigrew. As Slytherin house is reputed to have produced more than one good wizard, were there any more Dark wizards (apart from Wormtail) who were sorted to Gryffindor house?  Edit:  Its  mentioned on Pottermore that Hufflepuff has had the fewest (meaning less than Gryffindor) Dark wizards.  The Hufflepuff welcome letter on Pottermore makes a claim about their dark wizard turnout:     However, it’s true that Hufflepuff is a bit lacking in one area. We’ve produced the fewest Dark wizards of any house in this school. Of course, you’d expect Slytherin to churn out evil-doers, seeing as they’ve never heard of fair play and prefer cheating over hard work any day, but even Gryffindor (the house we get on best with) has produced a few dodgy characters.    Now assume that Gryffindor has produced only one! So there's a contradiction, hence there was somebody else!


I am wanting advice in securing an email server for large quantities of outbound emails daily.    Would like recommendations on hardware and software, plus cost estimates.   WOuld like system to grow with volume.   Starting out at 30,000 emails per day, and then growing from there.    Want to make sure my business plan can afford this.

This is a  about  Related:      I have a question regarding capacity planning. Can the Server Fault community please help with the following:   What kind of server do I need to handle some number of users? How many users can a server with some specifications handle? Will some server configuration be fast enough for my use case? I'm building a social networking site: what kind of hardware do I need? How much bandwidth do I need for some project? How much bandwidth will some number of users use in some application?


I want to allow view parameters to my view separated by comma.          My parameters are like **Z060401010014,Z060401010095,Z060401010096**              Sql Query `**select * from plotboundarygeo where plcd in('%plcd%')**`              And i am Using Reg Exp like              **^[\w\d\s,]+$**             callback parseResponse            maxFeatures 5000            outputFormat text/javascript            request  GetFeature            service  WFS            typeName plotgeo:vwarea            version  1.0.0            viewparams plcd:Z070400030091,Z070400030041   When i use this condition and run my application in my i am getting error like      1 feature types requested, but found 25 view params specified.    Can any one help how to resolve this issue?

I have a sql view which take only one parameter, but this parameter is a list, and a need to know how can i pass this parameter in the url  Here is my sql view  SELECT * FROM shop WHERE id IN %list%   When I put the default value for %list% as (1, 2 ,3) as example, the layer preview works and show the shopa with the default ids,  but when I try this in the url  viewparams=list:(1,2,3)   does not work.   I already tried other things like   viewparams=list:"1,2,3"   but nothing works.  Does anyone know how to do this?


Let's say, in a multiplayer late-game (3+ players) I want to cast/activate anything during another players turn. Everyone is rather low on life, and in response to my spells/abilities on the stack another player reduces the life of the player whose turn it currently is to 0 or below, because of which he loses the game.  It is obvious, that anything that player controls/owns is taken from the stack and the battlefield and his turn ends immediately. But what happens to my stuff on the stack? Does it fizzle or still resolve?

In Magic: The Gathering, the rules for a player losing in a multiplayer game are quite complex, so I'd like to try to understand them by example. I would be happy to ask each of these situations as a separate question if that is preferred, but they all seem related, and I would love to have one place to look up all of these answers.  Let's say I'm playing with two friends, Bob and Chloe, in a simple free for all. Unfortunately, I lose. When I lose, suppose the following:   I controlled an  which has exiled Bob's , does he get his bear back? I have a  on the stack targeting Chloe, does Chloe take the 2 damage still? Earlier in the turn I cast  to prevent damage to one of Bob's . If it later takes 3 damage, will that damage be prevented? Something I controlled gave Bob a 1/1 soldier token. What happens to the token? Something Chloe controlled gave me a 1/1 soldier token. What happens to the token? I had a  enchanting one of Bob's army of . What happens to the bear? I had also played  on Bob's final . What happens to the last bear? Chloe had  my . What happens to the Clone? Are there any other situations specifically addressed by the rules?


You know the kind I mean. At the intro of Mission Impossible, we see Tom Cruise, who suddenly hooks a hand beneath his jaw and tears of his face, which turns out to be one of those vinyl masks. Beneathe the mask, he's somebody totally different.  I have seen Mrs Doubsfire, where Robin williams wears one of thsoe masks and can seriously pass for an old lady, and even still has facial mobility. So I suppose it can be done, to a degree.  Given that the guy wearing the mask has a small face, small nose etc, could he really pass convincingly for someone else if he wore a mask?

Sometimes we see a mask is used by an actor of a film by which he drastically changes his face. I was under the impression that only after plastic surgery one can change his face. I stumbled upon this question while watching . Here it is shown  changes his face drastically by using such mask to s face. I believe such mask does not exist because from IMDB I found Hrithik had a special appearance(I believe only for the face changing scene) in that movie. I am posting the screenshots to make you guys more clear about which mask I am talking about. Here Don i.e. Shahrukh Khan opens the mask:  Hrithiks Face  Opening the mask  SRK showing his face I remember similar masks were shown in MI 2 and 3. So how is this scenes done if the mask is not real?


here is my .  I have a class numberonly it works on load page, but when I append input it is not working on text box.  I know it not re-initialize after I append input that is my main aim to append event on append.  This is my html:: (Please see )  <div id='addinputdiv'>   <input type="text" class='numberonly' />  </div> <button onclick="addinputt()">Add Input</button>   numberonly class have on key down and key up events, I want to bind it on new input append.

I have a bit of code where I am looping through all the select boxes on a page and binding a .hover event to them to do a bit of twiddling with their width on mouse on/off.  This happens on page ready and works just fine.  The problem I have is that any select boxes I add via Ajax or DOM after the initial loop won't have the event bound.  I have found this plugin (), but before I add another 5k to my pages with a plugin, I want to see if anyone knows a way to do this, either with jQuery directly or by another option.


I am writing a python script to automate some ArcMaps data processing.  I am getting hung up at raw_input().  I am using raw_input to get input from a user.  A folder will be created with the folder name based on the user input.  I don't understand why this isn't working. I've viewed tutorials, read the manual, etc... and I still can't figure out why I am getting this error for raw_input().  I've managed to be able to get user to select files and directories suing the Tkinter toolkit should I look into using this toolkit to get text from a user prompt as well?

I'm just starting to get into Python scripting for work.  I'm currently creating a script to automate a process.  Basically, it asks the user the client name, gets a projection if available, creates directory on C: drive for client, creates file geodatabase specific to client, creates required dataset, and creates feature classes specific to clients data. Eventually, it will also add the required fields to each feature class and probably some other things.  I started this not really knowing the proper etiquette of Python scripting for ArcMap. But what I've created so far will only run outside ArcMap I believe.   Is this acceptable?   Instead of getting user input through arcpy.getparamaterastext(), which I just found out about, I'm using raw_input().   Is this okay?   It does work, I'm just not sure if this is a proper way to do scripting.  Here's the code I have so far.  import sys import arcpy import os  #Records name of the client client = raw_input("Enter the name of the client: (letters and underscores only) \n")  #Records filepath of client to be created clientpath = "C:/" + client  #Inquires if projection file exists projection = raw_input("Is there a .prj or .shp available with correct projection? Y or N \n")  #Records the projection location if available if projection.upper() == "Y":     spatialr = raw_input("Drag the .prj or .shp here to record the filepath \n")     nspatialr = spatialr.replace('"', "") elif projection.upper() == "N":     alert = raw_input("You must add the spatial reference manually, hit enter to continue. \n") elif projection.upper() != "N" or "Y":     exit = raw_input("That is not a valid response. Try again. \n")     sys.exit()  #Checks if client folder exists; if not, creates one if not os.path.exists(clientpath):     os.makedirs(clientpath)  #Variable for file geodatabase location FGBpath = clientpath + "/" + client + ".gdb"  #Checks if client file geodatabase exists; if not, creates one if not arcpy.Exists(FGBpath):     arcpy.CreateFileGDB_management(clientpath, client)  #Variable for dataset location FDatasetpath = clientpath + "/" + client + ".gdb" + "/Network"  #Checks if dataset exists; if not, creates one if not arcpy.Exists(FDatasetpath):     if projection.upper() == "Y":         arcpy.CreateFeatureDataset_management(FGBpath, "Network", nspatialr)     elif projection.upper() == "N":         arcpy.CreateFeatureDataset_management(FGBpath, "Network")  #Variable for cable feature class location FCcablepath = clientpath + "/" + client + ".gdb" + "/Network" + "/cable"  #Checks if cable feature class exists; if not, creates one if not arcpy.Exists(FCcablepath):     if projection.upper() == "Y":         arcpy.CreateFeatureclass_management (FDatasetpath, "cable", "POLYLINE", "", "", "", nspatialr)     elif projection.upper() == "N":         arcpy.CreateFeatureclass_management (FDatasetpath, "cable", "POLYLINE")  #Variable for splice point feature class location FCsplicepath = clientpath + "/" + client + ".gdb" + "/Network" + "/splice_point"  #Checks if splice point feature class exists; if not, creates one if not arcpy.Exists(FCsplicepath):     if projection == 'Y' or projection == 'y':         arcpy.CreateFeatureclass_management (FDatasetpath, "splice_point", "POINT", "", "", "", nspatialr)     elif projection == 'N' or projection == 'n':         arcpy.CreateFeatureclass_management (FDatasetpath, "splice_point", "POINT")  exit = raw_input("\n\n File geodatabase, dataset, and the cable \n and splice point feature classes successfully created. \n\n Hit enter to exit.")   I still have some work to do, like adding the needed fields.


I got the following problem at hand. We try to insert a Double via JDBC in Oracle 11.2.0.2.0, we send 70.56 and in the database 70,56000000000000227373675443232059478759 is inserted. My question would be why? Can someone please point me in the right direction, should I switch to float, I suspect a JDBC mapping problem.

double r = 11.631; double theta = 21.4;   In the debugger, these are shown as 11.631000000000000 and 21.399999618530273.  How can I avoid this?


I am currently writing my CV using a modified version of a LaTeX template from here:   When I list my programming experiences, I formatted the CSharp Symbol using a \newcommand to make it look nicer. The command works, but when used in a section it breaks the building process saying undefined control sequence. When I remove this \Csh command it works again. Whats wrong with the \Csh so that it breaks the formatting of the section?  \newcommand{\Csh}{C{\lserif\#}}   The section in question:  \begin{AbschnittCV}{Something Something}             \EintragCV{Topic1}{                 StuffA: bla bla \newline                 StuffB: bla blubb blubb \newline                 StuffC: blablabla             }             \EintragCV{Programming}{                 \Csh : bla bla \newline                 C/C++: bla bla bla \newline                 Delphi/Java: bla bla bla             }   % <-- This bracket is highlighted as error 'Undefined control sequence. }' \end{AbschnittCV}   How can I resolve this problem/fix my command definition?  The full error log says:      ! Undefined control sequence. \Csh ->C{\lserif                   \#} l.223           }  The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, and I'll forget about whatever was undefined.  LaTeX Font Info:    Try loading font information for T1+cmtt on input line 237.  (/usr/share/texmf-dist/tex/latex/base/t1cmtt.fd File: t1cmtt.fd 2014/09/29 v2.5h Standard LaTeX font definitions ) <signatur-bewerber.png, id=62, 108.405pt x 26.499pt> File: signatur-bewerber.png Graphic file (type png) <use signatur-bewerber.png> Package pdftex.def Info: signatur-bewerber.png  used on input line 246. (pdftex.def)             Requested size: 142.26378pt x 34.77982pt.  [3

I want to make C# look nice in my book, but with the following:  C\# it looks like this:    When it should look more like this:    For the second one, I used verbatim, but I don't want that and I've also used a macro like the following everywhere so it should be easy to replace:  \def\Csharp{C\#}  Any suggestions on how I make this look correct?  Edit  I am writing a programming book, in the C# Language Specification, it looks like this:


I think i understand it now, if found this:   I know that position and speed are relative. There is no such thing as universal coordinates. Then why is acceleration absolute? Is the 3th and 4th derivative of position to time also absolute? Where/how can i see this in the math/laws of motion?  For example: you are in a rocket and you have an accelerometer with you, and someone else is standing on an astroid that is not attracted by gravity towards something else, so it has no net force on it. If the engines of the rocket are turned on, then you will see that on the accelerometer, and you will know that it is you that is accelerating, not the astroid.   Also if the universe were completely empty, except for a bucket of water. If the water would be pushed towards the edges of the bucket, then we would know that the bucket is rotating around its axis. But what would happen if you could rotate space itself around the bucket?  It probably is because $F=ma$ and not something else like $F=m^2a^3+2a+...$, is that correct? Can $F=ma$ be deduces from deeper principles, or is it an experimental law?

A while back in my Dynamics & Relativity lectures my lecturer mentioned that an object need not be accelerating relative to anything - he said it makes sense for an object to just be accelerating. Now, to me (and to my supervisor for this course), this sounds a little weird. An object's velocity is relative to the frame you're observing it in/from (right?), so where does this 'relativeness' go when we differentiate?   I am pretty sure that I'm just confused here or that I've somehow misheard/misunderstood the lecturer, so can someone please explain this to me.


I was trying to format code in , but it wouldn't submit because "The title is too short, minimum 15 characters." I had not changed the title, so the original version must have suffered from the same problem.  How was the OP able to create a question with a 13-character title? I tried to do that and I failed. I tried , that didn't work either.  (Seen . Nobody seems to be surprised that a short-title question made it to the system in the first place. Why? Apparently not because a , there were none.)

Test to see if the title length requirement can be circumvented by appending lots of dots.


Is it possible that entangled particles don't exchange information at all, e.g. maybe something happened at the moment they were split that made them opposite?

From everything I've read about quantum mechanics and quantum entanglement phenomena, it's not obvious to me why quantum entanglement is considered to be an active link. That is, it's stated every time that measurement of one particle affects the other.  In my head, there is a less magic explanation: the entangling measurement affects both particles in a way which makes their states identical, though unknown. In this case measuring one particle will reveal information about state of the other, but without a magical instant modification of remote entangled particle.  Obviously, I'm not the only one who had this idea. What are the problems associated with this view, and why is the magic view preferred?


So let's assume that I have this simple code:  HTML:
Hello!
 <input type="submit" id="update_map" value="Update!" />   JQUERY:  $("#id").mouseover(function () {     alert("TRUE"); });   So far everything works perfect, but when I'm updating the test div with that code:  $("#update_map").click(function () {     $.post( "update_ajax.php", function( data ) {         $( "#test" ).html( data );         alert("Done!");     }); });   But now, when I clicked on "Update!", and I'll move my mouse over the "test" div, it won't work.  How can I solve that problem?


How do I access the property of a child class instead of the abstract class, when handling objects by their parent/abstract class? Like in this example:  public class WordCategories {   public static abstract class Noun {     public static final String TYPE = null;     //... and so on, methods   }   public static class Person extends Noun {     public static final String TYPE = "Person";     // ...   } }  /* ... then we build a collection with members like: */ nouns.add(new WordCategories.Person("Bill Clinton");  /* now later we need to access a mixed list of nouns: */ for(WordCategories.Noun n: nouns) {   if(n.TYPE.equals("Person") ){ // this is always null }   Obviously I could just specify (WordCategories.Person) n but that assumes that it is a Person. I need the cast to come from the parent class, and it would be most elegant if it did not involve interpreting the TYPE constant or the use of reflection, for that matter.

I've been using the == operator in my program to compare all my strings so far. However, I ran into a bug, changed one of them into .equals() instead, and it fixed the bug.  Is == bad? When should it and should it not be used? What's the difference?


In light of the current pandemic, how can travelers ensure that they're not infected while taking the plane? Would it be sufficient to wear a N95 mask with protective goggles or does one require a full-blown hazmat protection suit to ensure absolute safety?  I am aware that the best course of action is to avoid travel altogether, but let's presume that this is not an option.

I will be travelling for more than 13 hours through South East Asia, most of the time in a crowded environment like airplane or transiting at the airport. What precautions should I take to reduce the chances of contracting any contagious disease, such as Corona Virus COVID-19?


I have following Python regex:  re =re.match(r'.*? from\s+(.*?)(\s.*|$)', q)   Here, q is a query like this:  Q1 = u"select * from dlpx_jobs where job_id=\\'531\\';"  Q2 = u"select * FROM dlpx_jobs where job_id=\\'531\\';"   Now, obviously, for Q1 the regex works because "from" is lowercase in the query but for Q2 regex doesn't work because in Q2 "from" is in Uppercase.   Is there any way through which the regex works for both the query irrespective of whether "from" is uppercase or lowercase?

In Python, I can compile a regular expression to be case-insensitive using re.compile:  >>> s = 'TeSt' >>> casesensitive = re.compile('test') >>> ignorecase = re.compile('test', re.IGNORECASE) >>>  >>> print casesensitive.match(s) None >>> print ignorecase.match(s) <_sre.SRE_Match object at 0x02F0B608>   Is there a way to do the same, but without using re.compile. I can't find anything like Perl's i suffix (e.g. m/test/i) in the documentation.


What i have,  suppose I am creating two object like below,  String s1 = "abc"; String s2 = s1;  System.out.println("== comparison "+ s1==s2);   i am expecting the output is      == comparison true   but i get     false   What is the problem?  I am not getting output as my expectation.  Question why it is not matching the expected output.  please reply and explain why it is coming like this.  Thanks in advance tofek khan


Every time I run sudo apt-get update an error is getting thrown regarding nginx.  The following NEW packages will be installed: nginx 0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded. 1 not fully installed or removed. Need to get 0 B/3.498 B of archives. After this operation, 37,9 kB of additional disk space will be used. Selecting previously unselected package nginx. (Reading database ... 542828 files and directories currently installed.) Preparing to unpack .../nginx_1.10.0-0ubuntu0.16.04.4_all.deb ... Unpacking nginx (1.10.0-0ubuntu0.16.04.4) ... Setting up nginx-full (1.10.0-0ubuntu0.16.04.4) ... Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details. invoke-rc.d: initscript nginx, action "start" failed. dpkg: error processing package nginx-full (--configure): subprocess installed post-installation script returned error exit   status 1 dpkg: dependency problems prevent configuration of nginx: nginx depends on nginx-core (>= 1.10.0-0ubuntu0.16.04.4) | nginx-full    (>= 1.10.0-0ubuntu0.16.04.4) | nginx-light (>= 1.10.0-0ubuntu0.16.04.4) |   nginx-extras (>= 1.10.0-0ubuntu0.16.04.4); however: Package nginx-core is not installed. Package nginx-full is not configured yet. Package nginx-light is not installed. Package nginx-extras is not installed. nginx depends on nginx-core (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx- full (<< 1.10.0-0ubuntu0.16.04.4.1~) | nginx-light (<< 1.10.0-  0ubuntu0.16.04.4.1~) | nginx-extras (<< 1.10.0-0ubuntu0.16.04.4.1~);  however: Package nginx-core is not installed. Package nginx-full is not configured yet. Package nginx-light is not installed. Package nginx-extras is not installed.  dpkg: error processing package nginx (--configure): dependency problems - leaving unconfigured No apport report written because the error message indicates its a   followup error from a previous failure.                       Errors were encountered while processing: nginx-full nginx E: Sub-process /usr/bin/dpkg returned an error code (1)   I've tried to resolve as suggested in other posts without success:  sudo apt-get remove nginx sudo apt-get -f install    # (as mentioned in )  $ systemctl status nginx.service nginx.service - A high performance web server and a reverse proxy server Loaded: loaded (/lib/systemd/system/nginx.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Mo 2016-11-07 21:05:51 CET; 7min ago Process: 10372 ExecStartPre=/usr/sbin/nginx -t -q -g daemon on; master_process on; (code=exited, status=1/FAILURE)   I also tried the following... as the error persists.  apt purge nginx apt autoremove apt install nginx   How many options do I have from here to get on the right track?  Should I try uninstalling/disabling apache2?

:~$ sudo apt-get remove nginx* && sudo apt-get install nginx-full*  Reading package lists... Done Building dependency tree        Reading state information... Done  After this operation, 5,579 kB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://in.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 nginx-full-dbg amd64 1.10.0-0ubuntu0.16.04.1 [3,789 kB] Fetched 3,789 kB in 33s (112 kB/s)                                              Selecting previously unselected package nginx-common. (Reading database ... 189767 files and directories currently installed.) Preparing to unpack .../nginx-common_1.10.0-0ubuntu0.16.04.1_all.deb ... Unpacking nginx-common (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full. Preparing to unpack .../nginx-full_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full (1.10.0-0ubuntu0.16.04.1) ... Selecting previously unselected package nginx-full-dbg. Preparing to unpack .../nginx-full-dbg_1.10.0-0ubuntu0.16.04.1_amd64.deb ... Unpacking nginx-full-dbg (1.10.0-0ubuntu0.16.04.1) ... Processing triggers for ufw (0.35-0ubuntu1) ... Rules updated for profile 'Apache Full' Rules updated for profile 'Nginx HTTP'  Processing triggers for systemd (229-4ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for man-db (2.7.5-1) ... Setting up nginx-common (1.10.0-0ubuntu0.16.04.1) ... Setting up nginx-full (1.10.0-0ubuntu0.16.04.1) ... Job for nginx.service failed because the control process exited with error code. See "systemctl status nginx.service" and "journalctl -xe" for details.  invoke-rc.d: initscript nginx, action "start" failed.  dpkg: error processing package nginx-full (--configure):  subprocess installed post-installation script returned error exit status 1 dpkg: dependency problems prevent configuration of nginx-full-dbg:  nginx-full-dbg depends on nginx-full (= 1.10.0-0ubuntu0.16.04.1); however:   Package nginx-full is not configured yet.  dpkg: error processing package nginx-full-dbg (--configure):   dependency problems - leaving unconfigured No apport report written because the error message indicates its a followup error from a previous failure.                            Errors were encountered while processing:  nginx-full   nginx-full-dbg  E: Sub-process /usr/bin/dpkg returned an error code (1)