I can't seem to figure out how to enlarge the viewable area in Camera 0 in order to see how to position object I want rendered. Cntrl + B gives me  crosshairs to redraw but does not allow to redraw the viewable area larger.

The Camera view area is so small (see picture). How can I increase it?


I just came across the old cliche that describes a star as a "little candle that shines its light so far," and am curious whether, barring obstruction and interference, one might be able to detect a candle at the distance of a star or more (obviously, using a keener instrument than the human eye).   I understand that we can think of the light from a candle as being a cloud of photons. I know that a photon can potentially travel the greatest distances available in the reachable universe, but it seems to me that from a weak source they must at some distance become so dispersed that even a single photon from the source would be unlikely to hit the earth. Is that right?

It would seem that far-away stars are at such a distance that I should be able to take a step to the side and not have the star's photons hit my eye. How do stars release so many photons to fill in such great angular distances?


Let $ f: [0,\infty) \to \Bbb R$ be a function of class $C^2$ (twice continuously differentiable on $\Bbb R$) such that $$ \lim_{x \to \infty} (f(x)+f'(x)+f''(x))=C$$ Then prove that $\lim_{x \to \infty} f(x)=C$ My attempt: Let us take the auxiliary function $g(x)$ defined as, $g(x) = e^x(f(x)+f'(x))$. Then we have $g'(x)=e^x(f(x)+ 2f'(x)+f''(x)$. If we use Cauchy's MVT to the functions $g(x)$ and $e^x$ on any interval $[N, 2N]$, then there exists $\mathcal E \in (N, 2N)$ such that $$ \frac{ g(2N)-g(N)}{e^{2N}-e^N}=\frac{g'(\mathcal E)}{e^{\mathcal E}}$$ $$ \implies \frac {e^{2N}(f(2N)+f'(2N))-e^N(f(N)+f'(N))}{e^{2N}-e^N}=\frac{e^{\mathcal E}(f(\mathcal E)+2f'(\mathcal E)+f''(\mathcal E))}{e^{\mathcal E}} $$ $$ \implies \frac {(f(2N)+f'(2N))-e^{-N}(f(N)+f'(N))}{1-e^{-N}}= f(\mathcal E)+2f'(\mathcal E)+f''(\mathcal E)$$ Now let us take the limit of $N$ as $N \to \infty$ (this also implies $\mathcal E \to \infty$), $$  \implies \lim_{N \to \infty} {\frac {(f(2N)+f'(2N))-e^{-N}(f(N)+f'(N))}{1-e^{-N}}}= \lim_{\mathcal E \to \infty} {f(\mathcal E)+2f'(\mathcal E)+f''(\mathcal E)} \space \space \space \space \space \dots \space (1)$$ Now assume $\lim_{x \to \infty}{f(x)}=k$ and $ \lim_{x \to \infty} {f'(x)}=l$ and , then from $(1)$, we would have $$ k+l=C+l$$ $$\implies k=C$$ So it shows  $\lim_{x \to \infty} f(x)=C$. I have a doubt regarding my proof. I had to assume that  $ \lim_{x \to \infty} {f'(x)}$ exists and is finite (This also deduces $\lim_{N \to \infty}{e^{-N}(f(N)+f'(N))}=0$) . Is it possible to proceed without that assumption? What are the modifications in this proof it would bring then?

This problem is an extension to the simpler problem which deals with $f(x) + f'(x) \to A$ as $x \to \infty$ (see problem 2 on ).     If $f$ is twice continuously differentiable in some interval $(a, \infty)$ and $f(x) + f'(x) + f''(x) \to A$ as $x \to \infty$ then show that $f(x) \to A$ as $x \to \infty$.   However, the approach based on considering sign of $f'(x)$ for large $x$ (which applies to the simpler problem in the blog) does not seem to apply here. Any hints on this problem?  I believe that a similar generalization concerning expression $\sum\limits_{k = 0}^{n}f^{(k)}(x) \to A$ is also true, but I don't have a clue to prove the general result.


If I was looking at the following code as Javascript code, it would make sense...but how is it that the call action() in Main doesn't yield a NullReferenceException for i?  Did the Action grab a JavaScript context like thing?  Thanx in advance to all.  public class Program {     static void Main(string[] args)     {         var p = new Program();         var action = p.method();         action();         Console.ReadKey();      }      public Action method()     {         var i = 6;         Action action = () => Console.WriteLine(i);         i++;         return action;     }  }   OUTPUT>>7

