You have developed an artificial amoeba, and you can control exactly how it divides. Each individual amoeba can be instructed to divide into A, B, or C amoebas. That is, if you instruct an amoeba to divide into A, this amoeba will disappear, and  A different new amoeba will appear.    You start out with K amoeba initially, and you want to give them instructions such that at the end, you have exactly N amoeba left. Giving an instruction is a costly affair because it requires you to produce some biochemicals, and so you want to give as few instructions as possible.     Find and write the minimum number of instructions that you should give to end up with exactly N amoebas. If it cannot be done, write −1 instead. Note that each instruction is given to a single amoeba, and not all of them together.  Find the minimum number of instructions needed for these instances: (a) K = 23, A = 7, B = 12, C = 16, N = 114 (b) K = 9, A = 7, B = 15, C = 16, N = 76       This problem is from pen & paper test, ZIO-2019.   My attempt:-   extra Amoebas to produce = 114 - 23 = 91   Amoeba added by each instruction, A = 6 , B =11 , C = 15   I manually tried to find , n(A)=1,n(B)=5,n(C)=2 .   But my process took very long time, because im pretty noob in alogs. So is there any mathematical method to get the answer , instead of trying to put each value manually to get the answer

I need some help with solving question number 2. The statement of the question is huge and so I refrained from typing it. This is last year's ZIO paper.   So, I thought that rather than vanishing bacterias and then again increasing it, we could keep $K$ bacterias as it is and decrease the number of instructions $A, B, C$ by 1 each. Then we can try to form the rest of the bacterias $i.e (N-K)$ using the 'modified' instructions.   I tried but cannot reach $N$ and I also need to develop a generalized algorithm so that all the test cases are solved easily. Thanks in advance.   This is not an ongoing test.


Today I found a site called .  If you checked it has almost all content from the Stack Exchange network. I think they are getting them from RSS feeds.  Can we get an action about that type of site or according to Terms of conditions of Stack Exchange it is a legal site?

of Stack Overflow, all content posted on Stack Exchange sites by their users (i.e. you wonderful people) has been provided to the whole universe under . For my fellow non-lawyers, that license basically means:   Anyone can use any Stack Exchange posts at any time without having to ask for permission Making money off of the copied content is permitted You don't even have to copy stuff from here verbatim; you can just use it as a starting point and make whatever edits you want There are just two rules you have to follow:   You have to provide . Simple links to the original post and author info are just fine. You have to  and allow other people to use your content, as long as they follow these very same rules. How meta!    (If you ever forget any of that, and want to refresh your memory, the license info is linked to in the footer of every page.)  There are, in fact, a lot of people who republish varying amounts of our content for assorted reasons. Unfortunately, there are some Stack Content Republishers Attributing Poorly and/or Excelling at Ranking (SCRAPERs, for short).  In this context, "attributing poorly" means any use that doesn't follow our attribution rules or make any other reasonable attempt at give credit. This can get pretty egregious; I've seen SCRAPERs that not only don't link back to SE originals, but also use fake author info and post dates to make it harder to find originals. By "excelling at ranking," I'm referring to copycat sites that end up higher in Google results than the original SE sites do for the same content. That's not necessarily wrong, but in some cases, it indicates inappropriate SEO hackery.  So, the question is: what can you do if you spot a SCRAPER?


When I use a SF:deploy it deploys all the code in the src folder not just the files that have been changed.   How can I make it so that it only deploys the files that have changed?

I am trying to set up a Jenkins job which uses the migration tool to move code from a source control system to an org.  To test the job I created a new custom object  named aaaTest__c.  I changed my package.xml to the following:  <?xml version="1.0" encoding="UTF-8"?> <Package xmlns="http://soap.sforce.com/2006/04/metadata">     <types>         <members>aaaTest__c</members>         <name>CustomObject</name>     </types>     <version>31.0</version> </Package>   When my Jenkins job runs I see 1160 components that failed to deploy.  These include objects, workflows, triggers, classes and more.  The object errors appear to be for the custom fields on that object.  The errors all look like this:  workflows/Account.workflow (Account.Test_Task) -- Error: Not in package.xml   I don't understand why the migration tool is trying to deploy all of these components when I'm telling it just deploy one.  Any help will be greatly appreciated.


I have a (subject) and (page) TABLES in a database.  page TABLE belongs to subject TABLE, each subject has an ID  When user click on a subject mysite/blog?subject=(ID gets set__) 1,2,3,4,5  So i want pages to be INSERTED according to in which subject they are in URL.  Well, i'm sending data using POST form to a (form_process.php) page.  <?php             if(isset($_POST["submit"])){          $Message = $_POST["Content"];           $query  = "INSERT INTO page ";          $query .= "(Message, SubjectID) ";          $query .= "VALUES ('{$Message}', $_GET['subject'])";          $result = mysqli_query($connection, $query);           if(mysqli_affected_rows($connection) > 0){            echo "Page added to its beloging subject";          }      } ?>   I get this error:       Notice: Undefined index: subject in   C:\xampp\htdocs\kerimgrozny\public\blog.php on line 64   The problem is: when using $_GET variable in INSERT query as FOREIGN KEY, It gets undefined.  The link on GitHub:

If user input is inserted without modification into an SQL query, then the application becomes vulnerable to , like in the following example:  $unsafe_variable = $_POST['user_input'];   mysql_query("INSERT INTO `table` (`column`) VALUES ('$unsafe_variable')");   That's because the user can input something like value'); DROP TABLE table;--, and the query becomes:  INSERT INTO `table` (`column`) VALUES('value'); DROP TABLE table;--')   What can be done to prevent this from happening?


In book General Topology by Kelley it is stated: If $A=(0,1)$ is a subset of topological space $(\Bbb R,\tau)$, then every point in closed interval $[0,1]$ is an accumulation point of $A$.    I understand that in topological space, accumulation points of $[0,1]\subset \Bbb R$ are $0$ and $1$. But how is entire closed interval a set of accumulation points of the same open interval?

I am not sure I understand why for the open set $(a,b)$, the limit points are $[a,b]$. Why are $a,b$ now included as limit points? Is this because we can somehow find a sequence in the open interval converging to these points?


$$S_n = \int_{0}^{1}\frac{n x^{n-1}}{1+x} dx \quad n \ge 1$$  My attempt:  $$|S_n| \le \int_{0}^{1}\left|\frac{n x^{n-1}}{1+x} dx\right| = \int_{0}^{1}\frac{n x^{n-1}}{1+x} dx \le \int_{0}^{1}n x^{n-1} dx$$  $0 \le x \le 1$, and $n \ge 1$.  So, $|S_n|=[x^n]_{0}^{1}$ and thus $|Sn| = 1$.  So, $\lim_{n \to \infty} S_n = 1$.  But the answer mentioned is $0$. I don't know what I am doing wrong. Please help.

Let $s_n$ be a sequence defined as given below for $n \geq 1$. Then find out $\lim\limits_{n \to \infty} s_n$.   \begin{align}   s_n = \int\limits_0^1 \frac{nx^{n-1}}{1+x} dx  \end{align}  I have written a solution of my own, but I would like to know it is completely correct, and also I would like if people post more alternative solutions.


Please help me to find out which function is used to run a terminal command in objective c as i used in java in following code. I want to only know that which function is use in obj c or cocoa to execute a terminal process.  Runtime rt = Runtime.getRuntime();         Process prcComile = rt.exec("javac -d F:/ F://" + fname.getText()+ ".java");         InputStream iscmp = prcComile.getErrorStream();         int cerrInt = iscmp.read();         if (cerrInt == -1) {             Process prc = rt.exec("java -cp  F:/ " +fname.getText());             InputStream iserr = prc.getErrorStream();             int errInt = iserr.read();             if (errInt == -1) {                 InputStream is = prc.getInputStream();                 int readInt = is.read();                  String allOutput = "";                 while (readInt != -1) {                     char ch = (char) readInt;                     allOutput = allOutput + ch;                     readInt = is.read();                 }                  txtOutput.setText(allOutput);             } else {                 String errorString = "";                 while (errInt != -1) {                     char ch = (char) errInt;                     errorString += ch;                     errInt = iserr.read();                 }                 txtOutput.setText(errorString);             }         } else {             String errorString = "";             while (cerrInt != -1) {                 char ch = (char) cerrInt;                 errorString += ch;                 cerrInt = iscmp.read();             }             txtOutput.setText(errorString);         }

How can I execute a terminal command (like grep) from my Objective-C Cocoa application?


Feel free to correct me if you don't share the same experience, but in my own experience, usage of the word "abandon" as a noun without being apart of the phrase "reckless abandon" is extremely rare.  Is there a name for this situation where a noun is almost exclusively paired with the same adjective and is it a unique phenomenon?

I am referring to a set of words that wouldn't make sense if one word or the other was omitted. Like barbershop quartet, or Cyber Security. What do you exactly call this set of words?


I have had review audits several times in the review queues which are mostly fine. They usually included a short (non comprehensive) description of the solution and a link to a howto with the full solution.  You may argue that such answers are not the best way to answer a question, but I guess they helped the user if he was willing to follow and read the link. So I do not think that they should be used as review audits, as it is quite debatable if they are low quality just because they do not quote the link in the answer.  EDIT: You asked for an example, here is another one I found just now:   The post is short, contains a very short abstract of a solution and a link to a howto which looks as if it answers the question in a more comprehensive way. Deleting this answer is a bad idea, as it contributes useful information. Instead of deleting it should be kept until somebody has the time to improve it by extracting the part relevant to the question from the howto and adding it to the answer.  When looking at the page I see that right after me the next user failed. You may think its bad quality, but it is no good idea to use it for review audits as it can be discussed if it is helpful or not.

I think we can all agree, this sucks:  If you've been around a little while, you've probably encountered hundreds of answers like this in various forums, some of them even marked as "The Answer" by well-meaning1 forum admins looking to close a thread. We could try to enumerate the commonly-observed problems with it...  Link is probably broken If link isn't broken, it's spam If link isn't spam, it's to some broadly-related resource that the answerer found by pressing "I'm feeling lucky" when googling the question's title.  ...but the real issue here is that we don't know! Even if the link was originally pointing directly to the most awesomeest answer ever for exactly the question being asked, there's nothing in the answer itself to even hint at what direction we're being pointed in. Strip the markup, and this is what you're left with:  i think you should take The tutorial HERE! This will help you a lot  Is there even one tiny speck of information there? No. Even the title of the page being linked to would have provided something to go on, but that was entirely too much work. So let me be clear: this sort of response is not an answer. If you see this, flag it. Moderators, if you see it flagged, delete it. There's really only one valid exception to this rule, and that's when the question is:  Suggest me some tutorials where i can learn quick.  Don't get me wrong, it's still a bad answer - but when the question is kinda asking for bad answers this is to be expected. Close or flag the question and move on - this is much more efficient than hanging around to babysit it by deleting every crap answer that inevitably shows up. If you're still reading, you're probably getting really bored by now. "Gee, Shog - answers that contain ZERO information are terrible, horrible, very-bad things? What shocking revelations will you share next?" Yeah. It's really simple... Except, . See, the problem is that once you step away from black-and-white "answers / doesn't answer" decision-making, things get... Interesting. And all those other answers with links in them See, this is an answer:  And so is this:  Yes, they're both very short, and yes, they contain links. But strip the markup, and you still get at least a little bit of useful information. Does that mean these answers should forever hang around the site? No, not necessarily - if it turns out they're just not that useful, they should probably still be removed - or at very least, down-voted so that they rank below other answers. Just remember: if the text of the post contains an honest attempt at answering the question, then it is an answer - so don't flag it otherwise, and if you do, don't complain if your flag gets declined. Answers & Apples If you're still confused, forget about answers. Think about apples instead:  Answers are just like that, but less tasty in pies.  1 By which I mean to say, "criminally lazy"


