Error in na.fail.default(as.ts(x)) : missing values in object in time series forecasting

I am trying to perform fit diagnostic on a salesData forecast using however I am getting an error: salesDataFC$residuals 2012 NA NA NA NA NA 2013 1.00454060 0.74436890 0.59266194 0.53535119 0.18350112 2014 1.99667197 -3.32464848 0.28314025 2.30886777 7.90332419 2015 1.71499831 -0.52401427 0.34252510 -1.64516043 2.77034325 2012 NA NA NA NA NA 2013 0.05094251 -0.22804463 -1.91518053 2.58830624 0.26477677 … Read more

Categories R

Reversing a List in Prolog

Your solution explained: If we reverse the empty list, we obtain the empty list. If we reverse the list [H|T] , we end up with the list obtained by reversing T and concatenating with [H] . To see that the recursive clause is correct, consider the list [a,b,c,d] . If we reverse the tail of … Read more

CSS media queries: max-width OR max-height

Use a comma to specify two (or more) different rules: From https://developer.mozilla.org/en-US/docs/Web/CSS/Media_Queries/Using_media_queries Commas are used to combine multiple media queries into a single rule. Each query in a comma-separated list is treated separately from the others. Thus, if any of the queries in a list is true, the entire media statement returns true. In other … Read more

Image rotation algorithm

One of the best pages describing image rotation algorithms I’ve found on the internet is tied to Dan Bloomberg’s excellent leptonica library. While the leptonica library itself is written in C and won’t help you, his page on image rotation algorithms: http://www.leptonica.org/rotation.html is definitely worth a read. You will most likely want to implement something … Read more

How do I find the MySQL my.cnf location

There is no internal MySQL command to trace this, it’s a little too abstract. The file might be in 5 (or more?) locations, and they would all be valid because they load cascading. /etc/my.cnf /etc/mysql/my.cnf $MYSQL_HOME/my.cnf [datadir]/my.cnf ~/.my.cnf Those are the default locations MySQL looks at. If it finds more than one, it will load … Read more

OverflowError: (34, ‘Result too large’)

Python floats are neither arbitary precision nor of unlimited size. When k = 349, 16.**k is much too large – that’s almost 2^1400. Fortunately, the decimal library allows arbitrary precision and can handle the size:

mvn command is not recognized as an internal or external command

Restart your machine, after setting up your M2_HOME (pointing to you Maven basedir, NOT the bin dir) and PATH (PATH=%M2_HOME%\bin;%PATH%). Then do: If there is a .bat file, it should work under Windows, as it appears to be finding it. If there isn’t one, then your paths are not right and you need to make … Read more

Get a random sample with replacement

I have this list: and I want to get 4 random letters from it, but including repetition. Running this will only give me 4 unique letters, but never any repeating letters: How do I get a list of 4 colors, with repeating letters possible?