What is a closure? Do we have them in .NET?  If they do exist in .NET, could you please provide a code snippet (preferably in C#) explaining it?


I have a simple matrix:       [,1] [,2] [,3] [1,]    1    2    3 [2,]    4    5    6 [3,]    7    8    9 [4,]   10   11   12   I have to calculate linear regression and orthogonal regression using lm() and prcomp() respectively. (for orthogonal see: )  Assume that the first column is the the X and M the matrix I wrote before.  LINEAR REG.  mod1 <- lm(M[,1] ~ M[,2] + M[,3] + 0)   Its output is (coefficient):  Coefficients: M[, 2]  M[, 3]        2      -1   Ok, I have these coefficients.  Now for   ORTHOGONAL REG.  mod2 <- prcomp(~ M[,1] + M[,2] + M[,3])   Its output is:               PC1        PC2        PC3 M[, 1] 0.5773503  0.0000000  0.8164966 M[, 2] 0.5773503 -0.7071068 -0.4082483 M[, 3] 0.5773503  0.7071068 -0.4082483   The question is: out to interpret prcomp() result instead of lm() result ? Using lm() the coefficients are using to predict the X values.  What about prcomp() ?  Thank you!

I always use lm() in R to perform linear regression of $y$ on $x$. That function returns a coefficient $\beta$ such that $$y = \beta x.$$  Today I learned about total least squares and that princomp() function (principal component analysis, PCA) can be used to perform it. It should be good for me (more accurate). I have done some tests using princomp(), like:  r <- princomp( ~ x + y)   My problem is: how to interpret its results? How can I get the regression coefficient? By "coefficient" I mean the number $\beta$ that I have to use to multiply the $x$ value to give a number close to $y$.


This question is related to  by @Stefan, but it is not a duplicate of it. The questions are slightly different: the author simply wanted to know if this had been implemented, while I'm asking for help specifically on how to do this (in a particular way). Additionally, the other question got no useful answers for implementers, except a recent one that merely linked to my attempt at this. Having explained the "duplicate" issue... I'm on Ubuntu 14.04 using full disk encryption (LVM on top of LUKS) and I would like to incorporate luksSuspend into the suspend procedure (and later use luksResume) so that I can suspend to RAM without leaving key material on memory and the root unlocked. I've tried to port a , so far without success: I honestly have no idea of what I'm doing... Can anyone help me port this (or create something like this from scratch)? Or, at least, can anyone point me to documentation about how to hook stuff into the suspend procedures and how to keep the necessary binaries and scripts (such as cryptsetup) available even after all IO to root has been blocked (by luksSuspend)? Concerning how to keep the necessary binaries and scripts available for resume, this  copied them to /boot; I would like however to use something more in the lines what Vianney used in the script I mentioned before, because that approach appears to be a bit more elegant in this aspect. I haven't reached much, but my development can be found on .

Normally I don't shutdown my notebook any more in favour of using suspend-to-RAM. The downside is that my encrypted home partition is completely accessible after resume without entering the passphrase. A bad idea if someome steals your notebook...  Looking at . I've learned that  now supports the luksSuspend and luksResume command. Has luksSuspend and luksResume been integrated in the scripts doing suspend-to-RAM and resume?


Given that $D$ be a bounded region containing $0$ and $f:D\rightarrow D$ be a holomorphic mapping such that $f(0)=0,f'(0)=1$ prove that f(z)=z for all $z$ in $D$  This problem reminded me of the Schwarz's lemma but the region is not $\{z:|z|<1\}$ so what theorem should I apply here?

This is an exercise in complex analysis:     Let $\Omega\subset{\Bbb C}$ be open and bounded, and $\varphi:\Omega\to\Omega$ a holomorphic function. Prove that if there exists a point $z_0\in\Omega$ such that   $$ \varphi(z_0)=z_0\qquad\text{and   }\qquad \varphi'(z_0)=1 $$   then $\varphi$ is linear.   I'm trying work out the case $z_0=0$ first, in which $$ \varphi(z)=z+\sum_{n=2}^{\infty}a_nz^2. $$ It suffices to show that $a_n=0$ for all $n\geq 2$. If let $$ \varphi(z)=z+a_2z^2+O(z^3) $$ then  $$ \varphi^k(0)=z+ka_2z^2+O(z^3), $$ and $$ \varphi^k(0)=0,\quad (\varphi^k)'(0)=1. $$ If one can show that $\{ka_2\}_{k=1}^{\infty}$ is uniformly bounded, then one at least has $a_2=0$. But I don't know how to go on. Any idea?


Let $f:\mathbb R \to \mathbb R$ be a function such that for any irrational number $r$, and any real number $x$ we have $f(x)=f(x+r)$. Show that $f$ is a constant function.

Let $f:\mathbb R \to \mathbb R$ be a function such that for any irrational number r, and any real number x we have $f(x)=f(x+r)$. Show that f is a constant function.   It's easy to see any constant function satisfies the original properti... But I don't see how to show this is the only solution.


provides the following expression for the location of the extrema of the sinc function:  $$x_n=q-q^{-1}-\dfrac{2q^{-3}}{3}-\dfrac{13q^{-5}}{15}-\dfrac{146q^{-7}}{105}...$$  with $q =\left(n + \dfrac 12\right)\pi$  However, I have not been able to find this expression in the literature. Can anyone please provide some references where this expansion is derived, or at least mentioned?

The  gives an approximation for the (positive $x$) locations of the extrema of the sinc function as  $x_n \simeq (n + \frac{1}{2})\pi - \frac{1}{(n + \frac{1}{2})\pi}$  but provides no reference or proof.  How would I go about deriving such an approximation?


I know the definition of leverage points in regression, that is $h_{ii}=x_{i}'(X'X)^{-1}x_{i}. $  In many places and text books, they always say that leverage is a standardized measure of the distance of the ith observation from the center of the x space. But I don't understand why.   I think that if you want to measure that distance, you need to use Mahalanobis distance, that is $(x_{i}-\mu)'\Sigma^{-1}(x_{i}-\mu)$. Clearly, it is not the same with $h_{ii}$. So I am confused why they say that.  Thanks in advance for you reply!  Thank you for your reminding that there is a similar question: Prove the relation between Mahalanobis distance and Leverage?   But in the answer, the author assumed that the mean of the regressors is 0, I don't understand this assumption. What if the mean isn't 0? In this case, the following proceeds can not go through(the matrix $X'X$ is not diagonal matrix and so it is not easy to get its inverse).   Because I don't have enough reputation to leave a comment to the author, so I ask a new question here. I know that if we have proofed the relationship between Mahalanobis distance and Leverage, then my question is solved. But maybe there is another way to answer my question. Thank you!

I have seen formulas on  that relate Mahalanobis distance and Leverage:     Mahalanobis distance is closely related to the leverage statistic, $h$, but has a different scale: $$D^2 = (N - 1)(h - \tfrac{1}{N}).$$    In a , Wikipedia describes $h$ in these terms:     In the linear regression model, the leverage score for the $i^{th}$ data unit is defined as:$$h_{ii}=(H)_{ii},$$ the $i^{th}$ diagonal element of the hat matrix $H=X(X^{\top}X)^{-1}X^{\top}$, where $^{\top}$ denotes the matrix transpose.   I can't find a proof anywhere. I tried to start from the definitions but I can't make any progress. Anyone can give some hint?


Lets say I have an inline script tag that has a very simple code as follows  (function() {  var test = "This is a simple test";   function modifyTest(s) {   s = "Modified test text";  };   modifyTest(test);  console.log(test) //Will still display "This is a simple test"   })();   However if i use test = modifyTest(test); the change is applied my question is this.  Is this the only way to modify a variable in javascript inside a function, meaning i must always do  source = function(source); inorder to alter a variable inside a function,  or am i missing a scope concept that is preventing me from accomplishing this?

The primitive types (number, string, etc.) are passed by value, but objects are unknown, because they can be both passed-by-value (in case we consider that a variable holding an object is in fact a reference to the object) and passed-by-reference (when we consider that the variable to the object holds the object itself).  Although it doesn't really matter at the end, I want to know what is the correct way to present the arguments passing conventions. Is there an excerpt from JavaScript specification, which defines what should be the semantics regarding this?


This is a follow-up question based on . The accepted answer explained how this staggered design originates to earliest typewriter. My question is, why do they stagger in this way?  Take home row as the horizontal axis, then in the alphanum area you canʼt find two keys aligned horizontally. It might be explained by my observation that for old typewriters, each keyʼs lever must take a unique horizontal position. I'm just wondering whether itʼs that later industrial designers never changed this, or that there are other reasons beyond path dependence?

In every keyboard that I have used, the keys are arranged so that the keys are staggered a small increment to the left from the previous row. Q is above and slightly to the left of A, and A is above and slightly to the left of Z. This pattern continues across the entire board. Case in point:    What is the motivation behind this design? I would think that a column layout would be easier to type on - and indeed, many ergonomic keyboards seem to go with a column layout, where Q is directly above A and so on.


I would like to predefine a closing slide containing the title of the presentation as well as the name of the author.  For this I would like to define some kind of equivalent to maketitle (e.g. makeendcard) in my beamer class file which creates the slide.  How can I do this?

I'm using a custom beamer template in the corporate identity for my companies presentations (by having a class .cls file that loads the beamer class, all packages and sets all the beamer options). In the end of each presentation there always has to be the same "Thank you" style frame. I'd like to unify the process so that on every beamer PDF the default last page gets appended by the class code automatically and must not be copy-pasted to every single presentation.  How can I achieve this? I'm using LuaLaTeX if this is of any relevance.


Current scenario  I have an Apache server running on default port 80 on a CentOS 6.7 box.  I forward port 80 from my router to this machine, and I can access it from the outside with my domain a.com.  Everything works as expected.  What I want to do  I stood up a second machine, CentOS 7, to act as a dedicated  server.  By default, it runs the web interface through nginx on port 80. I want to be able to access it through my subdomain gitlab.a.com.    Is this possible to do?  And if so, am I on the right track thinking it can be done with some combination of using a virtual host and a reverse proxy in Apache?  I'd prefer both of them to run on 80 if possible and not use alternate ports.

I have an Ubuntu server behind a NAT router / firewall. I would like to add another server, serving content from both servers over http(s). As I understand it I can have the "main" server request data from another IP depending on which vhost is being called.   However I need to understand how that is done and which kind of setup is needed. Is the data being routed through the "main" server or is the data served directly from server 2? Is there any other sharing needed to happen between servers like access to the files?


I've been through 10 guides on how to manage correct directory and packaging, and i just cant get it right.  i have my projects in C:\Users\gusta\Documents\Programmer    in the testprojektclass i have:  package testprojektclass;  public class myClass  {     private int age ;     public void setAge (int age)     {        this.age = age ;      } }   and in the testprojekt main:  import testprojektclass.*; public class importtest {    public static void main (String []args)    {        myClass youngfella = new myClass();        youngfella.setAge(14);    } }   I feel like i've tried everthing, but it keeps saying: package testprojektclass does not exist..

I'm a C++ developer - not a java developer, but have to get this code working...  I have 2 public classes that will be used by another product.  I used the package directive in each of the java files.    package com.company.thing;  class MyClass ...   When I try to compile a test app that uses that I add   import com.company.thing.*;   The javac compiler fails with errors about com.company does not exist.  (even if I compile it in the same directory as the class files I just made a package of)  I am sure I am doing something bone-headed and silly.  I've read the  pages and tried to set up a directory structure like /com/company/thing  etc, but either I have totally screwed it all up or am missing something else.  EDIT thanks for the suggestions - I had tried the classpath previously.  It does not help.  I tried compiling   javac -classpath <parent> client.java    and the result is:  package com.company does not exist   I have the code I want to import (the two java files) in \com\company\product.  I compile those fine.  (they contain MyClass) I even made a jar file for them.  I copied the jar file up to the parent directory.  I then did (in the parent directory with the client java file)   javac -cp <jarfile> *.java   the result is:  cannot access MyClass bad class file: MyClass.class(:MyClass.class) class file contains wrong class: com.company.product.MyClass Please remove or make sure it appears in the correct subdirectory of the classpath.   EDIT  I got the client code to compile and run if I used the fully qualified name for MyClass and compiled it in the parent directory.  I am totally confused now.    compiled with no classpath set - just   javac *.java    in the parent directory - and it worked fine.  I can get a test app to compile, but that is not going to cut it when i have to integrate it into the production code.  Still looking for help.  EDIT:  Finally - not sure why it didn't work before - but I cleaned up all the files all over the directory structure and now it works.    Thanks


I have received a category "D" national visa issued by the Norwegian embassy. However the flight tickets that has been booked by my company shows that I will need to claim my luggage and change terminals (2 to 3) in Copenhagen,Denmark before I take the connecting flight to Stavanger, Norway. I always thought that the D visa is as good as another Schengen visa and i can enter the Schengen territory through any country as per my itinerary. However can someone confirm if I can clear the immigration process in Copenhagen airport with the Norwegian "D" visa.Or do I need to apply for another transit visa?

I found many related questions on this site but I am still not sure about the rules. How can I decide if I need a visa to transit? Schengen members as of May 2021 are as follows:  Austria Belgium Czech Republic Denmark (excluding Greenland and the Faroe Islands - but an open border with the Schengen Area is maintained) Estonia Finland France (excluding overseas departments and collectivities) Germany Greece Hungary Iceland Italy Latvia Liechtenstein Lithuania Luxembourg Malta Netherlands (excluding Aruba, Curaçao, Sint Maarten and the Caribbean Netherlands) Norway (excluding Svalbard) Poland Portugal Slovakia Slovenia Spain (except Ceuta and Melilla) Sweden Switzerland


I'm unable to add the tag bug to a question (but was able to do that a couple of months ago) - I get an error that says "'bug' tag not allowed". I couldn't find any information about that change - what is the rationale behind it?

It seems most of the questions tagged  on Stack Overflow are just intended to indicate "there's something wrong with my program", which would cover probably at least 80% of all questions on Stack Overflow.  There are some questions where it seems to refer to a possible bug in a framework or utility. I'm not sure the tag is really all that useful in that case either.  What does meta think?


Let $C_b([0,\infty))$ be the space of bounded continuous functions on $[0,\infty)$. On $C_b([0,\infty))$ we define a norm by $\|f\|_\infty = \sup\{|f(x)| : x\in [0,\infty)\}$. Furthermore, define  \begin{equation} C_0([0,\infty)) = \{f \in C_b([0,\infty)):\lim\limits_{n \to \infty}f(x) = 0\} \end{equation}  Exercise: Show that $C_0([0,\infty)), \|\cdot\|_\infty)$ is complete. Hint: you can use that $(C_b([0,\infty)),\|\cdot\|_\infty)$ is a complete space.  I know that:   If $(C_b([0,\infty)),\|\cdot\|_\infty)$ is a complete space, $C_0([0,\infty)), \|\cdot\|_\infty)$ is complete if $C_0([0,\infty))$ is closed in $C_b([0,\infty))$.  $C_0([0,\infty))$ is closed $\Leftrightarrow$ $B_\epsilon(x) \cap C_0([0,\infty)) \neq \emptyset$ for any $\epsilon > 0$, then $x\in C_0([0,\infty))$.   What I think I should do:  Pick $x\in C_b([0,\infty))$ such that $B_\epsilon(x)\cap C_0([0,\infty)) \neq \emptyset$ for every $\epsilon >0$. Then; show that $x\in C_0([0,\infty))$ as well.  Question: How do I show that $(C_0([0,\infty)), \|\cdot\|_\infty)$ is complete by using my approach and showing that $x\in C_0([0,\infty))$ as well?

I need to proof that $(C_0([0,\infty)), \ \|\cdot\|_\infty)$ is complete. I think that I did it correctly (or atleast am thinking in the right direction), but I still struggle with writing it down correctly. I used that $(C_b([0,\infty)), \|\cdot\|_\infty)$ is complete, so therefore as $C_0[0,\infty) \subset C_b[0,\infty) $, I wanted to use that if $A$ is a closed subset of a complete space $(M,d)$, that $(A,d)$ is complete. Thus, it came down to showing that $C_0[0,\infty)$ is closed.  Let $f_n(k)$ be a sequence of elements out of $C_0[0,\infty)$ that converges to an element $f$ out of $C_b[0,\infty)$. I need to proof that $f(k) \in C_0[0,\infty)$.   Per the definition of convergence, we know that $\|f_n(k) - f(k) \|_\infty \rightarrow 0$ whenever $n \rightarrow \infty$. We use this to find $ |f_n(k)-f(k)| \leq\|f_n(k) - f(k)\|_\infty  \rightarrow 0$.  Then we consider $|f(k)| = |f(k) - f_n(k) +f_n(k)| \leq |f(k)-f_n(k)| + |f_n(k)|$. If we take limits on both sides, we get: $\lim_{k\to \infty} |f(k)| \leq \lim_{k\to \infty} |f(k)-f_n(k)| + \lim_{k\to \infty} |f_n(k)| = 0 + 0 = 0$ (the first term follows from what we have previously stated and the second term follows from the fact that $f_n(k)$ is an element of $C_0$. Thus, $f \in C_0$ and therefore $C_0$ is closed and therefore it is complete.  My questions are the following;   What exactly does it mean to be a sequence of functions? I used $f_n(k)$ and $f(k)$ in my proof because I saw that it was used in another exercise, but I'm not sure what it means to write that $k$ down. Is the structure of my proof sound? Is there a better way to proof such statements?   Thanks for reading,  K. Kamal


index.php:  <?php require_once("include/header.php") ?>   header.php:  <?php require_once("../../include/config.php") ?>   I have php files and I need to access them using the included file so I need to use something like  <?php require_once("../../include/config.php") ?> that will work with relative paths to this header.php, not to the file which includes my header.

I have a directory structure like the following;     script.php      inc/include1.php   inc/include2.php      objects/object1.php   objects/object2.php      soap/soap.php   Now, I use those objects in both script.php and /soap/soap.php, I could move them, but I want the directory structure like that for a specific reason. When executing script.php the include path is inc/include.php and when executing /soap/soap.php it's ../inc, absolute paths work, /mnt/webdev/[project name]/inc/include1.php... But it's an ugly solution if I ever want to move the directory to a different location.  So is there a way to use relative paths, or a way to programmatically generate the "/mnt/webdev/[project name]/"?


I have 7 cards in my hand 4 red, 3 yellow (both uncured diseases). I take a red card from another player in my city, can I immediately cure disease (there is a research center in my city) to enable me to return below the 7 card limit?

Scenario Pandemic's excess card rule states that if you have more than 7 cards in your hand at any time, you must discard the excess (according to your preference, of course). Let's say you're the Scientist, have 5 city cards and 2 special cards (like the airlift, or research center build card). The Researcher comes to town and gives you the remaining 1 color city card that will allow you to cure a disease as soon as you get to a research facility. Let's also say there's only two players (Researcher and Scientist). And that this is the last color that needs to be cured. This takes you to 8 cards - over the amount allowed. Question When do I, as the Scientist, need to play / discard my excess cards (in this case, let's take the two special cards as the ones to play) so I am not in violation of the excess card rule, but also so I maximize the value of the Researcher's endowment of city cards?  edited to reflect the limit of 7 vs 8, as noted by


I am using ArcGIS 10.2. I need some suggestion about this problem, maybe there is a certain tool, but I think no. I think some python code... but I do not know from where to start  :(  I have two shapefile layers: some polylines with points intersected. So, what I want to do automatically is to SPLIT those lines from a fixed measure (for example 10 meters) before and after this Point placed on the polyline.  The Points are on the line.  For example, if I have a 100 meters length polyline, and the point is situated in the middle, I want it split on the 40th and 60th meter.

I have a set of polylines which I need to split at varying distances from their starting points.   In general, I'm looking for a something similar to the SPLIT function within the editor tool. There it is possible to specify a certain line length where the split should be applied.   For instance: I have a line A of 3200m length, that I need to split into two separate geometries, one from 0 til 1700m, and one from 1700m til 3200m.      Can this be done in ArcGIS Desktop?   I'm using ArcGIS Desktop 9.3.1. on WinXP with Python 2.7.2.


I'm working with the varnish API in varnish 4.  The way it produces log entries is by Dispatch'ing against it, and passing in a callback.  Simple version:  class vlog(object):     def __init__(self):         self.body = []     def callback(self, vap, cbd, priv):         self.body.append(cbd)     def main(self):         self.vlog = varnishapi.VarnishLog(sopath="libvarnishapi.so")         while True:             ret = self.vlog.Dispatch(self.callback)             if ret == 0:                 time.sleep(0.1)   I need to do several more things in self.callback to aggregate the data properly, but whatever.  My REAL question is this:  How can I turn the above class into a generator?  My ideal usage would be something like this:      vlog_inst = vlog()     for log_aggregate in vlog_inst:         pass   Simply putting a 'yield' statement in the callback function never triggers iteration.  (surprising to me, adding the yield statement also causes all of my print statements to produce no output as well... I'm obviously missing something.)

How would one create an iterative function (or iterator object) in python?


I can't find this question previously answered here and as this site is about gathering a database of knowledge, I feel it must be asked.  Inspired by my brief discussion with @Richard.  I believe Rowling has planted nods to them in the books, but is there solid proof out there that she planned the hallows before The Deathly Hallows book?

When I read "Deathly Hallows", the whole idea seemed to be less organic to me. Unlike Horcruxes that were foreshadowed ever since "Chamber of Secrets" and subsequent books, the idea of Hallows seemed to be something JKR just stuck into the seventh book as a "last moment" idea.  Did Rowling address this somehow in terms of when she started planning for the idea of Hallows?


If $f$ is a differentiable function on $\mathbb{R}$ and $f'(0)=2$ satisfying $$f(x+y) = \frac{f(x)+f(y)}{1-f(x)f(y)},$$ then to prove that $f(x)=\tan 2x$.  I know that we must prove using the first definition(principle) of differentiation but I am not able to proceed. I got $f(0)=0$ and I also proved function is odd.

I have the following functional equation. Find all continuous functions $f:(-1,1) \to \mathbb R$ such that $$ f(x+y)=\frac{f(x) + f(y)}{1 - f(x)f(y)} $$ The first obvious solution is $f(x) \equiv 0$. Another one I guessed, it is $f(x) = \pm \tan x$. I suspect, that there are no more solutions. The problem is that I don't know how to prove that.  Since we have a rational equation, I have no idea how to make any substitutions in order to get expression for $\tan x$ (as it is not a rational expression).  P.S. I can also show that it is true that (a) $f(0) = 0$ (take $x=y=0$), and (b) $f(-x) = -f(x)$ (take $y=-x$).  Update: there is a solution of this problem also here:


Consider the sequence $\{x_n\}_{n\ge1}$ defined by $$x_n=\sum_{k=1}^n\frac{1}{\sqrt{k+1}+\sqrt{k}}, \forall n\in\mathbb{N}.$$ Is $\{x_n\}_{n\ge 1}$ bounded or unbounded.   I solved the problem as stated in the answer posted by me. Is it possible to solve the problem in a more better and rigorous manner?

Does the following series converge or diverge? $$ \sum\limits_{n=1}^\infty\frac{1}{\sqrt{n}+\sqrt{n+1}} $$ The methods I have at my disposal are geometric and harmonic series, comparison test, limit comparison test, and the ratio test.


Need storage at airport for 8days for excess luggage and wish to secure same in advance of arrival.

I need to find a place to leave my luggage in lockers for 2 days in Frankfurt, either the airport (Terminal 1) or at the train station. I have to go by train to Stuttgart for 2 days without luggage. The luggage is 5 bags, 28 inches.


Sorry for not using the correct terminology, the fact is I don't know what you'd call this sort of number so it's making it incredibly difficult to Google.  I want to multiply two numbers together and get the result back as just numbers, but I keep getting a string looking like this: float(8.6135096694932E+15). I need to export this in an XML file so I need a string containing just the numbers not this weird response I am currently getting.  Here is a very simple example:  var_dump(2005489*4294967297) //Actual Result: float(8.6135096694932E+15) //Desired Result: 8613509669493233   My question is simply. How can I multiple those two numbers together and get the desired result listed above?  For a bit more context of what i'm trying to do: I am given an ID, in this instance "2005489" and I need to generate a new ID based on a fermat numbering system, which basically seems to mean that it must be multiplied by "4294967297", I do not fully understand why since I am interacting with third party software. It seems simple enough, but I need to actually be able to print the string "8613509669493233" in an XML file, not the weird response i'm actually getting.  EDIT 2: Found another solution, very simple:  number_format($number, 0, '', '');   Found here:   EDIT: This has been marked as duplicate of this:   However I cannot see how that offers a solution. The only example is:  gmp_strval(gmp_init($n, 10), 2);   However this does not offer any resolution, here is an example:  $number = (string)(2005489*4294967297); $response = gmp_strval(gmp_init($number, 10), 2); var_dump($response); //0   Not using (string) results in:     gmp_init(): Unable to convert variable to GMP - wrong type

Ok, so PHP isn't the best language to be dealing with arbitrarily large integers in, considering that it only natively supports 32-bit signed integers. What I'm trying to do though is create a class that could represent an arbitrarily large binary number and be able to perform simple arithmetic operations on two of them (add/subtract/multiply/divide).  My target is dealing with 128-bit integers.  There's a couple of approaches I'm looking at, and problems I see with them. Any input or commentary on what you would choose and how you might go about it would be greatly appreciated.  Approach #1: Create a 128-bit integer class that stores its integer internally as four 32-bit integers. The only problem with this approach is that I'm not sure how to go about handling overflow/underflow issues when manipulating individual chunks of the two operands.  Approach #2: Use the bcmath extension, as this looks like something it was designed to tackle. My only worry in taking this approach is the scale setting of the bcmath extension, because there can't be any rounding errors in my 128-bit integers; they must be precise. I'm also worried about being able to eventually convert the result of the bcmath functions into a binary string (which I'll later need to shove into some mcrypt encryption functions).  Approach #3: Store the numbers as binary strings (probably LSB first). Theoretically I should be able to store integers of any arbitrary size this way. All I would have to do is write the four basic arithmetic functions to perform add/sub/mult/div on two binary strings and produce a binary string result. This is exactly the format I need to hand over to mcrypt as well, so that's an added plus. This is the approach I think has the most promise at the moment, but the one sticking point I've got is that PHP doesn't offer me any way to manipulate the individual bits (that I know of). I believe I'd have to break it up into byte-sized chunks (no pun intended), at which point my questions about handling overflow/underflow from Approach #1 apply.


Silmarillion tells how Sauron made Numenoreans worship Morgoth and offer him human sacrifices.  However,  states that Sauron first created this cult before his Numenorean captivity, for Men tribes of Middle-earth he dominated. There's no citation though. Is it true? Did Sauron's Men vassals in Second Age Middle-earth have Morgoth cult as their religion, and did they perform human sacrifices? Or did they worship Sauron himself as a god?  Also, are there any indications that this practice had survived until War of the Ring?

Watching The Lord of the Rings movies I was really captivated by the   elephant riders and the men in brazen scale armor who aided the orcs   against the forces of Gondor and Rohan. From what I know they are from   the cultures that worship Sauron. I'd like to know what Tolkien wrote   about them, their religion, their way of life, and so on.   From


I am trying to write a function in c++ to calculate the sum and product so my code is like that: #include <iostream> using namespace std;  int Product_Sum(int x, int y, int z) { int sum, product; sum = x + y + z; product = x * y * z;  return sum, product; }  int main() { int result; int x = 5, y = 10, z = 15; result = Product_Sum(x, y, z);  cout << result; enter code here  }  as a result I am just getting the sum of the numbers, how I can return both values together ? I tried writing it with retrurning 0 but I think it's not the right way

Is there a preferred way to return multiple values from a C++ function?  For example, imagine a function that divides two integers and returns both the quotient and the remainder.  One way I commonly see is to use reference parameters:  void divide(int dividend, int divisor, int& quotient, int& remainder);   A variation is to return one value and pass the other through a reference parameter:  int divide(int dividend, int divisor, int& remainder);   Another way would be to declare a struct to contain all of the results and return that:  struct divide_result {     int quotient;     int remainder; };  divide_result divide(int dividend, int divisor);   Is one of these ways generally preferred, or are there other suggestions?  Edit: In the real-world code, there may be more than two results.  They may also be of different types.


I'm trying to access a file as a char array, via memory mapping it, or copying it into a buffer or whatever, but both of these need the size of the file, easy enough, thought I, just use fseek(file, 0, SEEK_END).  However: according to  "Library implementations [of fseek] are allowed to not meaningfully support SEEK_END," Meaning that I can't get the size of a file using that method.  Next I tried fstat, which is less portable, but at least will provide a compile error rather than a runtime problem; but  notes that fstat does not need to provide a meaningful value for st_size.  So: has anyone actually come across a system where these methods do not work?

How can I figure out the size of a file, in bytes?  #include <stdio.h>  unsigned int fsize(char* file){   //what goes here? }


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

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


We've always played that scrolls are easily identifiable. ("Inside the chest you find 200gp and a scroll of fireball.")  Apparently we've been doing it "wrong". The  say, "If the spell is on your class’s spell list, you can read the scroll and cast its spell without providing any material components. Otherwise, the scroll is unintelligible."  So how, by the rules, do characters identify a scroll?

Are they always unidentified, except for when a Wizard already knows the spell? If the wizard already knows it, is it already identified?


Let $R$ be a ring. If $R[X]$ is noetherian, is R necessarily noetherian ?  I think that the answer is no, but could you show me the easiest example to understand ?

Prove the converse to Hilbert basis theoren:     If the polynomial ring $R[x]$ is Noetherian, then $R$ is noetherian.


I've made a Visual Web Part in Visual Studio (non-sandboxed) that I could easily deploy & "debug" on my local SharePoint installation.  I want to copy this web part to another SharePoint installation, so I went ahead and right-clicked the project in Visual Studio, clicked on the Publish, and saved it to the drive. I got a .wsp file.  I've taken this .wsp file and copied to the other server, installed with Add-SPSolution & Install-SPSolution  I don't see the web part in the Web Part gallery.  How can I get it there? What steps am I missing?

I have created several custom web parts in a Visual Studio solution which deploys to my development environment site perfectly directly through Visual Studio.  However, I also want to be able to deploy this solution to my testing/production environment which means using Powershell commands to accomplish the same result as a deploy through Visual Studio.  Every guide I've found uses the same commands that I am using which seems like it works but my web parts never show up in the web part gallery.  They do show up in the web part gallery through the Visual Studio deploy method so Visual Studio must be doing something else to provision them there.  The steps I'm using are as follows:  -Publish the Visual Studio solution and copy/paste the resulting .wsp file to a folder in my other site's machine at C:\Deploy\  -In SharePoint Management Shell on the machine I'm deploying to:   Add-SPSolution -LiteralPath C:\Deploy\Announcements.wsp Install-SPSolution -Identity Announcements.wsp -AllWebApplications -GACDeployment Install-SPFeature -Path Announcements_Feature1 -Force Enable-SPFeature -Identity Announcements_Feature1 -Url "site"   These commands all go through without error but the web parts don't show up in the web part gallery and I can't add them to my pages.  I have tried uninstalling/removing the solution and add/installing again.  I've made sure the feature scope is at the Site level.  The -GACDeployment in the install command should register the solution as safe.  The web parts are in the feature...I feel like I've tried everything and still nothing works.  Edit:  I've also tried this approach on my development environment machine which is the same machine Visual Studio deploys to perfectly and still no luck.


How to remove microcode firmware for intel cpus from intel-microcode because of that i cant use the wifi on my laptop. Pls help for activating wifi. I'm using ubuntu 16.04.

I'm having serious problems installing the Broadcom drivers for Ubuntu. It worked perfectly on my previous version, but now, it is impossible.   What are the steps to install Broadcom wireless drivers for a BCM43xx card?  I'm a user with no advance knowledge in Linux, so I would need clear explanations on how to make, compile, etc.    lspci -vnn | grep Network showed:   Broadcom Corporation BCM4322 802.11a/b/g/n Wireless LAN Controller [14e4:432b]      iwconfig showed:  lo        no wireless extensions. eth0      no wireless extensions.   NOTE: Answer below is updated every time new information is added and confirmed working.


Backdrop: A horror-themed campaign that heavily draws upon the Lovecraft mythos, using the Dungeons & Dragons 5th Edition ruleset.  Situation: The party has encountered a story arc inspired by the American folktale of the . An NPC is currently pregnant with an aberration; the party has used various magical abilities to successfully divine the gestating creature's true nature. Thanks to previous incidents being recorded in the town's charter, the party knows that giving birth to this creature will be fatal to the NPC and the creature itself will be dramatically more difficult to deal with.  The party has access to high level arcane magic (but not the Wish spell) and wants to find a way to safely separate the NPC from the aberration growing within her. Even in its current state the aberration could pose a threat if disturbed via surgery. The idea has been posed to try using a spell that targets only the NPC, specifically the Banishment spell - sending the mother to a harmless demiplane while the aberration can be collected and dealt with, without risking harm to the NPC.  With the above details in mind, could the  spell (or something similar) be used to separate the NPC from the aberration, such as by banishing just one or the other, while adhering more or less to Rules as Written?  "" covers a similar topic, but the circumstances are different in that this is not a creature that has been swallowed; the creature is actively growing inside the NPC.

If a creature with the ability to swallow other creatures is banished what happens to a still living swallowed creature (i.e. PC)?    The  spell has the following key points:     "You attempt to send one creature that you can see" "While there, the target is Incapacitated" "The target remains there until the spell ends"   The thing is, you only targeted one creature.  So what creature(s) are affected in this situation and how?  You can't see the swallowed creature, so how is it affected?  I can see several possible scenarios:   The swallowed creature is left behind.  Could be a useful way to save someone swallowed. The swallowed creature is also banished.  It is treated the same as the banished creature and is also incapacitated.  It may or may not take ongoing damage during this time (for instance the acid damage from the stomach). The swallowed creature is also banished.  It isn't affected by the incapacitation and could fight its way out of the creature that did the swallowing.  If it gets out, it is just in the demiplane alongside the banished creature.  It may or may not stay behind in the demiplane since it wasn't the target and the spell fails to pull it back.   Background: Our party is about to face a Kraken (party member stole from the temple of the God of Sea and Treachery despite the cleric vehemently warning against taking anything).  This thing seriously outclasses us (level 10 party members) if it is the full version of the Kraken.    We've faced a baby version of this before.  If this is the full CR23 version, the only thing I can see that can get us out is the cleric's Divine Intervention, running away while it is banished, or an exploit like being able to banish the creature with someone(s) inside who can then escape and attack it without being attacked in response.


I am a bit confused about why the plural of leaf is leaves. Can anyone explain why leaves is the plural form?

Many nouns that end in ‑f are made plural by changing the ‑f to ‑v‑ and adding ‑es.  +----------+-----------+ | Singular |   Plural  | +----------+-----------+ |  half    |  halves   | |  leaf    |  leaves   | |  shelf   |  shelves  | +----------+-----------+     But some nouns that end in ‑f are made plural simply by adding ‑s.  +----------+-----------+ | Singular |   Plural  | +----------+-----------+ |  chief   |  chiefs   | |  roof    |  roofs    | |  cliff   |  cliffs   | +----------+-----------+   Some nouns that end in ‑f can be made plural in two ways, either by adding ‑s or ‑ves:   +----------+--------------------+ | Singular |      Plural        | +----------+--------------------+ |  scarf   |  scarfs or scarves | |  hoof    |  hoofs or hooves   | |  dwarf   |  dwarfs or dwarves | |  wharf   |  wharfs or wharves | +----------+--------------------+   Now my question is how to determine whether to use only ‑s or to change the ‑f to ‑v‑ and add ‑es?


I’ve had a bit of difficulty of this question: (1+sinA+cosA)/(1-sinA+cosA)=(1+sinA)/cosA  I tried to do: (SinA)^2+(CosA)^2+sinA+cosA/(SinA)^2+(CosA)^2-sinA+cosA=(1+sinA)/cosA But then I’m kind of lost. Any help will be appreciated! Additionally, I am not allowed to move one side to another (over the equal sign).

We need to prove that $$\dfrac{\sin\theta - \cos\theta + 1}{\sin\theta + \cos\theta - 1} = \frac 1{\sec\theta - \tan\theta}$$  I have tried and it gets confusing.


Question : Is Java Pass By Value or Pass By Reference? This was the question asked in one of the interview.  Answer : In most of the Java books it is given that Java is pass by value. So I told this answer. But interviewer gave me an example of arraylist. Where we pass an arraylist to function() and in this function we remove an element and same is reflected back on original array. This means Java also supports pass by reference. I was confused so asking this Question to all of you.  Example of ArrayList :   public static void functionToRemoveAnElement(List<String>strs){     strs.remove(0);  }         public static void main(String args[]) {         List<String> strs = new ArrayList<String>();          strs.add("nishant1");         strs.add("nishant2");         strs.add("nishant3");         strs.add("nishant4");         strs.add("nishant5");         strs.add("nishant6");         strs.add("nishant7");                 for(String str : strs){             System.out.println("Before Calling Function : "+str);                      //here it will print all the values         }          functionToRemoveAnElement(strs);                  for(String str : strs){             System.out.println("After Calling Function : "+str);                 //here it will not print nishant1 after calling function()     } }   This is O/P for those who are saying the values will not change:                      Before Calling Function : nishant1  Before Calling Function : nishant2  Before Calling Function : nishant3  Before Calling Function : nishant4  Before Calling Function : nishant5  Before Calling Function : nishant6  Before Calling Function : nishant7                                                      After Calling Function : nishant2  After Calling Function : nishant3  After Calling Function : nishant4  After Calling Function : nishant5  After Calling Function : nishant6  After Calling Function : nishant7  We can see that nishant1 is not present after the call as we are removing 1st element.

I always thought Java uses pass-by-reference. However, I've seen a couple of blog posts (for example, ) that claim that it isn't (the blog post says that Java uses pass-by-value). I don't think I understand the distinction they're making. What is the explanation?


I am learning the zsh in the conditional expressions part, and I found some unreasonable output. For example: $ mkdir emptyspace && cd emptyspace $ var_assigned_with_emptystring=""  $ [[ -n $var_assigned_with_emptystring ]] && echo 'var_assigned_with_emptystring is a nonzero-len string!' $ [[ -n "" ]] && echo '"" is a nonzero-len string!'  $ test -n $var_assigned_with_emptystring && echo 'var_assigned_with_emptystring is a nonzero-len string by test!' var_assigned_with_emptystring is a nonzero-len string by test! $ test -n "" && echo '"" is a nonzero-len string by test!'   ----------   $ [[ -z $var_assigned_with_emptystring ]] && echo 'var_assigned_with_emptystring is a zero-len string!' var_assigned_with_emptystring is not an empty string! $ [[ -z "" ]] && echo '"" is a zero-len string!' "" is a zero-len string!  $ test -z $var_assigned_with_emptystring && echo 'var_assigned_with_emptystring is a zero-len string by test!' var_assigned_with_emptystring is a zero-len string by test! $ test -z "" && echo '"" is a zero-len string by test!' "" is a zero-len string by test!    Why does the test with a var_assigned_with_emptystring always gives a true result no matter it is with -n or -z option? What's the difference between test command and individual conditional expression surrounded by [[]]?  What is the difference between "" and var_assigned_with_emptystring? I think the parameter should have be expended(or evaluated) to a same value as "" when it comes to process in the internal part of test function. But test -n $var_assigned_with_emptystring gives a different return status with test -n ""

I'm confused with using single or double brackets. Look at this code:  dir="/home/mazimi/VirtualBox VMs"  if [[ -d ${dir} ]]; then     echo "yep" fi   It works perfectly although the string contains a space. But when I change it to single bracket:  dir="/home/mazimi/VirtualBox VMs"  if [ -d ${dir} ]; then     echo "yep" fi   It says:  ./script.sh: line 5: [: /home/mazimi/VirtualBox: binary operator expected   When I change it to:  dir="/home/mazimi/VirtualBox VMs"  if [ -d "${dir}" ]; then     echo "yep" fi   It works fine. Can someone explain what is happening? When should I assign double quotes around variables like "${var}" to prevent problems caused by spaces?


This story starts off with an alien fleet attacking a human spacecraft or fleet - the alien fleet overwhelms their human counterparts, and destroy all the ships.  A few survivors escape in individual survival pods, which the alien fleet starts to destroy - one of the survivors realises the aliens are using the pods emergency beacons to track the pods, so he disables his pods beacon and is instead taken aboard the alien ship as a prisoner.  He is kept in captivity for the remainder of the book, where we get an insight into the alien race.  The second stream in this book is from ground forces holed up on an alien planet, surrounded by alien forces.  The human forces have taken refuge in amongst some buildings or structures which contain shelves of small sticks of meat or flesh, and it is assumed that this is a burial place.  The human soldiers also report seeing alien ghosts amongst these buildings.  The reveal is:      The structures hold the respected elders of the alien race, who are susceptible to electromagnetic emissions, and the original attack was the result of a misunderstanding and response to the humans welcome messages.   This might be part of a series.  I read this in the 1990s.

I remember reading it in mid-to-late 90s.  It was a hardcover with a huge starship drawn on the cover.  The plot was about humans making first contact with a new alien species, when aliens suddenly attack and quite easily destroy the entire fleet.  Only one survivor is taken prisoner to the aliens' homeworld, where he is being prodded, tested, and evaluated.  The survivor happens to be a son of some important general who sends an elite force of commandos to rescue him.  In the meantime humans are preparing for the inevitable invasion.  The ending seemed open, as if this book was part of a set.  Seems like I may be missing closure to this story.


I am adding a custom HTTP header to a 204 - no content response in PHP:  header("Success: true"); http_response_code(204);   Question is how can I then read this header in JavaScript?  Edit: Should have mentioned this is for the current page not an Ajax request. From what I can establish there is no way to access http headers from within Javascript so it looks like this is not possible.

How do I access a page's HTTP response headers via JavaScript?  Related to , which was modified to ask about accessing two specific HTTP headers.     Related:


I am not sure if this was previously reported (if so, please excuse me) or if it is even considered a bug, but i see what is shown in the image below when i go to "New Question" page in Stack Overflow and scroll down.

I have noticed that while asking questions and scrolling to the bottom of the page, the right sidebar containing recent questions covers the footer partially. Also, a part of it goes beyond the browser's boundary. It may not be a big problem but it still doesn't look good.    This also happens on the  page


I successfully migrated from my old 120gb SSD to a 256gb SSD by using dd from a gparted Live USB. I am using Ubuntu and Windows 10 with dual-boot (grub). Everything boots fine :-)  Now I want to resize the partitions to get access to the unallocated space. Gparted and Windows do not give me the option to increase the partition size (I guess this is because it would change the position of the boot sectors).  This is how everything looks from the GParted live side:  Do you have any suggestion to increase the partition sizes of /dev/sda2 and /dev/sda6?

Previously, I have installed Windows 7 on my 320 GB laptop with three partitions 173, 84 and 63 GB each. The 63 GB partition was where the Windows was installed. The rest were for file containers.  Now I changed my OS to Ubuntu 12.04 LTS. I installed Ubuntu by replacing the entire Windows 7 on the 63 GB partition. The rest of the partitions remain as an NTFS Windows partition and I can still access them both (the 173 and 84 GB partitions).  Now I want to change the two partitions of Windows into an Ubuntu format partitions plus most importantly, I want to extend the 63 GB partition to more than a 100 GB because at the moment I am running out of disk space. Whenever I try to install any application, especially using wine, it always complains for a shortage of disk space.  How do I do the extending activity before I entirely format my laptop again and lose all the important files on my partitions?


Question :      The line $l_1$ passes through the points $( 0 , 0 , 10 )$ and $( 7 ,0 ,0 )$ and the line $l_2$ passes through the points $( 4, 6 ,0 )$ and $( 3 , 3 ,1 )$. Find the shortest distance between $l_1$ and $l_2$ .   I found that \begin{align}l_1 : r &= ( 7 , 0 ,0 ) + a ( 7 , 0 , -10 )\\ l_2 : r &= ( 3 , 3 ,1 ) + b ( -1 , -3 ,1 )\end{align} for $a,b\in\Bbb R$  Help me solve this question , thank you so much !

I know how to find the distance between a point and a line, not between two lines.  Find the shortest distance between the lines $(-1,1,4) + t(1,1,-1)$ and $(5,3,-3) + s(-2,0,1)$  Any help would be appreciated.


I, as a hobby, do a fair amount of historical weaponry, particular a focus on firearms. As a result I have a number of black powder rifles and pistols and often times get gunpowder absolutely everywhere.  This is normally fine but recently I was traveling international and got pulled aside for a swab check (see  )  Luckily they didn't detect anything but it makes me wonder, what if they had? What happens if explosive compounds are found and how can I help prevent/minmize any misunderstandings?

One day I was travelling from UK to Switzerland, the security officer at Gatwick airport check (with a kind of swab) all my electronic devices (mainly phone and camera chargers + cables) to see if it was in contact with any explosive materials.  Now I just remember that today I use a ring from a hand grenade to keep my home keys.   The ring is just the outside part which hold the pin and come from an exercise hand grenade but with the real explosive inside.  Just to mention this is not dangerous at all, it is just a metal part, which was one day on an exercise hand grenade.  I just have it from my compulsory military service and it is not forbidden material.  My question is: is there any probability to detect some explosive (even it should not have been in contact) at the airport if they try to check my keys and what could be the consequences? Do you advise me not to travel with such a thing?


For example: The BAB for a level 15 fighter would be +15/+10/+5 and I dont know why there are more than one. I am using the core rule book btw.

I'm not quite sure how the total attack bonus interacts with BAB.   Can you make more attacks than shown by your BAB (e.g. +11/+6/+1 BAB allows you to make 3 attacks) by having a high enough DEX, STR or other attack bonus modifiers? Assuming I have +11/+6/+1 BAB, and a spell gives me +6 attack bonus, would that make me able to attack as if I had +17/+12/+7/+2 BAB, giving me an extra attack?)   Can you make multiple attacks even if you have one of your stats drained, making your attack bonus negative, or less than 5?      It says in the SRD that the formula for attack bonus in melee is this:       Base attack bonus + Strength modifier + size modifier   I've also been told that you can make multiple attacks in one turn, but each attack gains a -5 penalty to attack bonus.


I'm iterating through a list of list of strings. I need to print each list in comma separated format except the last element. This is my code.  for(Iterator itr = list.iterator(); itr.hasNext();){     List<String> l = (List<String>) itr.next();     for(Iterator it = l.iterator(); it.hasNext();){        System.out.print(it.next() + " ");     }     System.out.println(); }   This prints something like   listen, silent, tinsel,   How do I format the print logic to remove the comma after the last element. I can do that on for i loop checking the value of i against the last index, but wish to know how to do it with an Iterator in Java.

While working in a Java app, I recently needed to assemble a comma-delimited list of values to pass to another web service without knowing how many elements there would be in advance. The best I could come up with off the top of my head was something like this:  public String appendWithDelimiter( String original, String addition, String delimiter ) {     if ( original.equals( "" ) ) {         return addition;     } else {         return original + delimiter + addition;     } }  String parameterString = ""; if ( condition ) parameterString = appendWithDelimiter( parameterString, "elementName", "," ); if ( anotherCondition ) parameterString = appendWithDelimiter( parameterString, "anotherElementName", "," );   I realize this isn't particularly efficient, since there are strings being created all over the place, but I was going for clarity more than optimization.  In Ruby, I can do something like this instead, which feels much more elegant:  parameterArray = []; parameterArray << "elementName" if condition; parameterArray << "anotherElementName" if anotherCondition; parameterString = parameterArray.join(",");   But since Java lacks a join command, I couldn't figure out anything equivalent.  So, what's the best way to do this in Java?


I’m having trouble updating a script that worked in Blender 2.7 over to 2.8. Since Scene Layers have been changed over to Collections. The script takes all the OBJ files from a location and brings them into Blender, which is working great.    The issue is after the objects are added to their collections there is also another "linked" copy in the Outliner.  Why is this a problem? I want to hide all the collections apart from the first one. Having these linked objects means when I try and hide the collection the object(s) stay visible.    Does anyone know how I can import objects into a collection without it linking a new copy?  I tried bpy.ops.object.move_to_collection function instead of linking objects. But I could not make it work in my script.  Here is the script:    import bpy import os import glob  directory_im = 'C:/Users/mila/OneDrive/Desktop/OBJ for test/' files = glob.glob(directory_im + "*.obj") for f in files:     head, tail = os.path.split(f)     collection_name = tail.replace('.obj', '')     bpy.ops.import_scene.obj(filepath=f)     myCol = bpy.data.collections.new(collection_name)     bpy.context.scene.collection.children.link(myCol)     for ob in bpy.context.selected_objects:         myCol.objects.link(ob)   And this is how it looks like after the import:

I currently have a method that does:  self.myCol = bpy.data.collections.new(self.collection_name) bpy.context.scene.collection.children.link(myCol)   This method creates and adds a new collection to the outliner. Next, I want to create a bunch of cubes and add those cubes to the collection. How can I tell blender to create objects only within that particular collection?   Something like:  bpy.ops.mesh.primitive_cube_add(collection='name', size=2, location=(0, 0, 0))   Obvious cube_add doesn't have the param for it, so what's the proper way to do this?


I am trying to capitalize each word in a sentence in JavaScript. When ran I get an Uncaught TypeError saying myArray.substr is not a function.  function cap() {     var myString, myArray, first, last, up, low;     myString = document.getElementById("textbox").value;     myArray = myString.split(" ");     first = myArray.substr(0, 1);     last = first.substr(1);     up = myString.toUpperCase();     low = myString.toLowerCase();      document.getElementById("textbox").value = myString;      return cap(" "); }

Is there a simple way to convert a string to Title Case? E.g. john smith becomes John Smith. I'm not looking for something complicated like , just (hopefully) some kind of one- or two-liner.


I posted a question  () on Wednesday, 02/17/2015, but it is showing that I asked the question "yesterday". All of the comments I posted on Wednesday also show up as being posted "yesterday".  In my current timezone (EST) it is currently 8:45am Friday 02/19/2015.  This may sound a bit nit-picky that I'm submitting this question but I'm curious about why it is showing up this way.  I understand that "yesterday" could be interpreted loosely.    I went back to the note I posted and I see that floating over the date does show that it was 02/17 when I posted (2 days ago).  This was interesting because it almost had me convinced that I had written this up just yesterday.  The days blur together.  :)

Looking at , I see "asked yesterday" (which I really hate; I'd like to see an exact time specification rather than this vague one, especially in the list of questions). But it was not asked yesterday! When I hover over it to show the exact time, it shows it was actually the day before yesterday!  This snapshot was taken at 2012-03-31 15:00 UTC (plus or minus a few minutes):    Whatever different opinions you may have on the implementation, yesterday is a word with a certain meaning. Redefining it is not a good idea. At least rephrase this as "1 day ago" or something.


If I do a simple loop with a while, it is evaluating my ++ operator after the first loop, does this mean that my while operator makes a small scope saving my i and after it finishes evaluating it applies the ++ operator on it? Why does this happen with this operator and also happens on the -- but not with lets say a simple sum i + 1?  var i = 0; while(i++ < 1) { console.log(i) }   My output is 1  var i = 1; while(i-- > 1) { console.log(i) }   My output is 0  var i = 0; while(i + 1 < 1) { console.log(i) }   My output is undefined

Is there a difference in ++i and i++ in a for loop? Is it simply a syntax thing?


Is it a good practice to make the constructor throw an exception? For example I have a class Person and I have age as its only attribute. Now I provide the class as  class Person{   int age;   Person(int age) throws Exception{    if (age<0)        throw new Exception("invalid age");    this.age = age;   }    public void setAge(int age) throws Exception{   if (age<0)        throw new Exception("invalid age");    this.age = age;   } }

I have exceptions created for every condition that my application does not expect.  UserNameNotValidException, PasswordNotCorrectException etc.  However I was told I should not create exceptions for those conditions. In my UML those ARE exceptions to the main flow, so why should it not be an exception?  Any guidance or best practices for creating exceptions?


I have seen written in many books that a motion that repeats itself after a specific time period follows periodic or harmonic motion. However I know for a fact that damped harmonic motion cannot repeat the initial motion (parameters defining motion like amplitude, velocity etc. change).This clearly shows that harmonic motion does not repeat itself. How can I clearly differentiate it as a separate entity? I am probably messing myself with the meaning of the words.

For example, if a pendulum system in the real world oscillates its amplitude and period will eventually decrease. Does that still count as a periodic motion? Since the motion doesn't have the same amplitude at equal time periods.


I know that if Alice and Bob both have secret-public key pairs, they can use RSA for example. If we remove the possibility that Alice can know anything which Eve doesn't (ie Alice's secret key), is there an algorithm which makes encryption still possible?  (I am new in the topic and haven't been able to find an answer.)

I've always been interested in encryption but I have never found a good explanation (beginners explanation) of how encryption with public key and decryption with private key works.  How does it encrypt something with one key and decipher it with another key?


06-25 18:30:30.885: E/AndroidRuntime(26556): FATAL EXCEPTION: main 06-25 18:30:30.885: E/AndroidRuntime(26556): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.eeee.ftest/com.eeee.ftest.MainActivity}: java.lang.NullPointerException 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2295) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2349) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.app.ActivityThread.access$700(ActivityThread.java:159) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1316) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.os.Handler.dispatchMessage(Handler.java:99) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.os.Looper.loop(Looper.java:176) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.app.ActivityThread.main(ActivityThread.java:5419) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at java.lang.reflect.Method.invokeNative(Native Method) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at java.lang.reflect.Method.invoke(Method.java:525) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at dalvik.system.NativeStart.main(Native Method) 06-25 18:30:30.885: E/AndroidRuntime(26556): Caused by: java.lang.NullPointerException 06-25 18:30:30.885: E/AndroidRuntime(26556):    at com.eeee.ftest.MainActivity.onCreate(MainActivity.java:21) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.app.Activity.performCreate(Activity.java:5372) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1104) 06-25 18:30:30.885: E/AndroidRuntime(26556):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2257) 06-25 18:30:30.885: E/AndroidRuntime(26556):    ... 11 more   public class MainActivity extends SherlockFragmentActivity {      @Override     protected void onCreate(Bundle savedInstanceState) {         super.onCreate(savedInstanceState);         requestWindowFeature(Window.FEATURE_NO_TITLE);         setContentView(R.layout.activity_main);          ActionBar actionbar = getSupportActionBar();         actionbar.setNavigationMode(ActionBar.NAVIGATION_MODE_TABS);          ActionBar.Tab Frag1 = actionbar.newTab().setText("Fragment 1");         ActionBar.Tab Frag2 = actionbar.newTab().setText("Fragment 2");         ActionBar.Tab Frag3 = actionbar.newTab().setText("Fragment 3");          Fragment Fragment1 = new Fragment_1();         Fragment Fragment2 = new Fragment_2();         Fragment Fragment3 = new Fragment_3();          Frag1.setTabListener(new MyTabsListener(Fragment1));         Frag2.setTabListener(new MyTabsListener(Fragment2));         Frag3.setTabListener(new MyTabsListener(Fragment3));          actionbar.addTab(Frag1);         actionbar.addTab(Frag2);         actionbar.addTab(Frag3);       }      class MyTabsListener implements ActionBar.TabListener{          public Fragment fragment;          public MyTabsListener(Fragment fragment){             this.fragment = fragment;         }          @Override         public void onTabSelected(Tab tab, FragmentTransaction ft) {             // TODO Auto-generated method stub             ft.replace(R.id.fragment_container, fragment);          }          @Override         public void onTabUnselected(Tab tab, FragmentTransaction ft) {             // TODO Auto-generated method stub          }          @Override         public void onTabReselected(Tab tab, FragmentTransaction ft) {             // TODO Auto-generated method stub          }      }  }

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 have generated some data Y and would like to describe its variation as a function of some variable X. Using MS Excel, I obtained the trendline shown in the figure below which suggests that Y varies approximately cubically with X. However, I would like to omit the trendline itself (leaving only the data points marked by the blue diamonds) and describe the data qualitatively in an increasing sense. To that end, would it be accurate for me to use the following statement: the data Y increases approximately cubically with X?

When reading scientific papers I have seen people explain the growth of a variable linearly, exponentially. However how would one say for a variable which grows in quadratic fashion, or cubic?  I don't remember reading something like: "y grows cubically with x"  Can I say, y grows cubically with x?  What would be the proper way to explain cubic or quadratic growth of a variable as a function of another one?  How would you explain the given lines:


My father, Walter Henry Belmont, is listed in the 1940 Boston, Massachusetts, USA Census Record as working (occupation) Laborer, WPA projects. How can I find what WPA projects he worked on?  Moderator's Note on Privacy Policy: Walter was born more than 100 years ago, so this question complies.  "Massachusetts Births, 1841-1915," database with images, FamilySearch ( : 7 December 2017), Walter Henry Belmont, 30 Oct 1915, Boston, Massachusetts; citing reference ID #p 330, Massachusetts Archives, Boston; FHL microfilm 2,409,903.

Several of the city directory listings I've found list people as being employed by the WPA ().    In the comments on ,  on the blog The Legal Genealogist (posted on June 21, 2012 by Judy G. Russell), one reader says she found employment information about her maternal grandfather in the 1940 Census, but many listings merely say the person was employed by the WPA with no indication of what they were doing.    If I could determine what projects took place in their area, could I find evidence of what work they did?  (Note that the WPA was formed in 1935 and was dissolved in 1943 -- this question was prompted by a missing 1940 Census record for a WPA employee.)  There are indexes at NARA which were produced by WPA projects.  I wonder if any records exist that would list the projects and say how many employees worked for each one.  Lists which named the employees would be a bonus, but even a general overview would be useful for context.     seems an obvious place to start.  I'll check there, and at the Internet Archive, and so on. This is the main entry page for the .  I'll also check the beta History.SE.


Currently I am monitoring 10 hosts. I want to write a script which will calculate the disk space in every 24 hours and then if the file system of a host is critical for any host then it will move the old files from that host to the host which has the largest disk space?

There is a list of IP addresses in a .txt file, ex.:  1.1.1.1 2.2.2.2 3.3.3.3   Behind every IP address there is a server, and on every server there is an sshd running on port 22. Not every server is in the known_hosts list (on my PC, Ubuntu 10.04 LTS/bash).  How can I run commands on these servers, and collect the output?  Ideally, I'd like to run the commands in parallel on all the servers.  I'll be using public key authentication on all the servers.  Here are some potential pitfalls:   The ssh prompts me to put the given servers ssh key to my known_hosts file. The given commands might return a nonzero exit code, indicating that the output is potentially invalid. I need to recognize that. A connection might fail to be established to a given server, for example because of a network error. There should be a timeout, in case the command runs for longer than expected or the server goes down while running the command.   The servers are AIX/ksh (but I think that doesn't really matter.


This is a question about episode 4x16 of Fringe.  This episode, titled "Nothing as It Seems" takes place in the   alternate timeline, after the      return of Peter.   The episode begins with Marshall Bowman on a plane.  The same scene occurs at the star of 1x13 ("The Transformation").  The events on the plane in the new timeline occur differently, in that      Bowman does not transform into a maniacal beast on the plane.   However, the same air hostess attends to Bowman and checks on him while his is in the washroom, and Bowman is seated next to exactly the same elderly passenger, despite a difference of three years.  (The timeline has changed but not the date.)  It seems highly improbable that Peter's absence (the divergent event between the two timelines) should cause Bowman to make his flight (for the same purpose as the original flight) three years later than he did originally, and also highly improbable that three people with no connection to one another should appear again on the same flight (in particular, that Bowman and the same random passenger should be seated next to one another again, three years later).  Is this a plot hole, or is there a genuine in-universe cause for this highly improbable arrangement of events?

In Fringe's season 1, the episode  (1x13) shows how  travels on VertusAir flight 718. We witness how he develops some strange symptoms, withdraws into a lavatory and transforms into a porcupine-like monster.  At the end of season 3, Peter "switches" the timeline (changing the past and making the present continue in a different timeline henceforth) from blue- to orange-verse. Various statements throughout the 4th season indicate time (the date) was not reset; Olivia and Walter have been working on Fringe cases for some three years etc. - hence it is safe to say that season 4 plays 3 years after season 1.  Then, in the episode  (4x16), the events from 1x13 happen again, up to the point of Bowman's transformation, which this time doesn't happen (not aboard the plane, anyway). As far as I can tell, great care was taken to exactly recreate the events from the season 1 episode, including hiring the same actors to play the flight attendants once again ( and ), so obviously this is supposed to be the same event with slight changes.  Peter, as well as Olivia - who is in the process of regaining her memories from the blue-verse -, remember the events from 1x13 and note the difference that Bowman's transformation happened later this time, implying that in the orange-verse, everything related to flight 718 played out the same way, except for the small difference that the transformation happened a bit later.  BUT ... all of this happened 3 years later!! Is there any explanation for this?  How unlikely is it that in the orange-verse timeline, Marshall Bowman is on the very same flight with the very same flight attendants 3 years after the same would have happened in the blue-verse? Mind you, this is not a "small change" in the course of events while mostly everything else stays the same.  So, why did Peter and Olivia realize the transformation happened a tad later in the orange-verse timeline, but were not baffled by the fact that essentially the same events as in the blue-verse happened, but three years later?  EDIT: Not only the flight and the flight attendants were the same in both episodes. The passenger next to Bowman was the same, an elderly lady played by  both times, as well. Moreover, the transcripts of  and  reveal that the dialogue between Bowman, the passenger next to him, and the cabin crew is the same down to the lines of text until the moment of transformation.  Interestingly, the announcement by the captain in the beginning seems to be different - starting the inflight movie + selling headsets vs. circling before beginning the final descent + selling snacks. On the other hand, this could be presumed to be a slight retcon, as in 4x16, it was crucial for the plot that the plane would be close to landing, and starting the inflight movie would not make much sense right before landing.


Find a function that matches the following conditions.  (a) $f(x)$ is continuous for all real numbers  (b) $f(0)$ = 3  (c) For all real numbers $x$, $f(x) = f(x/2)$  This is from a past paper, and the answer has been given as the following steps:   $f(a) = ... = f(a/2n)$ $f(a)$ = lim as n approaches infintiy $f(a)$ = lim as n approaches infinity of $f(a/2n)$ $f$(lim as n approaches infinity of $\frac{a}{2n}$ therefore $f$ is continuous $f(0) = 3$   My question arises due to poor printing of my answer book. In step 1 is $f(a/2n)$ the correct step or should it be $(f(\frac{a}{2^n})$? If so could you please explain why? Because for both possibilities I can't seem to figure out why that's a step in proving the continuity. I'm sorry for the very elementary question. Thank you!

How do I prove that if $f: \Bbb{R}\rightarrow\Bbb{R}$  is continuous at $0$ and $$f(x)=f(2x)$$ for each $x\in\Bbb{R}$, then $f$ is constant?


I created a new user and set its option to "root". Then I switched the option of the user which was activated to "standard" and closed the window. But now I can't login as the new user because I didn't set a password and so the user which is root is not activated. What shall I do?

I clean-installed Ubuntu 11.10 today, and then installed VirtualBox.  This required me to add myself to the vboxusers group, and since 11.10 seems to no longer have a graphical app to add users to a group, I ran the following command:  sudo usermod -G vboxusers stephane   This is a problem.  I now see what I should have run instead is:  sudo usermod -aG vboxusers stephane   The end result is I'm no longer in the groups I should be in.  Including whatever group is required to run "sudo".  When I run any command as sudo now, I get the following:  $ sudo ls [sudo] password for stephane:  stephane is not in the sudoers file.  This incident will be reported.   Is there a way to fix this, or do I need to re-install from scratch again?


I have searched and find this:  In classical logic, why is $(p \Rightarrow q) = T$ if $p = F$ and $q = F$?  Is the only way to prove that is not  a tautology by having $T \to F$, which gives $F$?

I am studying entailment in classical first-order logic.  The Truth Table we have been presented with for the statement $(p \Rightarrow q)\;$ (a.k.a. '$p$ implies $q$') is: $$\begin{array}{|c|c|c|} \hline p&q&p\Rightarrow q\\ \hline T&T&T\\ T&F&F\\ F&T&T\\ F&F&T\\\hline \end{array}$$  I 'get' lines 1, 2, and 3, but I do not understand line 4.      Why is the statement $(p \Rightarrow q)$ True if both p and q are False?  We have also been told that $(p \Rightarrow q)$ is logically equivalent to $(~p || q)$ (that is $\lnot p \lor q$).  Stemming from my lack of understanding of line 4 of the Truth Table, I do not understand why this equivalence is accurate.       Administrative note. You may experience being directed here even though your question was actually about line 3 of the truth table instead. In that case, see the companion question  And even if your original worry was about line 4, it might be useful to skim the other question anyway; many of the answers to either question attempt to explain both lines.


When we install Ubuntu, we get a lot of softwares pre-installed. Just like this, is it possible for me to install Ubuntu, then install all my required softwares and packages, setup my desktop and other system wide settings and once I get my perfect Ubuntu ready for use; I make snapshot or installable (my own Ubuntu version) of the system into a DVD or ISO. So that in future, I can just install Ubuntu through that ISO and get everything ready in a moment!  I checked , but remastersys is no longer available. I checked  as well, but it's too long and doesn't seem to be what I need.   Any other solution?

I installed Ubuntu 14.04.1 on one of my laptops and now I want distribute that exact installation to a few of my friends. I tried making an iso with Gparted on a live session but it makes a 500 GB file (I've only used around 8 GB) .   Thanks in Advance !


I know about the  question and its answers, and I'm trying to revive it and continue the search for the perfect answer.  I'm in a similar situation - a new patio was paved by concrete pavers from Cambridge (I didn't know they were porous) and I've left wet leaves on it for a couple of weeks (I didn't know about tannin stains).  However the question above is from 2010... Are there any recent achievements in chemistry, which will allow me to remove these tannin stains, or at least to decrease their dark color intensity? I have found references about "Genesis 950" and tea tree oil - do they really help?  UPDATE: I'm emphasizing that the question , mentioned in the beginning of my question and also pointed out as a duplicate, is five-years old, and so doesn't contain most recent information about various chemicals, which I don't know about, but may be somebody here does. I've also given two examples of agents, which weren't discussed in this question.  Additionally, it looks harsh to me to point me to the question, which I myself have addressed in the beginning of my question and pretend this question solves all my problems (it doesn't). I've already tried some ways to remove these stains (dishwasher detergent, OxiClean), but they are still there.

We have a brand new paver stone walkway/patio. To my dismay, I noticed that their were leaf and acorn stains from the oak tree in the front yard. I've learned my lesson and I'm going to try to keep the walkway swept more regularly.  Will these stains go away with enough rain & time? If not, what's the best remedy for removing these stains? What's the best mode of prevention?


I have a Lenovo Y700-15ISK laptop that came with 16GB (2x8GB) RAM. On the seller's website it indicated that there were 2 of 4 RAM slots used, which sounded great to me - meaning that I can expand the RAM further.   I've used different tools to determine the actual number of RAM slots, such as Task Manager(Win 10), CPU-Z, Speccy and wmic, as suggested here [. The problem is that they report different things. See below:  (1). Task Manager:    (2). Speccy    (3). CPU-Z    (4). Wmic    The manufacturer's manual I found online indicates that there are only 2 x SODIMM slots. It also reports that the motherboard can take a max capacity of 16 GB (2x8GB, 2133Mhz), while other sources say that it can actually take upto 32GB (2x16GB) and has been tested. See  and  ... so i have reason to believe the manufacturer can make mistakes. Seems no one is certain. Who should I believe?  In the end, I've opened up the machine from the under side (following a guide like ), and I seem to only find 2 slots (so far), but because of the differing results from the tool reports, I feel there are 2 more RAM slots. Could there be a possibility that there are another 2 RAM slots hidden on the other side of the motherboard (or in some place that i can't easily find), or is it simply that there are only 2 slots and the tools are reporting wrong results? Anyone with experience with disassembling this entire machine who might know the motherboard (Lenovo Allsparks 5A) inside out?  NB: I know this question is pretty similar to this one [  ] ... but the machines are different.

My motherboard has 2 ram slots . Why does CPU-Z and Speccy show that I have 4 slots ?  Gigabyte GA G41 MT S2P


I've been running Ubuntu for about 4 years now, and I'm having a problem with 12.04  Every once in a while the computer will slow almost to a stop, interrupting any playing audio/video, and essentially becomes unusable for a minute or more. I keep checking the system monitor, but it shows me using less than half of my RAM. I've got swappiness on 10, the suggested value for my 4GB RAM. Dell Inspiron 1545, Intel Dual Core 2.1GHz.  I've checked out some of the other threads for help, but nothing seems to work.  Any help?

What are your tips for improving overall system performance on ubuntu? Inspired by this  I realized that some default settings may be rather conservative on Ubuntu and that it's possible to tweak it with little or no risk if you wish to make it faster.  This is not meant to be application specific (e.g. make firefox load pages faster), but system wide.  Preferably 1 tip per answer, with enough detail for people to implement it.  A couple of mine would be:   Install  (via Software Center or sudo apt-get install preload); Change  value - "which controls the degree to which the kernel prefers to swap when it tries to free memory";   What are yours?  PS: Since this is not intended to have a unique answer but rather, several useful tips, I'm making this community wiki out-of-the-box.


alguien sabe como obtener el centroide real de un polígono, en la versión 2.18 había una herramienta con el mismo nombre. ahora en la versión 3.2.1 no esta, quiero obtener el centroide real de polígonos tipo peine que quede el punto dentro del polígono, que no le genere un extend. la herramienta que trae de centroide deja el punto fuera del polígono.  Google Translated     "someone knows how to get the real centroid of a polygon, in version   2.18 there was a tool with the same name. now in version 3.2.1 is not, I want to get the real centroid of comb polygons that is the point   inside the polygon, that does not generate an extend. the tool that   brings centroid leaves the point outside the polygon."

I am looking to use realcentroid where I'm assuming it puts all points within the polygons rather than the tool in QGIS Vector -> geom -> centroid tool, which in my result some bendier polygons have their centroids placed outside - the geometric centroid? The real centroid plugin doesnt install in QGIS v3 - do these get updated with releases?


I'm on Ubuntu 16.04 and I downloaded and installed Etcher for Linux x64 (64-bit) (AppImage), a standalone application to make bootable usb drives. Supposedly, to uninstall the application I simply havee to remove it. However, on first use a message popped up asking "Should a desktop file for /home/myhome/Downloads/etcher-electron-1.4.4-x86_64.AppImage be installed?" I selected yes, and now I can't get the message to come back. I deleted the AppImage file and extracted a new one from the downloaded zip file, but the message will no longer pop up. This seems to indicates that the application has not completely removed. How do I completely remove it?  For those claiming this is a duplicate, the answer to the provided "duplicate" does not apply here because this is a standalone application. Please read more carefully next time.

I've searched the net for such information and found different command lines, like these ones:  sudo apt-get remove application sudo apt-get remove application*  sudo apt-get remove --purge application sudo apt-get remove --purge application*  sudo apt-get purge application sudo apt-get purge application*   So, what is the correct way? Is it necessary to use that "*"?  After that, I also found these commands:  sudo updatedb sudo locate application sudo rm -rf (file/folder name)


I am communicating between two python scripts via pipes (Python 3.6.0 on osx). In the ideal case where the message is sent and waiting in the pipe, reading it isn't a problem. However when the pipe is empty it hangs while trying to read it.   Here is the script that writes to the pipe:   import pipes pipe_path = "/tmp/mypipe" t = pipes.Template() t.append('tr a-z A-Z', '--') f = t.open(pipe_path, 'w') f.write('ping')   Here is the script that that reads it:   import pipes pipe_path = "/tmp/mypipe" t = pipes.Template() t.append('tr a-z A-Z', '--') f = t.open(pipe_path, 'r') txt = f.read() print(txt)   So if I run the second script without running the first one it hangs. How can I detect if the pipe is empty and avoid it hanging on f.read()?

I'm using the  to start a subprocess and connect to its output stream (standard output). I want to be able to execute non-blocking reads on its standard output. Is there a way to make .readline non-blocking or to check if there is data on the stream before I invoke .readline? I'd like this to be portable or at least work under Windows and Linux. Here is how I do it for now (it's blocking on the .readline if no data is available): p = subprocess.Popen('myprogram.exe', stdout = subprocess.PIPE) output_str = p.stdout.readline()


Consider the hyperplane $H$: $∑x_{i}=k$, where k is a constant and $i=1...n$. How do we project a vector onto this subspace? More precisely, how do we compute the projection matrix $P$?

Consider the hyperplane $H: \sum_{i=1}^n x_i=0$. Let $P$ denote the orthogonal projection onto $H$. What exactly is the matrix $P$ and how do we find it?


I had some organic lamb shanks in the fridge. I forgot to freeze them by the "use or freeze by" date. It's 5 days past the date. Are they still good?

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.


For example, let's say I've asked a question like this: "If I've broken my arms, what should I do?"  Someone answered "If you have money, you may go to the clinic."  In fact, the answer-er have already fulfilled my needs in real-world case. However, I may curious for something and would like to ask more.  Question 1: Since the answer-er answered the question with precondition "If you have money". So I would like to ask "What if I don't have money". What should I do? I may comment and waiting for this reply, but I would like to have an official way.  Question 2: In my question, I've also give my precondition "If I've broken my arms". I may want to know if the answer applies in different scenario, like "If I've broken my legs". What should I do? Should I create another question and edit my question?  Actually I've got these questions when I ask another question in StackOverflow, FYI

What is the XY problem?  When asking questions, how do I recognize when I'm falling into it?  How do I avoid it?


it shows on cycle render but not on blender render.. what to do? here are the screen shots

How does Cycles work and how is it different from Blender Internal?  Which is better?


I mainly studied Illustrator to use it in T-Shirt custom design.  Now, I have this problem.  According to the tutorials that I see.  When working on print jobs, I should use CMYK mode rather than RGB.  I am just having trouble utilizing blending mode in CMYK transparency panel.  They sometimes dont look so well especially doing abstract designs.  If I switch to RGB, the design looks good in illustrator but does'nt print well on my CMYK printer.  Question is, how do I do about this problem of mine.  Anyone having this?

I just notice it now as I am new to Illustrator.  When I am in RGB mode, blending transparency seems to be easier as mode such as Screen, Multiply or Overlay looks good naturally.  If I switch the document mode to CMYK then the image is getting messed up.  I'd like to know, if CMYK is not ideal for blending options?


On Stack Overflow I find many code snippets which are otherwise correct but will throw an error because of the case sensitive nature of the programming language it's written in (Java, Unix, etc).  I try to edit them when possible. But am asking the question because most of the time the changes are less than 6 characters and so editing is not possible. I leave comments but most are ignored.  Is it necessary for a minimum characters cap for editing? I have seen 'Title' can be edited with just one change. And reviewers can easily reject edits which are not useful.  Or will it be useful if we remove the minimum character cap for editing when it is in a code block?  Stack Overflow code snippets have helped millions (including me numerous times) and it hurts to see such trivial mistakes in them.

, to correct a misspelled library enum in an answer. Since the edit was only one character, I also had to add a superfluous sentence to get over the character limit required to edit a post.  I've hit this problem before in other edits, always in code snippets. Since the edit limit exists to prevent trivial edits, and since there are many cases where one character code edits are not trivial (= to == etc), would it make sense to have a lower edit minimum inside code snippets?


How can I add some new tag set in my Stack Overflow account to get notification, if a new question is asked by a user for that particular tag set?

Is there a way to configure your Stack Overflow account so that you receive notification emails when posts are made to specific tags?    Or do you simply have to log on to see new posts?


Why do we get a coloured spot on old crt TV while dragging a bar magnet near the TV?

When you hold a powerful magnet near an old-style CRT TV, you see an interesting pattern, which "shows up the field lines" (see  ).   I understand the basics about the general idea why the image is distorted due to electron deflection, as described in , but am curious as to why the specific pattern of alternating light and dark regions is seen. Do the electrons follow certain field lines preferentially, leaving other regions of the phosphor screen dark?


I need to know how the directory name in order to type it out in the terminal. How do I access the names of directories?   Windows Explorer used to have a title bar with the full path. Can someone please help me figure out how to see the full path of a certain file?

Is there a way to make sure that a deleted file can not be recovered?   As you know, deleting a file by pressing shift-del or using trash doesn't mean that file is gone forever. It resides somewhere in the computer.  In day to day life, law enforcement or thieves use recovery programs to reveal our private data or something else.   They can recover all data that resides on hard disk, in RAM, and even USB.  To protect us from these people, what should one do? Which program should one use?  Note: I don't want an answer like first use a recovery program then erase that file with shred. With just one program, I want to erase all unused/deleted files on my computer.


I made last code block visible, I didn't add anything that wasn't already in a post. Just the lack of newline rendered it hidden. And I removed "thank-you" part. It was approved by one reviewer, and then rejected by community, apparently without any other edit.  It's been a long time since I suggested edits (I'm mostly on Drupal Answers where I'm 10k+ already), so I admit I have no clue how it works now.

Why does the Community user sometimes approve or reject edits? How does a machine know if my edit is valid? What does it mean if my edit was rejected by Community?     See also:


There is some milk   Or     There are some milk   Which sentence is more correct according to the grammar rules?

I've read an article on BBC and the author wrote "there is some evidence...", but that phrase is really confusing because "some" is a plural identification but following "is". Can someone please explain this?


I buy beef dripping in tubs from the butcher - usually use a teaspoon when making a roast or a cottage pie.  It never seems to change colour, or smell; so how long is it safe to keep for?

I kept all of the bacon grease from making bacon this weekend, and now I have a jar of solidified grease in the fridge. How long can I use this to impart bacony goodness to my fried vegetables before it goes bad?  What is the shelf life of the fat drippings from bacon, roast and other meats?