I would like delete the title of my popup JavaScrip but i don't know how i can and where i make the code.  This is my code :  <a href="javascript:;"  onclick="if(confirm('voulez-vous vraiment supprimer cette  station?'))  window.location.href='Supprimer_Station.php?id_sta=<?php echo  $valeur['ssiphone_idstation']; ?>&act=supprimer'; ">   Tthanks for your help

Is it possible to modify the title of the message box the confirm() function opens in JavaScript?   I could create a modal popup box, but I would like to do this as minimalistic as possible. I would like to do something like this:  confirm("This is the content of the message box", "Modified title");   The default title in Internet Explorer is "Windows Internet Explorer" and in Firefox it's "[JavaScript-program]." Not very informative. Though I can understand from a browser security stand point that you shouldn't be able to do this.


Find the integral  $$I=\int\dfrac{\sqrt{\ln{(x+\sqrt{x^2+1})}}}{1+x^2}dx$$  My try: let $$x=\tan{t}$$ $$I=\int\sqrt{\ln{(\tan{t}+\sec{t})}}dt$$ note $$\tan{t}+\sec{t}=\dfrac{\sin{t}}{\cos{t}}+\dfrac{1}{\cos{t}}=\dfrac{\sin{\dfrac{t}{2}}+\cos{\dfrac{t}{2}}}{\cos{\dfrac{t}{2}}-\sin{\dfrac{t}{2}}}=\tan{\left(\dfrac{t}{2}+\dfrac{\pi}{4}\right)}$$then I can't,Thank you

I want to compute the following integral: $$\raise 1ex{\Large\int} \frac{\sqrt{\ln(x+\sqrt{1+x^2}})}{1+x^2}\,dx$$


