So I've been having this issue when defining a XMLSchema for a certain element. Mainly the problem is that the XML can have a <STREET> tag that either has a string or nested tags in it that represent the street BUT not both, example:  Just text, with a predefined pattern:  <ADDRESS>Hollywood St.75</ADDRESS>   Or nested tags that represent the street:  <ADDRESS>   <STREET>     Hollywood   </STREET>   <NUMBER>     75   </NUMBER> </ADDRESS>   So accordingly I did define the appropriate custom types as per the requirements, and they are as follows:  Simple type for the street address:  <xsd:simpleType name="SimpleAddressType">   <xsd:restriction base="xsd:string">     <xsd:pattern value="[a-zA-Z ]+ St\. ?[0-9]{1,2}" />   </xsd:restriction> </xsd:simpleType>   Complex type for the Street + Number tags:  <xsd:complexType name="ComplexAddressType">   <xsd:sequence>     <xsd:element name="STREET" type="xsd:string" />     <xsd:element name="NUMBER" type="xsd:integer" />   </xsd:sequence> </xsd:complexType>   And this is the part where I'm stuck as I have no idea how to define such use case. My general idea was to add both types under xsd:choice tags as ADDRESS elements and call it a day, but then I realized that its not allowed. Any kind of help would be greatly appreciated.

How would I define an element that can either contain plain text or contain elements? Say I wanted to somehow allow for both of these cases:  <xs:element name="field">     <xs:complexType>         <xs:sequence>             <xs:element ref="subfield" minOccurs="0" maxOccurs="unbounded" />         </xs:sequence>         <xs:attribute name="name" type="xs:string" />     </xs:complexType> </xs:element>  <xs:element name="field" type="xs:string" />   ... so that both these elements would be valid:  <field name="test_field_0">     <subfield>Some text.</subfield> </field>  <field name="test_field_1">Some more text.</field>


The question is this.     Let $(s_n)$ be a sequence such that   $$\left|s_{n+1}-s_n\right| < 2^{-n}, \forall n \in\mathbb N$$   Prove that $(s_n)$ is a Cauchy sequence and hence convergent.   My proof is below.  Proof. Let $\epsilon > 0 $ and $N = \dfrac{\ln\left(\frac{1}{\epsilon}\right)}{\ln(2)}$. Then, $\forall n > N = \dfrac{\ln(\frac{1}{\epsilon})}{\ln(2)}$ implies  $$n\ln(2) > \ln\left(\frac{1}{\epsilon}\right)$$ $$2^n > \frac{1}{\epsilon}$$ $$\epsilon > \frac{1}{2^n} > \left|s_{n+1}-s_n\right|$$Q.E.D.  Is this ok??

Suppose the terms of the sequence of real numbers $\{a_n\}$ satisfy $|a_{n+1} - a_n| \le 2^{-n}$ for all $n$. Prove that $\{a_n\}$ is Cauchy.   My Work  So by the definition of a Cauchy sequence, for all $\varepsilon > 0$ $\exists N$ so that for $n,m \ge N$ we have $|a_m - a_n| \le \varepsilon$. However, questions like  make me understand that the $2^{-n}$ condition is necessary for this to be a true statement.   So I am wondering how to appeal to the Cauchy definition for this proof. Do I prove that every convergent sequence is therefore Cauchy, and then try to prove convergence?


I've read that a monk's fists are considered monk weapons. Does that enable a paladin to cast Holy Weapon on a friendly monk?  For clarification, I am not asking if an unarmed attack is a weapon attack; it is. What I am asking is if the hands are weapons, so that way they can be infused with spells like Holy Weapon, which only targets weapons.

For the purposes of the fighter Battle Master archetype, whenever a maneuver calls for a "weapon attack" does that include an unarmed strike?


I found the following little FM transmitter circuit among some old papers and it works pretty well, but I have a tough time understanding how the circuit operates:    I understand the trimcap and inductor form a LC tank circuit that resonates at the required frequency. I don't understand how the transistor keeps the tank "topped up". Can anyone explain the circuit's operation in detail ?

I stumbled across a relatively simple FM radio transmitter online.    Credit:   I wanted to understand how it works (it is called "super simple" on the website), but several hours I have nothing but a vague understanding.   I believe R2, L1, C3 form an oscillator, and then the transistor Q1 is used to modulate the signal. C1 would just be used to remove any DC offset. However, this leaves R1, C2, C4, C5, and R3 and,  for these components,  I have no clue what they do.   Could someone please explain how this "super simple" transmitter works?


I have a simple Python script that I want to stop executing if a condition is met.  For example:  done = True if done:     # quit/stop/exit else:     # do other stuff   Essentially, I am looking for something that behaves equivalently to the 'return' keyword in the body of a function which allows the flow of the code to exit the function and not execute the remaining code.

I am aware of the die() command in PHP which exits a script early.  How can I do this in Python?


Is there any way to make the world's background white without making everything way too bright? I simply want to make the whole world white, without effecting the lighting.

I am trying to make a computer monitor. This means I have to have an image texture for the screen. My image texture is currently connected to an Emission BSDF shader. Unfortunately, when the emission is bright enough to emit light, the image is white-washed. I tried adding a Brightness/contrast node to the image before pushing it into the Emission BSDF, but it seems to directly counter the Emission's strength.  The desired light level   The desired image brightness


Find all ordered pairs $(a, b)$ such that $a$ and $b$ satisfy $a^b$ = $b^a$ and $a$ and $b$ are integers.   The only way I can think of solving this question is by trial and error, but there must be a more efficient way.

We know that $2^4 = 4^2$ and $(-2)^{-4} = (-4)^{-2}$. Is there another pair of integers $x, y$ ($x\neq y$) which satisfies the equality $x^y = y^x$?


Let’s say, we are tossing a fair coin.  How many times, on average, should we toss it so as to have N more heads than tails or tails than heads?  In other words, what is the mathematical expectation of the number of tosses till |number(heads) - number(tails)| == N?

I flip a coin until I get $m$ more heads than tails, or $n$ more tails than heads. Let the expected number of flips of the coin before stopping be $f(m,n)$.  I obtained $f(m,n)=mn$ from the recursion $f(m,n)=1+\frac{f(m-1,n+1)+f(m+1,n-1)}2$ with $f(k,0)=f(0,k)=0$ for all $k$.   Other than going through this recursion (and either solving by inspection or by writing as linear recurrence in single variable and solving brute force), is there an intuitive reason you should expect this process to take $mn$ flips? I was thinking about the more general problem with probability $p$ of getting heads and was struck by how simple the formula became when handling, what turned out to be a special case (general formula broke down) of $p=\frac12$.


I've just watched the anime, in there Blast doesnt appear, but I believe he was mentioned when the heros gathered to fight the aliens. Supposedly he's the #1 hero of the hero association but he never appears. Does he appear in the One Punch Manga or at least in the webseries?

Blast is #1 among S-rating heroes; it is said that only Blast will be able to stop a God-level attack. However, we never actually see Blast, or get any hints as to who he/she may be.  The question is: has either ONE or Murata Yusuke hinted on who Blast might be?


I like using Chrome on Mac and it is my default browser.  However, Microsoft SharePoint and Chrome don't work well together.    I am wondering if there is a place where I can specify domains to auto open in Safari? Or better yet, have an option on right click menu of URLs to open in Safari?  Any ideas how to achieve this?

Safari is my default browser, and I like it that way. But I want to open Google URLs (Google Docs, YouTube, etc.) in Chrome by default, e.g., when I click on a link in Mail. Is there a system-level way to set the default browser for a sub-set of domains?


$f(x)=3x^2-6x+3$ if we see the graph we'll know that it isn't. Using the definition we have:  $$f(x_1)=f(x_2)$$  $$3(x_1^2)-6(x_1)+3=3(x_2^2)-6(x_2)+3$$ We get rid of 3 and the we factorize the other $3$  $$x_1^2-2x_1=x_2^2-2x_2$$ Then we factorize $x_1$ and $x_2$  $$x_1(x_1-2)=x_2(x_2-2)$$  Then what?

The answer given is that it's not because it's a parabola and hence, would fail the horizontal line test, i.e., two values of $x$ will have the same value of $f(x)$.  However, how can we prove the same algebraically? My solution:  Let $f(x_1) = f(x_2)$  $\implies x_1^2 - 2x_1 = x_2^2 - 2x_2$  $\implies (x_1 - 1)^2 -1 = (x_2 - 1)^2 - 1$  $\implies (x_1 - 1)^2 = (x_2 - 1)^2$  $\implies x_1 = x_2$ (I believe that I've made the mistake here because we can't really take square root of both the sides.)  My question is: how do we prove that the function is not one-to-one algebraically?


First of all: I speak Spanish. So I hope you understand what I am asking:  Recently I successfully installed Ubuntu 13.04. So after a week, I turn on my computer and .  This shouldn't appear, It has to appear just when I press F10. So, when I select Ubuntu in Grub, appears a black screen like this:    So after this, I can't do anything... Ctrl+Alt+Del and F10 doesn't work... So I just turn off my computer the bad way.  What can I do?

I am trying to boot Ubuntu on my computer.  When I boot Ubuntu, it boots to a black screen.  How can I fix this? Table of Contents:


banknotes = [200,100,50,20,10,5,1,0.50,0.25,0.10,0.05,0.01]  amount = float(input("Enter an amount: "))  for i in range (0,len(banknotes)):     if banknotes[i] <= amount:         banknote = int(amount // banknotes[i])         amount = amount - banknote*(banknotes[i])         print(banknotes[i],"banknotes:",banknote)  For example when I input 86.74, program acts like its 86.73. But somehow when I input 386.74 or almost any other number, it works correctly. I really can't see where the problem is, and I tried online python compiler to see if my IDE is bugged, same thing happened.

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


Prove that logical statement $\phi$ build only with $\leftrightarrow$ is a tautology iff every atomic statement of $\phi$ appears even number of times. Hints please, thank you

I just started to study Mathematical Logic and I am having trouble finding a simple proof of the following exercise.    Let A be a propositional formula that contains only the $\equiv$ connective. For those who are not familiar with it $f_\equiv(T,T)=f_\equiv(F,F)=T$ and $f_\equiv(F,T)=f_\equiv(T,F)=F$. Show that A is a tautology if and only if each atomic proposition that appears in A appears an even number of times. I have managed to find a complicated proof using inductions and the fact that $\equiv$ is both commutative and associative but I don't believe this was the point of the exercise. Any help would be appreciated.


There is one room with a small hole in the floor, with arrows pointing to it and some kind of dust in the hole. What is this room? What does he "realize" here? What is the clue?

There was an octagonal room, with an octagon in the centre of the floor. In the centre there was some sand and dust, with arrows pointing towards the central point.    What was the importance of that room?


I am using Drag & Drop ListView on files (directories or any kind of files).  When i drag&drop My Computer or Bin from Desktop NullReferenceException happens.  All i want is to skip this element (display some text in log textbox or smthing). I have no idea how to achieve that. I don't know what kind of object is MyComputer element from Desktop.  Here's my code after cutting useless to this subject logic:  private void Directories_ListView_DragDrop(object sender, DragEventArgs e)     {          string[] DroppedDirectories = (string[]) e.Data.GetData(DataFormats.FileDrop,false); //array of dd files paths         try         {             foreach (var directory in DroppedDirectories) // here Exception  occurs this loop process all dragged and drop files              {                 ListViewItem Dir = new ListViewItem(Path.GetFileNameWithoutExtension(directory));                 //Place for some checking Logic                 if (GetDir.IsDirectory(directory))                 {                    (.....);// Doing some things                 }                 else                     LogList.Items.Add(DateTime.Now + ": Entry " + Dir.Text + " is not a directory");              }         }         catch(Exception) // it only stops app from crashing,          {             LogList.Items.Add(DateTime.Now + "One of elements was Mycomputer or Bin, process stopped ");         }     }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


So I was using the Knife Tool in Adobe Illustrator for cutting shapes. After doing so I realized that the shapes have a gap (line) between them. I need to save my document as a pdf and it has to be in vector form. I would like to know what do I have to change in my work in order to remove the gap between them. Thank you for your answer. :)

I have created a logo with pen tool in Illustrator but between lines (where they intersect with each other) there is a gap where it gets the color of the background.  Something like this:  (Black color is the background color) - As you can see where the paths join each other there is a kinda dotted black line. I Grouped them but still the same. I converted to jpeg just to be sure it is not only shown like that but same effect.   NOTE: I want to export that logo as SVG file type and use it in the WEB. I tried some solutions given like anti-aliasing in preferences or art optimize when saving for optimization. But still I have same problem. I want to get that logo in SVG and put it on the web where it will display clean without those strange gaps.  How can i get rid of this?


A few weeks ago my old English Teacher updated his word of the week and I can't remember the word only the definition; It was something along the lines of     'How real A fictional world or character feels to be .'   If Anyon

How do we refer to the act of resembling the truth, regardless if it is indeed the truth?  Some context: suppose you are watching a film and the story bears a striking resemblance to "real life". Perhaps you remember similar events from your own background or the story has a strong internal coherence. So you feel that the story could be true, even though you know it is fictional. Or, as the legend has it, when Michelangelo finished his "Pietà" and the sculpture seemed so "real" and "natural" to him, that he was amazed that the sculpture couldn't talk. One last example: you hear the promises of a politician in election campaign and he seems to be telling the truth, but of course you have no way to figure out, beforehand, if he is being honest or not.  The word "likelihood" comes to mind, but this word suggests some kind of numerical (even statistical) evaluation, which is akin to "probability". The word I am looking for describes the feeling you get, which leads to a subjective "binary" judgement (either it resembles the truth or not).  In Portuguese, such word is "verossimilhança" (from Latin verum, truth + similis, similar).


I have a datatable with several columns of strings. One column is "IPAddress". I want to sort the data table by the IP Address column. I've tried    DataView dv = dt.DefaultView; dv.Sort = "IPAddress asc"; dt = dv.ToTable();   But of course this produces a result  where, for example 10.1.1.203 comes before 10.1.1.21 instead of after.   There was a really clever solution here  but this works for lists, not datatables.   Edit: This is not a duplicate question, as the linked question is almost 10 years old and a lot has changed since then, and more importantly, the question does not specifically address the problem of IP address sorting which is very specific and unique problem.

I've got a report being built from a dataset. The dataset uses the Sort property to order the data. I know that I can create a sort expression like this:  "field desc, field2 asc"  But what I need now is a way to do a custom sort. In SQL, I can perform a custom sort by doing something like this:  order by      case when field = 'Some Value' then 0 end     case when field = 'Another Value' then 1 end   To basically re-define my sort (i.e, Some Value comes before Another Value).  Is it possible to do something similar as a sort expression against a DataView?


I have a Maya plugin and want to get events for timeChanges. However I need to pass a function that I don't want to be static, but this fail at compilation:  void MyClass::initializeCallbacks() {     MDGMessage::addTimeChangeCallback((MMessage::MTimeFunction) &timeChanged,this); }  void MyClass::timeChanged(MTime tim, MyClass* clientData) {     <Code> }   I then get the following compilation errors:  must explicitly qualify name of member function when taking its address   ...&timeChanged,this);      ^~~~~~~~~~~~       MyClass:: error: cannot cast from type 'void (MyClass::*)(MTime,       MyClass *)' to pointer type 'MMessage::MTimeFunction' (aka 'void       (*)(MTime &, void *)')   How can I properly pass a pointer of my function ?

I'm using an API that requires me to pass a function pointer as a callback. I'm trying to use this API from my class but I'm getting compilation errors.   Here is what I did from my constructor:  m_cRedundencyManager->Init(this->RedundencyManagerCallBack);   This doesn't compile - I get the following error:      Error  8 error C3867: 'CLoggersInfra::RedundencyManagerCallBack': function call missing argument list; use '&CLoggersInfra::RedundencyManagerCallBack' to create a pointer to member   I tried the suggestion to use &CLoggersInfra::RedundencyManagerCallBack - didn't work for me.   Any suggestions/explanation for this??  I'm using VS2008.  Thanks!!


Suppose we consider a point dipole i.e. an ideal dipole. At the origin the potential:  $$ \phi(\mathbf r) = \frac{1}{4\pi\epsilon_0} \frac{\mathbf p\cdot\hat{\mathbf r}}{r^2}$$  is undefined due to the $1/r^2$ term in the potential, but electric field:  $$ \mathbf E = \frac{1}{4\pi\epsilon_0}\frac{3(\mathbf p\cdot\hat{\mathbf r})\hat{\mathbf r} - \mathbf p}{r^3} - \frac{1}{3\epsilon_0}\mathbf p\delta^3(\mathbf r) $$  remains well defined. How can we calculate electric field at the origin by equation $\mathbf E=-\nabla\phi$?

I am a bit lost how one has deduced the formula for electric field with electric dipole because of some inconsistency between different sources. The  contains a delta function in the formula, but  gives only the formula without the delta function,  $$\bar{E} = -\nabla \phi = \frac{-p}{4\pi \epsilon_{0} r^{3}} ( \hat{e}_{z}-3\hat{u}_{r}(\hat{u}_{r} \cdot \hat{u}_{z}) ) $$  Is it intentionally left out?  My notes mention that the dipole is with a circular thing $P=Q d$ where $d$ is distance and $Q$ is charge.


Can anyone Explain what exactly is the use of the Macro Expansion In C or C++ Program.  # define UPPER 3 main() { int i; for(i=0;i<UPPER;++i) cout<<i; }   The same thing could be achieved using constants and making there scope global, then why do we use it, are they used just to increase the readability of the program?

The C preprocessor is justifiably feared and shunned by the C++ community. In-lined functions, consts and templates are usually a safer and superior alternative to a #define.  The following macro:   #define SUCCEEDED(hr) ((HRESULT)(hr) >= 0)     is in no way superior to the type safe:  inline bool succeeded(int hr) { return hr >= 0; }   But macros do have their place, please list the uses you find for macros that you can't do without the preprocessor.   Please put each use-cases in a seperate answer so it can be voted up and if you know of how to achieve one of the answers without the preprosessor point out how in that answer's comments.


I'm looking for any tips for making a meal with dried noodles without needing to actively cook them.  My problem is that the kitchen in my office has nothing, not even a microwave. It just has a hot water dispenser (not sure of the exact temperature, standard models generally dispense it at 94ºc so I would assume this one is the same).  I'm fine with salads and sandwiches, but sometimes I want something hot. A particular favorite is noodles, but whenever I have instant noodles I get terrible indigestion, probably because of all the terrible things that are in the flavor sachet (I actively avoid reading the ingredients for my own sanity).  I want to make my own similar thing adding my own spices/ ingredients, and also preferably vegetables, but it seems unreasonably expensive to buy lots of individual packets of instant noodles, and get rid of the flavor sachets to make my own.  I've tried searching on the internet, but all of the things I've found are cooking it inside a kettle (which isn't an option), or using a microwave (also not an option).  So are there any tips/ advice for cooking noodles (like dried egg noodles) simply with hot water?  More specifically, optimum noodle weight:water volume ratio, and amount of time they are left in the water before ready to eat.  If there are any other type of noodles that can be used for this specifically, egg noodles aren't required. I also don't mind if it ends up more like a soup, but I would rather there be as little liquid remaining as possible.

I saw a commercial on televison for preparing spaghetti without boiling the noodles, just place them in water for about on hour.  Can this be done?


My fiancee and I are trying to find a game that we can play together, and neither one of us is a strategy fan. The whole sandboxy aspect of Civ seemed like it might be a nice way to get our feet wet. The one issue is we tend to have conflicting schedules.  Is it possible to start a two player game, make a turn, then log out. Then she can log in, make her turn, and log out. Sort of like one would do with games like "Chess with friends"?   Or does it require that we both sit down and play a game from beginning to end? Can't seem to find an answer to this. Thanks!

The Civilization series of games is famous for having a way to play by e-mail. This allows people to take a long time on their turn without holding up the other players, as you do in a real-time game. Yet, I can not find any method to play by e-mail in the game menus. Does it exist? If so, how do you do it?


Can someone explain the origin of this symbol, and deconstruct the name "ampersand"? I vaguely recall my mother's saying she learned her alphabet (early 1920s) with this symbol being the "27th letter".

I’m sorry if this was asked a million times before, but neither Google nor the ELU site has helped me out.  I’m wondering:   What’s the reason behind introducing this character?  What’s the difference between it and and?


Recently I found myself in a state similar to that which @senator found himself . I too have been reading Dirac's Lectures on Physics and am particularly confused by the notion of Hamiltonians without classical analogues.  The way I understand it, at Second Quantisation one always starts with the classical Lagrangian to end up with the Quantum Mechanical Lagrangian and so within this capacity I do not see how each Hamiltonian cannot have a classical analogue.  Is this still the route taken to obtaining Hamiltonians which do not have classical analogues and if so what are some examples of this?  If it is the case that at each instance of finding a Hamiltonian one starts from a classical Lagrangian, is that not wrong given that Classical Mechanics is a subset of Quantum Mechanics.

I am now reading the quantum mechanics textbook by Dirac (chap. 4, $\S21$, p. 88).   He says that his quantization procedure does not include all possible systems in quantum mechanics and there are systems without a classical analogue.  How is this possible?


All round him the long scar smashed into the jungle was a bath of heat.   English is my second language, my first language is Spanish.  I don't understand this sentence at all. Please explain.

A line from William Golding's The Lord of the Flies:     All round him the long scar smashed into the jungle was a bath of heat.   Is it just me or does the sentence seem grammatically off?


So I need to be able to check for the word "view" in a sentence, without pulling it out of another word, and even if its the first word.  import re   if re.search(r"view", "interview"):     print "aw"                          #This cuts it out of the word "interview"  if re.search(r" view", "interview"):     print "aw"                          #This wont cut it out of another word, but                                      #doesn't work if "view" is the first word.  if re.search(r" view", "view"):     print "aw"                          #This just shows it wont work since its the first word.

Can a regular expression match whitespace or the start of a string?  I'm trying to replace currency the abbreviation GBP with a £ symbol. I could just match anything starting GBP, but I'd like to be a bit more conservative, and look for certain delimiters around it.  >>> import re >>> text = u'GBP 5 Off when you spend GBP75.00'  >>> re.sub(ur'GBP([\W\d])', ur'£\g<1>', text) # matches GBP with any prefix u'\xa3 5 Off when you spend \xa375.00'  >>> re.sub(ur'^GBP([\W\d])', ur'£\g<1>', text) # matches at start only u'\xa3 5 Off when you spend GBP75.00'  >>> re.sub(ur'(\W)GBP([\W\d])', ur'\g<1>£\g<2>', text) # matches whitespace prefix only u'GBP 5 Off when you spend \xa375.00'   Can I do both of the latter examples at the same time?


Given is a string variable elementOne.   def elemenOne = 'AB_CD_EF_GH'   The challenge is to extract only the 'AB', the first part of its value, only that which precedes the first underscore symbol (counted from the left to right).  I have written a code:  def elementTwo = (element_one =~ /^.*(?=(_))/)[0][0]   but it extracts 'AB_CD_EF' instead of only 'AB'.  How should I modify my code, in order to extract only 'AB' part from 'AB_CD_EF_GH'?  Thank you!

I have this gigantic ugly string: J0000000: Transaction A0001401 started on 8/22/2008 9:49:29 AM J0000010: Project name: E:\foo.pf J0000011: Job name: MBiek Direct Mail Test J0000020: Document 1 - Completed successfully  I'm trying to extract pieces from it using regex. In this case, I want to grab everything after Project Name up to the part where it says J0000011: (the 11 is going to be a different number every time). Here's the regex I've been playing with: Project name:\s+(.*)\s+J[0-9]{7}:  The problem is that it doesn't stop until it hits the J0000020: at the end. How do I make the regex stop at the first occurrence of J[0-9]{7}?


what this code means. why List = LinkedList  List<String> list1 = new LinkedList<String>(); List<String> list2 = new LinkedList<String>();

I have seen this mentioned a few times and I am not clear on what it means. When and why would you do this?   I know what interfaces do, but the fact I am not clear on this makes me think I am missing out on using them correctly.   Is it just so if you were to do:  IInterface classRef = new ObjectWhatever()   You could use any class that implements IInterface? When would you need to do that? The only thing I can think of is if you have a method and you are unsure of what object will be passed except for it implementing IInterface. I cannot think how often you would need to do that.   Also, how could you write a method that takes in an object that implements an interface? Is that possible?


I'm writing what should be a simple programme for an assignment that finds the ideal change to dispense, measured in the number of coins. My solution is to use a a while loop that keeps checking through coins and subtracting them from the customer change until change equals 0. However, I am getting stuck in an infinite loop and am completely stumped as to why.  Here is my code:  while (change > 0.0) {      for (int i = 0; i < numberOfCoins; i++) {          if ((change - coins[i]) >= 0.0) {             change = change - coins[i];             coinsTally[i] = coinsTally[i] + 1;             break;         }     } }   change is any value from 0.0 to 0.99, numberOfCoins = 6,   and coins[numberOfCoins] = { 0.5, 0.2, 0.1, 0.05, 0.02, 0.01}

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


How could I best write a hotkey script that opens an url in the webbrowser (firefox)?  Example:  ALT+G = www.google.de ALT+W = www.wikipedia.de   Or would I have to use some kind of existing software therefore?

I want to change the key bindings on some of the keys on my keyboard.  I want some to run commands and others to activate different keys.  What applications can I use to do this?      Index:       (from within System Settings)             I'm still looking for answers using dconf and any other method.


How is the  (or inclination) caused on Earth?

This titled position of the earths axis is known as inclination of the earths axis. The earth's rotation axis makes an angle of about 66.5 degrees with the plane of its orbit around the sun, or about 23.5 degrees from the perpendicular to the ecliptic plane  what is the scientific reason for the inclination of earth's rotation axis?   and what will happen if the inclination angel changed?


I've a USB 2.0 drive. Today while I coping some media files in the pendrive, I found that It stucked in middle. I'd wait for half an hour, it remains unchanged! I thought that this is may be problem with my pendrive. I tried with another pendrive and got the same result!! What can I do?

I was getting the usual 4-8mbps in 12.04 when copying files via usb sticks. However after upgrading to 12.10, I only get 200-300kbps when I try to perform the same operation.   I have tried different usb sticks (which work flawlessly on Windows 7) and still experience the same issue. I experienced the same issue sometime ago on 11.10 but everything was normal when I upgraded to 12.04 so it might be a kernel issue.  Here's the output of dmseg |tail:      mysterio@mysterio-HP-Pavilion-dv6700-Notebook-PC:~$ dmesg |tail   [  871.023093] sdb: sdb1  [  871.026909] sd 5:0:0:0: [sdb] No Caching mode page present  [  871.026920] sd 5:0:0:0: [sdb] Assuming drive cache: write through  [  871.026927] sd 5:0:0:0: [sdb] Attached SCSI removable disk  [ 1036.226206] ISO 9660 Extensions: Microsoft Joliet Level 3  [ 1036.233561] ISO 9660 Extensions: RRIP_1991A  [ 1086.342973] ISO 9660 Extensions: Microsoft Joliet Level 3  [ 1086.343010] ISO 9660 Extensions: RRIP_1991A  [ 1173.971357] ISO 9660 Extensions: Microsoft Joliet Level 3  [ 1173.971441] ISO 9660 Extensions: RRIP_1991A   I have updated my system with the latest updates. What could be wrong?


Keep getting a module error here, though I created the module

What is __init__.py for in a Python source directory?


suppose we have a bar magnet    |S_______________N| ... we can imagine it to be    |S-N-S-N-S-N-S-N|  So, why do we see the lines leave the north pole and enter the south pole externally?  What happens internally?

When I searched the net about magnetic field lines,  told something about contour lines and that magnetic materials placed along a magnetic field has some specific loci, which i did not understand. Can someone explain it to me in details.  Also how do we know that tangent to a magnetic field line gives the direction of magnetic field? I am very confused.


When I go to upgrade the system with apt-get upgrade the message appears: E: The package linux-hwe-5.4-headers-5.4.0-56 needs to be reinstalled, but I can't find an archive for it. I am a new user in Ubuntu, I need a step by step on how to solve it, please.

Running Synaptic I get the following error message:  E: The package hl1440lpr needs to be reinstalled, but I can't find an archive for it. E: Internal error opening cache (1). Please report.   Upon accepting the message, Synaptic quits.


Is there English term for fast food restaurant that have only small area for food preparation and counter (facing street) at which people order food and eat?  Here is a  of what I am referring to.   I found out later that in Blade runner screenplay they refer to this area as Noodle bar.

Is there a name for this kind of restaurant? Searching Google, I can't find any synonym of restaurant. I've tried to search for images of unluxurious restaurant, small restaurant or mundane restaurant, with no satisfactory result. The restaurant I'm looking for is small, not so clean and definitely not a place that high class people go to eat.  It can be a house:    Or lie on a side of the street:


Can anyone help me see why the fancyhdr package fails to display the header and footer while I typeset my file? I have all the correct file paths for the input commands. Also, there is no error detected by my typesetting tools. I can't find a reason my document cannot display a header and a footer.  I'm using Texpad 1.8.7 on a MacOS Mojave 10.14.6. I've installed the full version of the MacTeX and I have double checked that I have the fancyhdr package installed in the right place. Can anyone help?   My code is as follows:   \documentclass[12pt, twoside]{report} \usepackage[utf8]{inputenc} \usepackage{graphicx} \graphicspath{ {/Users/siyang/Desktop/Images/} } \usepackage[a4paper,width=150mm,top=25mm,bottom=25mm,bindingoffset=6mm]{geometry} **\usepackage{fancyhdr}** **\pagestyle{fancy}**  \title{ {Social Strain and Delinquency}\\ {\large The University} } \author{me} \date{January 1, 2020}  \begin{document}  \maketitle  \chapter*{Abstract} Abstract goes here  \chapter*{Dedication} Dedication goes here  \chapter*{Declaration} I declare that..  \chapter*{Acknowledgements} I want to thank... \end{document}

I have a problem with the fancy package: I use the report documentclass and I have a chapter, a lot of text and then a new page starting with a section (or the next page has no chapter starting on that particular page).  The problem be, that what I defined for my header and footer is NOT on the chapter-page but only on the non-chapter page. How come? What did I miss?  Minimal example:  \documentclass[]{report}  \usepackage{lastpage} \usepackage{fancyhdr} % for use of \pageref{LastPage}  \fancypagestyle{IHA-fancy-style}{% \fancyhf{} %Clear header and footer \fancyhead[LE,RO]{\slshape \rightmark} \fancyhead[LO,RE]{\slshape \leftmark} \fancyfoot[C]{\thepage of \pageref{LastPage}} %Custom footer \renewcommand{\headrulewidth}{0.4pt} %Line at the header visible \renewcommand{\footrulewidth}{0.4pt}} %Line at the footer visible  \title{A short example}  \begin{document}  \maketitle \tableofcontents  \pagestyle{IHA-fancy-style} \chapter{A chapter} Look at the footer  \newpage \section{A section} Look at the footer  \end{document}   Take notice: No line on page 2 at the bottom - a line on page 3 at the bottom.  Any clues?


I'm having trouble working out how to differentiate expressions that have both division and square roots in them such as:  $$\frac{2x}{\sqrt{x^2+7}}$$  if someone could show me the necessary process that would be great.

I would really appreciate an explanation of the steps needed to differentiate expressions such as:  $$\sqrt{\frac{1-2x}{1+2x}}$$  $$\frac{2x}{\sqrt{x^2+7}}$$  $$\frac{5}{2+\sqrt{1+3x}}$$  I've been stuck on questions like these for a while and I can't seem to get my head around them.


I am having a hard time understanding why the 1/cosine term does not change to lets say cosine theta squared? Can someone explain why?

I can not see how mathematically one can divide the numerator and denominator by theta. Can some one explain this in a different way. When you divide two fractions you multiply the first fraction by the reciprocal of the second. This is not the case here.     Divide numerator and denominator by $\theta$. ($\sin\theta$ also works.) $$\eqalign{\lim_{\theta\to0}\dfrac{\sin\theta}{8\theta+\tan\theta}&= \lim_{\theta\to0}\dfrac{\dfrac{\sin\theta}\theta}{8+\dfrac{\sin\theta}\theta\cdot\dfrac1{\cos\theta}}\\&=\dfrac{\lim\limits_{\theta\to0}\dfrac{\sin\theta}\theta}{8+\lim\limits_{\theta\to0}\dfrac{\sin\theta}\theta\lim\limits_{\theta\to0}\dfrac1{\cos\theta}}\\&=\dfrac1{8+1\cdot1}\\&=\dfrac19.}$$


A Ethernet cable has 4 pairs of data lines. In normal conditions only two pairs are used, one as a Tx pair and another as Rx pair. So two pairs are left unused. Is it possible to make use of these 2 pairs to carry another independent connection?  Of course I am expecting some obstacles. Maybe it will lead to a lot of noise and subsequent signal degradation. Can this be avoided by using a different color code?  It should be noted that I am not using Gigabit hardware. I just have 10 Mbps. So if I give this a try, will my connection speed be further reduced?   Another reason why this solution will be great is because I have only one power outlet in my room.

I got this cable with a homeplug AV 200 device - its labelled cat 5e    But looking at the plug end has me rather dubious about it.   (There's only 4 strands there, not the standard 8 - and missing pins, so I suspect these cables are designed to do so. The wire jacket is also surprisingly loose).  Another angle. This isn't a standard connector, no, someone has went and made a non standard connector specifically for this    I figured the cable was crap so I cut into it - some of you were wondering if they had merely left out the additional pairs - and the answer is no - its basically half a cat 5 cable.    I'm currently using it for some legacy equipment that runs on fast ethernet and the plug it came with and it seems to work. However, I'm curious - what're the downsides of such a cable? What do I need to look out for? In what situations would this cat-5 cable be unsuitable for use in anything other than a ethernet cat o'nine tails?


The command df . can show us which device we are on. For example, me@ubuntu1804:~$ df . Filesystem     1K-blocks    Used Available Use% Mounted on /dev/sdb1       61664044 8510340  49991644  15% /home  Now I want to get the string /dev/sdb1. I tried like this but it didn't work: df . | read a; read a b; echo "$a", this command gave me an empty output. But df . | (read a; read a b; echo "$a") will work as expected. I'm kind of confused now. I know that (read a; read a b; echo "$a") is a subshell, but I don't know why I have to make a subshell here. As my understanding, x|y will redirect the output of x to the input of y. Why read a; read a b; echo $a can't get the input but a subshell can?

Why do I get different values for $x from the snippets below?  #!/bin/bash  x=1 echo fred > junk ; while read var ; do x=55 ; done < junk echo x=$x  #    x=55 .. I'd expect this result  x=1 cat junk | while read var ; do x=55 ; done echo x=$x  #    x=1 .. but why?  x=1 echo fred | while read var ; do x=55 ; done echo x=$x  #    x=1  .. but why?


The input $filetype is the file extension, so if we say it's PHP $def should be equal to "Web". But the output is just "Image" no matter what filetype is in the input.  $filetype = "PHP"; switch(strtolower($filetype)) {     case ("jpeg" || "jpg" || "png" || "ico" || "gif" || "svg" || "ps" || "psd" || "tif" || "tiff" || "ai" || "bmp"):         $def = 'Image';         break;     case ("aif" || "cda" || "mid" || "midi" || "mp3" || "mpa" || "ogg" || "wav" || "wma" || "wpl"):         $def = 'Audio';         break;     case ("7z" || "arj" || "deb" || "pkg" || "rar" || "gz" || "tar.gz" || "z" || "zip"):         $def = 'Archive';         break;     case ("bin" || "dmg" || "iso" || "toast" || "vcd"):         $def = 'Disc';         break;     case ("csv" || "dat" || "db" || "dbf" || "log" || "mdb" || "sav" || "sql" || "tar" || "xml"):         $def = 'Data';         break;     case ("apk" || "bat" || "cgi" || "pl" || "com" || "exe" || "gadget" || "jar" || "py" || "wsf"):         $def = 'Executable';         break;     case ("fnt" || "fon" || "otf" || "ttf"):         $def = 'Font';         break;     case ("asp" || "aspx" || "cer" || "cfm" || "css" || "htm" || "html" || "js" || "jsp" || "part" || "php" || "rss" || "xhtml"):         $def = 'Web';         break;     case ("key" || "odp" || "pps" || "ppt" || "pptx"):         $def = 'Presentation';         break;     case ("c" || "class" || "cpp" || "cs" || "h" || "java" || "sh" || "swift" || "vb"):         $def = 'Programming';         break;     case ("ods" || "xlr" || "xls" || "xlsx"):         $def = 'Spreadsheet';         break;     case ("3g2" || "3gp" || "avi" || "flv" || "h264" || "m4v" || "mkv" || "mov" || "mp4" || "mpg" || "mpeg" || "rm" || "swf" || "vob" || "wmv"):         $def = 'Video';         break;     case ("doc" || "docx" || "odt" || "pdf" || "rtf" || "tex" || "txt" || "wks" || "wps" || "wpd"):         $def = 'Document';         break;     default:         $def = ''; } echo $def;   How do i get the correct $def output from the switch?

Is there a way of using an 'OR' operator or equivalent in a PHP switch?  For example, something like this:  switch ($value) {      case 1 || 2:         echo 'the value is either 1 or 2';         break; }


I am fairly new to Ubuntu and I am loving it!  But I don't quite understand the difference between the shell and the terminal. Can any one explain?  Someone told me that a terminal is just a "tool" to view the shell, akin to using a browser like Firefox or Chrome to "view" the web.   Is his analogy correct? Also what is the default shell of Ubuntu? Bash, tcshell, or something else?

I'm confused with the terminology. What is the difference between shell, console, and terminal?


I am working on a document with a colleague and we have different versions of PGF/Tikz installed -- I have version 3 and he has version 2.10.  This is causing a problem for compilation on our two platforms because the syntax for defining matrices in tikz changed slightly from version 2.1 to 3.0.  (See: )  What I would like to do is add code at the beginning of my document which checks the version of pgf/tikz that is being used at compilation. Based on that, I want certain blocks of code to be executed which matches the proper syntax for that version.  Is this possible?

Is there a LaTeX command for printing the versions of the currently installed packages? I need to know the installed version of the pgfplots package.


We have some laptops which go out to end users when they need to go to events however a few users seem to then go an unpin everything from the taskbar which makes my life a little frustrating when it comes to doing a health check and clean up afterwards  Is there like a local policy I could set on the machines that would prevent from items from being unpinned on the taskbar?

When right clicking an icon on the taskbar Windows displays a small menu. This always contains a button to pin/unpin the application on the taskbar.    I frequently use this menu to open new windows of applications and often accidentally hit the pin/unpin button. Since I do not frequently change the applications which are pinned to my taskbar I do not really need these buttons to be there all the time.  Is there a way to hide these buttons so that I can no longer hit them by accident?


I am trying to upgrade to a new release version following the instructions of the accepted answer .   Someone mentioned in the comments section of the OP's question that you should change http://old-releases.ubuntu.com/ubuntu/ to http://us.archive.ubuntu.com/ubuntu/ so that's what I did. The current state of my sources.list file is as shown below.      When I try to run sudo apt-get update && sudo apt-get dist-upgrade, I get   Ign:1 http://us.archive.ubuntu.com/ubuntu disco InRelease Hit:2 http://packages.microsoft.com/repos/vscode stable InRelease                                                             Ign:3 http://us.archive.ubuntu.com/ubuntu disco-updates InRelease                                                             Hit:4 http://dl.google.com/linux/chrome/deb stable InRelease                               Hit:5 https://repo.skype.com/deb stable InRelease                                          Ign:6 http://us.archive.ubuntu.com/ubuntu disco-backports InRelease                        Hit:7 http://ppa.launchpad.net/bit-team/stable/ubuntu disco InRelease Ign:8 http://us.archive.ubuntu.com/ubuntu disco-security InRelease Err:9 http://us.archive.ubuntu.com/ubuntu disco Release                               404  Not Found [IP: 91.189.91.39 80] Err:10 http://us.archive.ubuntu.com/ubuntu disco-updates Release                      404  Not Found [IP: 91.189.91.39 80] Err:11 http://us.archive.ubuntu.com/ubuntu disco-backports Release   404  Not Found [IP: 91.189.91.39 80] Err:12 http://us.archive.ubuntu.com/ubuntu disco-security Release   404  Not Found [IP: 91.189.91.39 80] Ign:13 http://ppa.launchpad.net/pmcenery/ppa/ubuntu disco InRelease Err:14 http://ppa.launchpad.net/pmcenery/ppa/ubuntu disco Release   404  Not Found [IP: 2001:67c:1560:8008::15 80] Reading package lists... Done E: The repository 'http://us.archive.ubuntu.com/ubuntu disco Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://us.archive.ubuntu.com/ubuntu disco-updates Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://us.archive.ubuntu.com/ubuntu disco-backports Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://us.archive.ubuntu.com/ubuntu disco-security Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details. E: The repository 'http://ppa.launchpad.net/pmcenery/ppa/ubuntu disco Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.   What should I do?

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


I have forgotten my Galaxy A7 2016 running android 5.1.1's password. How do I open my phone without losing my files in device storage?

I upgraded my Moto G2 to Android Lollipop using over-the-air upgrade. It was awesome but I set a pattern lock which I forgot. Usually after 5 wrong attempts it shows the "forgot password" button but it is not showing that button even after 100 wrong attempts. How to unlock the phone?


I am doing video classification with a model combining CNN and LSTM. In the training data, the accuracy rate is 100%, but the accuracy rate of the test data is not so good. The number of training data is small, about 50 per class. In such a case, can I declare that over learning is occurring? Or is there another cause?

Can anyone tell me how to judge if a supervised machine learning model is overfitting or not? If I don't have an external validation dataset, I want to know if I can use ROC of 10 fold cross validation to explain overfitting. If I have an external validation dataset, what should I do next?


I am attempting to write a script that automates the installation of ports/packages on new FreeBSD installs.  To do this, the user who executes the script must be root.  The system is "supposed" to be virgin meaning bash and sudo may or may not be installed; so I am trying to account for it.  To do this, I am checking if the user ID equals 0.  The problem is, between bash and sh, the environment variables are different:   bash -> $EUID (all caps) sh -> $euid (all lower)   Is there a different way other than the environment variable to check for root user or should I just adjust the checking of the user based on environment?

Here's my source:  #!/bin/bash  echo "Running script to free general cached memory!" echo ""; echo "Script must be run as root!"; echo ""; echo "Clearing swap!"; swapoff -a && swapon -a; echo ""; echo "Clear inodes and page file!"; echo 1 > /proc/sys/vm/drop_caches; echo "";   It clears caches and stuff, and it echoes that it needs to be run as root in the terminal. I basically just want the script to cease running if it detects it's not being executed as root.   Example:  "Running script to free general cached memory!" "Warning: script must be run as root or with elevated privileges!" "Error: script not running as root or with sudo! Exiting..."   If run with elevated privileges, it just runs as normal. Any ideas? Thanks!


I have been trying to do this setup right but it just doesn't work as I would wish to. First thing, I'm legacy, bios and have MBR so number of max partitions is 4. I already have 4 so it displays the 5th one I created for ubuntu as "unusable". So my goal is to take a partition from the second drive (Disc D) and install Ubuntu there. I tried the MBR to GPT conversion, seems like my laptop doesn't support it, which is weird since it's not that old of a laptop (Dell Inspiron 5559) Any help?

Whenever I startup from the LinuxLive USB, and try to install Ubuntu 12.04, it only gives me two options instead of the usual 3 or 4. My options are "Replace Windows 7 with Ubuntu" and "Something Else". Whenever I go into "Something else", it looks extremely confusing. How do I install it side-by-side while using the "Something else" section? These are my partitions.   /dev/sda /dev/sda1 ntfs (104Mb, System Required Partition) /dev/sda2 ntfs (1000097Mb, Windows 7 Partition)   Or should I try reinstalling my installer on a CD rather than USB and maybe then it will have the "Install alongside" function?


I try to delete the .Trash-1000 folder of my USB stick however I can't do it. I get the following error and when I click on delete it just crashes and does nothing else.

Can someone tell me what the .Trash-1000 folder is and how can I remove/delete it?  It taking up 275 gigs of disk space.


I'm curious why there is a 2 GB limit for a 32-bit process on a 32-bit OS. According to the blog post , the limit can be extended to 3 GB, but the question remains.  I see that the physical limit is 4 GB, so are 2 or 3 GB just hard coded in Windows? Why not 4 GB as a 32-bit process might have on a 64-bit OS?  NOTE: This question was marked as a duplicate, but the referenced question refers to the 4 GB limit of the 32-bit address space. This is NOT what I am asking. I am specifically asking why Windows limits processes to 2 GB -- even on a 32-bit platform. The accepted answer mentions it, but it doesn't explain why.

Possible Duplicate:             As you can see in , all versions of x86 Win 7 max out at 4Gb.  Is there a technical reason for this or is this just a marketing strategy to get people to buy a more expensive OS?


For a function $\|\cdot\|$ to be a norm, it must satisfy the following: Let $X$ be a vector space over the field $F$. For any $x, y\in X$ and $r\in F$ N1) $\|x\|\geqslant 0$ N2) $\|x\|=0 \rightarrow x=0$ N3) $\|rx\|= |r|\cdot ||x||$ N4) $\|x+y\|\leqslant \|x\| +\|y\|$ We let $X$ and $F$ in this case to be the set complex numbers $\mathbb C$ I managed N1) to N3) but N4) the triangular inequality just doesn't seem to work for modulus of a complex number, how can I show this?

