I need to fit a spline function to a data set. I tried with bs, ns and smooth.spline. In my case the curve obtained by smooth.spline follows the trend in data better than with the bs and ns.  However, I do not know how to   obtain the equation of the fitted smooth.spline function? (namely, how to interpret the equation coefficients of the smooth.spline output)  compute the $R^2$ of the fitted function?  calculate the analytical first derivative of the fitted function, and obtain its equation (with actual coefficients)?   An example of data set can be computed as  library(stats) x <- 1:11 y <- c(0.2,0.40, 0.6, 0.75, 0.88, 0.99, 1.1, 1.15, 1.16, 1.16, 1.16 ) plot(x, y) spline <- smooth.spline(x,y) lines(spline)

I'm trying to fit a spline for a GLM using R.  Once I fit the spline, I want to be able to take my resulting model and create a modeling file in an Excel workbook.     For example, let's say I have a data set where y is a random function of x and the slope changes abruptly at a specific point (in this case @ x=500).    set.seed(1066) x<- 1:1000 y<- rep(0,1000)  y[1:500]<- pmax(x[1:500]+(runif(500)-.5)*67*500/pmax(x[1:500],100),0.01) y[501:1000]<-500+x[501:1000]^1.05*(runif(500)-.5)/7.5  df<-as.data.frame(cbind(x,y))  plot(df)   I now fit this using  library(splines) spline1 <- glm(y~ns(x,knots=c(500)),data=df,family=Gamma(link="log"))   and my results show  summary(spline1)  Call: glm(formula = y ~ ns(x, knots = c(500)), family = Gamma(link = "log"),      data = df)  Deviance Residuals:       Min       1Q   Median       3Q      Max   -4.0849  -0.1124  -0.0111   0.0988   1.1346    Coefficients:                        Estimate Std. Error t value Pr(>|t|)     (Intercept)             4.17460    0.02994  139.43   <2e-16 *** ns(x, knots = c(500))1  3.83042    0.06700   57.17   <2e-16 *** ns(x, knots = c(500))2  0.71388    0.03644   19.59   <2e-16 *** --- Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1  (Dispersion parameter for Gamma family taken to be 0.1108924)      Null deviance: 916.12  on 999  degrees of freedom Residual deviance: 621.29  on 997  degrees of freedom AIC: 13423  Number of Fisher Scoring iterations: 9   At this point, I can use predict function within r and get perfectly acceptable answers.  The problem is that I want to use the model results to build a workbook in Excel.    My understanding of the predict function is that given a new "x" value, r plugs that new x into the appropriate spline function (either the function for values above 500 or the one for values below 500), then it takes that result and multiplies it by the appropriate coefficient and from that point treats it like any other model term.  How do I get these spline functions?    (Note: I realize that a log-linked gamma GLM may not be appropriate for the data set provided.  I am not asking about how or when to fit GLMs.  I am providing that set as an example for reproducibility purposes.)


Today I found some weird behavior of following piece of code:  if (arg == 0):    # some local variable    format = ""    ret = format + arg else:    # bultin format function    ret = format(arg, "#x")  print ret   It acts different inside and outside function. With this code:  import sys  def foo(arg):    if (arg == 0):       # some local variable       format = ""       ret = format + "0"    else:       # bultin format function       ret = format(arg, "#x")     print ret   arg = int(sys.argv[1])   print "Outside function:" if (arg == 0):    # some local variable    format = ""    ret = format + "0" else:    # bultin format function    ret = format(arg, "#x")  print ret   print "Foo call:" foo(arg)   I get following output of call: python format.py 1  Outside function: 0x1 Foo call: Traceback (most recent call last):   File "format.py", line 31, in <module>      foo(arg)   File "format.py", line 10, in foo     ret = format(arg, "#x")   The first question is why a local variable under if statement hides the format function used in else statement?  The second one is why it acts different (and now with the expected behavior) when called outside a function?

What exactly are the Python scoping rules?  If I have some code:  code1 class Foo:    code2    def spam.....       code3       for code4..:        code5        x()   Where is x found?  Some possible choices include the list below:   In the enclosing source file In the class namespace In the function definition In the for loop index variable Inside the for loop   Also there is the context during execution, when the function spam is passed somewhere else. And maybe  pass a bit differently?  There must be a simple reference or algorithm somewhere.  It's a confusing world for intermediate Python programmers.


i am sure there is a simple answer, but i have seem to have forgen it. How do you calculate the relative apparent size of the subject   i have seen a formula with the field of view and tangent, but i am looking at a simple way to estimate on the fly what lens to use to make the subject 3X larger or smaller than where it is at, with a 50mm for instance.  i seem to remember halfing and doubling focal lenght, but that doesn't seem to work, 400mm is a lot more magnified than X3 (50 to 100 to 200 to 400mm)  Since "super zooms" like 24-240mm are 10X optical zooms, is it based on the starting 24mm lenght, which gives 10 increments, the relative X2 magnification would be 24-48-72-96-120-144-168-192-216-240mm  but that logic seems to break with other applications...  i though of angle of view, but 10° increments of fov, gives only 7 steps from 24 to 240mm (84-74-64-54-44-34-24-14° but 14° diagonal angle of view is 130mm and the next logical step 4° is 500mm  any simple way to estimates?

I am thinking about buying a new lens specifically to take photos of distant targets (birds, bears, etc). I currently own the Canon 70-300 IS USM, which is a nice lens, but I find that if I want to take a photo of anything further away than about 10 meters, the target does not fill a large amount of the frame (meaning I have to significantly crop in post production).  I am currently looking at the Canon prime 400mm, however I would like to determine at what distance an object will fill a reasonable proportion of the frame.  Is there a formula or rule of thumb I can apply that will help me in this situation? I realise the size of the target I am shooting will play a role here, so if we need to make an assumption about the size of the target please let me know.