I have two classes Foo and Bar. I have a data loader that loads data from file and return them as Foo or Bar.  Currently I have the solution as:   struct Foo {    std::vector<Foo> Filter() {      //do something with data and return new Foo's   }   std::vector<int> data;  }  struct Bar : protected Foo {   std::vector<Bar> Filter() {      //do something with data and return new Bar's   } }  template <typename T> DataLoader<T> {      ....      T & Get() { ... } }   where T is either Foo or Bar.  The problem with this solution is that I cannot dynamically choose to return Foo or Bar. I have to reload data. Ue of virtual method is not working, since Filter has different return types. Also, making inheritance public is not an option, because in that case I could do Foo f = Bar(); which I dont want to enable.  I have come up with a solution using multiple inheritance. However, I am not sure if it is correct or it would produce undefined-behaviour.  I have added private class to DataLoader:  struct FooBarStorage : virtual public Foo, public Bar {}   and changed inheritance in Bar to struct Bar : virtual protected Foo.  Now I can have non-templated DataLoader:  class DataLoader {    template <typename T> T & Get() { ... } }   and specialise Get to return Bar & or Foo &. The advantage is, I can load data only once and decide what to return in runtime. With a previous solution, data were loaded with a given type (Foo or Bar) and I was not able to change the type.   Is this a possible working solution or would it produce undefined-behaviour / other problems / performance impacts?

What is the meaning of "virtual" inheritance?  I saw the following code, and didn't understand the meaning of the keyword virtual in the following context:   class A {}; class B : public virtual A;


Following  I ended up buying a Nikon N80 with a third party lens (28-90mm, 55mm diameter). I also have a  lens, which is 52mm.  From what I gathered, I should get a  and K2/8 Yellow filter, but I wonder if I should use a 55-52 step down filter adapter or a second set of filters?  I'm asking because of possible issues with vignetting (I doubt the 50mm lens has a wide enough angle for that though) and ghosting, but also because ideally I don't want to buy additional filters. (At the same time, I don't know if I will buy additional lenses later on once I figured out this stuff some more. Ideally I want to add a wide angle lens for indoors, but from what I gathered, I don't need to use filters indoors?)

I have a variety of Nikon DX lenses that take differently sized filters. Most take 52mm filters, but there are a few that take larger 67mm or 77mm filters. The advice I've read most commonly online is to buy one filter size and get filter conversion rings to step up to that size filter. In my case, the largest size appears to be 77mm.  So, I walked into a couple local photo shops and asked about 52mm-77mm filter conversion rings and they looked at me like I had two heads. One guy suggested I stack a 52mm-67m and a 67mm-77mm. I have found 52mm-77mm rings online, so I know they exist.  Is this not a common thing to do? How does the stack exchange community handle the varying sizes of filters in their kit?  Thanks, PaulH


I'm trying to conduct a two sample t-test on  on food and drink workers in the Seattle MSA to see if there is a mean difference in levels of employment before and after the enactment of an increase in the minimum wage after April 1, 2015. The background for this project is that many people say that an increase in the minimum wage will force low-skill employers to cut their staff in order to minimize costs.   I've included my code below but I'm not certain it's correct. I separated the data into two variables (observations before and after the minimum wage increase took effect), but why am I getting such a ridiculously small P-value? Is that correct? Any help is appreciated.   #seattleData <- read.table(file=file.choose(), 2 # header=T, sep=",",) food_drink_workers <- seattleData$food_drink_workers afterMinWageLaw <- food_drink_workers[304:346] beforeMinWageLaw <- food_drink_workers[1:303] boxplot(beforeMinWageLaw, afterMinWageLaw) options(scipen = 100) t.test(beforeMinWageLaw, afterMinWageLaw, mu=0,      alternative "less", conf=.95,      var.equal = FALSE, paired = FALSE)   Results:  Welch Two Sample t-test  data: beforeMinWageLaw and afterMinWageLaw  t = -36.92, df = 160.8, p-value < 0.00000000000000022  alternative hypothesis: true difference in means is less than 0  95 percent confidence interval:  -Inf -38.87279  sample estimates:  mean of x mean of y  103.8059 144.5023

I'm trying to conduct a two sample t-test on  on food and drink workers in the Seattle MSA to see if there is a mean difference in levels of employment before and after the enactment of an increase in the minimum wage after April 1, 2015. The background for this project is that many people say that an increase in the minimum wage will force low-skill employers to cut their staff in order to minimize costs.  I've included my code below but some have indicated that my statistics aren't correct. Is there a better way of doing this with a t-test? How could I do a regression analysis on this same data? Would I have to create a new variable with the minimum wage for each corresponding observation date?  The data into two variables (observations before and after the minimum wage increase took effect),.  #seattleData <- read.table(file=file.choose(), 2 # header=T, sep=",",)  food_drink_workers <- seattleData$food_drink_workers  afterMinWageLaw <- food_drink_workers[304:346]  beforeMinWageLaw <- food_drink_workers[1:303]  boxplot(beforeMinWageLaw, afterMinWageLaw)  options(scipen = 100)  t.test(beforeMinWageLaw, afterMinWageLaw, mu=0,   alternative "less", conf=.95,   var.equal = FALSE, paired = FALSE)   Results:  Welch Two Sample t-test  data: beforeMinWageLaw and afterMinWageLaw  t = -36.92, df = 160.8, p-value < 0.00000000000000022  alternative hypothesis: true difference in means is less than 0 95 percent confidence interval:  -Inf -38.87279  sample estimates:  mean of x mean of y  103.8059 144.5023


Let $f(x,y)$ such that  $$f(tx,ty)=t^n f(x,y)$$ for all $t$, where $n \in \mathbb Z^+$ Prove that $$x\frac{\partial f}{\partial x}+y\frac{\partial f}{\partial y}=nf(x,y)$$ This is my attempt First i want to get a formula for $\partial f/ \partial x$ $$f(x,y)=\frac{f(tx,ty)}{t^n} \implies \frac{1}{t^n}\cdot ?$$ but what is the partial derivative of $f(tx,ty)$ with respect to $x$?

suppose that $f$ is a mapping from $\mathbb R^n \to \mathbb R$.  a positively homogeneous of degree $n$ and suppose $f_1, f_2, .... f_N$ are continuous for $a \neq 0$. then   $$\sum_{i=1}^n a_if_i(a)= n*f(a)$$   now, they asked me to prove this. (Which is a total no no to me)  I write my proof as;  $f$ is a mapping from $\mathbb R^n \to \mathbb R$  A homogeneous function of degree $n$ if for all $a \in \mathbb R^n$ and all $L>0$, $f(La)=L^n\,f(a)$. let $a \in \mathbb R^n$ and define function $g$ be a mapping from $[0,\infty) \to \mathbb R$. so I write $g(L) = f(La)-L^nf(a)$. then $L≥0$ let $L=0$ then, $g(L)=0$ and therefore $g'(x) =0$?  then i don't know what's goes next. can anyone help me about this?


I was wondering, why don't other force cultures play a larger role, especially as of Force awakens?  Are there actually not other cultures, with philosophies that aren't divided light/dark?  If there are, why aren't they larger influences in the galaxy?  I think I recall one or two other cultures from the books, but on planets that were very isolated... but I would expect to see a lot more of them, reasonably, from all the leftover traditions that 'discovered' the force for each species and isolated planet, from religions which also have skills (like meditation, self discipline, visualization, energy work), from old superstitions that would suddenly become relevant once kids were no longer recruited by the Jedi.  The Sith and Jedi define themselves in opposition, and can't really exist without the other.  They might not talk about other force philosophies, and deny middle ground, or third way out, because it lost them recruits. The  citing the "manual for students" suggests the Jedi temple might have recruited kids forcefully, and if they also sqooshed religions, the other cultures might slowly fade.  Perhaps the empire was hunting down force users - even those who were nothing like Jedi but sorcerers/acolytes/shamans/warrior-kings of wherever.  But I don't recall this happening in canon, unless I missed something.  And this theory doesn't fit with what we see of the galaxy in Force Awakens.  If that were the case, I would expect a lot more showing up in Force awakens, as there's nobody left to suppress them and any talented kids who found the traditions/religions/superstitions that would let them teach themselves would have time to grow and find each other...especially if there are people who can figure out some things without prior training, as Rey seems to.  Instead, we have the impression that the Force has been all but forgotten.  So after all that musing, the question I am asking is - is there a reason other Force-using cultures are not more widely represented?  Especially in the last movie, since the Jedi and Sith reduced each other down to a handful, and the possibility of suppression from either seems unlikely.  An in-universe reason, preferably, I'm willing to accept anything from the extended universe or any other canon.  Edit: Many thanks to those who offered answers of other cultures that exist, but the question I'm trying to ask is more, why were there not more of them to begin with, and why didn't those other cultures rise up and take over the galaxy when the Jedi and Sith kind of left a vacuum?  Why would people be forgetting the force exists (as the film seems to suggest) if there are other cultures still out there, and if they are gone, what happened to them?

That I know of, there is the , the  and the .  You make a concious decision which of these paths to follow, but are there any additional belief systems someone could adhere to if they were force users?  Black, white and grey pretty much covers everything in the spectrum I suppose but the expanded universe is so massive, I'm wondering if anyone has found another way.


I apologize if I've missed a blatantly obvious question that answers my problem.  I have a variable newTeacherName with no value initialized in the parent form Edit_Class_Form.  I have a popup Change_Teacher_Popup that has the user select a new value from a combo box New_Teacher_Combobox.  How do I have the parent form obtain the selected value from the combo box in the popup?

How do I pass a value from a child back to the parent form? I have a string that I would like to pass back to the parent.  I launched the child using:  FormOptions formOptions = new FormOptions(); formOptions.ShowDialog();


My Java course just gave the following example in the case of inheritance:  public static void main(String[] args){  Student john = new Master("John Adams"); Student anne = new Associate("Anne Philips");  }   The Master and Associate classes are subclasses of the Student classes in this case. It seems logical that we can construct new objects of subclasses of the Student classes this way. But is there a practical reason where we would prefer this way of defining the variables johnand anne as opposed to the easier format:  public static void main(String[] args){  Master john = new Master("John Adams"); Associate anne = new Associate("Anne Philips");  }   While it seems more obvious to a reader that Masterand Associateare subclasses of the Studentclass, I am not sure how this facilitates work while coding.

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 define a two-dimension array in python like this:  a = [[1]*3]*3   and I want to assign one element to be 2, like:  a[1][1] = 2   However, a turns out to be:  [[1,2,1],[1,2,1],[1,2,1]]   Instead of what I thought like this:  [[1,1,1],[1,2,1],[1,1,1]]   Anyone has any idea?

I needed to create a list of lists in Python, so I typed the following: my_list = [[1] * 4] * 3  The list looked like this: [[1, 1, 1, 1], [1, 1, 1, 1], [1, 1, 1, 1]]    Then I changed one of the innermost values: my_list[0][0] = 5  Now my list looks like this: [[5, 1, 1, 1], [5, 1, 1, 1], [5, 1, 1, 1]]    which is not what I wanted or expected. Can someone please explain what's going on, and how to get around it?


I've recently started trying to learn C & was doing an exercise that involved creating a recursive factorial function. Why does the following print out an answer of 24?  #include <stdio.h>  int factorial(int n);  int main(void) {     int n = 5;     printf("%d\n", factorial(n));     return 0; }   int factorial(int n) {     if (n <= 1)         return 1;     else         return n * factorial(--n); }   If i change the last line to      return n * factorial(n - 1);   I get the expected 120.  I understand that you can't use n-- b/c it only decreases n after the line is processed but whats wrong with --n & why does it give 24?

In C, what is the difference between using ++i and i++, and which should be used in the incrementation block of a for loop?


Call an element $x\in R$ of a ring nilpotent if $x^m=0$ for some $m\in\mathbb{Z}^+$.  If $a\in\mathbb{Z}$ is an integer, show that the element $\overline{a}\in\mathbb{Z}/n\mathbb{Z}$ is nilpotent if and only if every prime divisor of $n$ is a divisor of $a$.  Here's my attempt at a proof. If $\overline{a}\in\mathbb{Z}/n\mathbb{Z}$, and there is a $m\in\mathbb{Z}^+$ so that $\overline{a}^m=\overline{a^m}=\overline{0}$. Then $a^m\equiv 0\mod n$ , and so there is a $k\in\mathbb{Z}$ with $a^m=kn$. Now suppose $p$ is a prime divisor of $n$, so that $n=lp$ for some $l\in\mathbb{Z}$. Then $a^m=(kl)p$, so $p$ divides $a^m$. By Euclid's lemma, $p$ must then divide $a$. Conversely, suppose every prime divisor $p$ of $n$ divides $a$. Then $n=kp$ and $a=lp$. Fix $m\in\mathbb{Z}$, and take $a^m=l^mp^m$, and since $p=n/k$ we have $a^m=(l^m n^{m-1}/k^m)n$, so that $a^m\equiv 0\mod n$. I have a strong suspicion that my proof of this direction is flawed, because it seems to imply that every $m\in\mathbb{Z}$ has $a^m\equiv 0\mod n$. Are there any ways I can remedy this, and is the other direction fine?

Suppose $n = p_1^{a_1} ... p_r^{a_r}$ where $p_i$'s are prime integers and $a_i$'s are positive integer.  (a) Show that the set of nilpotent elements in $\mathbb{Z}_n$ is $(p_1 p_2 ... p_{r-1} p_r)$, the ideal generated by the element $p_1p_2 ... p_{r-1} p_r$.  (b) Find a necessary and sufficient condition on $n$ such that $\mathbb{Z}_n$ does not have any non-zero nilpotent elements.  My attempt:  (a)Let x be a nilpotent element in $\mathbb{Z}_n$. Then $x^k = n$ for some $k > 0$.Note that $x \neq 1$. Since $Z_n$ is a UFD, $x =  p_1^{b_1} ... p_r^{b_r}$, where $b_i > 0$ and so $x^k = p_1^{k b_1} ... p_r^{k b_r} = p_1^{k b_1 - 1} ... p_r^{k b_r - 1}(p_1 ... p_r) \in (p_1 ... p_r)$. Hence the set of nilpotent elements is a subset of $(p_1 ... p_r)$. On the other hand, for all $x \in (p_1 ... p_r)$, $x = z_1 \cdot p_1 ... p_r \cdot z_2$ for some $z_1 = p_1^{c_1} ... p_r^{c_r}, z_2 = p_1^{d_1} ... p_r^{d_r} \in \mathbb{Z}_n$, so $x = p_1^{c_1 + d_1 +1} ... p_r^{c_r + d_r+1}$. Let k be an natural number such that $k(c_i+d_i+1) >a_i$ for all i. Then we have $x^k = p_1^{k(c_1 + d_1 +1)} ... p_r^{k(c_r + d_r+1)} = p_1^{a_1} ... p_r^{a_r}(p_1^{k(c_1 + d_1 +1)-a_1} ... p_r^{k(c_r + d_r+1)-a_r}) = 0 \in\mathbb{Z}_n$. Hence the $(p_1 ...p_r) \subseteq$ the set of nilpotent elements in $\mathbb{Z}_n$. Therefore $(p_1 ...p_r) =$ the set of nilpotent elements in $\mathbb{Z}_n$  (b) $a_i = 1$ for all $i$. If $a_i = 1$ for all i, then it is obvious then $\mathbb{Z}_n$ does not have any non-zero nilpotent elements. Now I just need to show that if $\mathbb{Z}_n$ does not have any non-zero nilpotent elements, then $a_i = 1$ for all $i$. Proof by contradiction: Suppose there exists some $a_i$ > 1. Then $p_1...p_r < n$ is non-zero a nilpotent element.


I viewed  to redirect text to file while displaying the output. My question is how can I redirect it while working AND without constant | tee command.  My plan is to use  to identify terminal (Gnome or Guake) and record only Gnome for my Linux commands testing. So I need constant and immediate redirecting of commands and their outputs (with errors) to a file (say cmdlog.log).

I want to create a text file which will add each command I am going to run on the terminal as a new line entry in the text file. i.e., I need to keep a record of what are the things I'm doing in the terminal. Further if I can keep a record of outputs I'm getting in the terminal, along with the inputs in the terminal, as a text file, it will be much better.   Each time I forget a command I have to search again in the Internet for the command.  Can I can make a file like above?


Anki doesn't start at all. I installed it using ubuntu software center. Tried installing python, didn't work.

after upgrading to Ubuntu 16.10 from 16.04, Anki program does not run. this is the error message:  Traceback (most recent call last):   File "/usr/bin/anki", line 7, in <module>     import aqt   File "/usr/share/anki/aqt/__init__.py", line 12, in <module>     from aqt.qt import *   File "/usr/share/anki/aqt/qt.py", line 22, in <module>     from PyQt4.QtWebKit import QWebPage, QWebView, QWebSettings ImportError: No module named QtWebKit


When we say $a=a$ means that are absolutely the same right? What does equal mean in $3+2=7-2$? Does it mean that they are absolutely the same or that the value is just the same?

I've been tasked with explaining to a group of people what the notion of equality means in mathematics, I've come up with a working explanation, but would appreciate some input, suggestions etc.  Mathematical equality $X=Y$ is a binary relation between two mathematical expressions $X$ and $Y$ which is essentially the statement that the two expressions represent the same mathematical object ($X$ and $Y$ define the same mathematical object) if the equality holds for any value of $X$ and any value of $Y$ (in other words, they share all and only the same properties). If the equality doesn't hold for all values of $X$ and $Y$ then the relation $X=Y$ is a conditional statement that holds for a certain set of values of $X$ and $Y$.  I was then hoping to move on to the notion of equivalence relations and how equality is the archetypal example. How does one define equality as an equivalence relation? Also, is the reason why the equivalence classes of equality (as an equivalence relation) contain only a single element (in each class) simply because the only element which satisfies all the conditions of equality with another element (i.e. shares all and only the same mathematical properties) is the element itself (i.e. each element is equal to itself and only itself).  Hope this is clear enough, apologies if it isn't (I feel like I've confused myself a bit through trying to explain the concept).  $\underline{\textbf{Edit}}$:  Would it be correct to define the notion of equality in terms of equality of sets, i.e. given two sets $A$ and $B$, then $A=B$ if and only if, for every $x\in A$ we have that $x\in B$, and for every $x\in B$ we have that $x\in A$? If this is the case then I can see how equality of (natural) numbers follows, as if we define them as $$0=\emptyset,\;1=\lbrace\emptyset\rbrace,\;2=\lbrace\emptyset,\lbrace\emptyset\rbrace\rbrace,\ldots,n=\lbrace 0,\ldots,n-1\rbrace$$ then it is obvious that $1=0$ is not true because $\emptyset =\lbrace\emptyset\rbrace$ is not true (as $\emptyset\in\lbrace\emptyset\rbrace$, but $\emptyset\notin\emptyset$).


I can't find the answer to this question. What is a java.util.EventListener? How does it work? I have already done some research on google but I only found this, which isn't very clear: a tagging interface that all event listener interfaces must extend.  Can someone please help?

In the javadoc it says that EventListener is      "A tagging interface that all event listener interfaces must extend."   Why is that? What's the significance of making a custom listener implement EventListner? Is there any special handling for EventListner somewhere?


Suppose a user posts a programming question in SO with 20 lines of code.  Sometimes, I can give a solution to what was asked with a single line change, but I know that the overall approach is not correct. The approach I am thinking may increase or decrease the lines of code but will be better. This would completely replace OP's code and make the question obsolete.  Other times, the OP's question was in the first 10 lines and in the remaining 10 I found a defect.   Can I suggest the changes that don't directly answer the question? Although my feedback will not answer the question it will be improve the coding standards.  I know that I can post it as a comment but formatting coding is not great in there.  I tried to find if someone already posted this question but I dont find any, May be I am not searching with correct terms/keywords.

If someone asks how to do XYZ, and you think doing XYZ at all is a Bad Idea™, is it valid to post an answer saying so? You aren't answering the question, but instead, arguing the question's validity.  You could do this in a comment, but I don't think comments carry enough weight on occasion.  For example, I came across this today ; for those not wanting to link away:     I would like to build a wiki based website about professors, so that students can share information and check the reputation of the professor before working for him.   and I really wanted to post an answer that said, "I think this is a very bad idea". (In fact I did anyway, despite awareness that it could get myself flamed.)  Was I wrong? What should I have done instead?


I know that in MechWarrior Online if you quit (or crash, whathaveyou) that any scores or accomplishments you have made in the match will be awarded to you at its conclusion (even though you're not in it).  I was wondering if Battlefield 3 did the same. Like, it may do so if you quit (so the game has a chance to 'shut down') but what if you crash, are kicked, or otherwise disconnected abruptly?  I don't think it increases your scores (experience etc) whilst the game is running, but I don't know if it will still amend your profile if you aren't there when the match ends (I've logged back into a match before and found my score to be 0 with 0 kills and deaths as if I was never there).

Last night I played a few games with my friend. While in the last game, I suddenly remembered something I had to do and was about to leave but my friend told me that I would lose my progress if I did so. I stayed until the end, through the scoreboard screen and quit while the next map was loading. Taking a look  now, I can't see any of yesterday's games. I don't remember how much XP I had yesterday so there is no sure way for me to check that. I had gotten a dozen ribbon and I don't see them in the feed, but there could be specific conditions to be showing them.  My questions then.   If you quit a game early, do you lose progress / XP? What if you quit on the scoreboard? Do you need to wait for the next map to load to save your progress? Any idea why the games aren't showing up? Some of them I definitely waited for the next map to load. Is there a delay for them to be shown on Battlelog?   Thanks.


I have a shapefile of 50 polygons. I've read it into R. Now I want to use R to export 50 shapefiles, one for each polygon. This seems like an intuitive application of . But I'm having a devil of a time doing it.  I tried a for loop (like ).  STNCODES <- unique(ptsbuf_400@data$STNCODE) for (i in 1:length(STNCODES)) {   tmp <- data[ptsbuf_400@data$STNCODE == STNCODES[i], ]   writeOGR(tmp, dsn=getwd(), STNCODES[i], driver="ESRI Shapefile",            overwrite_layer=TRUE) }   I get the following error:     Error in data[ptsbuf_400@data$STNCODE == STNCODES[i], ] :    object of   type 'closure' is not subsettable   This seems to be the cause of the error, but I'm at a loss how to fix it:     data[ptsbuf_400@data$STNCODE == STNCODES[i], ]   Amtrak station data     works--likely there is some difference between the spatial object generated by readOGR/writeOGR and read_sf and write_sf--the latter seems to be a vector, while the sp object is not?

Is there a way to replicate the Split Vector Layer function from QGIS in R?   I have a Shapefile containing around 20 polygons that I'd like to split into 20 separate files.   I guess since it's in QGIS there would be a solution in Python, but I'd like to integrate it into a R workflow if possible.


I've got two Fibonacci methods I'm testing out. Both should be linear. Either I don't understand memoization or HashMap lookups are slower than I thought.   I understand that the recursive function shouldn't be sped up a lot by the addition of DP, but since it's static it only needs to compute once (never falls out of scope). After the first execution, it retrieves the answer from the HashMap.   I'm doing this in preparation for implementing the O(log n) fibonacci function and benchmarking, but got detoured slightly when I saw this. (Even addition memoization to the iterative approach slows it down).   Please enlighten me, I'm feeling quite stupid at the moment.   Iterative Approach:  public static int linearIterativeFib(int x) {     if (x <= 2) {         return 1;     } else {         int prev = 0;         int result = 1;         for (int i = 2; i <= x; i++) {             int temp = result;             result += prev;             prev = temp;         }         return result;     }        }   Recursive Approach:  static Map<Integer, Integer> memo = new HashMap<Integer, Integer>();  public static int linearRecursiveFib(int x) {     if (x <= 2) {         return 1;     } else if (memo.containsKey(x)) {         return memo.get(x);     } else {         int result = linearRecursiveFib(x - 1)                  + linearRecursiveFib(x - 2);         memo.put(x, result);         return result;     } }   And a unit test:  @Test public void testSpeed() {     int input = 35;     long start = System.currentTimeMillis();     for (int i = 0; i < 10000000; i++) {         fib.linearIterativeFib(input);     }     System.out.println("Iterative approach took "              + (System.currentTimeMillis() - start) + "ms");      start = System.currentTimeMillis();     for (int i = 0; i < 10000000; i++) {         fib.linearRecursiveFib(input);     }     System.out.println("Recursive approach took "              + (System.currentTimeMillis() - start) + "ms"); }   Returns:  Iterative approach took 6ms Recursive approach took 132ms

How do you write (and run) a correct micro-benchmark in Java?  I'm looking for some code samples and comments illustrating various things to think about.  Example: Should the benchmark measure time/iteration or iterations/time, and why?  Related:


The questions is      If $n$ straight lines are drawn on a plane such that each line intersects every other line and no three lines have a common point of intersection, then the plane is divided into $$\frac{n(n+1)}{2}+1$$ regions. Prove this by using mathematical induction.   I did the base case, but I do not know how to show that if $P(k)$ is true, then $P(k+1)$ is true. The worked solutions say that the addition of another line creates another $k+1$ regions. How do they get that?  Thanks

Show that $n$ lines separate the plane into  $\frac{n^2+n+2}{2}$ regions if no two of these lines are parallel and no three pass through a common point.   I know we start with the base case, where, if we call the above equation P(n), P(0), for 0 lines would be 0.  But I really have no idea how to begin the inductive step.  How do we know what k+1 we're supposed to arrive at?  Thanks!


Let $G$ be a group such that $|G| = 2^2 \cdot 3^2$. I want to show that there exists a nontrivial normal subgroup of $G$.  My tries: By the Sylow theorem I find out that te number of $2$-Sylow subgroups is equal to 1,3 or 9. On the other side the number of $3$-Sylow subgroups is equal to $1$ or $4$. Now I don't have any ideas what to do.

Prove that a group of order 36 must have a normal subgroup of order 3 or 9.  Let n2 be the number of 2-Sylow subgroups of G (with |G|=36). Then n must be 1 or 3.  Let n3 be the number of 3-Sylow subgroups of G. then n3=1 or n3=4 if n3=1 we have 1 3-sylow group of order 9. and it is also a normal group(from sylow theorem ) if n2=1 there is normal group of order 4 but I cant show normal group of order 3.


I have a command that processes data slowly. The command processes lines from a file and writes the results to the output file data.txt:  my_command > data.txt  The issue I have is that I'd like to examine output lines in the data.txt file as they are processed. The problem is that no output appears in my output file until the OS decides to dump data to the output file, which happens every few hours. Is there anyway I can force data to be flushed to the file more frequently?

I have a script which calls two commands:  long_running_command | print_progress   The long_running_command prints progress but I'm unhappy with it. I'm using print_progress to make it nicer (namely, I print the progress in a single line).  The problem: Connection a pipe to stdout also activates a 4K buffer, so the nice print program gets nothing ... nothing ... nothing ... a whole lot ... :)  How can I disable the 4K buffer for the long_running_command (no, I do not have the source)?


I already know about the lower() and upper() but is there any simplest method to do it,for example like ignoreCase() in Java,  ex code:  a="hello how are you,i am praveen",  now if i do   "PRAVEEN" in a:  it gives us false,i want to make it caseinsensitive    thank you in advance

How can I do case insensitive string comparison in Python?  I would like to encapsulate comparison of a regular strings to a repository string using in a very simple and Pythonic way. I also would like to have ability to look up values in a dict hashed by strings using regular python strings.


I'm confused about a relatively simple algebraic geometry computation. Let's take the affine plane curve $x^3-y^2=1$; this is an open subset of an elliptic curve. Indeed, if we embed affine space into projective space in the usual way, we get the genus one projective curve $x^3-y^2z=z^3$; so far so good. Now consider the weighted projective space $\mathbb{P}(2,3,1)$ with coordinates $x_2,y_3,z_1$. The affine chart away with $z_1=1$ is just the $(x_2,y_3)$-plane, so we can embed our above curve into $\mathbb{P}(2,3,1)$ via $x\mapsto x_2$, $y\mapsto y_3$; the completion inside the weighted projective space is then given by the homogenous equation $x^3_2-y^2_3 = z_1^6$. Consider now the affine chart $x_2=1$; this is the quotient by $\mu_2$ acting with weights $(3,1)=(1,1)$ on $y_3,z_1$, so its ring of functions is $\mathbb{C}[y_3^2,z_1^2,y_3z_1]$. Write $a=y_3^2,b=z_1^2,t=y_3z_1$, so that this ring can be written $\mathbb{C}[a,b,t]/(ab-t^2)$. Then the restriction of the complete curve $x^3_2-y^2_3 = z_1^6$ to the chart is given by $\mathbb{C}[a,b,t]/(ab-t^2,1-a-b^3)= \mathbb{C}[b,t]/((1-b^3)b-t^2)$. But now we see that this affine piece of the curve is cut out in affine $(b,t)$-space by the degree-$4$ equation $-b^4 +b-t^2=0$; it's easy to verify this is non-singular, so it's a Zariski open inside a smooth genus-$3$ curve. So the conclusion seems to be that the curve defined by $x^3_2-y^2_3 = z_1^6$ has a piece which is a Zariski open inside a genus-$1$ curve, and also a piece which is a Zariski open inside a genus-$3$ curve, which is impossible. What's going on?

I saw in   that $y^2 = 1+x^4$ is (the affine equation of) an elliptic curve. Why is it the case? Typically, SAGE tells me it is isomorphic to $y^2 = x^3 - 4x$, which is an elliptic curve with Weierstrass equation, but I don't know how to prove this.  Thank you!


I'm struggling with the following piece of code:  def function(param):     if(param == 'notgen'):         return 'some text'     elif(param == 'gen'):         for x in range(10):             yield x gen = function('notgen') print(type(gen)) >>> <class 'generator'>   I suppose, this is expected behavior, but I cannot find proper docs. I need to yield and return values from one function depending on the situation.  Is it even doable?  Thanks everybody for suggestions!

What is the use of the yield keyword in Python? What does it do? For example, I'm trying to understand this code1: def _get_child_candidates(self, distance, min_dist, max_dist):     if self._leftchild and distance - max_dist < self._median:         yield self._leftchild     if self._rightchild and distance + max_dist >= self._median:         yield self._rightchild    And this is the caller: result, candidates = [], [self] while candidates:     node = candidates.pop()     distance = node._get_dist(obj)     if distance <= max_dist and distance >= min_dist:         result.extend(node._values)     candidates.extend(node._get_child_candidates(distance, min_dist, max_dist)) return result  What happens when the method _get_child_candidates is called? Is a list returned? A single element? Is it called again? When will subsequent calls stop?   1. This piece of code was written by Jochen Schulz (jrschulz), who made a great Python library for metric spaces. This is the link to the complete source: [Module mspace][1].


Whenever a new command is declared, each argument has to be in brackets {}, so that a new macro with several mandatory arguments looks like this:  \myMacro{1stArg}{2ndArg}{3rdArg}{4thArg}   Is there any way to get a macro that looks like this?  \myMacro{1stArg, 2ndArg, 3rdArg, 4thArg}

It seems that a common operation needed when defining new commands is to scan over a list of arguments (separated e.g. by a comma, but maybe by something else) and do something with each argument in the list, find the last one, or whatever.  For example to write commands that look like \Command{a,b,c} or \Command{c.d.e} and do something with each a, b, and c. See e.g. questions on  and .  Some solutions have been posted there, but what would be the best idiom to perform such kind of operations? LaTeX's \@for looks very nice, but is it possible to use it to scan anything other than comma-separated lists?


Let $G$ be a finite group, $|G|=n$. Then $G$ embeds into $S_n$ via left multiplication.  I have just learned  that, if $\exists H \lhd G$ (proper normal subgroup) which has trivial centralizer in $G$, then $G$ embeds into $S_{|H|<n}$ by conjugacy (e.g., $G=S_n$ and $H=A_n$, for $n \ge 3$).  This kind of "sharpening process" made me ask the following: Can we always/in some case determine the least $l$ such that $G \hookrightarrow S_l$?

It is a theorem that, for every finite group $G$, there exists an $n$ such that $G \leq  S_n$. Given a particular group, is there any way to determine or bound the smallest $n$ such that this occurs? The representation of the group is up to you, though bounds that use less information are preferred.  If this problem is too hard, specific special cases are also interesting, as are bounds on $n$.


I have a class that uses an internal binary tree as a data structure. I have a weird problem. I'm recursively looking for a specific node. If the node is found I want the code to return the reference to it. The problem: After return it's always null! But why?  private HeapNode getHeapNode(double key) {     //ELEMENT IS NOT AVAILABLE HERE, NULL-Pointer, ALWAYS     return getHeapNodeRec(key, rootHeapNode); }  private HeapNode getHeapNodeRec(double key, HeapNode curr) {     if (curr == null) {         return null;     }     if (curr.getKey() == key) {         //ELEMENT IS AVAILABLE HERE, I can access its data!         return curr;     }     else {         getHeapNodeRec(key, curr.getLeft());         getHeapNodeRec(key, curr.getRight());     }     return null; }

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?


Can multiclass Arcane Trickster/Wizard use their Arcane Trickster's Spell Slots to cast Wizards spells they know that are not Enchantments or Illusions?

Introduction  The eldritch knight fighter (EK) in my game is contemplating whether to dip into wizard (Wiz) for more magical versatility in combat.  Spell Slots  The  (PHB p.164/165) say:     You determine your available spell slots by adding together all your levels in the bard, cleric, druid, sorcerer, and wizard classes, half your levels (rounded down) in the paladin and ranger classes, and a third of your fighter or rogue levels (rounded down) if you have the Eldritch Knight or the Arcane Trickster archetypes. Use this total to determine your spell slots by consulting the Multiclass Spellcaster table.   So a EK6/Wiz5 would add up to a 7th level spellcaster (6/3 + 5). A snippet of the mentioned table shows:  \begin{array}{l} \text{level} & \text{1st} & \text{2nd} & \text{3rd} & \text{4th} & \text{5th} & \text{6th} & \text{7th} & \text{8th} & \text{9th} \\ \hline 1 & 2 & - & - & - & - & - & - & - & - \\ 2 & 3 & - & - & - & - & - & - & - & - \\ 3 & 4 & 2 & - & - & - & - & - & - & - \\ 4 & 4 & 3 & - & - & - & - & - & - & - \\ 5 & 4 & 3 & 2 & - & - & - & - & - & - \\ 6 & 4 & 3 & 3 & - & - & - & - & - & - \\ 7 & 4 & 3 & 3 & 1 & - & - & - & - & -  \end{array}  The table implies that the EK spell slots and the Wiz spell slots are simply one and the same pool of spell slots, but I didn't find an explicit mention of this. Or is this table only for the added class through multiclassing?  We’re both unsure of how to interpret this when it comes to expanding spell slots.  Question  Multiclass Spellcaster: do the classes have a shared pool of spell slots? If so, does it matter which class’ spells are cast when expending spell slots?  Our confusion comes from our inexperience with 5e and multiclassing - let alone spellcasters. Are we missing something, or are we just overthinking it?    Related (but without clear answer to this question):


Trying to identify a story:   I read it in an anthology during the 80's.  The anthology may have been older than that. Narrator is sent by an organization to view the future.  He does this on multiple occasions, with the future becoming stranger each time.  I'm not sure of the method used to grant him this view. His perspective of observation is quasi-orbital.  He views Earth from a great height and can zoom in for greater detail. He is mainly engaged in observing continental Europe.  During one of his observations, he determines that the majority of the European public now belongs to single-sex organizations that are at war with each other (Male vs. Female).   I'm sorry there's not more to go on.

Here's what I remember about it:   The protagonist is sent a relatively short distance into the future (maybe a year? I've forgotten). When he arrives in this "future" he finds himself in a completely different world, with non-human inhabitants. The inhabitants use a machine to teach him their torturous language. He tries to return home, and (eventually) finds himself in a realm of chaos/nothingness. He laboriously reconstructs in his mind everything he can remember about his home and finds himself back there somehow. The twist is      that in his "home" reality everyone speaks the language he was taught by the non-human inhabitants at his first stop.


I have seen  which seems to be the closest to my need.   When I download the docs, either I have no ways to filter the document or I don't see all the schools. I have been trying for a week now.   I can download individual files , but it definitely does not have all schools.   Where can I obtain all school boundaries (starting with CA)?     As I wrote in the very first paragraph, there is a question very similar to this one, but it does not answer my question for two reasons:   the Census offers School District and also some Elementary School boundaries, but they are not accurate down to each individual school.  I downloaded a huge file from that question, but it has no description (some generic name for each file), it is for the whole country, and I don't have any software that allows me to see the file. I need to click on every school in the country until I find my local school, and chances are these two sources are actually just one, and it will not have the individual elementary, middle and high school.   Image 1 is the city school district boundaries (which I also need, so that is helpftul).     Image 2 has some Elementary schools, not for all cities, and most importantly, it does not match reality. Each city has many elementary schools, and the map brings just one for "some" cities.

Census.gov usually makes available the shapefiles containing school zone boundaries. Due to the US government shutdown, census.gov is down. Does anyone know where to download a recently archived copy?


I have been reading and I have found so many different answers that are not consistent, for the question of what is the maximum attachment size in Apex when using Messaging.SingleEmailMessage mail = new Messaging.SingleEmailMessage(); Messaging.EmailFileAttachment efa = new Messaging.EmailFileAttachment(); efa.setFileName('myfilename.json'); efa.setBody(Blob.valueOf(blabla)); mail.setFileAttachments(new Messaging.EmailFileattachment[]{efa}); .....  what is the actual max limit of the attachment (efa)? 3mb? 5mb? 25mb?

I am using Apex to send emails with attachments to users.  For incoming emails, I know the maximum size of the email, including the attachment, is 10 MB. Email which are above 10 MB are not processed by Email Services and  are rejected with an email response back to the sender.  However, I am having trouble determining the maximum size for outgoing emails.  I've heard there's a 3 MB limit but haven't seen this documented.    Can you all confirm an outgoing limit on email or attachment size? What happens when the limit is exceeded?  What kinds of errors would I see? Is there any way to send emails more than this limit without leveraging any appExchange tool? Any ways?   Thanks in advance.


I have a property   public int active { get; set; }   That in my db has a default value of 1. I would like to have this property default to 1 if not otherwise specified  public partial class test {     public int Id { get; set; }     public string test1 { get; set; }     public int active { get; set; } }   I saw that in c# 6 you can do  public int active { get; set; } = 1   But I am not using c# 6 :(. Thanks for the advice. (Very, very new to c# / OOP)

How do you give a C# auto-property an initial value?  I either use the constructor, or revert to the old syntax.    Using the Constructor:  class Person  {     public Person()     {         Name = "Initial Name";     }     public string Name { get; set; } }   Using normal property syntax  (with an initial value)  private string name = "Initial Name"; public string Name  {     get      {         return name;     }     set     {         name = value;     } }   Is there a better way?


I have a question concerning a mixed model ANOVA conducted using the lmer function of the lme4 package. Despite a lengthy research across tutorials and forum entries I do not have a clear response to how exactly my lmer formula should be written. Experimental design 32 participants take place in the study, half of which constitute the test group, the other half the control group. Both groups do a pre and a posttest, and in both testing sessions they see 18 items of 3 conditions (= 54 items per testing session), and the stimuli of each condition are not repeated in the pre and the posttest. My question is now if the following formula is correct/complete and if the fact that we deal here with repeated measures is automatically calculated: (dv: dependent variable) Formula fit1 <- lmer(dv ~ (condition * session * group) + (1|item_ID) + (1|subj_ID) + group,               myData, REML=FALSE)  Or is one of the following more accurate: fit2 <- lmer(dv ~ (condition * session * group) + (1|item_ID) + (1+session|subj_ID) + group,               myData, REML=FALSE)  fit3 <- lmer(dv ~ (condition * session * group) + (1|item_ID) +               (1+session+condition|subj_ID) + group, myData, REML=FALSE)  I have also conducted the ANOVA comparing the three models (anova(fit1,fit2,fit3)) but given that these three models are not equally complex this comparison is actually not valid, is this assumption right? Moreover, I have included the pbkrtest package to obtain degrees of freedom and p values; are the obtained dfs usable for reporting the inferential statistics or do I need to apply an additional transformation?

There's a lot of discussion going on on this forum about the proper way to specify various hierarchical models using lmer.  I thought it would be great to have all the information in one place. A couple of questions to start:   How to specify multiple levels, where one group is nested within the other: is it (1|group1:group2) or (1+group1|group2)? What's the difference between (~1 + ....) and (1 | ...) and (0 | ...) etc.? How to specify group-level interactions?


Apologies if the title is incorrect, but I'm not entirely sure how to describe the issue I am having. Please see the image below for clarification. The text should be justified, but in random spots of the document, the text moves across the justification line.  This happens about 3 times in my 20 page document. Two of the occurrences are inline LaTeX as in the attached image, but the other occurrence is a text-only sentence in a text-only paragraph.  An excerpt of text (it might not seem too big a deal now, but if you've got a whole page of text properly justified, that part really sticks out):

In the inline math mode ($...$), if the formula is too long, LaTeX will try to break it on operators, e.g.  very long text followed by a very long equation like $a+b+c+d+e+f+g+h+i+j+k+l$ etc   may be rendered as  very long text followed by a very long equation like a+b+c+d+e+f+g+h+i+ j+k+l etc   However, the break won't happen if they are separated by commas, e.g.  very long text followed by a very long equation like $a,b,c,d,e,f,g,h,i,j,k,l$ etc   will overflow the page like  very long text followed by a very long equation like a,b,c,d,e,f,g,h,i,j,k,l etc   How to make LaTeX able to insert line breaks after a comma too?


I'm using Jabref to manage references. I use references both in English and German.       % my Question \documentclass[12pt,twoside]{report}% Use this line for the print version of the thesis  \usepackage{natbib} \begin{filecontents}{\jobname3.bib} @INPROCEEDINGS{Talaya2004,   author = {Talaya, J. and Alamús, R. and Bosch, E. and Kornus, W},   title = {Integration of a Terrestrial Laser Scanner with {GPS/IMU} Orientation     Sensors},   booktitle = {The International Archives of the Photogrammetry, Remote Sensing     and Spatial Information Sciences 35 (Part B7)},   year = {2004},   pages = {990-995},   owner = {Say},   timestamp = {2013.09.07} } @PHDTHESIS{Gordon2008,   author = {Gordon, B},   title = {Zur Bestimmung von Messunsicherheiten terrestrischer Laserscanner},   school = {Technical University Darmstadt, http://tuprints.ulb.tu-darmstadt.de/1206/.},   year = {2008},   owner = {Say},   timestamp = {2013.09.08} } @ARTICLE{Rautenberg2002,   author = {Rautenberg, U and Wiggenhagen, M},   title = {Abnahme und Ueberwachung photogrammetrischer Messsysteme nach VDI     2634, Blatt 1},   journal = {PFG},   year = {2002},   volume = {Nr. 2/2002},   pages = {pp. 117-124},   owner = {Sayyad},   timestamp = {2013.09.08} }  \end{filecontents}  \begin{document}  %%%%%%%%%%%%% begin Bibliography %%%%%%%%%%%%%%%%% \citet{Talaya2004}\\  \citet{Gordon2008} \citet{Rautenberg2002} \bibliographystyle{apalike}  \bibliography{\jobname3}  \end{document}   Output:     Gordon, B. (2008). Zur Bestimmung von Messunsicherheiten ter-   restrischer Laserscanner. PhD thesis, Technical University Darmstadt,   .      Rautenberg, U. and Wiggenhagen, M. (2002). Abnahme und ueberwachung   photogrammetrischer messsysteme nach vdi 2634, blatt 1. PFG, Nr.   2/2002:pp. 117-124.      Talaya, J., Alams, R., Bosch, E., and Kornus, W. (2004). Integration   of a terrestrial laser scanner with GPS/IMU orientation sensors. In   The International Archives of the Photogrammetry, Remote Sensing and   Spatial Information Sciences 35 (Part B7), pp. 990-995.   I want to get     Gordon, B. (2008). Zur Bestimmung von Messunsicherheiten ter-   restrischer Laserscanner. PhD thesis, Technical University Darmstadt,   .      % Correct german, Nouns are written with capital letters      Rautenberg, U. and Wiggenhagen, M. (2002). Abnahme und   Ueberwachung photogrammetrischer Messsysteme nach VDI 2634, Blatt 1. PFG, Nr. 2/2002:pp. 117-124.      % First letter should be capital.      Talaya, J., Alams, R., Bosch, E., and Kornus, W. (2004). Integration   of a Terrestrial Laser Scanner with GPS/IMU Orientation Sensors. In   The International Archives of the Photogrammetry, Remote Sensing and   Spatial Information Sciences 35 (Part B7), pp. 990-995.   What  should include / have to change in my code. What should I change in .bst file.  I'm using JabRef to mange my code.

Titles of articles I'm about to cite contain upper case letters and when using BibTeX it converts them to lower case ones. This happens only in the title and only the first letter conserves its case. For example, when I cite an article about HF, the reader won't know if it is about Hafnium (Hf) or fluorine acid (HF).  I know that I can fix it manually in the .bbl file but I would like to avoid it, or fix it automatically.


We found out later in the season that Bernard is made in the image of Arnold. Also in earlier episodes, Bernard himself asks Ford about Arnold. How is it possible that no one in the whole park knows who Arnold is, and what he looked like?  I can understand that it has been many years(30?) since the park opened and new people might not know about the 2nd partner, especially since Delos will not want anyone to know about someone so important committing suicide just before opening of the park. But Elsie points out in one episode that Bernard 'has been there since ever'. I am not sure if it was mentioned or I forgot when Ford introduced Bernard in the park, but it seems a little improbable that no one even back then knew about Arnold. Also Bernard being a programmer himself could easily see at any point the code commits made by Arnold. Maybe it was one of those 'it doesn't look like anything to me' thing, maybe.  But the massacre at the church location must have been a huge thing, even if Delos hushed it up. Someone must know, right? Speaking of Delos, someone in higher management must have known about Arnold(William's father-in-law?).   On a sidenote, isn't it too cocky and careless of Ford to keep a photo of him(at a very young age) with a guy looking like Bernard in his office. Ok, so Bernard probably wont even see Arnold in that photo, but he can't be the only one visiting his office. Ford seems to spend an awful lot of time at his other underground office anyways.

Spoiler markdown is annoying, and will only be here for a week. Don't read further if you're not up to date with Westworld.  It has been revealed in episode 9 of Westworld that;      ...Bernard is actually a host 'resurrection' of Arnold, made in his likeness.   This is confirmed through the photograph and flashbacks of Dolores talking to him in the secret basement of the hidden home.  But, given the fact that all the employees speak of and semi-mythologise Arnold, why is it that      No one seems to have noticed that Bernard looks exactly like him? We know there is documentation and photos of Arnold (Ford has one), so given that Bernard is seemingly free to come and go as he pleases why would no one from the 'real world' recognise him as Arnold's Doppelganger? If Bernard never rotates out of the facility, why has no-one noticed he doesn't ever leave? the picture of Ford, his father and Bernard would indicate that the Bernard/Arnold host has been knocking around the facility for a long time (The flashback of Ford activating the machine looks like a much younger Ford, I'd speculate 20 years younger minimum). Are we really to believe that Charlotte Hale, a board member, has no idea what Arnold looks like?   Has the show addressed this glaring plot hole at any previous point?    Given the events of S02E02, I'm opening this one straight back up wth a bounty attached. Arnold was clearly not a reclusive, he should be recognisable to outside interests: and yet still is only known as 'Bernard' by external forces in Season 2. Are there any interesting theories why?


I have a two JavaScript (.js) files in a static resource. When I enter the full  of a JavaScript file in the browser,  the JavaScript file is displaying whereas if I do  the JavaScript file is not displaying.  FYI, both of the JavaScript files are in the same static resource. I have updated the VExpander.child.js file. Prior to my update, VExpander.child.js was displaying in the browser.  Is there a reason for not displaying the file?

Is it at all possible to have <link href="http://jacobraccuia.com/styles.css">inside your Visualforce page and have it work when clicking the http://cs14.salesforce.com/apex/visualforce_page?    That way i can make tons of CSS changes without having to reupload or repackage files.    It works perfectly when I make the site a public domain but inside Salesforce it doesn't.  It seems like I'm going to have to re-zip and reference as a static resource whenever I want to demo or repackage or something.  The other problem is that one of the components requires log-in, which is not something I have set up...  I haven't fooled around with the Eclipse IDE, but maybe that is the way to go.  edit: here is the top of my code!  <apex:page sidebar="false" showHeader="false"  standardStyleSheets="false" controller="Boardroom_Home_Jacob"> <head>     <apex:stylesheet value="http://jacobraccuia.com/bootstrap/css/bootstrap.min.css" />     <apex:stylesheet value="http://jacobraccuia.com/sf_styles.css" /> </head>   edit 2:  adding https:// seemed to work perfectly in Firefox, but in Chrome.... (failed) net::ERR_INSECURE_RESPONSE


Jerry is neither rich nor famous. I know this is correct.  Is this correct? Jerry isn't rich nor famous. It doesn't sound natural to me, but I can't find a reason why it wouldn't be right.

I've always wondered this but never asked. Given this statement:     Energy can be neither created nor destroyed.   Should it be or or nor? This is on Wikipedia so they are probably correct in saying nor but why is this so? In my opinion it sounds like it should be or.  The more I think of it the more I think it can be left up to interpretation or emphasis. For example, it could be interpreted to mean:     Energy = ¬Created ∨ ¬Destroyed   or     Energy = ¬(Created ∨ Destroyed)   Some help here?


I want to show the data in ListView using array adapter. When I run the program I got the NullPointerException. error was in myarray.add(contactid+ " - ");  full Error was:     java.lang.NullPointerException: Attempt to invoke virtual method 'boolean java.util.ArrayList.add(java.lang.Object)' on a null object reference at com.android.jsonparsingtest2.MainActivity$JSONTask.doInBackground(MainActivity.java:82)                                                                                at com.android.jsonparsingtest2.MainActivity$JSONTask.doInBackground(MainActivity.java:44)   MainActivity.java  public class MainActivity extends ActionBarActivity {  private ListView tvData;  private ArrayAdapter arrayAdapter;  @Override protected void onCreate(Bundle savedInstanceState) {     super.onCreate(savedInstanceState);     setContentView(R.layout.activity_main);     Button btnHit = (Button) findViewById(R.id.btnHit);      btnHit.setOnClickListener(new View.OnClickListener() {         @Override         public void onClick(View v) {             new JSONTask().execute("http://a.nextput.com/offers/19/o/a0f252064bd27339607c7166d270d82a/f?aff_id=56556_18&im=25");         }     }); }  public class JSONTask extends AsyncTask<String, String, ArrayList<String>> {     ArrayList<String> myarray;     @Override     protected void onPreExecute() {         super.onPreExecute();     }      @Override     protected ArrayList<String> doInBackground(String... params) {         HttpURLConnection connection = null;         BufferedReader reader = null;         try {             URL url = new URL(params[0]);             connection = (HttpURLConnection) url.openConnection();             connection.connect();              InputStream stream = connection.getInputStream();             reader = new BufferedReader(new InputStreamReader(stream));             StringBuffer buffer = new StringBuffer();              String line = "";             while ((line = reader.readLine()) != null) {                 buffer.append(line);             }              String finalJson = buffer.toString();             JSONObject parentObject = new JSONObject(finalJson);             JSONArray parentArray = parentObject.getJSONArray("offers");              //ArrayList<String> data = new ArrayList<>();             StringBuffer finalBufferData = new StringBuffer();             for (int i = 0; i < parentArray.length(); i++) {                 JSONObject finalObject = parentArray.getJSONObject(i);                 String contactid = finalObject.getString("app_name");                 //String custname = finalObject.getString("name");                 //String custemail = finalObject.getString("email");                 //String custgender = finalObject.getString("gender");                 //String mobileno = finalObject.getString("mobile");                 myarray.add(contactid+ " - ");             }             return myarray;          } catch (MalformedURLException e) {             e.printStackTrace();         } catch (IOException e) {             e.printStackTrace();         } catch (JSONException e) {             e.printStackTrace();         } finally {             if (connection != null) {                 connection.disconnect();             }             try {                 if (reader != null) {                     reader.close();                 }             } catch (IOException e) {                 e.printStackTrace();             }         }         return null;     }      @Override     protected void onPostExecute(ArrayList<String> result) {         super.onPostExecute(result);         // tvData.setText(result);         arrayAdapter = new ArrayAdapter(MainActivity.this, android.R.layout.simple_list_item_1, result);         tvData = (ListView) findViewById(R.id.tvJsonItem);         tvData.setAdapter(arrayAdapter);     } }  }

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 heard that April 26 will be the day Ubuntu 18.04 is going to be releasing its stable version.   Is it possible to know in advance at what time?

I want to know where I can find updated information about all the stable and in-development versions of Ubuntu, where I can find this information?     This question is meant to be a canonical question. It expects to answer the following questions:         Is X version stable yet?   Is X version in beta?   Is X version still supported?   What versions are still supported?   What are the versions in Beta/Alpha?   Until where X version will be supported?   Have X version ceased support?   When will be X version released?   Where I can download any release?   When will the next LTS version of Ubuntu be released?         The list is not exhaustive.


How do you read/write a Map, specifically a LinkedHashMap, from/to a text file? I've tried to use the Iterable interface, but that doesn't work because i have Map and Iterable can only take one argument.   Map code:  Map<String, String> m1 = new LinkedHashMap<String, String>(16, 0.75f, true);  m1.put("John Smith", "555-555-5555"); m1.put("Jane Smith", "444-444-4444");   I know I have to create a PrintWriter + BufferedWriter/PrintReader + BufferedReader objects to read/write to this text file, and then use some version of the hasNext() method to read until the file ends, I just am not sure how. Please help!  EDIT: I can't use the Serializable interface for this either, because I'm trying to write a Map to the text file, not individual entries, and there's no indexOf() method for Maps.

If I have an object implementing the Map interface in Java and I wish to iterate over every pair contained within it,  what is the most efficient way of going through the map?  Will the ordering of elements depend on the specific map implementation that I have for the interface?


I have seen on many occasions a name of a function (frankly speaking I just call it function because of it typical appearance, they are though sometimes named commands or system calls but I do not know the idea behind labelling them differently), which contains a number within the brackets part of it, like in exec(1) exec(2) exec(3).  What is the meaning behind putting numbers into them ?

So, for example, when I type man ls I see LS(1). But if I type man apachectl I see APACHECTL(8) and if I type man cd I end up with cd(n).  I'm wondering what the significance of the numbers in the parentheses are, if they have any.


I need to solve the equation $x^{17}\equiv 37$ in $\mathbb{Z}/101\mathbb{Z}$.   I've looked into these topics (,  ) but couldn't derive a solution.     So summarize what I know:       101 is prime $\implies \mathbb{Z}/101\mathbb{Z}$ is cyclic group (or even a field) since $\mathbb{Z}/101\mathbb{Z}$ is cyclic it has a generator with the same order of $\mathbb{Z}/101\mathbb{Z}$. In this case the generator has order $\phi(101)=101-1=100$  due to Fermat I have $x^{100}\equiv 1$ $mod(101)$ $\phi(101)=100=2^2\cdot 5^2$ I have tried in vain to orient myself to:  I know that the (only) solution is $x=52$   Can somebody help me?

We know that $221 = 17*13$. So we can check if the system has roots to both of those equations separately, which it does:  $x^{5} \equiv 2$ mod $13$ has the solution $6 + 13n$ and $x^{5} \equiv 2$ mod $17$ has the solution $15 + 17n$.   I got these numbers from wolfram, I have no idea how to solve this problem WITHOUT a calculator. And even after finding these numbers. How would one obtain a solution modulo $221$? I was thinking the Chinese Remainder Theorem but I am under the assumption that CRT only applies to problems with powers of $x$ which are $1$.  Thanks.


How can I construct a stored procedure that will allow me to pass (for example) an @IDList so that I can write:  Select * from Foo Where ID in @IDList   Is this doable?

Is there a graceful way to handle passing a list of ids as a parameter to a stored procedure?   For instance, I want departments 1, 2, 5, 7, 20 returned by my stored procedure. In the past, I have passed in a comma delimited list of ids, like the below code, but feel really dirty doing it.   SQL Server 2005 is my only applicable limitation I think.  create procedure getDepartments   @DepartmentIds varchar(max) as   declare @Sql varchar(max)        select @Sql = 'select [Name] from Department where DepartmentId in (' + @DepartmentIds + ')'   exec(@Sql)


I'd like to know if there's a method to get Windows 7 or Windows 8 Developer Preview to install to a GPT disk on my traditional IBM PC BIOS setup. Windows 7, of course, rejects my GPT partition, because I don't have UEFI. Well, Debian and Grub 2 seem to work fine... So I want to know if there's a way to force Windows to work as well.  I'd seriously prefer avoiding hybrid MBR/GPT, because it's quite fragile and feels hackish, but it does work. I would assume the main blocker is that Microsoft is simply not adding support in their BIOS bootloader for GPT, which is understandable, I suppose. Is there any recourse?  The way I see it, there are a few potential solutions:   Having an alternate bootloader for the Windows kernel. NOT a chainloader. As far as I know, none exist. That's a shame. Storing as little as possible on an alternate MBR-based disk. Not liking this idea, but it's doable. I'm not sure I'd call this a solution to the problem as much as a workaround. Emulating EFI enough to get the EFI bootloader to work... I remember hearing a bit about a UEFI-on-BIOS emulator, but I can't find anything about it now. I assume this is doable, but there's probably not much demand for it yet, and it's probably no fun at all to setup. GRUB 2 seems to be able to boot a hackintosh with necessary EFI emulation, but I guess there's no interest/UEFI 2 is harder to approach (and I would assume other EFI emulators used for hackintosh are on the same boat.) Coreboot with TainoCore. Coreboot does not work on my motherboard (as far as I know,) and I'm quite sure the last effort to do this during GSoC was a failure. I'd absolutely love this solution, if it did work, though.   Am I missing anything?

My PC does not support UEFI BIOS, but it has Legacy BIOS. The motherboard is "P5LD2-X1333".  I need to install Windows 8 on the 3TB hard drive with GPT scheme, since as we know, the MBR scheme does not support more than 2TB space. Also, you can not boot OS from a GPT hard drive without UEFI BIOS.  So how can I use the hard drive with 3TB space with OS and without UEFI BIOS?


After updating Ubuntu to 20.04 but is showing Unity. Before 20.04, I had 18.04 upgraded from 16.04 but that also had same desktop environment.  How can I switch to Ubuntu's default GNOME based desktop environment?

I've installed Ubuntu 18.04, and everything worked excellent until I decided to try Unity desktop. Bottom line - I've uninstalled unity desktop completely. But! I have some stuff that didn't recover to previous state. First is the login screen that have changed, and I want to bring back the gnome native login screen.  Second is the Lock screen (that is shown on wake up). Before unity it was the gnome's one, that you can change it's background in the background properties.  After unity it changed to annoying login form that doesn't work if the keyboard layout is not english, and you just can't switch between layouts in this form and all the window around it. So if before sleep I was using hebrew or russian layout, on wake up I just cant log back in, and I have to restart the pc.  How can I switch back to normal gnome stuff? Thanks!


While checking my tempdb details, its showing that almost 90 GB is consumed. So I tried clearing all caches and perform shrinking, but still it's consuming 90 GB of space.  My drive became full where tempdb is allocated, which is why I am trying to get space from database files.    I have executed following queries to resolve issue. But it is still consuming 90 GB.  DBCC FREEPROCCACHE -- clean cache DBCC DROPCLEANBUFFERS -- clean buffers DBCC FREESYSTEMCACHE ('ALL') -- clean system cache DBCC FREESESSIONCACHE -- clean session cache DBCC SHRINKDATABASE(tempdb, 10); -- shrink tempdb dbcc shrinkfile ('tempdev') -- shrink db file dbcc shrinkfile ('templog') -- shrink log file   The tempdb database has only one .mdf and one .ldf file.  Is there any option to clear tempdb without restarting MSSQL service?  Note: MSSQL Version 2012, tempdb is in simple recovery mode.  Update : While checking the Messages of shrinking It is showing  'DBCC SHRINKFILE: Page 1:12185400 could not be moved because it is a work table page.' I hope its due active connection to tempdb, So i checked sp_whoisactive its not showing any connection. But replication is going on the server  Also i got table wise size from tempdb as follows    How i can shrink 'tempdb' properly ?  A

We have a 2008R2 production DB in full recovery mode.  To produce a minimised dev version, for SQL Server 2014, the following steps are run:  RESTORE DATABASE BigDB FROM  DISK = N'C:\Share\BigDB.bak' WITH  FILE = 1,   MOVE N'BigDB_Data' TO N'C:\Database\BigDB_Data',   MOVE N'BigDB_Audit]' TO N'C:\Database\BigDB_Audit',   MOVE N'BigDB_Log' TO N'C:\Database\BigDB_log.LDF',  NOUNLOAD,  REPLACE,  STATS = 5  alter database BigDB set recovery simple with NO_WAIT alter database BigDB set compatibility_level = 120  go  -- {truncate / delete statements.. with no additional 'go'}  DBCC SHRINKFILE (N'[BigDB_Audit]' , 500) DBCC SHRINKFILE (N'BigDB_Data' , 1000) DBCC SHRINKFILE (N'BigDB_Log' , 1000) DBCC SHRINKFILE (N'BigDB_Data' , 1000) -- Without this repeat, file remains same DBCC SHRINKFILE (N'BigDB_Log' , 1000) -- Without this repeat, file remains same   I've observed that without the repeat of the shrinkfile on the main data file, and the log, one or both does not actually shrink.  Can this behaviour be expected, and if so why?


Let $A$ and $B$ be $n \times n$ matrices over some field with $A$ nilpotent. Now let $c_1,\ldots,c_{n+1}$ be $n+1$ distinct scalars such that $A+c_i B$ is nilpotent for all $i=1, \ldots,n+1$. Then how can I show that $B$ is also nilpotent?    Thanks

Suppose $A$ and $B$ are $n\times n$ matrices over $\mathbb{R}$ such that for $n+1$ distinct $t \in \mathbb{R}$, the matrix $A+tB$ is nilpotent. Prove that $A$ and $B$ are nilpotent.     What I've tried so far:  Define $f(t)=(A+tB)^n$. Then $f(t)$ has polynomials of degree at most n as its entries. Each of these polynomials has n+1 distinct roots, and hence is the constant zero polynomial. This shows that for all $t \in \mathbb{R} \ f(t)=0$, which in particular gives $A^n= f(0) =0$ that shows A is nilpotent. Now if none of the $t_1,...t_{n+1}$ , that make A+tB nilpotent, is zero, we can use $g(t)=(tA+B)^n$ with roots $\frac{1}{t_i}$ similarly and show that B, too, is nilpotent. But I have no idea in case one of the $t_i$ is zero.  Thanks in advance.


I'm using the ratio test on the complex power series $\sum_{n=0}^\infty (\frac{n!}{n^n})z^n$. I'm able to get to $\frac{(n+1)!|z|^{n+1}}{(n+1)^{n+1}}(\frac{n^n}{n!|z|^n})=|z|\frac{n^n}{(n+1)^n}$. How should I interpret this result and determine the radius of convergence?

$$S=\sum^{\infty}_{n=1}\frac{n!}{n^n}z^n$$ Where $z \in \mathbb{C}$. Using D'Alambert's test of convergence:  $$\frac{1}{R}=\lim_{n\to \infty}\frac{\frac{(n+1)!}{(n+1)^{n+1}}}{\frac{n!}{n^n}}$$  $$\frac{1}{R}=\lim_{n\to \infty}\frac{n^n}{(n+1)^n}$$  Where $R$ is the radius of convergence. When we consider the difference between $4^3$ and $3^3$, for example, it seems clear to me that this limit cannot be computed as follows:  $$\frac{1}{R}=\lim_{n\to \infty}\frac{n^n}{(n+1)^n}=1$$  However, this is exactly how my textbook (Riley, Hobson and Bence) does it. How can this computation be justified, considering that $n+1$ to a large power will always be a lot larger than $n$.


Show that the only continuous function on $(-1,+1)$, which is not identically zero and satisfies the equation $f(x + y) = f(x)f(y)$ for all $x,y \in \mathbb{R}$, is the exponential function $f(x) = a^x$ with $a = f(1) > 0$.

This is part of a homework assignment for a real analysis course taught out of "Baby Rudin."  Just looking for a push in the right direction, not a full-blown solution.  We are to suppose that $f(x)f(y)=f(x+y)$ for all real x and y, and that f is continuous and not zero.  The first part of this question let me assume differentiability as well, and I was able to compose it with the natural log and take the derivative to prove that $f(x)=e^{cx}$ where c is a real constant.  I'm having a little more trouble only assuming continuity; I'm currently trying to prove that f is differentiable at zero, and hence all real numbers.  Is this an approach worth taking?


I need to generate a regex to match any string with this structure:  {"anyWord"}{"aSpace"}{"-"}{"anyLetter"}   How can I do it?  Thanks     EDIT   I have tried:     string txt="print -c";    string re1="((?:[a-z][a-z]+))";   // Word 1    Regex r = new Regex(re1,RegexOptions.IgnoreCase|RegexOptions.Singleline);   Match m = r.Match(txt);   if (m.Success)   {         String word1=m.Groups[1].ToString();         Console.Write("("+word1.ToString()+")"+"\n");   }   Console.ReadLine();   but this only matches the word "print"

I don't really understand regular expressions.  Can you explain them to me in an easy-to-follow manner?  If there are any online tools or books, could you also link to them?


Similarly, if the answer is 10th president, how do you ask a question in English to get this answer. I wanted to ask a doctor to find out how many Corona patients had been diagnosed. But, when he said that this is the 100th patient, I didn't know how to ask a question to get that answer.  Hope my question is clear.

I want to make a question having an answer as follows:     5 is the third prime number.   The bold part is the answer. How to phrase the question?


I made a cream cheese frosting a while ago.  I didn't use all the frosting, so I put the rest (quite a lot actually) in the fridge with the intent to freeze it by the weekend if I hadn't used it.  Fast forward a month and it's still in the fridge.  I don't have the exact recipe in front of me, but it's cream cheese, powdered sugar, butter, extract, and milk.  The milk is minimal and I can't remember if I actually used it (I don't always).    I should note that I keep my refrigerator very cold (veggies usually freeze after a couple days - I like milk super cold).  I don't know if that would help preserve it longer, but thought it might be relevant.

How do I know if a given food or ingredient I have is still good, or if I should discard it?  How can I best preserve a food or ingredient?     This broad question is intended as a "general reference" question to quickly answer many how long will food keep for? questions. Please feel free to edit this question to expand and clarify as needed.


I've just installed CentOS 8 on my laptop using the minimal ISO.  While it was able to connect to my apartment's Wi-Fi during installation, I am unable to get any connectivity from the terminal. uname -a prints Linux localhost.localdomain 4.18.0-193.el8.x86_64 #1 SMP Fri May 8 10:59:10 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux  lspci prints ... 01:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter ...  rfkill prints ID TYPE      DEVICE                 SOFT      HARD 0  wlan      ideapad_wlan      unblocked unblocked 1  bluetooth ideapad_bluetooth   blocked unblocked 2  bluetooth hci0                blocked unblocked 3  wlan      phy0              unblocked unblocked  ip l prints 1. lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 2. enp2s0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP mode DEFAULT group default qlen 1000     link/ether c8:5b:76:c4:da:b2 brd ff:ff:ff:ff:ff 3. wlp1s0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000     link/ether c8:3d:d4:7e:8f:ed brd ff:ff:ff:ff:ff:ff  nmcli radio all prints WIFI-HW  WIFI     WWAN-HW  WWAN enabled  enabled  enabled  enabled  nmcli device status prints DEVICE  TYPE      STATE      CONNECTION enp2s0  ethernet  connected  enp2s0 lo      loopback  unmanaged  -- wlp1s0  wifi      unmanaged  --  ping 192.168.1.1 prints connect: Network is unreachable  I'm connected to my router over the LAN so I'm able to install any packages as needed. Also, nmtui, while it allows me to edit my Wi-Fi connection, does not allow me to activate said connection.  That is, the connection doesn't show up under "Activate a connection".

I recently installed CentOS 7 as the sole OS on an Acer Aspire T.  There is no GUI, as it is a server with a terminal-only interface.    What do I need to do to get CentOS 7 to be able to see and list the available wifi connections?    When I use the Network Manager Command Line Tool nmcli, I get the following, which indicates that nmcli has wifi enabled, but that it cannot see any wifi connections:    [root@localhost ~]# nmcli general status STATE         CONNECTIVITY  WIFI-HW  WIFI     WWAN-HW  WWAN     disconnected  none          enabled  enabled  enabled  enabled  [root@localhost ~]# nmcli connection show NAME  UUID  TYPE  DEVICE  [root@localhost ~]# nmcli device status DEVICE  TYPE      STATE      CONNECTION  eno1    ethernet  unmanaged  --          lo      loopback  unmanaged  --          wlp3s0  wifi      unmanaged  --    I then checked the firewall config, which shows that ssh is the only open service, as follows:    [root@localhost network-scripts]# firewall-cmd --list-all public (default, active)   interfaces: eno1   sources:    services: dhcpv6-client ssh   ports:    masquerade: no   forward-ports:    icmp-blocks:    rich rules:     What do I need to change in order to get CentOS to be able to see the wifi connections?  There are available connections.  Does the firewall need to change?  Or something else?      EDIT:    I am not able to do the things that @TimS. suggested because the following tools are not pre-installed on the computer, and it is not connected directly to the internet:    [root@localhost ~]# ifconfig -a -bash: ifconfig: command not found [root@localhost ~]# lspci -v -bash: lspci: command not found   [root@localhost ~]# iw dev -bash: iw: command not found [root@localhost ~]# iwconfig -bash: iwconfig: command not found     I am able to open nmtui, but am not sure what parameters to enter to create a new connection.     [root@localhost ~]# iw dev     -bash: iw: command not found     [root@localhost ~]# iwconfig     -bash: iwconfig: command not found


Is there any way to get desktop notification for Stack Overflow? I would like to know that someone has answered, commented, or voted on my question or answer without visiting the Stack Overflow webpage, and then I can visit Stack Overflow.  I spend a lot of time in refreshing the Stack Overflow page to see notifications.

Is there any desktop notifier for stackoverflow.com?  I'd like it to notify in the system tray when questions of my interest are posted, answers and comments to my questions are given, etc.


I am trying to give another PC completely unrestricted access to my machine. They are both on the same subnet. What I am looking for is effectively disabling the firewall entirely for one IP address.  Example  Host: 192.168.1.2  Client: 192.168.1.3 Firewall "off"  World: xxx.xxx.xxx.xxx Firewall "on"  To be specific I am running "Easy"PHP as a testing server for websites and want to access them from other machines on my network. After tinkering I figure the method suggested in my question would be best to make things actually easy.  PS. I have already tried opening all ports both inbound and outbound to that IP with no results. My only current success has been actually turning the whole firewall off.

I installed Windows 7 on my main machine and Windows Firewall is causing havoc with my home network.  I can't seem to connect to the main machine running Windows Firewall from any other machines on my network.  I've used Zone Alarm in the past and it was easy to configure an IP range to get through, but I can't seem to find that in Windows Firewall config.  Any advice?  Thanks!


In an answer to another question, someone jokingly mentioned using <: :> instead of [] for array subscripting.  I had never heard of this, and apparently neither has Google, so I did a bit of testing and found that all the way back in C compilers, <: is interchangable with [ and :> is interchangable with ], IE:  int* ptr; ptr<:0:>; ptr<:0]; ptr[0:>;   All compile and mean the same thing.  What was the purpose of this operator?

I learned today that there are digraphs in C99 and C++.  The following is a valid program:  %:include <stdio.h>  %:ifndef BUFSIZE  %:define BUFSIZE  512 %:endif  void copy(char d<::>, const char s<::>, int len) <%     while (len-- >= 0)     <%         d<:len:> = s<:len:>;     %> %>   My question is: why do they exist?


Which of the following is/are correct? A. I only answered two questions. B. I answered only two questions. C. I answered two questions only.

Which is grammatically correct?  I can only do so much in this time.  or  I can do only so much in this time.


I can't seem to get Ubuntu 12.04 or 13.04 installed properly alongside Windows 8 on a netbook Acer Aspire One 765.   First thing I tried was with a live usb/bootable usb. This failed after disabling secure boot and putting USB HDD on no.1 on the list. The system does not recognize any usb device although the usb works fine on another laptop.  Then I tried UnetBootin and Wubi. After installation I get a Windows 8 boot menu in which I can choose between w8 and ubuntu.   When I choose Ubuntu I get a screen that says it cannot boot windows because of hardware- or software changes. It needs the Windows install disk.  File: \ubuntu\winboot\wubi1dr.mbr  Status: 0xc000007b  Installing with wubi was sort of my last option to finally get Ubuntu on this device but I seem to be stuck with w8 here.  All help is appreciated!

I'm absolutely new to Linux. I would like to know how to install Ubuntu alongside the pre-installed Windows 8+ OS.  Should I do it with Wubi, or through the Live USB/DVD?  What steps do I need to take to correctly install Ubuntu?


I reset my phone. then when it finally turned back on after restoring itself, it asked for my Apple ID and the password. I forget both of them . it will not let me into the phone without imputing that information, which I don't have.  is there a way to get into my phone so I can use it again without knowing it ?

I bought a used iPhone 4.  The previous owner re-set the phone, but did not remove the device from their iCloud.  It is asking me for their iCloud information when I try to set-up the phone.  I don't have contact with the previous owner anymore.  Is there a way to remove the device from their iCloud so I can use a new one?


EDIT:I'm using a custom theme and attempting to edit the style on a specific field on the user edit page.  Dooug is correct. My question was answered here   I want to perform some styling and add CSS to the user edit page. Is this possible?

I would like to make some changes to the core toolbar module across all my sites, and I don't want to modify the actual core's css.  It looks like I should be able to override the core css found in modules/toolbar/toolbar.css by simply copying this file into my sites directory at /sites/modules/toolbar/toolbar.css.  I tried doing this, cleared the Drupal cache, but nothing happened.  What am I missing?