I was wondering how to prove the triangle inequality with complex numbers:  Verify that the function $d(z_1, z_2)$ is a distance funtion on $\mathbb{C}$ and also on any subdomain on $\mathbb{C}$.  I finished all but the inequality, which is what I need assistance with. I don't know how to prove the distance function inequality:  $d(z_1, z_3) \le d(z_1, z_2) + d(z_2, z_3) $


I've started making home lemonade recently and all the recipes boil about one cup of sugar in one cup of water. I never questioned that until my father saw the process and asked why don't I just add water and sugar to lemon juice or add boiling water to the pitcher with lemon juice and sugar and I couldn't really tell, I just knew the sweetness was greater in my experience.

On a hot summer day and with a basketful of lemons I often want a nice cold glass of lemonade. A lot of recipes suggest making lemonade with simple syrup, which requires cooking, whereas other recipes just have stirred-in sugar.  What exactly are the benefits of making lemonade (or limeade) with simple syrup versus just stirring in sugar?


I have my files synced with ubuntu-one. But as the service will be closed, I need to download the files. I installed 14.04 and my previous documents were deleted.In 14.04 , there is no ubuntu-1 app, so I can't really do anything. what should I do to download the files. In the site I see only the message I don't see any option to download, everywhere its the same message The service has been discontinued . no download options.  Here is a screenshot after I use the files () link:

I need to restore my documents and folders, since the installation of 14.04 reformatted my harddisk.  I can sign in to Ubuntuone, but I see no way to make it restore the files to my harddisk.


I'm unable to open a folder in cmd. The folder name has a space  The script that I'm working on is  start D:\My Data   which does not work. However start D:\MyData seems to work  but I need the space in the folder name...  start "D:\My Data" just opens another cmd window:

I'm trying to use the start command in the command prompt to open files and folders, but I'm unable to open files and folders that contain space(s) in their name.  I have tried the following queries (testing on C:\Program Files):  start C:\Program Files start C:/Program\ Files start C:/"Program Files" start C:\"Program Files" start "C:\Program Files" start "C:/Program Files" start C:/Program_Files start C:/Program%20Files   But none of them work.


Given two questions:  A) An existing question with some answers B) A (new) different question  Given also that the auto-generated dupe text reads:  This question already has an answer here:  (9 answers)  which can be true even if the duplicate question is a completely different question. If:  there is a valid answer to A) that is also a valid answer for B) but A and B are asking different questions there are other (possibly better) answers to B (that wouldn't answer A)  should B be closed as a dupe of A? Let me give an example to illustrate: Question A: "How do I concatenate n copies of a string"? Question B: "How do I create a stream of n copies of an object and reduce the stream to one final object? One way to accomplish A is to use a stream of n copies of a string and reduce the stream by joining, which happens to also answer B. So, "This question already has an answer here" would be true. But clearly the questions are not duplicates of each other, and there are many ways to answer both, so "close as a duplicate" seems inaccurate. There is a disconnect between the auto-generated message and the questions actually being duplicates. This has led some users to follow the message and close as dupe, despite the two questions not being duplicates. Questions: Should the question be closed as a dupe anyway? If not, should the auto-generated text be changed to something more accurate, eg "This question has been asked and answered here", so encourage closing as dupe be done when it's actually a dupe?  Update: The close dialog gives the following description for the "duplicate of" reason:  This question has been asked before and already has an answer.  So the intention is clear and what I expect from the reason, so can we tune the auto-generated text please?

In other words, should we now look at the content of the answers when we are evaluating questions for possible duplication?  Is it sufficient to say "Your answer can be found in this question over here, therefore your question is a duplicate?"  The new guidance is here:    Among other things, it describes the new close banner:     This question already has an answer here:   Link to the Duplicate Question   ... which seems to suggest that, if some other question in the system answers the OP's question, then the OP's question can be closed as a duplicate on that basis (even if the question itself is not necessarily duplicated).  Example Here:    Note the comments below the question, where I dispute the assertion made there that it is a duplicate question.  The original question doesn't mention unit testing.


I have loaded the sp library in R and the rds file for a specific country (see ), now how can I extract the list of coordinates from this object?  When I ask for the names of the object, the result is:   [1] "OBJECTID"      "ID_0"          "ISO"           "NAME_ENGLISH"  "NAME_ISO"       [6] "NAME_FAO"      "NAME_LOCAL"    "NAME_OBSOLETE" "NAME_VARIANTS" "NAME_NONLATIN" [11] "NAME_FRENCH"   "NAME_SPANISH"  "NAME_RUSSIAN"  "NAME_ARABIC"   "NAME_CHINESE"  [16] "WASPARTOF"     "CONTAINS"      "SOVEREIGN"     "ISO2"          "WWW"           [21] "FIPS"          "ISON"          "VALIDFR"       "VALIDTO"       "POP2000"       [26] "SQKM"          "POPSQKM"       "UNREGION1"     "UNREGION2"     "DEVELOPING"    [31] "CIS"           "Transition"    "OECD"          "WBREGION"      "WBINCOME"      [36] "WBDEBT"        "WBOTHER"       "CEEAC"         "CEMAC"         "CEPLG"         [41] "COMESA"        "EAC"           "ECOWAS"        "IGAD"          "IOC"           [46] "MRU"           "SACU"          "UEMOA"         "UMA"           "PALOP"         [51] "PARTA"         "CACM"          "EurAsEC"       "Agadir"        "SAARC"         [56] "ASEAN"         "NAFTA"         "GCC"           "CSN"           "CARICOM"       [61] "EU"            "CAN"           "ACP"           "Landlocked"    "AOSIS"         [66] "SIDS"          "Islands"       "LDC"     Am I wrong to assume the list is among one of these?

I want to do something relatively simply but it seems to be very difficult to do, though I am very new to using R for spatial data so apologies if I've missed something obvious.  I have a list containing 161 shapefiles of bird distributions in the world, they are each in the format of a SpatialPolygonsDataFrame. I also have world climate data in a raster stack format for 8 variables. Both sets of files are in the same projection (lat and long WGS84). I want to create new columns for the climate data with 1's where the species polygon overlaps with the climate data and 0 where it doesn't. I tried various functions to do this, quite a few initial options didn't work, the best option appeared to be:  pnt.in.poly(XY coordinates of climate data points, XY coordinates of species polygon)   I changed my raster of climate data into points to get the XY coordinates. I unified the polygons for each species shapefile and then used:  species@polygons[[1]]@Polygons[[1]]@cords   to get the coordinates for my species polygons as a matrix. However, I discovered that:  species@polygons[[1]]@Polygons[[1]]@coords    wasn't actually getting all the coordinates of the polygons only some of them.  I tried using fortify from the ggplot package, and it gives me a dataframe with coordinates but some of them are for holes in the polygons. I ran that with the pnt.in.poly function excluding the holes but it took an hour to run and when I looked at the output maps after it matched for some of the range but not all of it- there were holes in the distribution where there shouldn't be holes.   I also tried this method that I found somewhere else:  lonlat <- lapply(slot(species, "polygons"), function(x) lapply(slot(x,"Polygons"), function(y) slot(y, "coords")))    which gives me a list with 436 items- but I'm still not sure how to get the coordinates into a matrix form that will work in pnt.in.poly.  I'm sure this should be easier to do! Does anyone know a better way?


Today I down voted a question on "StackOverflow" for the first time. The user I down voted had a reputation of 1(this means that this user can't take revenge even if it were offended). From that time onwards someone has been down voting the Questions I have asked and the answers I have given. Even the very old ones. Can this be a ripple of my Down Vote. How can I stop this guy or girl. I am quite worried.

I just noticed that I lost a bunch of points from my reputation score, and I used the "reputation" tab on my user profile page to try and track down the cause.  During my investigation, I noticed there was an unusual event of type "reversal". In the normal place of a question title, it says "voting corrected".     What does this mean, and what caused it?  Did I do something wrong? Why did I lose all of that reputation? Is the system punishing me for leaving too many good answers?  Is there any way to earn it back?


I can't figure out why this simple math does not work. Maybe something about PHP and numbers I am not getting?  $step=1.0;  $step+=0.1;  $substep=$step-(int)$step;  echo gettype($substep);  echo $substep;  if ($substep==0.1) {       echo "should be here";  } else {      echo "but I end up here";  }      OUTPUT: double0.1but I end up here

Consider the following code:   0.1 + 0.2 == 0.3  ->  false   0.1 + 0.2         ->  0.30000000000000004   Why do these inaccuracies happen?


I'm always confused when it's correct to use "Me" and when it's correct to use "I"?   Can I always replace "I" by "me" (not opposite)?  Some examples:  "Me and you went together there"  "I and you went together there"   For the moment I'm using me just in the end of the sentence or when I'm talking about me and someone else together. But I sometimes hear people that replace the two pronouns. Maybe here I'll solve the problem and I'll Know what is the correct way.

I still have problems to figure out when it's right to use I or me in an answer.  For example, what is the right answer to "Who did this?"  If I did it, should I say I or me? I've heard native speakers using both. Is there a rule?   And what are some examples when to use me, and when I?


Almost a decade ago now, somebody asked about this:   All the replies to that question/bug report are of a very hostile kind.  Why has this bug not been fixed for this long? One of the replies appears to be mentioning that it has been fixed, but it has not, as of today, 2019-08-20.  What gives? A site as "polished" (over-engineered, one might say) as this really has no excuse whatsoever to let such a bug be for 10 years after it was pointed out.  PS: No, I'm not making some kind of "joke". I'm serious.

It looks like the new question statistics underneath the question title introduced a pluralization issue with views:        To be clear here, this was not an issue with the old sidebar-based question statistics; that used to properly say "viewed 1 time".


Today I'm checking the system processes. I checked the System Idle Process and it said it started a day ago. How?? Last night my computer is off, without power. How did it start a day ago? Last night my computer is shut down, powered off and unplugged from the power socket. Anyone can tell what is going on?

What I found in the event log is some information that apparently the system was reactivated from standby mode, but I definitely shut the system down regularly. This happens all the time. What is it, some faulty ACPI config?


Some strange problem occurred to me, when writing a report. I found some similar questions but none of the solutions work for me. Until today, my bibliography worked fine, today everything crashed. I was working with biber but I can not get it working anymore, so I had to switch to bibtex now. Here is my MWE: main.tex: \documentclass[a4paper,11pt]{article}  \usepackage[     backend=biber, % or bibtex     style=phys,     sorting=none, ]{biblatex} \addbibresource{references.bib}  \begin{document}  Hi there, this is me.~\cite{Nobody06}  \printbibliography \end{document}  and the references.bib: @misc{ Nobody06, author = "Nobody Jr", title = "My Article", year = "2006" }   I am using VScode and its recipes (pdflatex-bibtex-pdflatex x2 or latexmk). When using biber as a backend I get undefined references error, while when using bibtex I just get Using fall-back BibTeX(8) backend: (biblatex) functionality may be reduced/unavailable. warning but it compiles successfully. The strangest thing is that both options works fine on overleaf. When I try to compile it by hand in the command line pdflatex main and then biblatex main I still get undefined references. When doing biber main I get Cannot find 'main.bcf', so I am wondering which is the correct combination? Relevant versions: pdfTeX 3.14159265-2.6-1.40.21 (TeX Live 2020) BibTeX 0.99d (TeX Live 2020) kpathsea version 6.3.2 biber version: 2.15

I am on a Mac with MacTex 2020 and ran into a strange problem with Biber. Working on a document all was fine, I did not change the bibliography (says my git) and only fixing typos (not even adding cites) and suddenly latexmk stopped working after a Biber run, while that looked like  INFO - This is Biber 2.14 INFO - Logfile is 'doc.blg' INFO - Reading 'doc.bcf' INFO - Found 31 citekeys in bib section 0 INFO - Processing section 0 INFO - Globbing data source 'literature.bib' INFO - Globbed data source 'literature.bib' to literature.bib INFO - Looking for bibtex format file 'literature.bib' for section 0 INFO - LaTeX decoding ... INFO - Found BibTeX data source 'literature.bib'   so harmless in my view. Then with --debug I additionally get in the end.  INFO - LaTeX decoding ... warning: overriding existing definition of macro "jun" warning: overriding existing definition of macro "jul" warning: overriding existing definition of macro "sep" warning: overriding existing definition of macro "jan" [...] warning: overriding existing definition of macro "nov" INFO - Found BibTeX data source 'literature.bib' Unicode::UCD: failed to find unicore/version in /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc/lib /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc CODE(0x7fd026aeb5a8) CODE(0x7fd026aebb90) at /var/folders/hm/gt63cn0j2r7bwbzw7c1hww1r0000gn/T/par-626572676d616e6e/cache-2f8a664c3c933a44d096bcc8d018a5e92bced897/inc/lib/Biber/Input/file/bibtex.pm line 1011.   It seems unrelated to the library itself since deleting a few entries (going through deleting one half, then the other), the problem persists. It does not happen for an empty literature, but as soon as a first entry is added (just author/journal/title/year/volume/pages - no utf8-only chars) this error message appears.  what does this last error message mean?  How can I solve this?


I want to copy all elements of ArrayList to the back of the ArrayList. For example, in my ArrayList, there are {1,2,3,4} and I want it to be like this --> {1,2,3,4,1,2,3,4}. How do I do it?        for (int pos = 0; pos <  hand.size (); pos ++)        {            hand.add (hand.get(pos));        }   This gives me an error saying out of memory... Is there any way to make it work?  Thank you

How do I append the contents of one list at the end of another list?


i have my microsoft account setup. Now how can i make use of it to access my onedrive files. It doesnot show up in nautilus.. Where can i access those documents?

I am using Ubuntu 14.04. How can I sync my OneDrive account on Ubuntu 14.04? I know that OneDrive is a Microsoft cloud storage service and that Linux is not  supported. But there is a a tool called "OneDrive-D".  How can install and use "OneDrive-D"?


This just feels wrong.  My professor is claiming that .999... = 1 with the following proof:  $x = .999\dots$  $10x = 9.999\dots$  $9x = 10x - x = 9.999\dots = 9$  $x = 1$  Is this actually correct and I'm just going crazy?

I'm told by smart people that $$0.999999999\ldots=1$$ and I believe them, but is there a proof that explains why this is?


The question itself is relatively simple.   If I call System.schedule(String jobName, String cronExpression, Object schedulableClass), what is the maximum length for a scheduled jobname parameter?  The answer wasn't immediately apparent in the System class .  As an aside, I'm asking because I've run into a scenario where I need to go to extra lengths to ensure the scheduled job name is unique.   The current code I have takes into account the time when the job was scheduled. However, I've run into a scenario where a subscriber org has spun up all 50 Queueable jobs in one transaction. When each job runs it is trying to schedule another class to run. Depending on the exact timing, some of those resulting jobs end up with the same name. Exceptions are thrown. Jira tickets are raised.  Short of having the  available in Apex to ensure uniqueness I'll need to burn some more characters in the job name. I just need to know how many characters I have to work with.

Apex class and trigger names can be up to 40 characters long.  That got me thinking...    How long can an Apex identifier (variable) name be?


I displayed some Russian words on HTML and it showed like following.     ГђВџГђВѕГђВ»ГђВЅГ‘В‹ГђВ№ ГђВєГђВ°ГђВґГ‘ВЂ   The result is:     Полный кадр   I tried to convert the original string to UTF8 and displayed in HTML. I showed like above.  Some information:     store field collation: latin1_swedish_ci   The sql result is :      ÐÐ¾Ð»Ð½ÑÐ¹ ÐºÐ°Ð´Ñ   I queried the database and get the value. And then convert to utf8:  mb_convert_encoding($value, 'utf-8', 'windows-1251');   Could you please take a look at this link. Someone fixed it:  http://stackoverflow.com/questions/13765242/need-help-determining-encoding-of-the-text   The problem is I'm rebuilding a website. Some data is from old website. And I cannot input it manually because It's a lot. So I wrote a php script to get data from the old website and inserted to my new website. The old website display russian in HTML perfectly. But I didn't code it, and I cannot see his code. I already check the data between old table and new table. It's the same.

I'm setting up a new server and want to support UTF-8 fully in my web application. I have tried this in the past on existing servers and always seem to end up having to fall back to ISO-8859-1.  Where exactly do I need to set the encoding/charsets? I'm aware that I need to configure Apache, MySQL, and PHP to do this — is there some standard checklist I can follow, or perhaps troubleshoot where the mismatches occur?  This is for a new Linux server, running MySQL 5, PHP, 5 and Apache 2.


How  can  i  prove  that :  $$\binom{n}{0}^2+\binom{n}{1}^2+\binom{n}{2}^2+\cdots+\binom{n}{n}^2=\binom{2n}{n}$$  i tried to prove it : by   $$\binom{2n}{n} = \frac{(2n)!}{n!n!} = \frac{2^n (1\cdot3\cdot5\cdots(2n-1))}{n!}$$  but i can’t  take advantage of it.

I have to prove that: $$ \binom n 0 ^2  + \binom n 1 ^2  + \dots + \binom n n ^2 = \binom { 2n} n $$  I don't want a complete solution, but only a hint.


I want to reformat a SanDisk Cruzer Edge USB flash drive but it appears read-only:  $ sudo dd if=/dev/zero of=/dev/sdg dd: failed to open ‘/dev/sdg’: Read-only file system   I checked the readonly status with hdparm:  $ sudo /usr/sbin/hdparm /dev/sdg SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 14 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  multcount     =  0 (off)  readonly      =  0 (off)  readahead     = 256 (on)  geometry      = 1017/124/62, sectors = 7821312, start = 0   The readonly flag displays off but that I still cannot write to the drive. How do I solve this?    After running dosfsck on the device I get this output:  $ sudo /usr/sbin/dosfsck /dev/sdg fsck.fat 3.0.22 (2013-07-19) Logical sector size (1766 bytes) is not a multiple of the physical sector size.

When I plug in my USB flash drive, it shows up on my computer as write-protected or read-only. I am unable to transfer data to it, nor can I modify or delete any files already stored on it. I also cannot repartition or reformat the drive using Windows Disk Management, DiskPart, GParted, or other tools. The drive does not have a write-protect switch.  Why did this happen and what can I do about it? Is there a way to remove the write protection?  (Note that this can happen with some memory cards, too, as they often use controllers similar to those used in flash drives. In some cases, the system may report that the drive or card was formatted successfully even though it was never actually formatted; the original data reappears when the device is reinserted.)     This question comes up often and the answers are usually the same. This post is meant to provide a definitive, canonical answer for this problem. Feel free to edit the answer to add additional details.


All the other horcruxes were hidden and guarded carefully and with a lot of thought as to where they were hidden. It seems odd to me that the diary was given to the someone to keep safe. Even if he needed someone to use it to open the chamber of secrets ... It still seems a big risk.  Why was the diary given/entrusted to Malfoy Snr? Voldemort, who works alone, trusts something such as his diary horcrux to a person to keep safe. That seems to be a bit odd to me.

In The Chamber of Secrets, Lucius slips Tom Riddle's diary into Ginny's cauldron in Diagon Alley.  Did Voldemort or one of his followers instruct Lucius to do this?  If not, why did he do it?  If he was just trying to dispose of evidence, this seems like a rather stupid way to do it.  Arthur works for the Ministry and is a friend (or at least a fan) of Dumbledore's; if he discovered the diary quickly enough, it could go very badly for Lucius.  And if Lucius was deliberately trying to open the Chamber (for some reason?), the whole thing seems very poorly planned and executed.  There was no one at Hogwarts besides Ginny working towards opening the chamber, so the plan has a single point of failure.  What was Lucius trying to accomplish, and why?


grep /var/log /etc/rsyslog.conf | awk '{print $2}'   Output:  /var/log/messages /var/log/secure -/var/log/maillog /var/log/cron -/var/log/spooler /var/log/boot.log   I want the result to be:  /var/log/messages /var/log/secure /var/log/maillog /var/log/cron /var/log/spooler /var/log/boot.log   I need to remove the -.

I run a command and pipe it through awk as below :  mycommand |  awk '{print $1,tolower($3),$4}  This gives me the following output:  fred.o: t .abcdefg  fred.o: u .rstuvwxy  fred.o: t .defghi  fred.o: t .jklmnop  fred.o: d abcdefg  fred.o: d zyxwvuts    As you can see the sometimes the third column contains a leading "." but not always.  How can I modify my awk command to get rid of the leading "." in the third column if it exists ?  eg I would like my output to look like this :   fred.o: t abcdefg   fred.o: u rstuvwxy   fred.o: t defghi   fred.o: t jklmnop   fred.o: d abcdefg   fred.o: d zyxwvuts


I need to wire 5 led's in series with a switch and variable resistor to control brightness.    I think the circuit will need to look something like this (Ignoring the values the editor added!) but it's been a very long time since I've done anything like this.         – Schematic created using   I don't know how to calculate how much battery power will be required, or if it will need additional resistence.  How do you go about solving these kinds of equations?

I'm installing LED strips in my car's tail lamps to convert it from conventional bulbs to LEDs. I have a understanding of what I'm doing but not the complete knowledge to make the circuit work correctly without doing some guessing so I figured I would ask here.   I'm planning on working with and I need a length of 16", 15" and 14" to make then look correct in my housings. When I did the math the 19.7" strips have about 1.5 LEDs per inch and need to be segmented into 3 LED groups so I may have to get creative with the placement.   Ffom what I understand I need 2 diodes and a resistor. One diode on the parking lamp power, and one on the turn signal/brake power and then a resistor on the parking lamp  wire to step down the voltage enough to make them dim enough to use as a parking lamp and distinguish it from the brighter turn/brake lamps.  Does anyone know what size resistor and what size diode to use in this project? The voltage, with the car running, is around 13.8V to the rear lamps. I figure it should be running around 7V to the LEDs to light them as parking lamps.  Also will leaving out a cluster of 3 LEDs change the strips intensity to where I'll need different resistors for each strip?


I upgraded from 13.10 to 14.04 without realizing that the ubuntu one package was going to be removed (my fault). I know the ubuntu one service is being discontinued but I'd like to keep on using it at least until I have time to look for something else to replace it. Is there a way to install ubuntu one again on ubuntu 14.04?  Thanks!

I need to restore my documents and folders, since the installation of 14.04 reformatted my harddisk.  I can sign in to Ubuntuone, but I see no way to make it restore the files to my harddisk.


When travelling, I sometimes see little "puffs" of leaves and grass appear on the map. Are these a sign of Pokémon, or just a bit of visual flavour?

Occasionally, you can see little tufts of leaves blowing in spots on the map      Do these mean anything?


What is the value of the folowing sum and why: $$\sum_{n=0}^k\binom{2n}{n}\cdot\binom{2(k-n)}{k-n}$$

Possible Duplicate:          This was part of a homework assignment that I had, and I couldn't figure it out. Now it is bugging me. Can anyone help me? Although a proof would be nice, I wouldn't mind a push in the right direction.   $\displaystyle\sum_{i=0}^n {2i \choose i}{2(n-i)\choose n-i} = 4^n$


I have often found that when I am having performance problems on my MSSQL database, I can resolve them by running sp_UpdateStats.  I learned this because that's always the first line of defense from tech support, right after, "Is your computer turned on?"  My understanding is that SQL Server is supposed to keep stats automatically; I shouldn't need to nanny it.  So I'd like to understand: what circumstances might lead to the stats falling out of date so badly that I need to update them manually?

In SQL Server,  statistics are updated automatically when Auto Update Statistics in True (which is the default). Is there a reason to update statistics manually and in what circumstances?


I have a world jpg file that I am trying to use as a background image in ArcGIS. When I look at the raw jpg through a random picture viewer, it looks like this:    However, when I load the image into ArcMap, the contrast and color appear to change completely:    I couldn't find any documentation online on what causes this or how to fix it. Is this simply an artifact of GIS, or is there a way to make the image appear the same as the raw image in ArcMap?  Edit - Oops, this is a duplicate, but I am leaving it up because it may help someone find the answer they are looking for if the keyword geoTIFF is used.

I am having a hard time finding a world relief map with "lighter" ocean colors that will actually display as such in Arc.   This is the image I download from the web    but this is how it displays in ArcGIS.


I defined a function in C as below: int *face_2_cells(int boundary_field_id) { int b_cells_field[4]; if(boundary_field_id==1) {   b_cells_field[0]=1;   b_cells_field[1]=2;   b_cells_field[2]=3;   b_cells_field[3]=4; } else{   b_cells_field[0]=0;   b_cells_field[1]=0;   b_cells_field[2]=0;   b_cells_field[3]=0; } return b_cells_field; }  Then I called this function in another function and then printed the size of the array like below: void cs_user_extra_operations() {   {                                                                                int *face_22_cells = face_2_cells(1);     printf("\n SIZE = %i""  ", sizeof(face_22_cells)/sizeof(face_22_cells[0])); } }  But the code outputs the SIZE = 2, while the correct value for SIZE is 4. Where is the problem?

First off, here is some code:  int main()  {     int days[] = {1,2,3,4,5};     int *ptr = days;     printf("%u\n", sizeof(days));     printf("%u\n", sizeof(ptr));      return 0; }   Is there a way to find out the size of the array that ptr is pointing to (instead of just giving its size, which is four bytes on a 32-bit system)?


I have this shape (no strokes):   when I use the pathfinder unite tool the image is distorted to the following:     I have unchecked align to pixel grid, scale rectangle corners and scale stroke from the transformer control panel.   I've looked online for an explanation but can't seem to find one. Anyone has an idea for this?

I am curious as to why when I scale things the general shape changes. The flag in the middle is what I originally started with, and either side is the distorted result of rescaling it.   I have read previous answers and tried: unchecking align to pixel grid upon start-up of new document and then with the flag shape selected; checking 'scale strokes and effects'.  Any ideas? Here is another example of where this has happened, both lines and rectangle shapes have changed (harder to see):    And here is what is checked/unchecked:    I am completely lost... been searching for an answer but nothing. Thank you!


Google Street View is good idea. But I don't know any way to make similar thing myself. Is there any? What equipment would I need to make 1000 km of my own street view at once?

I'm looking for a true 360 degree camera, so that's both vertical and horizontal 360 degrees. I've seen some clip-ons for the iPhone, but am really not wanting to by an iPhone 4S for this.  What I would like to see: - decent resolution: at least 1920x1080. - and 30fps  I can't settle for an alternative that's not vertically 360 degrees (or at least much more than 180 degrees).  I've seen the ball camera, which isn't out yet, but would be really well suited for my case, given it does video as well.


I suddenly felt like making sushi. I thought about going to the fish market and buying so tuna and salmon.  Then I figured out that I have to kill the bacteria first. So far, I know that you have to freeze the fish under 20 Celsius.  Is there anything else I have to put into account?

Is it safe to consume raw fish purchased at the fish counter of a typical suburban grocery store? If not, do you have any tips for finding sushi grade fish. Also, are there requirements for safe sushi/sashimi beyond the use of safe fish?


I have a trigger after insert that uses a lookup to another object. However, while debugging the lookup is null. Since I am using after insert, should the field be populated? The field is also required to be filled in so the possibility of it not being filled in on save is not possible.  Code:  trigger ImplementingTrigger on Account (after insert) {     for(Account a : Trigger.New){         if(a.Type == 'Client Implementing'){             System.debug(a.Client_Operations_Manager__r.FirstName);             System.debug(a.id);             FeedItem notification = new FeedItem();         }     } }

Financial Account is a child of Client in a Master-Detail relationship. The client (John Sandbox) has a Wealth Advisor, 'John Smith', on his client record, however, the system debug that pulls finAcct.client__r.Wealth_Advisor__c shows this field as 'null'.  Does anyone have any idea why I am not getting the value in this field? The goal of this trigger is to make sure that the lookup fields for the Client Team (one of which is 'Wealth Advisor') always match between the client record and the financial account record when they are linked. Thanks!      Boolean UpdateMe;     List <Financial_Account__c> FinAcctsToUpdate = new List<Financial_Account__c>();      //Loop through all Financial Accounts in Trigger.new     for(Financial_Account__c finAcct : newFinAccts){         UpdateMe = false;          System.debug('finAcct WA Lookup: ' + finAcct.Wealth_Advisor_Lookup__c);         System.debug('Client: ' + finAcct.client__c);         System.debug('Acct WA: ' + finAcct.client__r.Wealth_Advisor__c);          if (finAcct.Wealth_Advisor_Lookup__c != finAcct.client__r.Wealth_Advisor__c){             finAcct.Wealth_Advisor_Lookup__c = finAcct.client__r.Wealth_Advisor__c;             UpdateMe = true;         }         if(UpdateMe == true){             FinAcctsToUpdate.add(finAcct);         }         UpdateMe = false;     }      if(FinAcctsToUpdate.size() > 0 ){         update FinAcctsToUpdate;     }


I'm having a hard time understanding the permittivity of free space in my own words. Wikipedia defines the permittivity of free space as "the value of the absolute dielectric permittivity of classical vacuum." and it defines the absolute dielectric permittivity as "a measure of the electric polarizability of a dielectric". So would that mean that the permittivity of free space is the polarizability  of a vacuum? If not, could someone please explain it in simple terms. (I need to give a simple definition in a lab report and I want to understand it fully in my own words to avoid any possible plagarism.)

The vacuum is empty, yet it seems to have 2 properties: it's absolute permeability and absolute permittivity, which have specific, finite, non-zero values.  Why?  Why are the vacuum permeability and permittivity non-zero and non-infinite?  What would a universe in which the vacuum permeability and permittivity were zero look like?  What would a universe in which the vacuum permeability and permittivity were infinite look like?


I'm able to create a flat diamond will fills, but I'm having some difficulty getting just the outlines. I've tried using borders with inside position, but I end up with thicker strokes in certain areas. When I put them to center, I get these weird pointy corners.

I am drawing some overlapping paths in Illustrator. However, some anchor points of different paths do not align correctly, they create some rugged corners. I tried to manually adjust the points with the direct selection tool but it is difficult to handle the corners.  Can anyone help me to fix the corners in the red circles?


I'm current using Corsair VS 550 (550 watt) power supply unit ,but i don't have any UPS. Is there any chance that my power supply unit and hard disk could be damaged for not using any UPS.can anyone help regarding this??

Can my computer components ( Monitor, Motherboard, RAM, HDD, CPU, SMPS) become damaged due to a sudden power flux. It's only needed to shut down Windows properly.  Can I solve both Hardware and Software problems without UPS?


This question originates from Pinter's Abstract Algebra, Chapter 22 Exercise E1.     Let $a$ and $b$ be integers. Suppose $a$ is odd and $b$ is even. Prove that    $\operatorname{gcd}(a,b) = \operatorname{gcd}(a+b, a-b)$.   Attempt:  Let $d=\operatorname{gcd}(a,b)$ and $d' = \operatorname{gcd}(a+b,a-b)$.   Given $a$ is odd and $b$ is even, $d, a+b, a-b$ and $d'$ must all be odd, for the sum or difference of an odd and even number is an odd number, and the common factor of an odd and even number is an odd number. By Theorem 3 in Chapter 22, $d=\operatorname{gcd}(a,b)$ iff $ax+by=d$ for some integers $x$ and $y$. This implies $ax$ is odd, which implies $x$ is odd, for otherwise $d$ would be even contradicting (1). $d' = \operatorname{gcd}(a+b,a-b)$ iff \begin{align*}     (a+b)x' + (a-b)y' &= d' & \text{for some }x',y'\in\mathbb{Z} \\     a(x'+y') + b(x'-y') &= d' \\     \implies &d = d' \end{align*} for there exists a unique non-negative generator in the principal ideal of all the linear  combinations of $a$ and $b$ (by the proof of Theorem 3 in Chapter 22). In particular, observe that \begin{align*}     x &= x' + y' \\     y &= x' - y' \\     x - y &= 2y' \end{align*} $x$ is odd by (2) so $y$ must be odd, for otherwise $x-y$ would not be divisible by 2.   Does this look reasonable?

I want to show that for $\gcd(a,b) = 1$ $a,b \in Z$   $\gcd(a+b, a-b) = 1$ or $\gcd(a+b, a-b) = 2$ holds.      I think the first step should look something like this:      $d = \gcd(a+b, a-b) = \gcd(2a, a-b)$   From here I tried to proceed with two cases. 1: $a-b$ is even, which leads to $\gcd(a+b, a-b) = 2$ 2: $a-b$ is odd, which leads to $\gcd(a+b, a-b) = 1$  My main problem I think is, that I do not know how I should include $\gcd(a,b) = 1$ in the proof.  Any help is appreciated. Thx in advance. Cherio Woltan


I was wondering: there is a lot of lore in Star Wars: The Old Republic, and some events could be seen as contradictions. What level of canon is given to this game?

For all types of derivative works, namely:   Movies Novels Comic books Other written works (including RPG materials) Cartoons Video games Derivative movies (such as the infamous Ewok movies and even more infamous )   According to what rules does something become "canon" and who is responsible for the evaluation of a published work?


These methods should ask for the size of the array (without error) then every element in the array    should be false (without error) and at the end the array should be printed...  but I get an exception in the line 29 (it is marked in the code)   I am initializing the array so I don't really know whats wrong with my code.  private boolean[][] board;     // true = queen, false = empty [...]   private void determineBoardSize(){         write("Sprechen sie sich ab wer weiß und wer schwarz ist");         write("weiß muss eine Zahl zwischen 5 und 8 wählen");         nrRows = readInt("Zahl aus {5,6,7,8}");         if(nrRows < 5 || nrRows > 8) determineBoardSize();         write("Schwarz muss nun eine Zahl zwischen ErsteZahl -1 und ErsteZahl + 1 wählen");         nrColumns = readInt("eine Zahl zwischen ErsteZahl -1 und ErsteZahl + 1 wählen");         if(nrColumns < nrRows - 1 || nrColumns > nrRows + 1) determineBoardSize();   private void initBoard(){         boolean[][] board = new boolean[nrRows][nrColumns];         for(int i = 0; i < nrRows; i++){             for(int y = 0; y < nrColumns; y++){                 board[i][y] = false;             }         }     }       private void printBoard(){         for (int j = board[0].length - 1; j >= 0; j--) { //java.lang.NullPointerException                     System.out.print("\n " + (1 + j));             for (int i = 0; i < board.length; i++) {                 System.out.print(board[i][j] ? " X" : " -");             }         }         System.out.print("\n  ");         for (int i = 1; i <= board.length; i++) {             System.out.print(" " + i);         }         System.out.println("\n" + (whiteToMove ? white : black) + " ist am Zug.");     }  public void startGame(){     determineBoardSize();     initBoard();     determineFirstPlayer();     printBoard();     mainLoop();     reportWinner(); }   public static void main(String[] args) {     Dame ds = new Dame("Weiß", "Schwarz");     ds.startGame(); }

What are Null Pointer Exceptions (java.lang.NullPointerException) and what causes them?  What methods/tools can be used to determine the cause so that you stop the exception from causing the program to terminate prematurely?


I am sure you are aware of the dillema of 1=-1 when we assume √-1=i. To refresh your memory it goes like this:  1= √1= √((-1)(-1))= √-1√-1= i*i= -1.  We must realize that saying √-1=i is only half true, therefore not true. √-1= +/-i. This is because i×i=-1 and so does -i×-i. Therefore we need to change our above statement to:  1= √1= √((-1)(-1))= √-1√-1= +/-i*+/-i= (+/-)-1=(+/-)1.  But then, wait, now 1 is equal to +/-1. It is equal to both itself and its opposite all of the sudden. Doesnt this make absolutely no sense? I think √-x should equal the set of no numbers. What do all of the educated mathematicians say?

I know there must be something unmathematical in the following but I don't know where it is: \begin{align} \sqrt{-1} &= i \\\\\ \frac1{\sqrt{-1}} &= \frac1i \\\\  \frac{\sqrt1}{\sqrt{-1}} &= \frac1i \\\\  \sqrt{\frac1{-1}} &= \frac1i \\\\  \sqrt{\frac{-1}1} &= \frac1i \\\\  \sqrt{-1} &= \frac1i \\\\  i &= \frac1i \\\\  i^2 &= 1 \\\\  -1 &= 1 \quad !!? \end{align}


This all started from the day before yesterday. I logged into my account and found out 2 reputation was gone. I checked my reputation changes, but didn't find any record. The same thing occurred yesterday and today.  What is wrong?

When I visit the reputation tab of my profile, I see a lot of stuff. I can make out some of it, but not all.   What do all the event types mean? Why do some events show an odd reputation gain or not show any reputation change at all? Why are some events sometimes highlighted in yellow? My reputation suddenly dropped, but I don't see anything. What happened? Why do some events disappear from my reputation history?


Find the value of $$\sum_{i=0}^{100}\dbinom{k}{i}\dbinom{M-k}{100-i}\frac{k-i}{M-100},$$ where $M-k>100,k>100$.   My approach: The Vandermonde's identity states that $$\sum_{i=0}^r\dbinom{m}{i}\dbinom{n}{r-i}=\dbinom{m+n}{r}$$ for any non-negative integer $m,n,r$.   Therefore setting $m=k$, $n=M-k$ and $r=100$, in the Vandermonde's identity we have, $$\sum_{i=0}^{100}\dbinom{k}{i}\dbinom{M-k}{100-i}=\dbinom{M}{100}.$$  This implies that $$\sum_{i=0}^{100}\dbinom{k}{i}\dbinom{M-k}{100-i}\frac{k-i}{M-100}$$ $$=\frac{k}{M-100}\sum_{i=0}^{100}\dbinom{k}{i}\dbinom{M-k}{100-i}-\frac{1}{M-100}\sum_{i=0}^{100}\dbinom{k}{i}\dbinom{M-k}{100-i}i$$$$=\frac{k}{M-100}\dbinom{M}{100}-\frac{1}{M-100}\sum_{i=0}^{100}\dbinom{k}{i}\dbinom{M-k}{100-i}i.$$  I need help in evaluating the expression $$\sum_{i=0}^{100}\dbinom{k}{i}\dbinom{M-k}{100-i}i.$$

Show that    $$\frac{\sum_{i=0}^n\binom{k}{i}\binom{M-k}{n-i}\frac{k-i}{M-n}}{\binom{M}{n}}=\frac{k}{M},$$ where $M-k>n$ and $k>n$   From Vandermonde's identity, I get $\sum_{i=0}^n\binom{k}{i}\binom{M-k}{n-i}=\binom{M}{n}$.   But what about the sum of the product in the numerator? Any hint will be helpful.


Given the adjoint of exterior multiplication by $\xi$, that is $\gamma: \Lambda_{p+1}(V) \rightarrow \Lambda_p(V) $,  $$\langle \gamma(v), w\rangle = \langle v, \xi\wedge w\rangle$$ for $v\in \Lambda_{p+1}(V)$ and $w\in \lambda_p(V)$. I would like to show that  $$\gamma(v) = (-1)^{np} \star(\xi\wedge(\star v))$$ where $\star$ is the Hodge star operator.   I know the basic definition of $\star: \Lambda_p \rightarrow \Lambda_{n-p}$, and  given an orthonormal basis $\{e_1,\cdots,e_n\}$ on $V$, we have the computation $$\star (e_{i_1} \wedge e_{i_2}\wedge \cdots \wedge e_{i_k})= e_{i_{k+1}} \wedge e_{i_{k+2}} \wedge \cdots \wedge e_{i_n}.$$  Also for $u,w \in \Lambda_p(V)$, we have  $$\star(w\wedge \star v) = \star(v\wedge \star w) = \langle u,w \rangle = \det(u_i, w_j).$$

As we know, for $V$ vectoral space and a orientation $\mathcal{O}$ on $V$ and $e_{1},...,e_{n}$, the hodge star operator $\ast:\wedge V^*\rightarrow\wedge V^*$ is defined for  $\ast(e_{1}\wedge...\wedge e_{n})=\pm 1$(acoording to the orientation preserve/invert for the basis $\{e_{i}\}$)  $\ast(1)=\pm e_{1}\wedge...\wedge e_{n}$(again $+$ if $[\{e_{i}\}]=\mathcal{O}$ and $-$ if $[\{e_{i}\}]=-\mathcal{O}$)  $e_{1}\wedge...\wedge e_{k}=\pm e_{k+1}\wedge...\wedge e_{n}$  Already prove that $\ast\ast=(-1)^{n(n-k)}\cdot$ and $<T,S>=\ast(T\wedge\ast S)=\ast(S\wedge \ast T)$ (where $T=\eta_{1}\wedge...\wedge \eta_{1}$, $S=\omega_{1}\wedge...\wedge \omega_{1}$ and $<T,S>=det(<\omega_i,\eta_{j}>)$)  For any $\xi\in V$ denote $\gamma:\ast:\wedge^{k+1} V^*\rightarrow \wedge^{k} V^*$ the adjoint of left exterior multiplication by $\xi$ $$<\gamma(T),S>=<T,\xi\wedge S>$$ for all $T\in\wedge^{k+1} V^*$ and $S\in\wedge^{k} V^*$.  I need to prove that $\gamma(T)=(-1)^{n-k}\ast(\xi\wedge\ast T)$ but I'm a little confused, how prove that $\gamma$ has this expression from this property?


Let $p$ and $q$ be non constant polynomials. Prove that the function $f(z) =p(z) e^{q(z)} $ attains every complex value.   I tried to use the little picard but i cant solve it.  I assumed that there exists $w_0$ complex that $f$ does not attain. Then i wrote $p(z) =\frac{f(z)} {e^{q(z)}} $. The problem is that the argument that since $f$ ommits $w_0$ and the denominator ommits the value one does not imply that the polynomial $p$ommits also the same value hence a contradiction. Could you help me?

This is a question from an old qualifying exam I am trying to solve.  Suppose $p$ and $q$ are nonconstant polynomials. Prove that the range of the function $f:\mathbb{C} \rightarrow \mathbb{C}$ defined by $f(z)=p(z)e^{q(z)}$ is all of $\mathbb{C}$.  My assumption is that I will need to use Picard's Little Theorem.  I know that $e^{q(z)}$ omits only $0$ and $p(z)$ has range all of $\mathbb{C}$.  However, I cannot see how to properly use this information. Any hint or suggestion would be very appreciated. Thanks!


I've been using Windows for years and thought I'd give Linux a try. As listed in the title, I'm trying to run Ubuntu through Oracle's Virtual box. When I go to the Install for Ubuntu, I get a black screen saying that the kernel version I am currently using is i686 rather than the x86-64 CPU...  Where do I go from here?

I was trying to install Ubuntu 12.04 in VirtualBox 4.2.12r84980. I see    this kernel requires an x86-64 CPU, but only detects an i686 CPU, unable to boot   But I am using a 64 bit Windows 8, and trying same .iso for trying Ubuntu. Then what is the problem?


Use the definition of continuity and the formal definition of the limit value ("$\epsilon$-$\delta$ definition") to show the following: Let $f: \mathbb{R} \to \mathbb{R}$ be a function that is continuous in $x = 0$ and has the property that if $x\neq 0$ then $f (x) \ge 0$. Then $f(0) \geq 0$.  I don't know where to start and I'm not good at using the formal definition of the limit value. I really appreciate some help :)

Using the definition of continuity and the $\epsilon$-$\delta$ definition of a limit, how would you proceed to show that the following statement holds true?  Let $f : \Bbb{R} \rightarrow \Bbb{R}$ be a continuos function at $x=0$, with the property that if $x\neq 0$ then $f(x)\geq 0$. Then $f(0) \geq 0$.  My attempt so far has been to assume that $f(0) \lt 0$, which means that $$f(0)=\lim_{x\to 0} f(x)\lt 0,$$ because of the continuity at the given point. Furthermore, I think this means that when $x$ approaches $0$ from both sides, at some point the value $f(x)\lt 0$, thus forming a contradiction.   I can't seem to see what to do afterwards. Is this a way of approaching the problem? And how will the $\epsilon-\delta$ definition come into play if my approach is usable?