I usually work with the normal article latex environment, with one column, and I usually introduce figures using the position given by [h] (with means "place the float here, i.e., approximately at the same point it occurs in the source text (however, not exactly at the spot)".  However, in multicols (in this case, in two columns), the only way I know to introduce graphics is by means of float package and it only works with the position given by [H] ("put exactly here"). The problem is that I have several graphics and using the position given by [H] there are lots of empty spaces that looks quite bad.  The question is if there is some way to use [h] position or something equivalent in the multicols package. Thanks in advance.

I'm trying to get images in my document in two different ways:   On top of the entire page, centered On top of a single column   I tried it with both twocols and multicols. I ruled out twocols because it forces a new page every time you turn it on, because I need the abstract to be wide and the rest of the cover page to be two columns.  Here are some examples of both points (screenshot from a downloaded PDF):   I want to achieve both, but somehow I can only solve the first point with:  \end{multicols}  \begin{figure}   \centering     \includegraphics[width=0.5\textwidth]{figure}   \caption{Dataflow pipeline of the edge detector}   \label{fig:workflowedge} \end{figure}  \begin{multicols}{2}   Is it awkward to turn off multicols, then turn it back on again?  For my second point, I've tried everything, but almost always, the image doesn't show up at all! The only way I can get it to show at all is by specifying the H placement specifier, but that places the image inside the text where I defined it, not on top of the column.  This is my best try, but it hides the image and breaks all references to ??:  \begin{figure}[t!]   \centering     \includegraphics[width=0.25\textwidth]{figure}   \caption{Dataflow pipeline of the edge detector}   \label{fig:workflowedge} \end{figure}   and I'm getting the warning:  Package multicol Warning: Floats and marginpars not allowed inside `multicols' environment!.   How can I make a figure a non-float?  I also tried the figure* environment, but that just creates an image centered on top of the page, like my first point.


I get this error: LNK2019 unresolved external symbol "public: class std::list<class cg::Component *,class std::allocator<class cg::Component *> > __thiscall cg::GameObject::getComponentsInChildren<class cg::Component>(int)" (??$getComponentsInChildren@VComponent@cg@@@GameObject@cg@@QAE?AV?$list@PAVComponent@cg@@V?$allocator@PAVComponent@cg@@@std@@@std@@H@Z) referenced in function "protected: void __thiscall cg::Scene::fixedUpdate(void)" (?fixedUpdate@Scene@cg@@IAEXXZ)  So the function getComponentsInChildren which is called inside Scene.cpp is not found. Here is the call: #include "Scene.h"  namespace cg {     ...      void Scene::update() {         for (auto i = this->rootObjects->begin(); i != this->rootObjects->end(); i++) {             std::list<Component*> list = (*i)->getComponentsInChildren<Component>(0);   // <--here              for (auto j = list.begin(); j != list.end(); j++)                 (*j)->update();         }     }      void Scene::fixedUpdate() {         for (auto i = this->rootObjects->begin(); i != this->rootObjects->end(); i++) {             std::list<Component*> list = (*i)->getComponentsInChildren<Component>(0);   // <--here              for (auto j = list.begin(); j != list.end(); j++)                 (*j)->fixedUpdate();         }     }      ... }  So I looked inside the GameObject.obj and really there is no symbol containing getComponentInChildren Here is the GameObject h + cpp #include <list>  #include "../Export.h" #include "../Forwarding.h" #include "RTTI.h" #include "Scene.h" #include "Component.h"  #include "../Components/Transform.h"  namespace cg {     class CGAPI GameObject final {     public:         ...          template<typename T>         std::list<T*> getComponentsInChildren(int includeInactive);          ...      private:         ...     }; }  #include "GameObject.h"  namespace cg {     ...      template<typename T>     std::list<T*> GameObject::getComponentsInChildren(int includeInactive) {         if (!RTTI::isComponent<T>())             return nullptr;          std::list<T*> list = getComponents<T>();          for (auto i = this->transform->begin(); i != this->transform->end(); i++) {             if (!includeInactive && !(*i)->getGameObject()->isActiveInHierarchy())                 continue;              list.merge((*i)->getGameObject()->getComponentsInChildren<T>());         }          return list;     }      ... }  I really dont understand why the Compiler does not output the function to the obj? Is there something I miss or is the error somewhere else?

Quote from :     The only portable way of using templates at the moment is to implement them in header files by using inline functions.   Why is this?  (Clarification: header files are not the only portable solution. But they are the most convenient portable solution.)


Is it okay to start a sentence with "Doesn't matter"? Like:     Doesn't matter which train you board, you are going to be late for the meeting.

"Thought you'd never ask" is "I thought you'd never ask" with "I" omitted. "Hope this helps" is "I hope this helps" with "I" omitted.   In English grammar, normally every sentence should have a subject, right?   My first thought is that these two examples are so often used that they are like set phrases. But these are not really set phrases. You can alter the words after "thought" and "hope".  Another possible explanation is the tendency to drop the subject if it is the first person pronoun. It seems that in many languages, such as Spanish, Italian and Japanese, the first person subject is usually omitted. Maybe English is going the same way? (Not exactly the same, since in Italian, verb forms change according to the person, so the subject is not necessary to understand who one's referring to.)  And, apparently, such omission is more common in spoken English than in written English.  Are there more examples of such first person subject omission? How frequent is it?


I have a question about a probability problem located here:    And quoted here:  “If you were trying to collect 6 baseball cards that came in packets of cheese puffs, assuming they are distributed evenly how many packets of cheese puffs would you expect to buy before you have all 6 cards?”  I was in agreement with the first part (Case I), in that one is guaranteed to get some card on the first packet.  However, they lost me at part II (Case II), with their odds calculation on that step.  I would have assumed since we still needed 5 cards of the 6 cards total, with each being equally likely, and given that we already have one of the cards, the odds of getting a card we needed would have been 5/6.  However, they say 4/5.  (Also, they have 4/5 = 125/100, which sure looks fishy to me!)  I would have further guessed 4/6, then 3/6, then 2/6 and finally 1/6 for the last card.  I also figured that the reciprocal of these summed is the number of cheese puff packets one would have to buy to collect all 6 cards, or 13.7 packets total  Can somebody point out where I am going astray with my method?  Or, is this a rare case where I'm okay and the reference is wrong?

I've just played a game with my kids that basically boils down to: whoever rolls every number at least once on a 6-sided die wins.  I won, eventually, and the others finished 1-2 turns later. Now I'm wondering: what is the expectation of the length of the game?  I know that the expectation of the number of rolls till you hit a specific number is  $\sum_{n=1}^\infty n\frac{1}{6}(\frac{5}{6})^{n-1}=6$.  However, I have two questions:   How many times to you have to roll a six-sided die until you get every number at least once?  Among four independent trials (i.e. with four players), what is the expectation of the maximum number of rolls needed? [note: it's maximum, not minimum, because at their age, it's more about finishing than about getting there first for my kids]   I can simulate the result, but I wonder how I would go about calculating it analytically.    Here's a Monte Carlo simulation in Matlab  mx=zeros(1000000,1); for i=1:1000000,    %# assume it's never going to take us >100 rolls    r=randi(6,100,1);    %# since R2013a, unique returns the first occurrence    %# for earlier versions, take the minimum of x    %# and subtract it from the total array length    [~,x]=unique(r);     mx(i,1)=max(x); end  %# make sure we haven't violated an assumption assert(numel(x)==6)  %# find the expected value for the coupon collector problem expectationForOneRun = mean(mx)  %# find the expected number of rolls as a maximum of four independent players maxExpectationForFourRuns = mean( max( reshape( mx, 4, []), [], 1) )  expectationForOneRun =    14.7014 (SEM 0.006)  maxExpectationForFourRuns =    21.4815 (SEM 0.01)


To loop through a map in c++ we do sth like this  map<string,int> mymap; map<string,int>::iterator it= mymap.begin(); while(it!=mymap.end()) {    //code here    it++; }   What if in the "code here" part i have an if statement that if evaluated to true, it erases one element from the map? How should my code change so that it still loops through all mymap elements in order?

In the following code I loop through a map and test if an element needs to be erased.  Is it safe to erase the element and keep iterating or do I need to collect the keys in another container and do a second loop to call the erase()?  map<string, SerialdMsg::SerialFunction_t>::iterator pm_it; for (pm_it = port_map.begin(); pm_it != port_map.end(); pm_it++) {     if (pm_it->second == delete_this_id) {         port_map.erase(pm_it->first);     } }   UPDATE: Of course, I then  which I didn't think would be related but answers my question.


I'm running Windows 10. I've found that uninstall button is grayed out for some apps at Start > Settings > System > Apps & features. Which means I can't uninstall such apps. For example here is a screen-shot for Movies & TV app which I want to uninstall:        So, why is Windows not letting me uninstalling some apps? Are those apps essential to have or without which Windows may not work?  And how do I uninstall those apps that I feel no need and want to uninstall? I've also tried Control panel but it doesn't list those apps at Control Panel > Programs & Features > Uninstall a program.

I was in the process of uninstalling all the Universal Apps from a new Windows 10 installation when I hit a roadblock.  It's not the first time I do this and it always goes well. However, this time, whenever I write in PowerShell Get-AppxPackage -allusers | Remove-AppxPackage or something more specific like Get-AppxPackage -allusers *windowscalculator* | Remove-AppxPackage I get the following message:     Remove-AppxPackage : Deployment failed with HRESULT: 0x80073CFA, Removal failed. Please contact your software vendor. (Exception from HRESULT: 0x80073CFA)   error 0x80070032: AppX Deployment Remove operation on package Microsoft.WindowsCalculator_10.1605.1582.0_x64__8wekyb3d8bbwe from: C:\Program   Files\WindowsApps\Microsoft.WindowsCalculator_10.1605.1582.0_x64__8wekyb3d8bbwe failed.      This app is part of Windows and cannot be uninstalled on a per-user basis. An administrator can attempt   to remove the app from the computer using Turn Windows Features on or off. However, it may not be possible to uninstall the app.      NOTE: For additional information, look for [ActivityId] 75c5fc31-fb20-0001-77fd-c57520fbd101 in the Event Log or use the command line Get-AppxLog -ActivityID   75c5fc31-fb20-0001-77fd-c57520fbd101      At line:1 char:49      + Get-appxpackage -allusers *windowscalculator* | Remove-AppxPackage   +                                                ~~~~~~~~~~~~~~~~~~       + CategoryInfo          : WriteError: (Microsoft.Windo...__8wekyb3d8bbwe:String) [Remove-AppxPackage], IOException       + FullyQualifiedErrorId : DeploymentError,Microsoft.Windows.Appx.PackageManager.Commands.RemoveAppxPackageCommand   I'm getting this message for every single app I try to uninstall, including those I know are perfectly uninstallable like the calculator or image viewer, which has never happened before. Powershell is running elevated and everything else works and seems normal. Is there something I can do besides reinstalling Windows?


If $p$ is a the sum of two squares are integers $a$ and $b$ s.t. $p=a^2 + b^2$ then $p=1$ mod $4$.  I need help proving that.

There's .   As the prime numbers that are $1\bmod4$ can be divided into the sum of two squares, will the squared numbers be unique?  For example, $41=4^2+5^2$ and the squared numbers will be 4 and 5.


I have two CheckBoxLists on my webpage. I have tried to center them on the page. Nothing so far has worked. I wanted to know if it has to do with the table that is created on databind and if I have to somehow add attributes to that instead of formatting the TR and TD? Any help would be appreciated.   I have tried creating three td's, putting the checkboxlist in the middle td and setting the left and right td's margin to 25%. Did not work.   I have tried setting the <td style="text-align:center;">, this did not work either.

How can I horizontally center a
 within another
 using CSS?

Foo foo


I just been victimized by a user for hate downvote. The story is like this: I reply to one question, and realise that someone suggested an off-topic answer, I downvote him and comment about the downvote.   After 10 minutes, I check back on Stack Overflow, and I realise that all my past comments and questions start getting downvoted. I lose about 20 points due to those downvotes. I accept that someone can downvote me, if they don't like my answer, but in 5-10 minutes 20-30 comments of mine from 6 month old question/comments get downvotes which means someone is doing it on purpose.

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


I wrote a proof for the above question, but I am not sure whether it is right or not since I assumed linear independence.   Here's the proof:   Let $u$,$v$ be linearly independent vectors in $V$. $span(u)$, $span(v)$, $span(u+v)$ are all $T-invariant$.   $T(v)$ is an element in $span(v) \Longrightarrow T(v) = av$  $T(u)$ is an element in $span(u) \Longrightarrow T(u) = bu$  $T(u+v)$ is an element in $span(u+v) \Longrightarrow T(u+v) = T(u)+T(v)= bu+av = c(u+v)$  Hence, $bu+av-c(u+v) = 0 \Longrightarrow (b-c)u + (a-c)v = 0$ Since u and v are linearly independent, $(b-c)=(a-c)=0 \Longrightarrow b=a$   Hence, $T(w) = kw$, for all $w$ in $V$, and $k$ any scalar.   Is it right to assume linear independence? And is there any problem with my proof?

Let $T: V \rightarrow V$ be a linear operator.  I need to demonstrate that if all nonzero vectors of $V$ are eigenvectors of $T$, then there is one specific $\lambda \in K$ such that $T(v) = \lambda v$, for all $v \in V$.  I understand that, if all nonzero vectors of $V$ are eigenvectors of $T$, then $T$ must be a scaling transformation. It just stretch or shrinks vectors, but doesn't change their  directions.  So, the statement says that if it happens, then, there is a single $\lambda$ such that $T(v) = \lambda v$. In other words, if there is such transformation, then it scales all vectors by the same scalar $\lambda$.  Applying the transformation to our standard basis vectors, we have: $$ T(e_1) = \lambda_1 e_1 \\ T(e_2) = \lambda_2 e_2 \\ \vdots \\ T(e_n) = \lambda_n e_n $$  I understand I need to prove that $\lambda_1 = \lambda_2 = \dots = \lambda_n$, but I can't see how!  EDIT  $$ v = c_1e_1 + c_2e_2 + \dots + c_ne_n \\ T(v) = \mu v = \lambda_1c_1e_1 + \lambda_2c_2e_2 + \dots + \lambda_nc_ne_n \\ $$  Since what's multiplying $v$ coordinates is $\lambda_i$, then all of them must be $\mu$. I'm not sure how to 'mathematize' this. Is this idea correct?  EDIT 2 Extending the left hand side of EDIT 1, we have: $$ \mu v = \lambda_1c_1e_1 + \dots + \lambda_nc_ne_n \\ \mu(c_1e_1 + \dots + c_ne_n) = \lambda_1c_1e_1 + \dots + \lambda_nc_ne_n \\ \mu c_1e_1 + \dots + \mu c_ne_n = \lambda_1c_1e_1 + \dots + \lambda_nc_ne_n \\ $$  And since $e_i$ are linearly independent, $\mu = \lambda_1 = \lambda_2 = \dots = \lambda_n$. Is this proof correct?


I'm not sure where to ask my question. What would be the best protocol to follow to find out which Stack Exchange community would be best for my question?   Should I just make an educated guess and post there? Or can I first post here on Meta.SE and ask where I should post my actual question? Is one of Meta Stack Exchange's roles to give such guidance?

I often find it intimidating to try and figure out where my question fits.   And will often end up posting in the wrong spot. Then I will get sent links to meta sites with large amounts of text, explaining why my question does not live there. These meta sites do great work in setting out clear rules, but there is a large amount of information to process.  I fully support the need to maintain the quality of these sites. But I find the user experience is a little lacking.   Am I just going about this the wrong way?


Trying to find this book I read probably something like 15-20 years ago. I can't recall if it was a full book or just a short story in a collection. I think the later. It's also possible I read it in French (can't recall), but maybe it was translated. God has to come up with explanations as men discover science, creating new rules as he goes (like men are trying to understand what matter is, so he creates atoms, then men probe the atom and he comes up with quarks, etc...). God gets entangled in what is like a complex web of lies where everything must still make sense and work together, and it becomes harder and harder for him to keep track. Evil influences men so that they try to understand more and more and direct them to the fragile parts of God's design. At some point near the end, to prevent a nuclear apocalypse, god divides the speed of light in half (because E=mc2) and earth is plunged in darkness for a few minutes, until the light from the sun arrives again. The story ends with evil winning and God starting over again with "something that has a square orbit". I recall there was a drawing of a square orbit in the book (like earth orbiting the sun, but square).

I read this novel back in the mid-80's but I'm pretty sure it was written in the 70's.  Strange things start to happen around a homeless man - like the laws of chance are changed.  The investigators discover that they can figure out what is going to happen next by interpreting the dreams/vision of the man.  One such dream is of a large body of water that is split into two pieces. Turns out that means that "C" (sea) - the speed of light has been halved.  The homeless man had become the embodiment of the creator essence. The creator was hiding, because it was tired of trying to keep the universe working and from the fight with is adversary - chaos.  At the end of the book, the creator allows the world to be destroyed and recreates it - except that planets are cubes and move in squares.  Yes - it was rather bizarre.


I tried installing VLC Player yesterday, and I got the Requires installation of untrusted packages error. I searched for hours for a solution to this problem whats the solution? pleas

I tried installing VLC Player yesterday, and I got the Requires installation of untrusted packages error.  I searched for hours for a solution to this problem, and finally came upon a suggestion that said to change servers for downloading updates from.  I did this, and it gave me a 404 error when I clicked on "Check" in the Update Manager.  I tried switching my server back to the main one (and after that, several other ones), but I am now still getting a 404 error:   And the other error I get when downloading or updating:   Edit: Output of cat /etc/apt/sources.list:  deb-src http://us.archive.ubuntu.com/ubuntu/ precise main restricted #Added by software-properties  # See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to # newer versions of the distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise multiverse universe #Added by software-properties  ## Major bug fix updates produced after the final release of the ## distribution. deb http://us.archive.ubuntu.com/ubuntu/ precise-updates main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-updates restricted main multiverse universe #Added by software-properties  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu ## team. Also, please note that software in universe WILL NOT receive any ## review or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise universe deb http://us.archive.ubuntu.com/ubuntu/ precise-updates universe  ## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu  ## team, and may not be under a free licence. Please satisfy yourself as to  ## your rights to use the software. Also, please note that software in  ## multiverse WILL NOT receive any review or updates from the Ubuntu ## security team.  ## N.B. software from this repository may not have been tested as ## extensively as that contained in the main release, although it includes ## newer versions of some applications which may provide useful features. ## Also, please note that software in backports WILL NOT receive any review ## or updates from the Ubuntu security team. deb http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-backports main restricted universe multiverse #Added by software-properties  deb http://us.archive.ubuntu.com/ubuntu/ precise-security main restricted multiverse deb-src http://us.archive.ubuntu.com/ubuntu/ precise-security restricted main multiverse universe #Added by software-properties deb http://us.archive.ubuntu.com/ubuntu/ precise-security universe  ## Uncomment the following two lines to add software from Canonical's ## 'partner' repository. ## This software is not part of Ubuntu, but is offered by Canonical and the ## respective vendors as a service to Ubuntu users. deb http://archive.canonical.com/ubuntu precise partner deb-src http://archive.canonical.com/ubuntu precise partner  ## This software is not part of Ubuntu, but is offered by third-party ## developers who want to ship their latest software.


If I have a split verb, such as "pick up" and I am a addressing a third person, I can say either:     I will pick Fred up at 11am.   Or:     I will pick up Fred at 11am.   For the second person, we have:     I will pick you up at 11am.   But it sounds wrong if I say:     I will pick up you at 11am.   What is my missing understanding here?    UPDATE:  My understanding from reading the  and the given answers, is that there is no strict rule about this at all, only a matter of style.  Thinking about it, I realised there is nothing wrong with the fourth example above, for example, if you wanted to give emphasis. Imagine saying the sentence and pointing your finger at the intended person:     I will pick up you at 11am.   It is no longer an awkward sentence, but becomes a highly emphatic one.

I thought of this question right after I posted a tweet about a service upgrading me to a free student account since I am in college. I said "That really helps a broke college student out." I actually paused for a second while I was writing that to decide if I should say     That really helps out a broke college student.   or     That really helps a broke college student out.   Are there any prescriptive rules about splitting phrasal verbs like this? I know this breaks the "don't put a preposition at the end of a sentence" rule, but that "rule" has an exception for phrasal verbs.  To clarify:   Is there any rule that says phrasal verbs can't be split, even if it is just an imposed, prescriptive rule? Does splitting a phrasal verb to put a preposition at the end of a sentence fall under the phrasal verb exception to the prepositions at the end of a sentence rule?


Currently it shows like this (a recent example)     closed as "not programming related" by RSolberg, Tim J, Rob Kennedy, Paul Alexander, Michael Petrotta an hour ago   How about it would show like this.     closed as "not programming related" by RSolberg, Tim J and as "not a real question" by Rob Kennedy, Paul Alexander, Michael Petrotta an hour ago   Or like this.     Closed as:   "not programming related" by RSolberg, Tim J   "not a real question" by Rob Kennedy, Paul Alexander, Michael Petrotta    an hour ago

Even though a question may be closed by receiving 5 close votes, the votes do not necessarily need to agree.  I think this is a good behavior, but  (which it was) and found the question was closed as "not a real question".  This is unfortunate, while I'm happy to display my username and acknowledge that I voted to close, I'd like some additional transparency.  That is, if it was a 4-1 vote for "not a real question" vs "exact duplicate" I'd be interested in seeing that level of information.  The point is to be transparent about why the question was closed, and though 5 users may agree the question needs to be closed they may not agree why.  It's important to recognize all the reasons for closure, not just the majority reason.  I'd suggest displaying this information as something like:     closed on Jun 21 at 4:26 as:         not a real question by foo, bar, baz   exact duplicate by alice, bob      Once a question has been closed I'd argue it's more important to understand the rationale than it is to worry about an extra 2 lines of text. If the votes are 2,1,1,1 perhaps keep just 2 bullets, the first showing the majority vote, the second saying "for other reasons" as a summary of the change.  The point is to aggregate the summary by reason.


If human being evolved without eyes, we'd have not known about light until, maybe Maxwell, $$\frac{1}{\sqrt{\epsilon_0\mu_0}}=c$$ But light is real and it exists physically in our universe.  Similarly, do fields like (electric, gravitational) exist like light but we do not possess right organ to see them? Or are fields just a mathematical trick (like momentum space or Hilbert space) and do not exist physically? Can a creature with right type of organ be able to see a field?

There was a reason why I constantly failed physics at school and university, and that reason was, apart from the fact I was immensely lazy, that I mentally refused to "believe" more advanced stuff until I understand the fundamentals (which I, eventually, never did). As such, one of the most fundamental things in physics that I still don't understand (a year after dropping out from the university) is the concept of . No one cared to explain what a field actually is, they just used to throw in a bunch of formulas and everyone was content. The school textbook definition for a field (electromagnetic in this particular case, but they were similar), as I remember it, goes like:  An electromagnetic field is a special kind of substance by which charged moving particles or physical bodies with a magnetic moment interact.  A special kind of substance, are they for real? This sounds like the authors themselves didn't quite understand what a field is so they decided to throw in a bunch of buzzwords to make it sounds right. I'm fine with the second half but a special kind of substance really bugs me, so I'd like to focus on that. Is a field material? Apparently, it isn't. It doesn't consist of particles like my laptop or even the light. If it isn't material, is it real or is it just a concept that helps to explain our observations? While this is prone to speculations, I think we can agree that in scope of this discussion particles actually do exist and laws of physics don't (the latter are nothing but human ideas so I suspect Universe doesn't "know" a thing about them, at least if we're talking raw matter and don't take it on metalevel where human knowledge, being a part of the Universe, makes the Universe contain laws of physics). Any laws are only a product of human thinking while the stars are likely to exist without us homo sapiens messing around. Or am I wrong here too? I hope you already see why I hate physics. Is a field not material but still real? Can something "not touchable" by definition be considered part of our Universe by physicists? I used to imagine that a "snapshot" of our Universe in time would contain information about each particle and its position, and this would've been enough to "de" it but I guess my programmer metaphors are largely off the track. (Oh, and I know that the uncertainty principle makes such (de)serialization impossible — I only mean that I thought the Universe can be "defined" as the set of all material objects in it). Is such assumption false? At this point, if fields indeed are not material but are part of the Universe, I don't really see how they are different from  except for perhaps a more geeky flavor. When I talked about this with the teacher who helped me to prepare for the exams (which I did pass, by the way, it was before I dropped out), she said to me that, if I wanted hardcore definitions,  a field is a function that returns a value for a point in space.  Now this finally makes a hell lot of sense to me but I still don't understand how mathematical functions can be a part of the Universe and shape the reality.


I want user to input text while it is not equal to "start".When it is equal to "start" I want to show "Bravo".In my code when I enter "start" it just continue to ask to input a text.What is missing in my code to process the operation i described.  import java.util.Scanner;  public class Application {   public static void main(String[] args) {     Scanner input = new Scanner(System.in);     String komanda = "a";     do {          System.out.println("Unesi komandu ");         komanda = input.nextLine();     }     while(komanda != "start");     System.out.println("Bravo");   } }

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


I'd like to add at the top of a .tex file a line to enable a command placed at the bottom of it (for instance, \printbibliography)  Why ? Firstly, in order to make easily disable this command in a very long .tex file. Even better, in order to externalise this line in a template input file, called at the beginning of the compiling process.  I've already tried to redefine the command \end{document} to adding \printbibliography before, like that :  \newcommand{\end{document}}[1]{\printbibliography \end{document}}}   But it doesn't work (it would have been too simple).  Here is an MWE :  \documentclass{article}  \usepackage{filecontents} \begin{filecontents}{\jobname.bib} @article{Bob1996,   title = {A {{Very Nice Title}}},   volume = {10},   number = {2},   journaltitle = {Annual Review of Nothing},   date = {1996},   author = {Bob, Bob} } @article{John1996,   title = {A {{Nice Title}}},   volume = {10},   issue = {2-3},   journaltitle = {Annual Review of Something},   date = {1996},   author = {John, John} } \end{filecontents}  \usepackage{biblatex}     \addbibresource{\jobname.bib}   % What I tried : % \newcommand{\end{document}}[1]{\printbibliography \end{document}}}  \begin{document}  ... A long long long text...  % Here is the command I need to remove, without removing  % the bibliography itself in the output file : % \printbibliography  \end{document}

I insert the name and licence with the command \nameofcompany at the end of my document like this:  \nameofcompany \end{document}   Now, I want to generalize it to some documents, for that I found \AtEndDocument{\nameofcompany} but it doesn't have exactly the same result than \nameofcompany  \end{document}. It seems that with \AtEndDocument, the command is only executed after \end{document}, while I want it to be executed before.  I also try to redefine the document environment like this  \renewenvironment{document}%   {\begin{document}}   {%   \nameofcompany %   \end{document}%   }   but it doesn't work either.  Is there a command like \beforTheEndDocument?


I need to reset my model's x,y,z orientation.  The back of it needs to be aligned with the z axis so I can use the edge-fade method described here:    Right now the model's orientation seems to be at an odd angle.  Thank you for help!  EDIT: Problem solved.      This answers the question.  I am leaving my question here in case anyone else does not know to look for "normal orientation"!

I want to change the orientation of my object to a specified direction.  Say I have an axle of a train whose normal orientation is set off by 90° from the global orientation:    The green arrow (Y-axis) points to the back of the train (along the global X-axis). But I want it to point to the sides of the train, so all I want is to rotate the orientation by 90° without rotating the object itself.  In other words, I want the normal and global orientation of the axle to be the identical:    Is this possible and if so, how?  Background: The game engine to use this model will move the bogies and the axles according to their orientations. After importing this train into the game the axles rotated 90° off.


I have the following program in which I have 2 classes, namely Class A and Class B in which each class has instance of another class declared as a private member.  FYI, for one class I'm using dynamic allocation (pointer instance) and in the other class I'm using automatic allocation (normal instance).  (Program.h)   class A; class B;  class A {     A();     ~A();     public:     void InitA();     void funcA;     private:     B b; // ERROR! on code compilation: "A::b uses undefined class B" }  class B {     B();     ~B();     public:     void InitB();     void funcB;     private:     A *a; } </code>   (Program.cpp)   B::B() : a(new A())     {     }     B::~B()      {          SAFE_DELETE (a);      }     B::InitB()     {         a->funcA(); // works beautifully!     }       A::A()      {     }     A::~A()      {       }     A::InitA()     {         b.funcB(); // DUE TO ERROR, code never compiles so I don't see this.     }   ERROR: "A::b uses undefined class B"  Now, I've deliberately not declared a pointer instance of class B in class A, which I believe should not be the reason for this error. This error is probably because I'm not doing forward declaration properly.

I am looking for the definition of when I am allowed to do forward declaration of a class in another class's header file:  Am I allowed to do it for a base class, for a class held as a member, for a class passed to member function by reference, etc. ?


In Blade Runner and Blade Runner 2049 some of the primary uses of replicants are for offworld colonies. Any explanation on the situation of Earth vs Offworlds?

In Blade Runner, there seems to be quite a  for emigration to the off-world colonies, e.g.,      "A new life awaits you in the off-world colonies, a chance to begin   again in a golden land of opportunity and adventure."   Is there any evidence that people emigrating are actually better off than staying on Earth?  The job descriptions of the replicants Deckard is tasked with "retiring" don't seem consistent with the colonies being wonderful places. If the colonies offered a good life, would they have to do so much advertising?


I want to change the grub2 menu color to black and white, also if it's related I wanted to change the purple color that appear between transitions when the PC boot.  I'm using Ubuntu 15.04.

How to do this manually, not installing any tools?


Is there a way to reset a iPad or return it to factory settings if you don't know the iCloud password?

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


I want to plot two different functions in two separate pair of axis, one above the other. Besides, I have to draw a dotted line between the two so as to mark some interesting points. Is it possible?

This issue has been driving me crazy for the past 10-20h. I have a group plot (pgfplots) where I have 2 plots one under another. I'd like to draw a vertical line (e.g. a helpline at x=150e-6) that would go through all of them.  When drawing inside the axis or rather nextgroupplot environment I can use something like this: \draw[thin] (axis cs:150e-6,\pgfkeysvalueof{/pgfplots/ymin}) -- (axis cs:150e-6,\pgfkeysvalueof{/pgfplots/ymax}); but this allows me to draw only on one of the subplots. If I go outside the axis environment I am able to draw on the entire {tikzpicture}, but I can't use the axis reference.  \begin{figure*}[h] \centering \begin{tikzpicture}  \begin{groupplot}[       group style = {group size=1 by 2, x descriptions at=edge bottom, vertical sep=0.2cm},       ytick={0, 1.8},       ymin=0,       ymax=3,       xmin=0,       xmax=550e-6,       change x base=true,       x SI prefix=micro]  \nextgroupplot \addplot table [x index = {0}, y index = {1}, col sep=comma] {plots/plot1reduced.csv};  \nextgroupplot[x unit=s] \addplot table [x index = {0}, y index = {3}, col sep=comma] {plots/plot1reduced.csv};  \draw[thin] (axis cs:150e-6,\pgfkeysvalueof{/pgfplots/ymin}) -- (axis cs:150e-6,\pgfkeysvalueof{/pgfplots/ymax});  \end{groupplot} \end{tikzpicture} \caption{Case 1} \label{fig:case1plot} \end{figure*}


I'm to execute gnome-terminal -e php /var/scripts/script.php but I get nothing but empty terminal window without user name, when I do php /var/scripts/script.php the terminal is running without problems, how do I show out script's output out in new launched terminal? I want cron some stuff up end end up terminals being here for waiting me to check them out how it's going, because it's gonna happen when I'm not at workstation, and I've got it checked out... It's like 140 outputs I would need to rewrite, if I want to log that, because I haven't used wrapper... I just need terminal to see the stuff anyway.

I want to Open a new Terminal in from within terminal.  It should have Shell prompt as well as already run few commands.  How to do it ?


For my website and coming all sites from now on, I want to have a wiki system, which can -  1) Support internalization easily, that is the wiki has a system to serve contents based on the language user selects. For example keeping 'en' as default, the wiki has to be able to serve other language articles, if a different language version exists. If i have a F.A.Q. page in english and spanish, changing language would server appropriate content.  2) It should be light weight and easy to install.  3) Only I can edit contents, others have no edit option. The wiki system has to have an easy way to switch off editing by guests. All edits are admin only.  I'm considering MediaWiki, but I wish to know if there is a better wiki system agreed by experienced and veterans. :)  Thanks, Anjan

This is a general, community wiki  question to address non-specific "I need a CMS or Wiki that does x, y, and z..." questions.  If your question was closed as a duplicate of this question and you feel that the information provided here does not provide a sufficient answer, please open a discussion on .    I have a list of features that I want for my website's Content Management System (CMS) - where can I find a [free] script that includes all of them?


#include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h>  #define LENGHT 20  typedef struct {     unsigned id;     char name[LENGHT];     char genre[LENGHT];     char nazionality [LENGHT];     int year_carrier_started;     bool check; }Artist;  void print(Artist *arr, int *i); void addOne(Artist *arr, int *i);  int main(void) {      int index = 5;     Artist *array = malloc(sizeof(int)*index);     for (int i=0;i<index;i++)     {         printf("Insert a number:\n");         scanf("%d",&array[i].id);     }     do     {         addOne(array,&index);         print(array,&index);     }while(1);      system("pause");     free(array);     return EXIT_SUCCESS; }   void addOne(Artist *arr, int *i) {     realloc(arr,sizeof(Artist)*(*i)+1);     printf("Insert another one:\n");     scanf("%d",&arr[*i].id);     *i = *i +1;     print(arr,i); }   void print(Artist *arr, int *i) {     for (int j=0;j<*i;j++)     {         printf("Number: %d position %d\n",arr[j].id,j);     } }   Hi guys, I got this struct from a piece of my program, what I need to is to realloc everytime the user wants to add a new Artist. After adding like 10/15 more users, it crashes for no reason (at least for me there is not). What am I doing wrong? (Dat *i is passed by reference, it counts how many artists are there already).

I know how to create an array of structs but with a predefined size. However is there a way to create a dynamic array of structs such that the array could get bigger?  For example:      typedef struct     {         char *str;     } words;      main()     {         words x[100]; // I do not want to use this, I want to dynamic increase the size of the array as data comes in.     }   Is this possible?    I've researched this: words* array = (words*)malloc(sizeof(words) * 100);  I want to get rid of the 100 and store the data as it comes in. Thus if 76 fields of data comes in, I want to store 76 and not 100. I'm assuming that I don't know how much data is coming into my program. In the struct I defined above I could create the first "index" as:      words* array = (words*)malloc(sizeof(words));   However I want to dynamically add elements to the array after. I hope I described the problem area clearly enough. The major challenge is to dynamically add a second field, at least that is the challenge for the moment.    I've made a little progress however:      typedef struct {         char *str;     } words;      // Allocate first string.     words x = (words) malloc(sizeof(words));     x[0].str = "john";      // Allocate second string.     x=(words*) realloc(x, sizeof(words));     x[1].FirstName = "bob";      // printf second string.     printf("%s", x[1].str); --> This is working, it's printing out bob.      free(x); // Free up memory.      printf("%s", x[1].str); --> Not working since its still printing out BOB even though I freed up memory. What is wrong?   I did some error checking and this is what I found. If after I free up memory for x I add the following:      x=NULL;   then if I try to print x I get an error which is what I want. So is it that the free function is not working, at least on my compiler? I'm using DevC??    Thanks, I understand now due to:     FirstName is a pointer to an array of char which is not being allocated by the malloc, only the pointer is being allocated and after you call free, it doesn't erase the memory, it just marks it as available on the heap to be over written later. – MattSmith   Update  I'm trying to modularize and put the creation of my array of structs in a function but nothing seems to work. I'm trying something very simple and I don't know what else to do. It's along the same lines as before, just another function, loaddata that is loading the data and outside the method I need to do some printing. How can I make it work? My code is as follows:      # include <stdio.h>     # include <stdlib.h>     # include <string.h>     # include <ctype.h>      typedef struct     {         char *str1;         char *str2;     } words;      void LoadData(words *, int *);      main()     {         words *x;         int num;          LoadData(&x, &num);          printf("%s %s", x[0].str1, x[0].str2);         printf("%s %s", x[1].str1, x[1].str2);          getch();     }//      void LoadData(words *x, int * num)     {         x = (words*) malloc(sizeof(words));          x[0].str1 = "johnnie\0";         x[0].str2 = "krapson\0";          x = (words*) realloc(x, sizeof(words)*2);         x[1].str1 = "bob\0";         x[1].str2 = "marley\0";          *num=*num+1;     }//   This simple test code is crashing and I have no idea why. Where is the bug?


I have a Toshiba Satellite Pro C50 laptop which came with Windows 8.1 pre-installed. I have installed Ubuntu 15.04 (64 bit) alongside Windows as a dual boot system. However, I can't access any of my data on the Windows drive C which has the name TI3125550PA from Ubuntu.  I get the following error message:  Unable to access “TI3125550PA” Error mounting /dev/sda4 at /media/malcolm/TI3125550PA: Command-line `mount -t "ntfs" -o "uhelper=udisks2,nodev,nosuid,uid=1000,gid=1000" "/dev/sda4" "/media/malcolm/TI3125550PA"' exited with non-zero exit status 14: Windows is hibernated, refused to mount. Failed to mount '/dev/sda4': Operation not permitted The NTFS partition is in an unsafe state. Please resume and shutdown Windows fully (no hibernation or fast restarting), or mount the volume read-only with the 'ro' mount option.   I had exited Windows properly with 'Shut Down', not 'Sleep' and did that several times.  From within Windows I ran 'chkdsk /f /r /x' which took some time to complete but reported that it had been 100% successful.  From within Ubuntu I used 'GParted' to check the partition which had Windows on.  It quickly completed the task, but still I get the same error message and am unable to access my data on the Windows drive.  Any ideas?

Whenever I boot Ubuntu, I get a message that it cannot mount my windows partition, and I can choose to either wait, skip or manually mount.  When I try to enter my Windows partition through Nautilus I get a message saying that this partition is hibernated and that I need to enter the file system and properly close it, something I have done with no problem so I don't know why this happens.    Here's my partition table, if any more data is needed please let me know.     Device Boot      Start         End      Blocks   Id  System /dev/sda1            2048    20000767     9999360   83  Linux /dev/sda2        20002814   478001151   228999169    5  Extended /dev/sda3   *   478001152   622532607    72265728    7  HPFS/NTFS/exFAT /dev/sda4       622532608   625141759     1304576   82  Linux swap / Solaris /dev/sda5        20002816   478001151   228999168   83  Linux


I've read that some vegetables should be never stored in the fridge.  Is that apply to most of the vegetables, some specific group or specific ones (which one)? What's general rule?

I'm a bit unsure about which fruits and veggies should be kept outside the fridge and which inside. It seems that apples, oranges, and bananas, are normally kept outside, and melons, watermelons, etc are kept inside. How do I know which ones should be kept inside and which should be kept outside?  Also, apart from making sure that fruits are stored on a different rack of the fridge than veggies, are there any other guidelines about storing them? I.e certain fruits that shouldn't be stored together, or anything?


I have found a lot of question about Xorg not starting by default, but this is actually what I want.  How can I have Linux Mint (17 Quiana) not start GUI, just the shell (I believe that is supposed to be login shell)?

I would like to start Debian without the GUI and then just type commands in to launch the desired programs (which are located on my local machine), eg  $ chromium-browser &   I already do a similar thing when sshing in to other machines on the LAN - it is handy if I need to visualise csv data for example in soffice. i currently have gnome desktop and Debian 7 installed.  I have , however I am reluctant to try them out for fear of being locked out of using the web browser once I do this (I will need it to seek help using the browser if I get stuck).  I was wondering if I could temporarily test out the method of starting the GUI on one of the other terminals (eg ctrl+alt+f1) to see if there are any problems? Will this work? Will it be equivalent to starting the GUI when booting without a GUI?  If this is feasible, please could someone provide full instructions for:   enabling the GUI on terminal f1 so that i can run gui programs (without showing the full desktop interface) turning off the desktop interface GUI on bootup   obviously I will need to run X11 to load GUI programs - that's fine, but I'm looking to boot up into text mode and then just execute GUI programs as needed.  doing some tests on an ubuntu 12.04 virtualbox vm (hopefully not too different to debian 7?)...  $ ps aux | grep gdm # *blank* $ ps aux | grep kdm # *blank* $ ps aux | grep lightdm root      1225  0.0  0.0 270664  3500 ?        Ssl  12:43   0:00 lightdm root      1234  1.9  2.2 236564 112276 tty7    Ss+  12:43   0:01 /usr/bin/X :0 -auth /var/run/lightdm/root/:0 -nolisten tcp vt7 -novtswitch -background none root      1382  0.0  0.0 156772  3572 ?        Sl   12:43   0:00 lightdm --session-child 12 19 $ sudo update-rc.d lightdm disable update-rc.d: warning: /etc/init.d/lightdm missing LSB information update-rc.d: see <http://wiki.debian.org/LSBInitScripts>  Disabling system startup links for /etc/init.d/lightdm ...  Removing any system startup links for /etc/init.d/lightdm ...    /etc/rc0.d/K20lightdm    /etc/rc1.d/K20lightdm    /etc/rc2.d/K80lightdm    /etc/rc3.d/K80lightdm    /etc/rc4.d/K80lightdm    /etc/rc5.d/K80lightdm    /etc/rc6.d/K20lightdm  Adding system startup for /etc/init.d/lightdm ...    /etc/rc0.d/K20lightdm -> ../init.d/lightdm    /etc/rc1.d/K20lightdm -> ../init.d/lightdm    /etc/rc6.d/K20lightdm -> ../init.d/lightdm    /etc/rc2.d/K80lightdm -> ../init.d/lightdm    /etc/rc3.d/K80lightdm -> ../init.d/lightdm    /etc/rc4.d/K80lightdm -> ../init.d/lightdm    /etc/rc5.d/K80lightdm -> ../init.d/lightdm $ sudo shutdown -r 0   and the gui is back up and running again after the reboot! so this clearly did not have the desird effect. however:  $ sudo /etc/init.d/lightdm stop   kills the gui. moving to tty2 (by pressing ctrl+alt+f2) and attempting to open firefox:  $ firefox & Error: no display specified   so attempting to specify a display:  $ export DISPLAY='0.0' $ firefox & Error: cannot open display: 0.0   and now i'm stuck. i can still get the gui back on ctrl+alt+f7 by entering the following into tty2:  $ sudo /etc/init.d/lightdm start   but this is not what i want. i just want to be able to run firefox without showing all the other desktop things such as the clock and the menu bars, etc.  trying out some of the things in ' answer  $ sudo /etc/init.d/lightdm stop $ echo "#!/bin/bash" > ~/.xinitrc $ echo "exec firefox" >> ~/.xinitrc $ xinit   this does exactly what i want :)


I was trying to solve this problem:     If    $$\frac{\cos x}{\cos y}+\frac{\sin x}{\sin y}=-1$$    then what is the value of    $$S=4\left(\frac{\cos^3y}{\cos x}+\frac{\sin^3y}{\sin x}\right)$$   I tried to solve this problem using a change of variables $\cos^3y=a\cos x$ and $\sin^3y=b \sin x$.  So:  $$\frac{S}{4}=a+b$$ $$\frac{\cos^6y}{a^2}+\frac{\sin^6y}{b^2}=1$$ and  $$\frac{\cos^2y}{a} + \frac{\sin^2y}{b}=-1$$ I tried to manipulate these equations, but it gives no result

If $\displaystyle \frac{\cos \alpha}{\cos \beta}+\frac{\sin \alpha}{\sin \beta}=-1$, find $\displaystyle \frac{\cos^3\beta}{\cos \alpha}+\frac{\sin^3\beta}{\sin \alpha}$.   I tried$$ \sin(\alpha+\beta)=-\sin \beta \cos \beta,\\ 2\sin(\alpha+\beta)=-\sin (2\beta),$$ and $$\frac{\cos^3\beta}{\cos \alpha}+\frac{\sin^3\beta}{\sin \alpha} =\frac{\sin\alpha\cos^3\beta+\sin^3\beta \cos \alpha}{\sin \alpha \sin \alpha},$$ but unable to find that ratio.  Any help, please.


Is there any way I can delete a global hotkey? I don't want to override it, I want it just deleted, since it blocks the key combination's use in other applications.  I don't have knowledge of what the program is that has the registered hotkey, but I also don't want to have to deal with installing Delphi and learning the language as suggested in the answer to a similar question on stackoverflow.  Thanks.

Given a hotkey, how can I find which program owns it?


In DS9 'Dax' they cannot find the location of the kidnappers of Dax. However, during the episode 'The Nagus', Sisko requests Jake's location from the computer, and it's given.  In previous episodes, they cannot locate people after they removed their combadges. So, surely the computer looks for the combadge, and if it has been removed, then locates using sensors.  So why didn't they do this in episodes which they were trying to find people who had removed their combadges?

In Star Trek it is frequently seen that when a crew member wants to avoid being tracked, they'll leave their communicator somewhere (quarters, corridor etc) which throws the computer and ship's security off their trail.  However, the entire interior of the ship is under constant surveillance by the internal sensors. Barring damage to the ship or sensors, or some space phenomenon causing radiation X to create interference, why aren't these internal sensors able to continue tracking every person on board regardless of where their comm-badge is? In the worst case, they should be able deduce who the errant individual is by simple subtraction: "I can see where all the other comm-badges are, so subtract them and the remaining life form must be the person I am looking for." But this never seems to be done either.  Is Star Fleet security really so inept or is there some other limitation in play that is never mentioned?


I want to make increase cell padding via CSS (so I don't have to set each table on the page).  I can't see how to do that.

In an HTML table, the cellpadding and cellspacing can be set like this:  <table cellspacing="1" cellpadding="1">   How can the same be accomplished using CSS?


So the other day I received a message from Google Search Console alerting that one of the websites I host contain malicious code, and I did manage to find numerous encrypted code lines in several files including wp-config.php and inside  which was installed and activated (not by me) and contained some encrypted code in its settings. I've deleted everything I found, installed the Sucuri Security plugin, and after scanning I installed WordFence which found a few more malicious files. I know for 100% that a "nulled" theme is the source of the malicious code. I've replaced the theme with an authentic one and also reinstalled its plugins. My question, is it possible to clean an infected WP website? I mean the malicious code/hacker must have gotten access to the database/other sites on the server which probably doesn't give me any other choice but rebuild am I, right? What's your opinion? I also would like to point out that the infected website has high traffic, which made it valuable for the "hacker", which what probably brought him to insert extra code into the site (which is something I didn't notice in other websites that use the same theme but have less traffic). Let me know if there's a complete procedure I can do that will clean this website & database completely from any malicious code. Thank you and regards.

My for-fun WordPress blog at  (running WordPress 3.1.1) got hacked -- it was showing an <iframe> on every page like so:  <iframe src="http://evilsite.com/go/1"></iframe> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">    I did the following   Upgraded to 3.1.3 via the built-in WordPress upgrade system Installed the  (lots of critical warnings on unusual files) and  (this showed all green and clean, so I uninstalled and removed it after running) Changed MySQL password. Changed all WordPress user passwords. Connected via FTP and downloaded the whole filesystem (not large, this is a WordPress-only Linux shared host) Diffed the filesystem against an official ZIP of WordPress 3.1.3 and removed or overwrote anything that did not match.   I am quite sure that    all the files on disk are official WordPress 3.1.3 files there are no "extra" files on disk other than my one /theme, the Exploit Scanner plugin (which I just downloaded), the /uploads folder, and a tiny handful of other expected files. My other plugin, wp-recaptcha, matches the current official downloaded version. I also checked the .htaccess file and nothing looks wrong there     I did not touch the database, but I am struggling to think how anything in the database could be malicious without special PHP code to make it work?  My WordPress blog appears OK and hack-free now (I think), but is there anything else I should check?


I can give accessibility permissions to some programs by going in System Preferences -> Security & Privacy -> Accessibility, and manually adding the programs one by one. Is there a way to do that programmatically, specifically via a bash script?

I would like to grant accessibility permission to some apps on Mac using Terminal as per this intruction   which is the accessibility tab in System Preferences  Or this    I would like to do that using Terminal so I can setup to install apps (i.e: BetterSnapTool) for many Mac at the same time, given I have admin privilege and this should be applied only on Mavericks and Yosemite  Does anyone know how to do this?  Thanks


I'm "remastering" my PhD thesis which is in the fatigue of composite materials. A common term is the effective stress intensity factor, which is $ \Delta K_{eff} $ in LaTeX code. Unfortunately, when typeset it looks like this:   I find the kerning between the two f characters in the subscript terrible. Can anyone suggest a fix for this. I've looked around this forum but nothing has popped out as a simple reliable solution. I am using a Mac (10.11) with MacTex 2015 and TexStudio as my editor/IDE.  Here's a MWE for those who need one:  \documentclass{book}  \begin{document}      \begin{equation}          \Delta K_{eff}      \end{equation}  \end{document}

I have a document, where I want to use $\tau_{ff}$. If this is rendered it looks like a space is inserted between the two f's. $\tau_{rl}$ looks fine ...   Where does this additional space come from and how can I avoid it being inserted?  (Miktex 2.9 on windows, if this is relevant).


Thanos' goal is to halve the population, to reduce demand for resources. The best way to kill half the population is to get all six infinity stones; then you can make half of all life just disappear.  But if you have all six infinity stones, you could just reduce the fertility of all species in the galaxy, so that the population gradually falls to half of its original size.   Why does Thanos prefer murder over birth control?

So we know from Infinity War that Thanos was collecting all the Infinity Stones to basically solve the problems brought about by overpopulation on many planets.  But does it make any sense? He could've just easily increased the resources or changed the area or taken appropriate measure to handle that situation. As far as I know, collecting all the Infinity Stones gives the user limitless power and control over the universe in the MCU.  Is Thanos just a mass murderer or is there something I'm missing?


I'm using Ubuntu 20.04.1 LTS with GNOME. Is there a way to unload GNOME and use Ubuntu look like Arch Linux installation process. With colors but only console screen. Directly from CLI. Using Ubuntu like this: [Example] I know that I can install Arch Linux and don't install any desktop environment. But installing Arch Linux is hard and Ubuntu have a bigger package repository. ( Just unloading GNOME and have access to load it again would be better, but I'm ready to remove it too :D )

To install the graphics driver I need to exit GUI / Gnome and go to the terminal. How can I do this in Ubuntu 18.04? Ctrl(STRG)+Alt+F1...F7 does not work, neither on the desktop, nor on the login screen...


A student's grades reflected his/her teacher  A student's grades are a reflection on his/ her teacher  A student's grade are a reflection of his/ her teacher  Could anyone possibly tell me if these mean the same?  Thanks in advance

The bride's elegant dress reflected her good taste. The bride's elegant dress is a reflection on her good taste. The bride's elegant dress is a reflection of her good taste.  Would you tell me if they mean the same thing? If they would mean the same thing, what about the following question--link--? or I mean how could we distinguish such a distinction between these functions? Similarly, what about these:  A student's grades reflected her teacher A student's grades are a reflection on her teacher A student's grade are a reflection of her teacher  When, where or in which situation don't they mean the same? How can we distinguish such a distinction?


Is there a systematic method for Logistic Regression to do transformations on the independent variables, in order to conclude that the most optimal logistic regression model is fitted?  Illustration of my question:  I have 2 independent variables (strength and minute both on a scale of 0 to 100) and the dependent variable is a binary outcome: win or lose.  I have done a logistic regression (in R with glm) to estimate the probabilities.  Since I already have the probabilities (based on an interpolated pivottable from a very large dataset, see picture below);     I can compare these with the probabilities from the logistic regression, see picture below:    I conclude that the logistic regression does not capture the non-linearity. For that reason I have added several transformations to the independent variables such as an interaction term, 2nd, 3rd and 4th power.  These additions result in a slight improvement measured by AUC after splitting the dataset and performing cross validations. Although visual the 4th power (red) is a deterioration compared to the 3rd power transformation (green); see picture below with the outcomes of 1 vector of the matrix with strength 50, deducted from the similar vector from the pivot table).    Do I have to conclude that Logistic Regression is not flexible enough for my data or that further improvement is possible by doing other transformations? In that case, is there a systematic structured method to do those transformations, in order to conclude that the most optimal model is fitted as possible by Logistic Regression?   PS: if there are any incorrect steps or conclusions above, pls let me know.

In linear regression, the transformations of explanatory variables is done to have maximum correlation with the dependent variable.  What is the best measure of choosing between multiple transformations in logistic regression as dependent variable is binary and not continuous?  The end goal is to maximize the lift (predictive power) of the model.


I faced this problem working on my fork of a repository. When I would make changes to some file(s) on a new branch and then switch to a different branch, git will not raise the error: You have local changes to "X"; cannot switch branches. error. Instead, it will just move to the new branch and reflect the changes in that branch as well. Please let me know if this a beginner mistake on my part.  Steps to reproduce -   Fork the repository git checkout -b new-branch-name Make changes to any file Switch back to master and those changes would reflect there   This is causing my master to be the same as a branch that I made changes to, which continued to stay after. Committing once to the newly created branch, however, fixes this issue.

I am working on a git repository with a master branch and another topic branch. I have switched to topic branch and modified a file. Now, if I switched to master branch that same file is shown as modified.   For example:  git status in git-build branch:  # On branch git-build # Changes to be committed: #   (use "git reset HEAD <file>..." to unstage) # #       modified:   cvsup_current #   Switch to master branch  [root@redbull builder_scripts (git-build)]# git co master M       builder_scripts/cvsup_current Switched to branch "master"   git status in master branch  [root@redbull builder_scripts (master)]# git status # On branch master # Changes to be committed: #   (use "git reset HEAD <file>..." to unstage) # #       modified:   cvsup_current #   Why is that the file is shown as modified in master branch even though it was modified in git-build branch?   My understanding was that the branches are independent of each other and when I change from one branch to another the changes do not "spill over" from one branch to another. So I am obviously missing some thing here.   Anyone got a clue stick?


I am quite new to C# and was trying to use lambda expressions.   I am having a list of object. I would like to select item from the list and perform foreach operation on the selected items. I know i could do it without using lambda expression but wanted to if this was possible using lambda expression.  So i was trying to achieve a similar result          List<UserProfile> users = new List<UserProfile>();        ..load users with list of users         List<UserProfile> selecteditem = users.Where(i => i.UserName=="").ToList();         foreach(UserProfile item in selecteditem)         {             item.UserName = "NA";         }   it was possible to do        users.Where(i => i.UserName=="").ToList().ForEach(i=>i.UserName="NA");   but not something like this       users.select(i => i.UserName=="").ForEach(i=>i.UserName="NA");   Can someone explain this behaviour..

I'd like to do the equivalent of the following in LINQ, but I can't figure out how:  IEnumerable<Item> items = GetItems(); items.ForEach(i => i.DoStuff());   What is the real syntax?


I am new to Blender. Here are the problems that i faced. After i mirrored and smooth division the model, the mirror seems like not doing well. It is obvious in object mode. The model is not smooth at the middle of the middle part. Another problem is the mouth of model does not match perfectly after smooth subdivision as shown as the picture.  Does anyone know how to resolve this? I can not continue with this until I can get the mirror perfect.  Thanks in advance for those who reply.

I was practicing with modeling a leaf using a image reference. Everything went fine and I finished modeling my leaf, but I wanted to make it more realistic (I'll add textures later), I saw lots of people using the Subdivision Surface modifier but it doesn't work for me.  My model:   My model when I add the Subdivision Surface modifier


Consider the code...  double first = 19.99; double second = 19; double firstPlusSecond = first + second; Console.WriteLine("Result: " + firstPlusSecond);   The output of this is "Result: 38.99" - which is what I expect  However...inspecting firstPlusSecond in debug, the number is actually 38.989999999999995  Which is messing with calculations elsewhere in the program.  What...?  What have I missed?

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


Maybe my OCD is kicking in, but I do get a little frustrated with 96 questions on the recommended view in the new navigation. It seems to ...    Can we please change it to be 100?

After the , I can now see question counts.  I noticed that my preferred settings (new questions, recommended tags, sort by active) returns a set of 96 questions.    What (if any) is the significance of 96 questions?


I have a PageBlockTable which shows a couple of rows. On click of one of these rows I want to display the fields of row in another page block below on the same page which will have some additional fields for the user to key in.  And then I want to create a record in another object.  How do I achieve this? How do I capture the values of the clicked row?     Below is my VF Page   <apex:page standardController="Account" extensions="AccountSearch">  <apex:form>  <apex:pageMessages ></apex:pageMessages>      <apex:pageBlockSection title="Please enter your details">        <apex:inputText value="{!FName}" label="First Name"/>           <apex:inputText value="{!LName}" label="Last Name"/>         </apex:pageBlockSection>      <apex:commandButton value="Search" id="Search" action="{!AccountSearch}"/>  </apex:pageBlock>  <apex:pageBlock title="Search Result">     <apex:pageblockTable value="{!acc}" var="a">       <apex:column >        <apex:outputlink value="https://cs62.salesforce.com/{!a.id}">{!a.Name}</apex:outputlink>       </apex:column>       <apex:column value="{!a.FirstName}"/>       <apex:column value="{!a.LastName}"/>      </apex:pageBlockTable>      </apex:pageBlock>

I have a pageBlockTable that loops through a list of objects.  I'm trying add an onRowClick event so I can use the clicked row as data for a javascript function. However when saving in the developer console, I'm getting the error :-     (Unknown property 'ContactStandardController.c')   What am I doing wrong, why is it looking at the controller and not the pageBlockTable var?  <apex:page standardController="Contact" >     <apex:pageBlock>         <apex:pageBlockTable value="{!Contact}" var="c" onRowClick="alert('{!c.Name}');">         </apex:pageBlockTable>     </apex:pageBlock> </apex:page>


I am using Wordpress and I can't get my footer to stay at the bottom of the webpage. I have a page.php which means that I use the same interface for all of my pages except the page content which I edit in Wordpress. On some pages it works fine but on the pages where the content is less (less text vertically if that makes sense) it is in the middle of the page and creates a white space at the bottom. This is the CSS I'm using for the footer atm. .footer-nav {     display: block;     width: 100%;     height: 200px;     background-image: url(/pics/bannerbottom.jpg);     background-size: 100% 120%;     padding: 20px;     position: relative;     clear: both;     bottom: 0;     margin-top: 100px;     float: left; }  .foot-container {     bottom: 0; }  and the HTML is just a simple div.

I have a simple 2-column layout with a footer that clears both the right and left div in my markup.  My problem is that I can't get the footer to stay at the bottom of the page in all browsers.  It works if the content pushes the footer down, but that's not always the case.


This is a tray-icon-only Windows Forms application. I'm trying to use argument to control something and change the text on the form for showing the status information.  But I found when I use argument to call it during it's running, the things I want to change are null (NotifyIcon() and MenuItem()), seems it ran a different application when I using arguments. I also tried Invoke() but there is no this definition in NotifyIcon().  Here is the code I wrote:  static void Main(string[] args) {     if (args.Length > 0)     {         Arg_Call(args[0]);     }     if (new Mutex(true, "{XXX}").WaitOne(TimeSpan.Zero, true))     {         Init_Tray();         Application.Run();     } } private static NotifyIcon trayicon;  private static void Init_Tray() {     trayicon = new NotifyIcon() { Icon = new Icon(@"D:\projects\Icon.ico"), Text = "Waiting", Visible = true };     trayicon.Visible = true;     Application.Run(); } private static void Arg_Call(string args) {     trayicon.Invoke((MethodInvoker)delegate {         trayicon.Text = "OK";     }); //from: https://stackoverflow.com/a/661662/8199423 }   Where am I wrong? How to and what is the best way to change the NotifyIcon.Text property in the running form via command-line-arguments?

Using C# and WPF under .NET (rather than  or console), what is the correct way to create an application that can only be run as a single instance?  I know it has something to do with some mythical thing called a mutex, rarely can I find someone that bothers to stop and explain what one of these are.  The code needs to also inform the already-running instance that the user tried to start a second one, and maybe also pass any command-line arguments if any existed.


Is $\dfrac{\sin(x)}{x}$ at $x = 0$  continuous?  Whats the value at $x=0~?$

How can one prove the statement $$\lim_{x\to 0}\frac{\sin x}x=1$$ without using the Taylor series of $\sin$, $\cos$ and $\tan$? Best would be a geometrical solution.  This is homework. In my math class, we are about to prove that $\sin$ is continuous. We found out, that proving the above statement is enough for proving the continuity of $\sin$, but I can't find out how. Any help is appreciated.


Keep getting a pop up informing me that that my Google play servecis has stopped. I have restarted my tablet but not getting any joy. Samsung tablet

The following message keeps appearing on my Samsung Galaxy S4 phone screen about every three seconds  "Unfortunately, Google Play Services has stopped".    Is it actually a virus or it is a problem with the Google Play Service?  I have tried disabling the Google Play Service but the message keeps appearing.  I have Norton Mobile running on my phone to pick up on viruses and to alert me to any possible security issues and also Lookout. They haven't picked up anything.  Does anyone have any suggestions?


int []arr = new int[4]; arr[^1];   // returns the last element  I'm trying to figure out the syntax above. It's returning the last element, but why?

How do you do it? Given a byte array:  byte[] foo = new byte[4096];   How would I get the first x bytes of the array as a separate array? (Specifically, I need it as an IEnumerable<byte>)  This is for working with Sockets. I figure the easiest way would be array slicing, similar to Perls syntax:  @bar = @foo[0..40];   Which would return the first 41 elements into the @bar array. Is there something in C# that I'm just missing, or is there some other thing I should be doing?  LINQ is an option for me (.NET 3.5), if that helps any.


I have a very old Oracle 7.x database that I need to open or convert to a new Oracle 11g. Here's the content of the old database:  control01.ctl control02.ctl control03.ctl findata01.ora finind01.ora gstdata01.ora rbs01.dbf system01.dbf system02.dbf system03.dbf temp01.dbf temp02.dbf tools01.dbf users.dbf  Note: the .ora files are binary (spfile). When mounting the old database the following error appears: ORA-00205: error in identifying control file  Ok, first I've tried to create a pfile from spfile:  create pfile='c:\ora\pfile.ora' from spfile='c:\ora...\findata01.ora'  I get "File created" but the pfile is empty.  I've tried to change the control files to:  alter system set control_files='c:\ora...\control01.ctl,c:\ora...\control02.ctl,c:\ora...\control03.ctl' scope=spfile;  But then I get the error message:  ORA-32001: write to SPFILE requested but no SPFILE is in use  Anyone know what else to try? I'm running out of ideas.  Maybe the database format has changed and it's not possible to open a 7.x database from inside 11.x? Or maybe there's a third-party tool to convert the database format?  Thanks in advance!

Is there any way to open or convert an old Oracle 7.x database into Oracle 11g? Thanks in advance!


I have a file that I use that has multiple artboards. I type info on page one and it copies the same information on the additional artboards. I need to know how to set this feature up in a new file. So far the "linking" just causes the text to carry over. I want the same info on every page.

I'm creating canvas' of multiple sizes and shapes that have blocks of text that are the same. Is there a way to have edit the text in one instance and have that same text duplicated across all over canvas'?


I am trying to convert from dxf to shp. Any text layer when converted has attributes including text, height, and angle. The angle is in radians, and I can see that it is in degrees in the dxf file. QGIS displays the text as if the angle was in degrees. How can I fix this?

When loading a dxf in QGIS, the line type files load in ok, however all text rotation values are lost when loaded into QGIS.  This is most obvious when you load in OStext.dxf (please see grab_Mar.22.jpg) this shows the same file open in AutoCAD and we can clearly see the selected “RICHMOND ROAD” with a rotation value of 314. When we look at the same record in QGIS (see attached grab2 Mar.22 13.43.jpg) we can see that the rotation value has changed to -0.80. So when I use that value to rotate the text, it doesn’t rotate to the correct place.  Why are the rotation values in the dxf files changing when we load into QGIS?


When calculating density of states for an electron, some arrive that k (the wavenumber) is $2\pi n x /L $ and some say it is $\pi n x /L$?  Where L is the dimension of the well  I’ve heard vague explanations of “you’re using only one quadrant of k space” but I truly have no idea what they’re talking about.  What is the difference in these two results and why does it occur?

I've started reading Schwartz' Quantum Field Theory and the Standard Model, and the very first equation seems to have an extra factor of 2, yet I have a hard time believing the first equation of a popular textbook would be wrong after many printings.  On page 1, Schwartz writes:     A blackbody is an object at fixed temperature whose internal structure we do not care about. It can be treated as a hot box of light (or Jeans cube) in thermal equilibrium. Classically, a box of size $L$ supports standing electromagnetic waves with angular frequencies   $$\omega_n = \frac{2\pi}{L}|\vec n| c \tag{1.1}$$   for integer 3-vectors $\vec n$, with $c$ being the speed of light.   This seems to me to have an extra factor of two. Assuming the components of the electric field are separable and performing separation of variables in a box, one should get something like $$E_i = E_{i0}\sin\left(\frac{n_x \pi x}{L}\right)\sin\left(\frac{n_y \pi y}{L}\right)\sin\left(\frac{n_z \pi z}{L}\right)\sin(\omega t) $$ where the $n_i$ are integers. Then, the wave equation becomes $$\frac{\omega^2}{c^2} = \frac{\pi^2}{L^2}(n_x^2 + n_y^2+ n_z^2) = \frac{\pi^2}{L^2}|\vec n|^2 $$ or equation (1.1), with no factor of two.  I'm aware that for calculating the number of states at a particular $\vec n$, you do get an extra factor of 2 for the 2 polarizations, but I don't see how that would affect the frequency.  I've looked at other resources and they seem to agree with my result. For instance, problem 8-47 in Tipler & Llewellyn's Modern Physics (6th Ed) says the energy of a photon in a box can be written $E=N(\hbar c\pi/L)$.  Still, I can't bring myself to believe the very first equation in Schwartz is wrong. Please let me know which result you agree with.


I want to get every color of gumball in a gumball machine (where there are 16 types of gumballs, each with a 1/16 chance of obtaining a particular color [assume there are an infinite amount of gumballs]).  I'm interested in knowing what the PMF (as a function of # of attempts) of getting every single gumball. ie. what is the probability of getting all 16 colors of gumballs in n trials?  I'd rather not have to brute-force the answer and am hoping for a somewhat elegant solution (maybe we can use the negative binomial distribution to find this?).

We roll a die until each side appears at least once, then we stop.     What is the probability of rolling exactly $n$ dice?   I guess the answer is  $$6-6\left(\dfrac{5}{6}\right)^n\;,$$  but this may be wrong.  In trying to solve this problem, I read , but I couldn't solve the problem.


If I have 1 reputation, I don't have enough reputation to comment on someone's post, but I want to help him/her. What should I do in this situation?  The only way to interact is through posting an answer, but if I do so everybody flags it.

I have been reading Stack Exchange for years - mostly not logged in, and have never posted (this is my first). I'm simply not very talkative, and very good at googling.  Recently a few occasions have come up when I've wanted to comment on a question.  I wanted either to ask for, or provide, clarification which did not warrant a new answer.  How do I gain enough reputation to comment without:   asking questions which have already been answered or that I can figure out on my own, or posting my comment like as an answer (i.e. being  rude)?


I have photographed the moon zoomed out to 500mm or so with my Lumix FZ150 when the sky is not very dark and have successfully captured terrific detail in the moon's features.  However, when trying to do the same with a dark or black sky, my eye sees the features, but I think the contrast is too much for the camera. I tried using a polarizer, and then a ND filter to no avail.  Would I have more success with a full frame sensor camera with many mega pixels, or will all cameras have limitations?

All my attempts to get a good shot of the full moon with my DSLR result in an overexposed circle on a black background.  I've tried using a tripod, remote shutter release, low ISO, and long exposure, but nothing has worked so far.  What combination of ISO and exposure time that will produce good results?   I particularly want to catch a full moon with the reddish effect when it is close to the horizon.


I've been performing many web searches using combinations of the words "vaccine", "vaccination", "COVID-19", "coronavirus", "efficacy", and "effectiveness", and have yet to find anything that provides an accurate answer to the following question: When a vaccine manufacturer states that their vaccine is "95% effective", does that mean: A. 100% of people receiving the vaccine during studies developed antibodies from the vaccine, but 5% still got sick.  (Which, I think, would actually mean it is less than "95% effective" because not everyone would get exposed to the virus that causes the illness.) (or) B. 95% (or less) of the study participants receiving the vaccine developed antibodies from the vaccine, therefore 5% of the people who received it still got sick. Which is it (or is it something else), and if it is "A", is my parenthetical understanding correct? Although my interest lies predominantly regarding COVID-19 vaccines, I think this question is general enough that it could apply to any vaccination.

Often we see in news they say AstraZeneca is 95% effective, while Chinese vaccine is 50%. I have question how to interpret these numbers.  Does this mean that if you get vaccinated with AstraZeneca for example, then assuming above numbers, there is 5% chance you will get the virus?  Also my question is do these percentages say anything about whether you will develop severe symptoms or not? For example does it mean that when we say Chinese vaccine is 50% effective does it mean it will reduce the severity of symptoms on half (due to 50%)?


I couldnot find this anywhere , so asking it here.   Say I have a query such as   SELECT * from TABLE WHERE col in ('a', 'b', 'c', .......);   This data is provided by list of strings and it is quite huge with length more than 100. What is efficient way of parameter binding in such scenario.  I am currently doing   'SELECT * from TABLE WHERE col in {0}'.format(str(tuple(LIST_OF_DATA)))   Another way I could think of is prepare a bind string with length of list such as ','.join(itertools.repeat("%s", len(LIST_OF_DATA))) and concatenate to query.  Is there any other way other than these to bind with in query a list of data ?

I have a python list, say l  l = [1,5,8]   I want to write a sql query to get the data for all the elements of the list, say  select name from students where id = |IN THE LIST l|   How do I accomplish this?


I am trying to use sudo apt-get update to update my Ubuntu but i have been getting this error code and i dont know how to proceed.  I am a newbie with ubuntu.  Thanks. Below is the error code it shows after trying to update  Fetched 32.9 MB in 2min 49s (195 kB/s)                                          W: Failed to fetch cdrom://Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)/dists/trusty/main/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs  W: Failed to fetch cdrom://Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)/dists/trusty/restricted/binary-amd64/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs  W: Failed to fetch cdrom://Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)/dists/trusty/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs  W: Failed to fetch cdrom://Ubuntu 14.04.2 LTS _Trusty Tahr_ - Release amd64 (20150218.1)/dists/trusty/restricted/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs  E: Some index files failed to download. They have been ignored, or old ones used instead.

When updating I got this error message:  W:Failed to fetch cdrom://Ubuntu 11.10 _Oneiric Ocelot_ - Release amd64 (20111012)/dists/oneiric/main/binary-i386/Packages  Please use apt-cdrom to make this CD-ROM recognized by APT. apt-get update cannot be used to add new CD-ROMs W:Failed to fetch http://ppa.launchpad.net/synce/ubuntu/dists/your_ubuntu_version/main/source/Sources  404  Not Found   What to do?


Is char* myString or char *myString considered best practice? My professor consistently uses char* myString and this seems to be less confusing than char *myString, but I've also seen many developers put the * with the string

Why do most C programmers name variables like this:  int *myVariable;   rather than like this:  int* myVariable;   Both are valid. It seems to me that the asterisk is a part of the type, not a part of the variable name. Can anyone explain this logic?


I have a failure to transfer my game from one HDD to another, and one PC to another. I copied the entire Skyrim folder from one HDD to another. And told where to find it also. Steam did a huge check of my HDD.  But it ended up downloading most of the files anyway. It took a week to download Dawnguard, Hearthfire, and Dragonborn files along with my Hi-Res textures.  I did ask about it in chat. But I feel this could help me or somebody else.  This is the screen I am looking at after transferring my entire hard drive to to new one. Steam downloaded my games, including Skyrim even though my Skyrim data folder had all the data files for Dawnguard, Hearthfire, Hi-Res and Dragonborn.  I have my copied files and have got rid of everything not steam related. I just have my DLCs and they include my hires files.  This is what it looks like.    But I still get this :     What could be causing this? How can I rectify? And in future when one is migrating to a new PC, how can this be avoided?  EDIT::::::::::::::::: Removed everything : Here is how it looks :  Still the prompt as before Steam Error 15  (Side Note : I transferred all my Origin games just by copy/pasting. This really is not nice.)    EDIT 2 :::::::::::::::::::::  And one more EDIT  I tried getting game cache up to speed, but this is prompt I am getting. But I played the game, it was working, I could pick out my character and all, and escape from Helgen.  EDITED 3 :::::::::::::::::  How does one transfer a Steam game? A game that is heavily modded, will the backup a Steam Game option suffice?

I use (and have it much bigger) drive D: to store all my user data and games, but I have installed the Steam client on drive C:. When I was installing a first game (Warhammer 40000), I've chosen to place my library folder on drive D: and the game went there.  But now as I've got installed the second game (Portal), I can see that it was put on drive C: despite to the choice I've done previously. When I open Steam - Settings - Downloads + Cloud - Steam library folders, I can see both installation places in the list. Can I merge them into one?  I would even agree to use the default drive C: library (as I've replaced it with a symlink already). When I press to remove one library it says it can only remove empty ones.


I am trying to change the permission of a folder in a mounted hard drive.  I didn't use command line to mount (nautilus file manager mounted for me when I clicked on it).  After the drive was mounted, the permission looks like this:  $ ll /run/media/myuser/ drwx------ 1 myuser myuser  4096 Feb 16 09:27 XYZ   Then, I do  $ sudo ln -s /run/media/myuser/XYZ/myData /data $ chown -R externaluser:externaluser /data $ ll / | grep data lrwxrwxrwx    1 externaluser externaluser    44 Mar  2 11:17 data -> /run/media/myuser/XYZ/myData   However, if I run  $ ll /run/media/myuser/XYZ | grep myData drwx------ 1 myuser myuser     48 Mar  2 12:16 myData   The owner and group are still myuser even after I ran:  chown -R externaluser:externaluser /run/media/myuser/XYZ/myData   How can this be fixed?  Basically, I would like to give access of this folder only to an external user to rsync data to that folder but I don't want to give access to other folders in the same drive.  Thanks.  This is CentOS 7 if it matters.

I have a drive being mounted (either manually or automatically using usbmount) and I can't change the owner or modify the permissions on the mounted drive or folders/files within in order for Mono to write files to it. I keep getting an operation not permitted error. I have since removed the usbmount package and I'm trying to affect the permissions on the mounted drive.. can't touch it      $sudo chmod 777 Folder drwx------  2 jroper jroper 16384 Sep 13 16:13 Folder/  jroper@ubuntu:/media/usb$ ll drwxr-xr-x  4 root root 16384 Dec 31  1969 ./ drwxr-xr-x 12 root root  4096 Sep 13 16:30 ../ -rwxr-xr-x  1 root root     0 Sep 13 14:43 File.txt* drwxr-xr-x  2 root root 16384 Sep 13 16:13 Folder/ drwxr-xr-x  2 root root 16384 Sep 13 14:23 System Volume     Information/ jroper@ubuntu:/media/usb$ sudo chmod 777 Folder jroper@ubuntu:/media/usb$ ll total 52 drwxr-xr-x  4 root root 16384 Dec 31  1969 ./ drwxr-xr-x 12 root root  4096 Sep 13 16:30 ../ -rwxr-xr-x  1 root root     0 Sep 13 14:43 File.txt* drwxr-xr-x  2 root root 16384 Sep 13 16:13 Folder/ drwxr-xr-x  2 root root 16384 Sep 13 14:23 System Volume     Information/ jroper@ubuntu:/media/usb$ sudo chown jroper:jroper Folder chown: changing ownership of ‘Folder’: Operation not permitted jroper@ubuntu:/media/usb$ ll total 52 drwxr-xr-x  4 root root 16384 Dec 31  1969 ./ drwxr-xr-x 12 root root  4096 Sep 13 16:30 ../ -rwxr-xr-x  1 root root     0 Sep 13 14:43 File.txt* drwxr-xr-x  2 root root 16384 Sep 13 16:13 Folder/ drwxr-xr-x  2 root root 16384 Sep 13 14:23 System Volume     Information/ jroper@ubuntu:/media/usb$ sudo chgrp jroper Folder/ chgrp: changing group of ‘Folder/’: Operation not permitted


so im tring to make my first character and everything was fine until i made the hands and when im done with it i tried to join it to the rest of the body (Ctrl+j) but whenever i do it be smoother/changes the color or whatever you want to call it  (i applied all of the modifiers before so there are none)  so i got 2 questions  1. how can i fix it?  2. why it changes\what is going on?  Before  After

I am attempting to make a tree but when I try to join the different components together ctrl J my decimated icospheres revert back to its original shape.  Any idea on how I can solve this?  I also forgot to mention that I am trying to create a low poly tree and that I am still in the learning stages.  The first image is the tree before joining and the second is the tree after joining