Dimension of family of hyperelliptic curves

Question: Suppose we have an elliptic curve E with a point $P$ of order $5$ over a field of characteristic $0$. Denote $E'$ the curve $E/\langle P\rangle$. Now let $x$ (resp. $x'$) be a function on $E$ (resp. $E'$) with a double pole at $O_{E_1}$ (resp. $O_{E'}$) and let $f : E \rightarrow E'$ be an isogeny of degree 5 with kernel $\langle P\rangle$. Now let $U$ be the function of degree $5$ such that $x' \circ f = u \circ x$ ($x$ and $x'$ define a map to $\mathbb{P}^1$). We let $C_f$ denote the hyperelliptic curve over $K = k(t)$ where $T$ is a free parameter, defined by the affine equation
$$
C_f: y^2 = u(x) - T
$$
If we have the following family of elliptic curves with $E_U : y^2 +(1-U)xy -Uy = x^3 -Ux^2$ with $(0,0)$ a point of order $5$. Then by Vélu's formulae  (Jacques Vélu, Isogénies entre courbes elliptiques. C. R. Acad. Sci. Paris Sér. A-B 273, 1971) we can get an explicit description of the morphism $f$. Projecting to the $x$ coordinate then gives us the following family of hyperelliptic curves.
$$
C_5(U,T) : Y^2 = (1-Z)^3 +UZ((1-Z)^3 +UZ^2 - Z^3(1-Z)) - TZ^2(Z-1)^2.
$$
I'm trying to see that this family is two dimensional (i.e. it isn't a one dimensional family in disguise), I've tried using the Igusa invariants, but that gets very messy. Does anyone have a solution?
Comment: I changed $$ to $\langle P\rangle$.  That is standard usage.
Comment: This might be a silly question, but what do you mean by "is two dimensional"? Do you mean that it is not a one-dimensional family in disguise?
Comment: Yes, exactly. I edited it.
Comment: I'm also not quite sure what happens behind the scenes when you say "we get a family". How is $C_5$ related to $E_U$ and $C_f$? Please write down the morphism.
Answer: I guess I found the answer:
We want to show that the family of curves
$
C(U,T) : Y^2  = (1-Z)^3 + UZ((1-Z)^3 + UZ^2 - Z^3(1-Z)) - TZ^2(Z-1)^2
$
covers all isomorphism classes of hyperelliptic curves of genus $2$ with real multiplication by $[\frac{1+\sqrt{5}}{2}]$. We construct this family as follows: Take an ellliptic curve $E$ with a rational point $P$ of order $5$. Pick a point $T$ on $E$ and considering the image $H$ of the set $\{T, T+P, T+2P, T+3P, T+4P\}$ under the map $x_1: E \rightarrow \mathbb{P}^1$, where $x_1$ is a function on $E$ with a double pole at $O_E$. Now the curve $C(E_T)$ is the double covering of $\mathbb{P}^1$ ramified at the points of $H$ and the image of $O_E$ under $x_1$. Because any elliptic curve with a point of order $5$ can be written as
$
E: y^2 + (1-U)xy - Uy = x^3 - Ux^2,
$
we write $C(E_T) = C(U,T)$.
First we recall a criterion due to Humbert.
Suppose that $\pi$ is a map from $C$ onto a plane conic $Q$ with branch points $P_1,P_2,P_3,P_4,P_5$ and $P_6$. Then $C$ has real multiplication by $\mathbb{Z}[\frac{1 + \sqrt{5}}{2}]$ if and only if for some ordering of the branch locus there is a plane conic $R$ passing through $P_6$ which is tangent to each of the edges of the pentagon $P_1P_2P_3P_4P_5$.
Suppose we have a curve $C$ with real multiplication by $\mathbb{Z}[\frac{1 + \sqrt{5}}{2}]$. Consider the two conics $Q,R$ obtained from the above criterion. We construct the elliptic curve $E$ by $E = \{(P,L) \in Q \times R^* | P \text{ lies on } L \}$. It is clear from the construction that the point $(P_1,L_1)$ for some $P_1 \in L_1$ has order $5$ on the curve $E$.
Now suppose we have an elliptic curve $E$ with a point $P$ of order $5$. We project to a conic $Q$ and consider the image of $H = \{T,T + P, T + 2P, T + 3P, T + 4P\}$ for some point $T \in E$. Now take a pentagon $G$ spanned by the image of $H$ and construct a conic $R$ inscribed to the sides of $G$. This conic $R$ will intersect $Q$ in some point, so by the criterion above this is equivalent to a hyperelliptic curve with real multiplication by $\mathbb{Z}[\frac{1 + \sqrt{5}}{2}]$.
These two constructions are inverse to eachother, so we've showed that any hyperelliptic curve of genus $2$ with real multiplication by $\mathbb{Z}[\frac{1 + \sqrt{5}}{2}]$ can be written in the above form.
Comment: Then you still have to show that the space of genus 2 curves with real mult. by $Z[(1+\sqrt{5})/2]$ is two dimensional, right ?


Virtual Desktop billing calculation method Amazon / Azure or Google

Question: I want to run couple of VMs for charity on Cloud and not sure about billing hence this question.
If I create a Virtual desktop / Workspace on one of cloud provider they say they charge per minute or second.
Does that mean for duration I have connected to it and using it or while its turned on?
If it's everytime I connect to it via workspaces client then it's fine.  That makes sense. If it's while its powered on then once I finish work, I shut the VM down, then reconnect next day. Will it power on automatically or will I have to do it before connecting?
Basically, if we purchase 5 Virtual Desktops.
not all will be used all time, may be 2 or 3 does it mean i will be charged for all when they are powered up but no one conencted?
thanks,
Kaleem
Answer: i got the answer from Amazon by raising a support ticket with them, posting it here incase someone else comes up with same question.
Following are the options available as to workspaces;
AlwaysOn — Use when paying a fixed monthly fee for unlimited usage of your WorkSpaces. This mode is best for users who use their WorkSpace full time as their primary desktop.
AutoStop — Use when paying for your WorkSpaces by the hour. With this mode, your WorkSpaces stop after a specified period of inactivity and the state of apps and data is saved. To set the automatic stop time, use AutoStop Time (hours).
Source: https://docs.aws.amazon.com/workspaces/latest/adminguide/running-mode.html
regards,
Kaleem
Comment: You should accept this answer so the question is marked as `Solved` in the system.


extjs numberfield maxlength not working

Question: I am new with Sencha Extjs 6. I want to use xtype:'numberfield' and it's working fine. But I want to set its max length, for example by 2, when input more than 2 digits just keep it nothing change. I don't know how to do it.
Please help me!!!
Thanks in advance.
Answer: You need to learn how to use Sencha Doc.
Well for this you need to use enforceMaxLength : true, and maxLength :2,This will work as you want. I created a fiddle for you. Fiddle Please test
Comment: In your code, input value still can be more than 2 digits.
Comment: But if edit code to  enforceMaxLength : true, maxLength: 2 it works fine. When i applied it to my project it still not working. I dont know why.
Comment: After modified, your code works fine. But it's not working with my project. Is it because of Classic or Modern?? I am using Modern.
Below is my code:
xtype : 'numberfield',
flex : 1,
padding: '0 0 0 3px',
itemId:'date',
reference:'date',
autoComplete: false,
autoCorrect: false,
clearIcon: false,
required: true,
allowBlank:false,
maxLength: 2,
enforceMaxLength : true,
Comment: Apparently code is not loading in fiddler for modern.  Will try to get to load code by some other way.
Comment: @UDID It doesn't load because the application has to be called differently, if I remember correctly.
Comment: @Alexander ya you may correct, I have to look because did'nt work much on modern.

extjs numberfield maxlength not working


Finding the points on the graph of the function $\frac{1}{3}x^3 + x^2 - x - 1$ at which the slope is $-1$; $2$

Question: Please help me. Find the points on the graph of $\frac{1}{3}x^3 + x^2 - x - 1$ at which the slope is
(a) $-1$; (b) $2$.
I don't know where to begin.
Comment: $(a)$: Let $f(x)$ be the function of the graph. Then you have to solve the equation $f'(x)=-1$. $f'(x)$ is the derivative of $f(x)$.
Comment: Please read this [tutorial](http://meta.math.stackexchange.com/questions/5020/mathjax-basic-tutorial-and-quick-reference) on how to typeset mathematics on this site.
Comment: Thank you guys and I'm so sorry if I didn't read the tutorial on how to typeset the figures! :))
Answer: The slope of the graph is equal to the derivative $$\frac{d}{dx}\left(\frac13x^3+x^2-x-1\right)=x^2+2x-1$$ Now solve for (a) $$x^2+2x-1=-1 \iff x^2+2x=0 \iff x(x+2)=0$$ and for (b) $$x^2+2x-1=2 \iff x^2+2x-3=0 \iff (x-1)(x+3)=0$$
Comment: Thank you Stef!! I feel so stupid. :)
Comment: I'm sorry, what are the points again? Are the answers x(x+2) and (x-1)(x+3) ? Sorry for  this dumb question
Comment: @Amp You do not need to. Actually you asked for a hint where to start and I answered completely :(... Sorry
Comment: @Amp. No, you need to find the $x$'s that solve these equations. Then you will give the points as $(x,f(x))$. For example one solution of $x(x+2)=0$ is $x=0$. Then $f(0)=-1$ so one point with slope $-1$ is the point with coordinates $(x,y)=(0,f(0))=(0,-1)$. Do the same for the rest of the points.
Comment: Thank you. I think I got it. For a, the points are (0,-1) and ( 7/3, -2) and for b it's (-2/3,1) and (2,-3). Am I correct? :/
Comment: @Amp Actually reversed for the second point $(x=-2, f(-2)=7/3)$ but otherwise yes correct.
Comment: Lol i didn't notice. :) thank you so much!!!! you don't know how this made me happy
Comment: @Nice, I should have given only a hint though, not the answer! Next time you do it by yourself and you upload your solution ;)!!


If $\Gamma\vdash b:\mathsf{Glue}[\phi\mapsto(T,f)]A$, then $\Gamma,\phi\vdash b:T$

Question: Can someone help me from where in those rules I can deduce what is printed below, i.e. that if $\Gamma\vdash b:\mathsf{Glue}[\phi\mapsto(T,f)]A$, then $\Gamma,\phi\vdash b:T$?  All the gluing types are introduced right before the paragraph (see PDF), the only preceding definition used here is $\Gamma\vdash a:A[\phi\mapsto u]$ (like in the top right rule for $\mathsf{unglue}$), but I as far as I understand, $\mathsf{Glue}[\phi\mapsto(T,f)]A$ is purely syntactical, i.e. it's just the type $\mathsf{Glue}$ with parameters $\phi, T, f, A$.
Only thing I can imagine is that is has something to do with the rule $$\Gamma\vdash\mathsf{Glue}[1_\mathbb{F}\mapsto(T,f)]A=T$$ if the $\phi$ could be baked into $\Gamma$, but as far as I understand, the face lattice is a seperate object, so one couldn't e.g. define $\Gamma':=\Gamma,\phi$.
Also, are gluing types meant to be inductive, e.g. when $b:\mathsf{Glue}[\phi\mapsto(T,f)]A$, do I know that $b$ is constructed via $\mathsf{glue}$ because this is the only constructor in $\mathsf{Glue}$?  (I assume not, just asking to be sure...)
Answer: You are correct about which rule entails it.
First, contexts $Γ$ don't just list variables, but 'face assumptions.' So $Γ,\varphi$ itself is a valid context which you could call $Γ'$ or something, and it means 'whatever $Γ$ means, and also $\varphi$ is true.'
Next, under the assumption $\varphi$, $\varphi = 1_F$. So, in the context $Γ,\varphi$, the system $[φ \mapsto (T,f)]$ is equivalent to $[1_F \mapsto (T, f)]$. And this allows the rule you mentioned to trigger.
Sometimes multiple contexts are used, one for 'normal' variable assumptions, and another for face/"cofibration" assumptions. But I think in the paper you're reading, they're just all merged into one context.
As for your second question, I believe $\mathsf{Glue}$ is arguably coinductively defined. You can find a discussion of that sort of thing in section 3.2 of this paper. I think it doesn't make much actual difference for non-recursive types like $\mathsf{Glue}$. But in some sense, the intuition is not that every element is necessarily 'made of' a $\mathsf{glue}$ constructor, but every element can be presented that way, because of an eta rule where you $\mathsf{glue}$ together what you get from $\mathsf{unglue}$ on any given value. But the 'projections' ($\mathsf{unglue}$ and the system) are supposed to be primary.
Comment: Can I just ask you *why* the system $[\phi\mapsto(T,f)]$ under $\Gamma$ is equivalent to $[1_\mathbb{F}\mathsf(T,f)]$ under $\Gamma,\phi$?  It makes intuitively sense, but the way I see it, $\mathsf{Glue}[\phi\mapsto(T,f)]A$ is just freshly introduced syntax and has nothing to do with the convention for $a:[\phi\mapsto u]$ introduced earlier?
Comment: An assumption $φ$ in the context could also be written $φ = 1_F$. I think it's a little confusing with the jargon about "faces," and "cofibrations." But the point is that things like $φ$ are propositions about the dimension variables, and a 'system' is a bunch of potentially overlapping cases on such propositions. The $1_F$ rule is then really saying, "if we can judge that one of the cases is actually true, then $\mathsf{Glue}$ reduces according to that case." And under the local assumption that $φ$ is true, we can judge that it is true, and the rule fires.
Comment: Various side conditions on building a 'system' ensure that if cases _do_ overlap, then it (judgmentally) doesn't matter which you pick, because they actually agree. So, syntactically, you don't have to worry about confluence problems caused by reducing according to one branch or the other when you happen to know they're true. And semantically, this is how topological 'gluing' works. The 'cofibration' propositions correspond to particular regions of a space, and you need to make sure that a definition by cases agrees on overlaps of regions to coherently glue them together.
Comment: Thanks a lot for the detailed explanations!  I think what confused me that for a given context, you can split it up in the pattern $\Gamma,\phi$ in various ways and get syntactically different results, which should all be judgementally equal, but I didn't find that part in the paper.  But it's so trivial that it's now easy to take it for granted.


mssql_bind empty string converting to NULL

Question: I am currently using SQL Server 2000 Stored Procedures with PHP. Following the PHP doc, I use mssql_bind to assign value of parameters and then execute the Stored Procedure.
The problem is that I got this bug which prevents me to bind empty strings to parameters (they are converted to NULL when the Stored Proc gets called)
I dont't want to have to convert every parameter inside the Stored Procedures to check if its NULL then convert back to an empty string. I want to be able to use empty strings as well as NULL which both have their own meaning.
Does anyone know a workaround for this in PHP ? PHP bugs website isn't very clear if that bug is fixed or when it will be fixed, I use PHP 5.2.11 (the lastest version from the 5.2 branch)
Answer: I personally don't have a MSSQL server available to test but have you tried using PDO instead of mssql directly?
PDOStatement->bindValue( mixed $parameter  , mixed $value  [, int $data_type  ] )

bindValue()
Yes, I realize that PDO is only a wrapper but who knows, could work! :)
Comment: Yes we know that there is PDO, but it does not support multiple resultset a Stored Proc could return.
Comment: It was a longshot, too bad! :(
Answer: Assuming you do not want to do what you suggested, options left to you are

Download a cvs snapshot of php and install it if viable, see if it is fixed.  If not viable or fixed via cvs then...
Use system() or exec() calls to use the stored procedures.  If too much a hassle then...
Don't use stored procedures, do your functionality in php or other scripting code.
Alter the stored procedure to accept another value for '' strings and convert THAT to a '' string.
Do what you didn't want to do.  Harsh :P But I do not see another way.
Answer: The bug #44325 proposed a patch to solve the problem, but it was not a correct solution, as it seems the problem is in ntwdblib.dll, and not in the code of the php_mssql extension.
See the comment from alexr at oplot dot com :

I'm sorry. This bug is not fixed. This
  is a bug of the ntwdblib.dll. And
  after latest updates the bug is
  return.
When I bind a empty string, the stored
  procedure received a chr(0) char
  instead a empty string.
Please roll back last fixes. This bug
  is irrecoverable.

Considering this, I'm not sure there's much that could be done on the PHP side :-(
Last time I worked with PHP+MSSQL on Windows, I had quite a lot of problems, like some quite similar to this one, actually ;-(
Maybe a possible solution, for you, might be to switch to the newer SQL Server Driver for PHP driver ? Note that is only works on Windows, though...
Comment: Yeah, that is the problem, we are running PHP on Linux, so we can't use the new driver.

Also, isn't ntwdblib.dll a Windows component ? So it should not affect the Linux version of PHP, or am I wrong ?
Answer: I have a solution that will work.
I am using ADODB (but that doesnt matter) and I have hacked the mssql driver (adodb-mssql.inc.php in the adodb5 drivers folder).
here is the code
if($var === ''){
        //stupid hack to prevent mssql driver from converting empty strings to null. now they arent empty strings but they will get trimmed down to legth 0 ;-)
        $var = ' ';
        $type = SQLVARCHAR;
        $isNull = false;
        $maxLen = 0;
    }

simply check if you are trying to bind an empty string and if you are change it to be non empty. it doesn't matter what value you use I just  use a space.
make the type a sqlvarchar isnull should be false and now the trick is to make maxlen 0 so that the mssql driver will trim your string to an empty string.
those variables should get passsed to the mssql_bind function if that wasn't obvious.


Relation between different ML models

Question: Is there a paper or book that talks about the mathematical relation between different machine learning models - how they are different and how they can (sometimes) be equivalent?
For instance logistic regression can be viewed as a single-layer perceptron. Other examples are here
Answer: Pattern Recognition and Machine Learning by Christopher M. Bishop does this a bit. It's a tough read, but usually worth it once you make it through.
For instance:

He discusses Gaussian Processes in the context of Kernel methods (like Support Vector Machines) and briefly discusses their connection to Neural Networks.
He starts his discussion of the EM algorithm with an explanation of k-means clustering.
He describes Bayesian Networks and Markov Random Fields under the heading of Graphical Models.
Comment: Thanks for the answer. While it does do some of that, it's scattered all over the book. It would be really nice to have a document that does this in one place and tries to relate as many models as possible...
Comment: A agree that that would be a nice resource. I don't know of any, but it'd be a worthwhile thing to set up (maybe in wiki format, so it can be kept up to date).

Relation between different ML models


svn: E120108: Unable to connect to a repository at URL

Question: svn: E120108: Unable to connect to a repository at URL 'http://svn.app.xxx'
svn: E120108: Error running context: The server unexpectedly closed the connection.
怎么破
Answer: Try https instead of http. Let me know if it solves your issue.


why is rails3 so stupid about creating huge load paths?

Question: I've been frustrated with the ~30 second rails environment start up time in production, so been tracing it some, and it seems a huge part of it is the load path craziness.
Here's a log including 3 files - for some reason they're loaded differently in each case.  Why do the top ones check each subdirectory first before the final directory?  Any suggestions on optimizations to make to improve this?
<code>lstat64("/data", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/data/u", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/data/u/apps", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle/ruby", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle/ruby/1.9.1", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle/ruby/1.9.1/gems", {st_mode=S_IFDIR|0755, st_size=12288, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mail-2.3.0", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mail-2.3.0/lib", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mail-2.3.0/lib/mail", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mail-2.3.0/lib/mail/parsers", {st_mode=S_IFDIR|0775, st_size=4096, ...}) = 0
lstat64("/data/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mail-2.3.0/lib/mail/parsers/content_disposition.rb", {st_mode=S_IFREG|0644, st_size=12151, ...}) = 0

lstat64("/usr", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies", {st_mode=S_IFDIR|S_ISGID|0775, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies/ruby-1.9.2-p180", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/i686-linux", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/i686-linux/enc", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/i686-linux/enc/trans", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat64("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/i686-linux/enc/trans/utf_16_32.so", {st_mode=S_IFREG|0755, st_size=17588, ...}) = 0
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/i686-linux/enc/trans/utf_16_32.so", O_RDONLY) = 10
read(10, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\260\4\0\0004\0\0\0"..., 512) = 512
fstat64(10, {st_mode=S_IFREG|0755, st_size=17588, ...}) = 0
mmap2(NULL, 10692, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 10, 0) = 0x589000
mmap2(0x58b000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 10, 0x1) = 0x58b000
close(10)                               = 0
open("/data/u/apps/newap/releases/20111108044231/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/vendor/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/app/assets/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/app/controllers/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/app/helpers/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/app/models/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/vendor/plugins/country_select/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.2.0/vendor/gems/metric_parser-0.1.0.pre1/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/yui-compressor-0.9.6/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/will_paginate-3.0.2/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/utility_belt-1.1.0/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/unicorn-3.7.0/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory);
...
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/coffee-rails-3.1.1/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rack-ssl-1.3.2/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/coffee-script-2.2.0/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/execjs-1.2.9/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/coffee-script-source-1.1.2/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/cocaine-0.2.0/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/big_sitemap-1.0.0/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rdoc-3.11/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/gems/ruby-1.9.2-p180@newap/gems/bundler-1.0.17/gems/bundler-1.0.17/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/aws-s3-0.6.2/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/xml-simple-1.1.1/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/awesome_print-0.4.0/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/addressable-2.2.6/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/bundler/gems/acts_as_taggable_redux-19a19d2d5775/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
...
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/open4-1.2.0/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/Platform-0.4.0/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/gems/ruby-1.9.2-p180@newap/gems/bundler-1.0.17/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/i686-linux/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby/1.9.1/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby/1.9.1/i686-linux/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/i686-linux/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/action_controller/vendor/html-scanner/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.2.0/vendor/gems/dependency_detection-0.0.1.build/lib/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/rack/mount/vendor/regin/enc/trans/single_byte.rb", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/vendor/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/app/assets/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/app/controllers/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/app/helpers/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/app/models/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/data/u/apps/newap/releases/20111108044231/vendor/plugins/country_select/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.2.0/vendor/gems/metric_parser-0.1.0.pre1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/yui-compressor-0.9.6/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/will_paginate-3.0.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/utility_belt-1.1.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/unicorn-3.7.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/uglifier-1.0.4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/sunspot_rails-1.3.0.rc4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/sunspot-1.3.0.rc4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/slim-1.0.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/temple-0.3.4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/sass-rails-3.1.4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/sass-3.1.10/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/sanitize-2.0.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/ruby-prof-0.10.8/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rsolr-1.0.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/bundler/gems/rails-dev-boost-dd82d6caf24e/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rails-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/pr_geohash-1.0.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/payment-1.0.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/parallel_tests-0.6.7/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/parallel-0.5.9/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/paperclip-2.4.5/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/oink-0.9.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/nokogiri-1.5.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/newrelic_rpm-3.2.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.7/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mysql2-0.3.7/ext/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/koala-1.2.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/kgio-2.6.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/irb_hacks-0.2.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/hodel_3000_compliant_logger-0.1.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/hirb-0.5.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/haml-3.1.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/flyrb-1.0.0.c/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/wirble-0.1.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/faraday-0.7.5/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/multipart-post-1.1.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/ezcrypto-0.7.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/escape-0.0.4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/delayed_job-2.1.4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/dalli-1.1.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/daemons-1.1.4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/crewait-0.1.7/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/creditcard-1.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/cranky-0.3.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/coffee-rails-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/railties-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/thor-0.14.6/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rack-ssl-1.3.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/coffee-script-2.2.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/execjs-1.2.9/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/coffee-script-source-1.1.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/cocaine-0.2.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/big_sitemap-1.0.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rdoc-3.11/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/gems/ruby-1.9.2-p180@newap/gems/bundler-1.0.17/gems/bundler-1.0.17/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/aws-s3-0.6.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/xml-simple-1.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/awesome_print-0.4.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/addressable-2.2.6/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/bundler/gems/acts_as_taggable_redux-19a19d2d5775/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/activeresource-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/activerecord-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/tzinfo-0.3.30/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/arel-2.2.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/activemerchant-1.18.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/money-3.7.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/json-1.6.1/ext/json/ext/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/json-1.6.1/ext/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/json-1.6.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/braintree-2.12.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/active_utils-1.0.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/actionmailer-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mail-2.3.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/treetop-1.4.10/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/polyglot-0.3.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/mime-types-1.17.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/actionpack-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/sprockets-2.0.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/tilt-1.3.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/hike-1.2.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rack-test-0.6.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rack-mount-0.8.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rack-cache-1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rack-1.3.5/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/erubis-2.7.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/activemodel-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/i18n-0.6.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/builder-3.0.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/activesupport-3.1.1/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/multi_json-1.0.3/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/POpen4-0.1.4/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/open4-1.2.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/Platform-0.4.0/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/u/apps/newap/shared/bundle/ruby/1.9.1/gems/rake-0.9.2.2/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/gems/ruby-1.9.2-p180@newap/gems/bundler-1.0.17/lib/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/1.9.1/i686-linux/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/site_ruby/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby/1.9.1/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby/1.9.1/i686-linux/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/vendor_ruby/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open("/usr/local/rvm/rubies/ruby-1.9.2-p180/lib/ruby/1.9.1/i686-linux/enc/trans/single_byte.so", O_RDONLY|O_LARGEFILE) = 10
</code>
Comment: just to reply with the additional work I did on this, looks like instead of just smart-guessing the dir for each loaded module, it adds it to the load path.  Like treetop needs /u/apps/newap/shared/bundle/ruby/1.9.1/gems/treetop-1.4.10/lib/treetop.rb - so to 'require' it, that directory needs to be added to the load path.  But it should be possible to hack in trying to require the file "guess" based on that module, and avoid adding it to the load path if it could be found in the expected .../lib/module_name.rb location, thus speeding up things.
Answer: Rails 3.2 improves this some.  The real answer is to ignore small performance things like this and be patient :)
Comment: That doesn't really explain WHY the rails developers thought this was a good idea in the first place, which I think is OP's question.


High complexity random forest always performs best on test data

Question: (I am new to machine learning so please bare with me) I am using Random Forest Regression algorithm but I am seeing interesting results. I randomly split data into validation set, test set, and training set, and I used the Python tool GridSearchCV to tune Random Forest, and no matter how I tune, the most complicated RF had the highest score on both validation and test sets no matter how I tune its complexity mathematically (although training and test accuracy differed by 5 to 7 percent).  Could this possibly happen if the problem is simple (simple enough that it can train well using fewer points) and the model is training on huge load of data?
Comment: Could you pls elaborate on "...always output best scores for all of these three sets" ?
Comment: the most complicated RF had the highest score on both validation and test sets no matter how I tune its complexity mathematically
Comment: What does "complicated" mean in your context.
Comment: Depth of trees @Matthew Drury
Comment: How do you know the problem is simple?  Did you construct it yourself?
Comment: @jbowman It was just intuition. I can already tell which features are strongly correlated to dependent variable.
Comment: @Ted I didn't think the title captured the spirit of the question, so I changed it and added a few tags for good measure.  Please edit it back if you feel like I got it wrong!
Answer: This is actually the way Random Forest is designed to work, so what you are seeing is not too surprising if you know a few things about the algorithm.
It helps to think in terms of the bias variance tradeoff.  As a reminder, at least roughly:
$$ \text{Test Error} = \text{Bias}^2 + \text{Variance} + \text{Irreducible Error} $$
A random forest is an average of decision trees.  The individual trees are decorated from one-another by clever subsampling schemes: bootstrap sampling of the training data, and split level subsampling of the features.
Since any the trees are identically distributed (each individual possibility for a fit tree is just as likely to show up as the 67th one in a forest as the 154th one) the bias of the average of all the trees is the same as for a single tree.  So the averaging keeps the bias of the model the same.
On the other hand, since the trees are not perfectly correlated, the variance of the average of the ensemble is less than that of a single tree.
This is how random forest works, it attacks the variance part of the error decomposition.  But for this to work out, you need the bias of a single tree to be low. Having multiple trees will not make it any lower, so your only chance to keep the bias low is in the complexity of the component trees.
Thus, in many cases, the best strategy for building a forest is just to build low bias, i.e. very deep, trees, and let the averaging attack the incurred variance.  It is not always the optimal strategy to grow the trees as deep as possible, it's conceivable that averaging does not overcome the suffered variance, but it's not particularly surprising when it does work out that way.


Invalid file destination in Java?

Question:     Scanner user = new Scanner(System.in);
    String word;

    System.out.println("Location of file: ");
    word = user.nextLine();

    FileReader fileOpen = new FileReader(word);
    BufferedReader fileRead = new BufferedReader(fileOpen);

How can I do an error check if the user enters a wrong file destination?
I get:
    java.io.FileNotFoundException:

when a invalid file destination is entered.
I want the program to say something like
System.out.println("Invalid directory");

I get errors for the methods isDirectory() and exists() telling me they don't exist for the type String when I try:
if (word.exists())
{
  //do blah blah
}
else
{
  //Print error
}

Comment: `if (new File(word).exists())`
Comment: Possible Duplicate: http://stackoverflow.com/questions/1816673/how-do-i-check-if-a-file-exists-java-on-windows
Comment: Learn to use [try/catch](http://docs.oracle.com/javase/tutorial/essential/exceptions/try.html) and [exceptions](http://docs.oracle.com/javase/tutorial/essential/exceptions/index.html) in general (learn how to read them)
Answer: Wrap your word in File and then do the checks:
if (new File(word).exists())
{
  //do blah blah
}
else
{
  //Print error
}

Alternatively, you may catch an exception when it is thrown:
Scanner user = new Scanner(System.in);
String word;

System.out.println("Location of file: ");
word = user.nextLine();

try {
    FileReader fileOpen = new FileReader(word);
    BufferedReader fileRead = new BufferedReader(fileOpen);
} catch (FileNotFoundException fnf) {
    // print an error
}

Answer: Create a File instance of 'word' then check if it exists. For the exception, surround it with a try and catch, in the catch: put the code you want to run should it not exist.

Invalid file destination in Java?


Migration from Spring Boot 2.X to 3.X - removed TypeDef annotation and deprecated EnumType from hibernate

Question: I am in the process of migrating the application from Spring Boot 2.X to 3.1.0 and there were problems related to hibernate annotations, which are deprecated/removed in the newer version of spring.
I have the following code and I'm having trouble adapting it to the current version: (I've added these annotations along with the import details to make it clear where they came from.)
<code>@Entity
@Table(name = "foo_event", schema = "foo")
@org.hibernate.annotations.TypeDef(name = "enum_type", typeClass = PostgreSQLEnumType::class)
data class FooEvent(
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    var id: Long? = null,

    @Enumerated(EnumType.STRING)
    @Column(name = "event_source")
    @org.hibernate.annotations.Type(type = "enum_type")
    val eventSource: EventSource
)

class PostgreSQLEnumType : org.hibernate.type.EnumType<EventSource>() {
    @Throws(HibernateException::class, SQLException::class)
    override fun nullSafeSet(
        ps: PreparedStatement,
        obj: Any?,
        index: Int,
        session: SharedSessionContractImplementor?
    ) {
        if (obj == null) {
            ps.setNull(index, Types.OTHER)
        } else {
            ps.setObject(index, obj.toString(), Types.OTHER)
        }
    }
}

enum class EventSource {
    SOME_SOURCE, ANOTHER_SOURCE
}
</code>
I'm wondering how to replace/what workaround to use so as not to change how the code works.
TypeDef has been removed.
Type does not take a "type" argument.
EnumType is deprecated and no longer has a nullSafeSet method. If I wanted to replace this EnumType with jakarta it doesn't let you specify the type.
Looking for a solution so far, it seems to me that the @Convert annotation will work similarly to Type and TypeDef.
Additionally - does it even need the @Type annotation in this case? It seems redundant to me when @Enumerated is already over it.
<code>@Enumerated(EnumType.STRING)
@Column(name = "event_source")
@org.hibernate.annotations.Type(type = "enum_type")
val eventSource: EventSource
</code>
Answer: I found a solution for this problem.
The matter was solved by the library https://github.com/vladmihalcea/hypersistence-utils
It provides access to an object with the same function, PostgreSQLEnumType.
Sample solution:
<code>@Entity
@Table(name = "foo_event", schema = "foo")
@Convert(attributeName = "enum_type", converter = PostgreSQLEnumType::class)
data class FooEvent(
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Column(name = "id", nullable = false)
    var id: Long? = null,

    @Enumerated(EnumType.STRING)
    @Column(name = "event_source")
    val eventSource: EventSource,
)
</code>


How to analyze consecutive V7 chords

Question: So I came across a song in which the chord progression consists mainly of 7 chords, but they don't seem to be secondary dominants.
It sounds very jazzy and I am aware that jazz compositions sometimes contain all these 7 chords, but I have a hard time analyzing it from a tonal point of view.
Here is the progression :

Cm7 - Eb7 - D7 - Ab7 - G7

I know it might sound very basic, but I really couldn't come up with something more precise for the moment.
Answer: The E♭7 and the A♭7 are both tritone substitutions which wile not exactly being secondary dominants very much take the role of them tonally and are often analysed as such. The  E♭7  will want to take you to D7 and the  A♭7 will want to take you to G7 just like the D7.
I've seen tritone substitutions marked before as "tt" so if doing Roman Numeral analysis you may see this:
X:1
L:1/4
M:
K:C Minor
V:1 clef=treble
"i7(Cm7)"[C E G B] "tt(Eb7)"[E G B _d] "(V7/V)D7"[D ^F A c] "tt(Ab7)"[A c e _g] | "V7(G7)"4[G B d f]||
%

More formally and what I would do is note the proper function of the tritone substitution like this:
X:1
L:1/4
M:
K:C Minor
V:1 clef=treble
"i7(Cm7)"[C E G B] "V7/ii(Eb7)"[E G B _d] "V7/V(D7)"[D ^F A c] "V7/V(Ab7)"[A c e _g] | "V7(G7)"4[G B d f]||
%

Notice how both the D7 and A♭7 have the same exact function in this analysis which is very much intentional as the serve almost the exact same function.
Comment: I  would add that the Ab7 not only has the same function, but creates more tension as it contains the notes of an altered D7 (D7b9b5) so the listener feels a greater need for resolution to the V7.  It's common in jazz to play a V7 and alter it before resolving and the substitution here accomplishes that.
Answer: Another analysis of Cm7 - Eb7 - D7 - Ab7 - G7 would be:
i - G7/V/V - V7/V - G7 - V7 or a German Sixth of V7/V then V7/V followed by the German Sixth (in C-minor) then V7.
It's sort of a i-V7 sequence with first a Secondary Dominant inserted i-V7/V-V7 then each of these is preceded by a German Sixth. This not the only analysis but it does show that the pattern isn't out of place in Common Practice Period Harmony. The functional relationship between the Eb7 - D7 (and the Ab7 - G7) is different from the more jazz-oriented analysis in Dom's response. Here these two are Subdominant-Dominant (or Predominant-Dominant according some authors) rather than Dominant-Tonic relations. Of course, these two sound the same (but may accompany different style melodies.)

How to analyze consecutive V7 chords


R fGarch: presample matrix for garchSpec()

Question: I am trying to specify GARCH model by function fGarch::garchSpec() and i need a specified presample. As defined in manual:

presample: a numeric three column matrix with start values for the
             series, for the innovations, and for the conditional
             variances.

But i am pretty sure, that this is not the correct order. After reading the manuals and codes for functions: 'garchFit', 'garchSpec', 'garchSim' I am still quite confused.
The question is: how to exactly build presample matrix?
Answer: You don't need to set an argument to presample. It will supply a "good" guess   and in estimating the parameters it will not matter. If you want to simulate data, then I would just make sure the burnin, n.start, is large enough.
Let's look at an example:
library(fGarch)
## First we simulate some data without setting presample:
# we set up the model by spec:
set.seed(911)
spec <- garchSpec(model = list(mu = 0.02, omega = 0.05, alpha = 0.2, beta = 0.75))
# then simulate our GARCH(1,1) model:
garchSim <- garchSim(spec, n = 200, n.start = 1)
plot(garchSim)

And estimates:
    > garchFit(~ garch(1, 1), data = garchSim)
Error Analysis:
        Estimate  Std. Error  t value Pr(>|t|)
mu      -0.02196     0.05800   -0.379   0.7049
omega    0.03567     0.02681    1.331   0.1833
alpha1   0.12074     0.04952    2.438   0.0148 *
beta1    0.84527     0.05597   15.103   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Log Likelihood:
 -265.8417    normalized:  -1.329209

Let us now try to add a very xtreme presample. In the above model (and this seed) the presample was:
> spec@presample
Presample:
  time          z h    y
1    0 -0.4324072 1 0.02

now we replace it by c(100, 0.1, 0.1). Since my model is a GARCH(1,1) without any ARMA-part, I only need to set 3 parameters as descriped in the documentation ?garchSpec. After updating spec we estimate the same model:
set.seed(911)
spec@presample <- matrix(c(0.1, 0.1, 0.1), ncol = 3)
garchFit(~ garch(1, 1), data = garchSim)

with the same output:
Error Analysis:
        Estimate  Std. Error  t value Pr(>|t|)
mu      -0.02196     0.05800   -0.379   0.7049
omega    0.03567     0.02681    1.331   0.1833
alpha1   0.12074     0.04952    2.438   0.0148 *
beta1    0.84527     0.05597   15.103   <2e-16 ***
---
Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Log Likelihood:
 -265.8417    normalized:  -1.329209

The likelihood and estimates are identical, but notice when we simulate with the new spec:
set.seed(911)
garchSim <- garchSim(spec, n = 200, n.start = 1)
plot(garchSim)

, the extreme initial sample supplied messed up our nice simulation. But by increasing the burn.in we get:
set.seed(911)
garchSim <- garchSim(spec, n = 200, n.start = 100)
plot(garchSim)


Possible number combinations within a range of sums

Question: I have a range of sums between $50$ and $100$
I need to determine how many possible combinations of $5$ unique selections between $1$ and $69$ will add up to a number this range.
So, for instance, let's say one possible combination would be:
$1+17+20+25+30 = 93$
or
$1+2+3+4+45 = 55$
How would I determine the $5$ unique selections to generate a sum within an acceptable range of between $50$ and $100$?
I know I've learned some of this before, but I can't find the right nomenclature for my searches so I can relearn it.
Comment: $15\not\in[50,100]$.
Comment: By unique selection, I assume you means the 5 numbers are distinct. By brute force, the number of combinations is $467711$.
Answer: $\newcommand{\bbx}[1]{\,\bbox[15px,border:1px groove navy]{\displaystyle{#1}}\,}
 \newcommand{\braces}[1]{\left\lbrace\,{#1}\,\right\rbrace}
 \newcommand{\bracks}[1]{\left\lbrack\,{#1}\,\right\rbrack}
 \newcommand{\dd}{\mathrm{d}}
 \newcommand{\ds}[1]{\displaystyle{#1}}
 \newcommand{\expo}[1]{\,\mathrm{e}^{#1}\,}
 \newcommand{\ic}{\mathrm{i}}
 \newcommand{\mc}[1]{\mathcal{#1}}
 \newcommand{\mrm}[1]{\mathrm{#1}}
 \newcommand{\pars}[1]{\left(\,{#1}\,\right)}
 \newcommand{\partiald}[3][]{\frac{\partial^{#1} #2}{\partial #3^{#1}}}
 \newcommand{\root}[2][]{\,\sqrt[#1]{\,{#2}\,}\,}
 \newcommand{\totald}[3][]{\frac{\mathrm{d}^{#1} #2}{\mathrm{d} #3^{#1}}}
 \newcommand{\verts}[1]{\left\vert\,{#1}\,\right\vert}$
$$
\left\{\begin{array}{rll}
\ds{\left. 1\right)} &
\mbox{Choose any}\ \ds{5}\ \mbox{numbers}\ \in\ \mathbb{N}_{\ 1\ \leq\ ?\ \leq\ 69}\
\mbox{such that their sum is}\ \ds{s}: &
\ds{\sum_{n_{1} = 1}^{69}\ldots\sum_{n_{5} = 1}^{69}
\bracks{\sum_{i = 1}^{5}n_{i} = s}}
\\ &\ds{\bracks{\cdots}}\ \mbox{is the}\ Iverson\ Bracket:\ \ds{\bracks{P} = 1}\
\mbox{whenever}\ \ds{P}\ \mbox{is}\ true
\\
&\mbox{and}\ \ds{0}\ otherwise.&
\\[5mm]
\ds{\left. 2\right)} & \mbox{Sum the above expression over all the values of}
\\
&\ds{s = 50,51,\ldots,99,100.}&
\end{array}\right.
$$

Then, the answer is given by

\begin{align}
&\bbox[10px,#ffd]{\ds{\sum_{s = 50}^{100}\braces{%
\sum_{n_{1} = 1}^{69}\ldots\sum_{n_{5} = 1}^{69}
\bracks{\sum_{i = 1}^{5}n_{i} = s}}}} =
\sum_{s = 50}^{100}\braces{\sum_{n_{1} = 1}^{69}\ldots
\sum_{n_{5} = 1}^{69}\bracks{z^{s}}z^{\sum_{i = 1}^{5}n_{i}}}
\\[5mm] = &\
\sum_{s = 50}^{100}\bracks{z^{s}}\pars{\sum_{n = 1}^{69}z^{n}}^{5} =
\sum_{s = 50}^{100}\bracks{z^{s}}\pars{z\,{z^{69} - 1 \over z - 1}}^{5} =
\sum_{s = 45}^{95}\bracks{z^{s}}{\pars{1 - z^{69}}^{5} \over \pars{1 - z}^{5}}
\\[5mm] = &\
\sum_{s = 45}^{95}\bracks{z^{s}}{1 - 5z^{69} \over \pars{1 - z}^{5}} =
\sum_{s = 45}^{95}\bracks{z^{s}}\pars{1 - z}^{-5} -
5\sum_{s = 45}^{95}\bracks{z^{s}}z^{69}\pars{1 - z}^{-5}
\\[5mm] = &\
\sum_{s = 45}^{95}\bracks{z^{s}}\sum_{k = 0}^{\infty}{-5 \choose k}\pars{-z}^{k} -
5\sum_{s = 45}^{95}\bracks{z^{s}}z^{69}
\sum_{k = 0}^{\infty}{-5 \choose k}\pars{-z}^{k}
\\[5mm] = &\
\sum_{s = 45}^{95}{-5 \choose s}\pars{-1}^{s} -
5\sum_{s = 45}^{95}\bracks{s \geq 69}{-5 \choose s - 69}\pars{-1}^{s - 69} =
\sum_{s = 45}^{95}{s + 4 \choose 4} -
5\sum_{s = 69}^{95}{s - 65 \choose 4}
\\[5mm] & =
\sum_{s = 0}^{50}{s + 49 \choose 4} - 5\sum_{s = 0}^{26}{s + 4 \choose 4}
\end{align}

The binomial arguments are polynomials, in $\ds{s}$, of grade four.

Then,
$$
\bbx{\bbox[10px,#ffd]{\ds{\sum_{s = 50}^{100}\braces{%
\sum_{n_{1} = 1}^{69}\ldots\sum_{n_{5} = 1}^{69}
\bracks{\sum_{i = 1}^{5}n_{i} = s}}}} = 72\ 531\ 081}
$$
Answer: By unique selection, I assume you mean the 5 numbers selected are distinct.
Furthermore, I will assume the order of selection doesn't matter. i.e. selections like $1+17+20+25+30 = 93$ and $30+17+20+25+1 = 93$ will be treated as same selection.
By brute force (i.e the most time consuming version of looping through everything), the number of combinations is $467711$.
Following is another way to derive the number mathematically (through we still need an CAS to complete some of the steps).

For any formal power series $\sum_{(i,j) \in \mathbb{N}^2} f_{ij} t^i x^j$
in $t$ and $x$. We will use the notation $[t^i x^j] (\cdots)$ to refer to the coefficient $f_{ij}$ in front of $t^i x^j$.
Let $A$ be any finite subset of positive integers. For any $m, n\in \mathbb{Z}_{+}$, the number of subsets of $A$ with $m$ elements whose element sum to $n$ is given by the formula
$$\mathcal{N} \stackrel{def}{=} \# \left\{ B \subset A : \# B = m \land \sum_{k\in B} k = n \right\}
= [t^m x^n ] \prod_{k\in A}( 1 + t x^k )$$
For the problem at hand, $m = 5$ and $A = \{ 1, \ldots, 69 \}$. We have
$$\mathcal{N} = \sum_{n=50}^{100} [t^5 x^n] \prod_{k=1}^{69} (1 + tx^k)
= [t^5 x^{100} ] \sum_{\ell=0}^{50} x^\ell \prod_{k=1}^{69} (1 + tx^k)
= [t^5 x^{100} ] \left(\frac{1-x^{51}}{1-x}\right)\prod_{k=1}^{69} (1 + tx^k)
$$
Expand the product into a polynomial in $t$.
$$\prod_{k=1}^{69}(1+tx^k) = 1 + \sum_{\ell=1}^{69} e_\ell(x) t^\ell
\quad\text{ where }\quad
e_\ell(x) = \sum_{1\le k_1 \le \ldots \le k_\ell \le 69} x^{k_1 + \cdots + k_\ell}$$
The coefficient $e_\ell(x)$ is the $\ell^{th}$ elementary symmetric polynomial associated with the set $A' = \{ x^1, \ldots, x^{69} \}$. In terms of $e_\ell(x)$, we have
$$\mathcal{N} = [x^{100}]\left(\frac{1-x^{51}}{1-x}\right)e_5(x)$$
Let $p_\ell(x)$ be the power sum symmetric polynomial associated with $A'$.
$$p_\ell(x) = \sum_{z \in A'} z^\ell = \sum_{k=1}^{69} x^{k\ell} = q_\ell(x)(1 - x^{69\ell}) \quad\text{ where }\quad q_\ell(x) = \frac{x^\ell}{1-x^\ell}$$
They are related to $e_\ell(x)$ through the
Newton–Girard formulae. In particular, we have
$$e_5(x) = \frac{1}{5!}
\left|\begin{matrix}
p_1(x) & 1 & 0 & 0 & 0\\
p_2(x) & p_1(x) & 2 & 0 & 0\\
p_3(x) & p_2(x) & p_1(x) & 3 & 0\\
p_4(x) & p_3(x) & p_2(x) & p_1(x) & 4\\
p_5(x) & p_4(x) & p_3(x) & p_2(x) & p_1(x)
\end{matrix}\right|$$
Substitute $p_\ell(x) = q_\ell(x)(1-x^{69\ell})$ into this and throw away terms which don't contribute to $[x^{100}]$, we obtain ($q_\ell(x)$ abbreviated as $q_\ell$):
$$e_5(x) =
\frac{1}{5!}
\underbrace{\left|\begin{matrix}
q_1 & 1 & 0 & 0 & 0\\
q_2 & q_1 & 2 & 0 & 0\\
q_3 & q_2 & q_1 & 3 & 0\\
q_4 & q_3 & q_2 & q_1 & 4\\
q_5 & q_4 & q_3 & q_2 & q_1
\end{matrix}\right|}_{ \Delta_5}
- \frac{x^{69}q_1}{4!}
\underbrace{\left|\begin{matrix}
q_1 & 1 & 0 & 0\\
q_2 & q_1 & 2 & 0\\
q_3 & q_2 & q_1 & 3\\
q_4 & q_3 & q_2 & q_1\\
\end{matrix}\right|}_{\Delta_4}
+ o(x^{100})\\
{\Large\Downarrow}\\
\mathcal{N}
= [x^{100}]\left( \frac{1-x^{51}}{5!(1-x)} \Delta_5 - \frac{x^{70}}{4!(1-x)^2}\Delta_4 \right)$$
With help on a CAS, this simplifies to
$$\mathcal{N} = [x^{100}] \frac{P(x)}{Q(x)}\quad\text{ where }\quad
\begin{cases}
P(x) &= x^{15}(1 - x^{51} - x^{65} - x^{66} - x^{67} - x^{68} - x^{69})\\
Q(x) &= (1-x)^2(1-x^2)(1-x^3)(1-x^4)(1-x^5)\\
&=  1- 2x + x^3 + x^5 - 2x^8 + x^{11} + x^{13} - 2x^{15} + x^{16}
\end{cases}
$$
Expand $\frac{1}{Q(x)}$ as a power series in $x$, $\displaystyle\;\frac{1}{Q(x)} = s_0 + s_1 x + s_2 x^2 + \cdots$. The coefficients $s_k$ can be computed using following recurrence relation:
$$
\begin{cases}
n < 0, & s_n = 0,\\
n = 0, & s_n = 1,\\
n > 0, & s_n - 2s_{n-1} + s_{n-3} + s_{n-5} - 2s_{n-8} + s_{n-11} + s_{n-13} - 2s_{n-15} + s_{n-16} = 0
\end{cases}
$$
The end result is
$$\begin{align}\frac{1}{Q(x)}
 = &\;\; 1+2x+4x^2 +7x^3 + \cdots \\
   & + 509x^{16}+628x^{17}+769x^{18}+933x^{19}+1125x^{20} + \cdots\\
   & + 8837x^{34} + \cdots\\
   & + 480512x^{85} + \cdots
\end{align}$$
In terms of $s_k$, we find
$$\begin{align}
\mathcal{N} &= [x^{100}]  \frac{x^{15}(1 - x^{51} - x^{65} - x^{66} - x^{67} - x^{68} - x^{69})}{Q(x)}\\
&= \left([x^{85}] - [x^{34}] - [x^{20}] - [x^{19}] - [x^{18}] - [x^{17}] - [x^{16}]\right)\frac{1}{Q(x)}\\
&= s_{85} - s_{34} - s_{20} - s_{19} - s_{18} - s_{17} - s_{16}\\
&= 480512 - 8837 - 1125 - 933 - 769 - 628 - 509\\
&= 467711
\end{align}
$$
Reproducing what we have obtained by brute force.


Excel VBA Continuous function/sub execution

Question: How to continuously execute a Function/Sub or every time the mouse (or mouse wheel) moves?
SelectionChange or Change will not work for this as intended.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
        Const FreezeRow As Long = 23
            Dim WindowTopRow As Range
            Dim wnd As Window
            Dim WindowRange As Range
            Dim MessageB As String

            Set wnd = ActiveWindow
            Set WindowRange = wnd.VisibleRange
            Set WindowTopRow = WindowRange.Rows(1)

            Application.EnableEvents = False
            If WindowTopRow.Row > FreezeRow + 1 Then
'            MessageB = MsgBox(WindowTopRow.Row, vbInformation, "Switch on Freeze")
                    ActiveWindow.ScrollRow = FreezeRow
                    Cells(FreezeRow + 1, 1).Activate
                    ActiveWindow.FreezePanes = True
           End If
           If WindowTopRow.Row <= FreezeRow + 1 Then
'           MessageB = MsgBox(WindowTopRow.Row, vbInformation, "Switch off Freeze")
                    ActiveWindow.FreezePanes = False
            End If

             Application.EnableEvents = True
End Sub

I want to freeze specific row once that row-1 is on the top of the screen and unfreeze it once that row is on the top of the screen.
Comment: I'm not clear on what you are trying to achieve over and above the built-in freeze rows functionality of excel - can you clarify?
Answer: You can't really do that. There is no easy way at least
Answer: Your code functions well as you've explained. Since you're using the SelectionChange event, the code will trigger whenever you click on any cell in the sheet.
Comment: How to change that to scrolling?


Understanding the results of the GLM in R

Question: I have data on the abundance of beetles I have collected (I have also done this for biomass of beetles and proportion of abundance represented by a particular functional group of beetles, but only include abundance for simplicity in this post).
Beetles were collected over 3 seasons: winter, spring and summer. At 3 sites: RW, RA and CTRL. And at 2 locations within each site: edge and centre.
I have plotted the data in R and performed all the data checks. Then I have conducted a GLM on this data.
What I need help with is understanding the summary output of this GLM.
In the coefficients returned I have the intercept and then the relevant p values for the other variables. However, I was not given p values for RW, centre, or spring. It is my understanding that the intercept is made up of a combination of these 3 un-returned variables.
So what I want to know is are the p-values I have been given showing that they differ significantly from the intercept/baseline which is a combination of these 3 variables rather than from each other e.g. RA differs significantly from RW/centre/spring and not from the other sites.
And then if that's the case, how do I get a p-value for RW if the intercept contains RW (with centre and spring), surely this doesn't make sense as how would RW differ from something that contains RW (with centre and spring)?
Also, how can I tell from the P values if RA differs significantly from CTRL for example, or if winter differs significantly from summer?
Also, if the intercept is made up of the combination of these 3 variables, what does its p value indicate? Why don't I have p values for the other combinations e.g. CTRL, edge, winter?
Thanks in advance for your help but please be mindful that I am an ecologist, not a mathematician.
I do not want to understand the math, but to understand how to write about my results in a scientific paper and talk about how the sites, locations and times effects the abundance of the beetles.
Here is my data:

and here is the summary of the glm provided by R:
Comment: Hello. You can two observations per (site, location, time). Can you explain? Also I notice at least one row "missing": it's (RA, Center, Winter). Is the observation truly missing, or perhaps it's 0 and has been omitted by chance?
Comment: Your data is over-dispersed: dispersion $\approx$ residual deviance / residual df = 30. This means that the standard errors from the Poisson fit are too small. You should address this issue first before reporting any p-values. Perhaps consider a negative binomial regression instead.
Answer: The intercept is the predicted value when all the other variables are 0. (I don't know what "a combination of the other variables" means).
Each of the parameter estimates for the categorical variables are in comparison to the reference group for that variable.  For the interactions, you won't get output for any of the reference levels in either variable, because an interaction is the product of two variables and the reference group is coded as 0.
I have fount that the easiest way to get a sense of what interactions are doing is to output the predicted values for different combinations of those effects. Since you have 3 sites, 3 seasons and 2 locations, you have 3x3x2 combinations, and you can get the predicted value for each. You can then put them in a table, or make graphs (or both) to look at what is happening.


UIScrollView with multipe TextViews and ImageViews layout issue

Question: I have a view in which I placed a scrollView that fits the entire view. Inside the scrollView I have a textView, below a imageView, below a textView and so on. The textViews are filled with content from the ViewController with localized text, so its height will change depending on language. I gave the textViews the constraints for top, bottom, left and right with 10 each. The ImageViews i gave the constraints top and bottom with 10 each, width 200 and centered in container horizontal. The height of the images is different for each image and no constraint for the height is given.

The first result was, the scrollView got a width of the longest text of the localized text. I changed for the

scrollView

Content Hugging Priority Horizontal to 995 and Vertical to 250.

textViews

Content Hugging Priority Horizontal of 400 and 200 Vertical,
Content Compression Resistance Priority Horizontal is 200 and Vertical 750.

Perfect result in portrait mode. When changing to landscape the width of the scrollView stays at 320 and is aligned to the left.
How can I fix the problem to let the scrollView take 100% width of the screen without giving the textViews the chance to force to enlarge themselves to 100% width?
Answer: Found solution:
The scrollView has constraints: top/bottom 8 and left/right 0 each to superview.
The textViews have constraints to top, left, bottom and right.
The images have constraints top, bottom and width, centered to X in container.
This results that the textViews take one line and grow to giant width.
Then I centered the textViews to X in Container and selected all textViews and images and centered them too.
Now the scrollView takes 100% width of screen, height as needed no matter if portrait or landscape.
So for all who have maybe the same issue: scrollView looks a bit smaller than the view, its constraints when adding are 0 to left and right and a top/bottom >0. When drag and drop scrollView in the view it takes 100% of the view size. That was the problem, the constraints were -16. Setting the scrollView to x = 16 and width = 288 results in fitting properly to the view! Next giving the textViews constraints top/left/bottom/right and center it to container (even if offset to real center, right to the item is 0 predefined - change it to use current canvas value).


Largest Power of $11$ that can divide $^{2n}C_n$

Question: I need help answering this question.
If $f(n) =$ the greatest integer $k$ for which $11^k$ divides
$\binom{2n}{n}$, what is the maximum value of $f(n)$ for all integers $1 \le n \le 10000$?
$${2n \choose n}=\frac{(2n)!}{(n!)^2}$$
I have figured out that $2$ is the greatest power of $11$ which divides $\binom{10000}{5000}$. I don't know how to show that this is/isn't the greatest value that $f(n)$ can take on for $\binom{2n}{n}$.
Comment: Well, I think f(7321) is 4.
Comment: I used the floor function. If you take the floor of 10000 divided by each power of 11 (11,121,1331), and add the three terms you will get 998. Similarly, with 5000 we get 498. 998-2(498)=2.
Comment: How did you get that 2 is the largest power of 11 dividing 10000C5000?
Comment: Check f(7321). If I'm calculating it correctly, it's more than 2.
Comment: It think it should be $3=
Comment: Ok, but n is the smaller number in the binomial coefficient. Shouldn't you be looking at 20000 and 10000? Either way, the max isn't attained there, because f(10000) is only 3, and f(7321) is more than that.
Comment: I chose 7321 because its double is just over a power of 11 namely 11^4.
Comment: Oh that makes a lot of sense. So the 2n term has more multiples of 11 than n. Thank you for your help!
Answer: By Kummer's theorem, you are looking for the $n$ which has maximum carries when added to itself in base $11$.  Now $n \leqslant 10000_{10} = 7571_{11}$ and it seems clear we cannot get more than $4$ carries, which is possible say when $n = 6666_{11} = 8784_{10}$.
--
For a check, note $11^4 = 14641 \mid \binom{2 \cdot 8784}{8784}$
Comment: That only yields 3. There are other numbers which yield 4.
Comment: @shrindle Really - did you check?  $6666_{11}$ will obviously have $4$ carries when added to itself.  Alternately, $11^4 | \binom{2\cdot 8784}{8784}$
Comment: My apologies, I did my math wrong. You are correct. Thank you!
Comment: No worries - the numbers are large. Checking carries however is MUCH easier even if you want to generate more examples.


Weak stationarity and ARMA-ARCH/GARCH models?

Question: I am slightly irritated about weak stationarity in connection to ARCH/GARCH models. I do not know the answer and I am not sure about it:
The basic question is:

Do we have to test weak stationarity before applying an ARMA-GARCH
  model?

Further on it can be said:

ADF and others test the mean equation, but this is not for the
  volatility equation, so what test do we have to use for the
  autocovariance-stationarity?

My thoughts:
Standard ARMA models assume the unconditional mean and unconditional variance to be constant. For ARMA-GARCH models this is also the case: The unconditional mean and unconditional variance need to be constant, whereas in case of the ARMA-GARCH models the conditional variance does not need to be constant.
It is correct that for the mean equation we may have to think about using a trend-stationary or difference-stationary model. But this is only concerning the mean equation, yes.
Conditional variance can be tested by testing for ARCH effects (Box-Ljung, Lagrange Multiplier).
So for ARMA-GARCH models we still need weak stationarity, since the unconditional mean and unconditional variance need to be constant. So I am not sure, but we have to test for weak stationarity before applying an ARMA-GARCH model? And especially with financial returns, do we also have to test for it? And which test do we use (and which command is implemented in R, so what command can you suggest?)
I know that if the unconditional variance is nonstationary (not finite and then it is also not constant) an integrated GARCH may be appropriate. But just because it is not constant I cannot say I use an integrated GARCH model?
I also know that for ARMA-GARCH processes all the "characteristical" roots lie outside the unit circle. So in case of a ARMA-GARCH(1,1) $\alpha_1+\beta_1<1$ is necessary. But I only see this after estimation? This is not a test for covariance stationarity?
EDIT: It basically pins down to (see the comments):
How can I test the unconditional variance to be constant? I mean in order to apply a GARCH model I have to make sure that I have constant unconditional mean (ADF test and so) and I have to test for constant unconditional variance (how?). I know that I have to further make sure that I have nonconstant conditional variance for GARCH processes, otherwise having a constant conditional variance ARMA is sufficient (test for ARCH effects).
EDIT 2: There is a Wavelet Spectrum test in the locits package, what about this test?
Comment: @mpiktas Mh, I knew that before. So I know that ARMA-GARCH processes need weak stationarity, but the question is about testing? So do I have to test before applying it? (Let's do not discuss about mean stationarity, since I know this is concerning the ARMA part, so the mean equation and I want to focus on the GARCH topic).
Comment: @mpiktas As I said, I know that ARMA-GARCH processes are stationary processes, but the question is about testing? So do I have to test for weak stationarity (and what tests?) in order to apply an ARMA-GARCH process? Especially in case of financial returns?
Comment: @mpiktas Yeah, but what stationarity? I know this, but how can I test the unconditional variance to be constant? I mean in order to apply a GARCH model I have to make sure that I have constant unconditional mean (ADF test and so) and I have to test for constant unconditional variance (how?) I know that I have to further make sure that I have nonconstant conditional variance for GARCH processes, otherwise having a constant conditional variance ARMA is sufficient.
Comment: The answer is yes. All the standard GARCH models assume that GARCH process is the stationary process.
Comment: Yes you have to make sure that the series is stationary. Concerning your last question, no $\alpha_1+\beta_1<1$ ensures that the theoretical model is a valid GARCH model, but if the sum is larger than one, this might be an indication, that GARCH(1,1) model is not apropriate for the data.
Comment: Basically the procedure is to test for stationarity with ADF to make sure that you do not have unit root. Then you apply GARCH model and look at the residuals, if they satisfy the GARCH model requirements, you are golden.
Comment: @mpiktas As I said ADF is about the mean equation, but this is not what I am pointing at.
Answer: Strict stationarity is the strongest form of stationarity. It means that the joint statistical distribution of any collection of the time series variates never depends on time. So, the mean, variance and any moment of any variate is the same whichever variate you choose. However, for day to day use strict stationarity is too strict. Hence, the following weaker definition is often used instead. Stationarity of order 2 which includes a constant mean, a constant variance and an autocovariance that does not depend on time. (second-order stationary or stationary of order 2). A weaker form of stationarity that is first-order stationary which means that the mean is a constant function of time, time-varying means to obtain one which is first-order stationary.
Using traditional stationarity tests such us PP.test (Phillips-Perron Unit Root Test), kpss test or Augmented Dickey-Fuller Tests are not adequate if you are to perform regression via other methods than ARIMA (due that in Arima the orders are fixed and that no other factors that produce non stationarity are included in the model). For non Arima cases stationarity tests in the frequency domain are more adequate.
Tests in the frequency domain : The Priestley-Subba Rao (PSR) test for nonstationarity (fractal package). Based upon examining how homogeneous a set of spectral density function (SDF) estimates are across time, across frequency, or both.
The test you refer to is a test also in the frequency domain (which tests a second order unit root test) where the wavelet looks at a quantity called βj(t) which is closely related to a wavelet-based time-varying spectrum of the time series (it is a linear transform of the evolutionary wavelet spectrum of the locally stationary wavelet processes of Nason, von Sachs and Kroisandt, 2000). So we see if βj(t) function varies over time or is constant by looking at Haar wavelet coefficients of the estimate so is stationary if all haar coefficients are zero (locits package).
There are other concerns about stationarity such us long range dependence, fractional integrated processes (ARFIMA) where the term d (differenciation) refers to long term memory processes.
The effect of higher order non stationarity, long term dependencies is that they are in effect reflected systematically in the errors of a regression, however its impact and thus validity of the regression is difficult to measure
Answer: From: "Financial Econometrics: From basics to advanced modeling techniques" Rachev, Mittnik et al. (Wiley 2006).
Answer: You can use the following statistical test for your issue :
Sanso, A., Arago, V., and Carrion, J. (2004), "Testing for Changes in the Unconditional Variance of Financial Time Series," Revista de Economia Financiera,4, 32–53.
As a result, you will know if the UNconditional variance of your time series can be considered constant or not (from a given confidence level).
Their test statistic can be easily implemented.
Enjoy!
Answer: As a practial "test" you could estimate your GARCH model on several subsamples and simply see if the unconditonal variance c*(1-(a+b))^-1 changes a lot or not.
Answer: I think it's imposible to prove if the unconditional variance is constant in his time serie, because you have only one realization of you underlying process. But someone here can to know how to extrapolate the conclusions to all possible realizations (and therefore to unconditional variance) with a single realization of the serie without using assumptions for ergodicity. I am not sure how this assumption works, but I would say that there is the key.
Answer: I believe you could use ADF test (unit root test) on the squared series for stationarity check of ARCH/GARCH models. Essentially, ARCH model is about the auto-correlation in squared Yt while ARMA model is about auto-correlation of Yt itself. ARCH model gives the equation below and note that if this holds, the unconditional variance is constant $\frac{w}{1-\alpha}$
.
$$E(r_t^2|r_{t-1}, r_{t-2},...) = E(\sigma_t^2e_t^2|r_{t-1}, r_{t-2},...)
= \sigma_t^2 = w + \alpha*r_{t-1}^2$$
So this can be thought of as an AR(1) process of $r_{t}^2$. Stationarity requires $\alpha <1 $ so the ADF could be applied here while treating $r_{t}^2$ as $s_{t}$.
However here is some research pointing out that the unit root test "should be expected to have very poor size properties and so they attached little significance to the rejection of the unit root null". For detailed discussions, this paper by Wright (1999) compared the standard unit root test on volatility agaist the modified unit root approach proposed by Perron and Ng, which proved to be a better test method.
References
Wright, J. H. (1999). Testing for a unit root in the volatility of asset returns. Journal of Applied Econometrics, 309-318.
Answer:
Standard ARMA models assume the unconditional mean and unconditional
  variance to be constant. For ARMA-GARCH models this is also the case

I don't think it is true, they're constant conditional variance models, see e.g. MATLAB's help on ARMA and GARCH. Whether you have to test before or after applying the model is up to you. We usually have a battery of standard tests, including ADF and Engle's ARCH, applied to our series during the data exploration phase. We never jump right into modeling before understanding the series, gathering literature, studying their basic time series properties such trends and cycles etc.
However, for the purposes of exposition, you can always apply the model then test the residuals for unit-root and homoscedasticity assumptions if they were implied, such as in constant conditional variance models.
Comment: Are you claiming (in your first line) that ARMA-GARCH is a constant conditional variance model? That is not correct.
Comment: GARCH is explicitly a model for non-constant conditional variance; AR(1) in your example is just a special case which is not sufficient to prove the general case -- and your claim as phrased in the answer is about the general case (or am I reading it incorrectly?). Also, another question: you say that the quoted statement is not true; but unconditional mean and variance in ARMA-GARCH indeed are constant (unless ARMA has a unit root or GARCH is actually IGARCH). Did you mean to stress the latter special cases?
Comment: @RichardHardy, simple AR(1): $x_t=c+\alpha x_{t-1}+\varepsilon_t$, where $\varepsilon_t\sim\mathcal{N}(0,\sigma^2)$. So, $Var(x_t|I_{t-1})=\sigma^2$, constant


Driver not specified for this database connection

Question: I want to connect to external database:
$old_database = array (
        'default' =>    array (
                'database' => 'grantexpert_registration',
                'username' => 'grantexpert_usr',
                'password' => 'xxxxxx',
                'host' => '188.8.131.52',
                'port' => '5432',
                'driver' => 'pgsql',
                'prefix' => '',
        ),
);

Database::addConnectionInfo('olddatabase', 'default', $old_database);
db_set_active('olddatabase');

But Im getting an error:

Driver not specified for this database connection: olddatabase in Database::openConnection()

All the examples show exactly this structure of array, but it's not working. Is smoething wrong here?
Answer: You've already provided the target DB name with the second param to addConnectionInfo(), so you just need to remove the 'default' element from the array, and shift the connection params up:
$old_database = array (
  'database' => 'grantexpert_registration',
  'username' => 'grantexpert_usr',
  'password' => 'xxxxxx',
  'host' => '184.108.40.206',
  'port' => '5432',
  'driver' => 'pgsql',
  'prefix' => '',
);

Database::addConnectionInfo('olddatabase', 'default', $old_database);
db_set_active('olddatabase');


Dynamic defualt filter for a HTML table with pure Javascript

Question: I am managing a large CSV file with columns that show the date, time and message.
Currently I have managed to convert my large CSV file into a HTML table with some additional Javascript code. I have also managed to put in a filter so I can filter out specific words, dates and times.
Now I am currently stuck with setting a dynamic default value. Basically the (hidden) filter should only display rows with the current Month and Day. This way I can look back at messages that were send X years ago on this date.
Like mentioned my current filter is an input field and definitly not the automatic way like I want to
I am also not ready to use anything other than Javascript. My knowledge beyond HTML and CSS doesnt go that far
HTML: for simplicity a table is structured here.
Note that the date-data is marked as MM/DD/YY.
<input
  type="text"
  id="myInput"
  onkeyup="myFunction()"
  placeholder="Search for names or countries.."
  title="Type in a name or a country">

 12/20/19
 01:39
 Rens: Wat

 12/20/20
 01:40
 Rocco Haagenhuizen: In de chat

 12/19/21
 01:40
 Rens: Wacht

 12/20/21
 01:40
 Rocco Haagenhuizen: Ga naar je chats

Javascript: input filter
const myFunction = () => {
  const trs = document.querySelectorAll('Table tr')
  const filter = document.querySelector('#myInput').value
  const regex = new RegExp(filter, 'i')
  const isFoundInTds = td => regex.test(td.innerHTML)
  const isFound = childrenArr => childrenArr.some(isFoundInTds)
  const setTrStyleDisplay = ({ style, children }) => {
    style.display = isFound([
      ...children // <-- All columns
    ]) ? '' : 'none'
  }

  trs.forEach(setTrStyleDisplay)
}

JSfiddle: http://jsfiddle.net/2bxwvqo7/6/
Answer:

const myFunction = () => {
  const trs = document.querySelectorAll('Table tr')
  const filter = document.querySelector('#myInput').value
  const regex = new RegExp(filter, 'i')
  const isFoundInTds = td => regex.test(td.innerHTML);
  const now = new Date();
  const isRightDate = childrenArr => childrenArr.some(td => {
    const tdDate = new Date(td.innerHTML);
    return tdDate.getDate() === now.getDate()
        && tdDate.getMonth() === now.getMonth();
  });
  const isFound = childrenArr => childrenArr.some(isFoundInTds)
  const setTrStyleDisplay = ({ style, children }) => {
    style.display = isRightDate([...children])
      && isFound([
        ...children // <-- All columns
      ]) ? '' : 'none';
  }

  trs.forEach(setTrStyleDisplay)
}
myFunction();
body {
  padding: 20px;
}

input {
  margin-bottom: 5px;
  padding: 2px 3px;
  width: 209px;
}

td {
  padding: 4px;
  border: 1px #CCC solid;
  width: 100px;
}
<input
  type="text"
  id="myInput"
  onkeyup="myFunction()"
  placeholder="Search for names or countries.."
  title="Type in a name or a country">

 12/13/19
 01:39
 Rens: Wat

 12/14/20
 01:40
 Rocco Haagenhuizen: In de chat

 12/13/21
 01:40
 Rens: Wacht

 2/13/21
 01:40
 Rocco Haagenhuizen: Ga naar je chats


Interpretation of possible mediation

Question: I have three variables X (IV), Y (DV) and Z, where there is a significant association between X and Z and, as well as Z and Y, but not between X and Y.
X is a categorical variables with 2 levels
Y is a ordinal variabel
Z is a ordinal variable
I have used both ordinal regression and non-parametric tests (Mann-Whitney and Kruskal-Wallis), and found the same results. Can I use any of these to say something about mediation? If not, which test could I use?
Is it possible that Z mediates the relationship between X and Y, when X-Y is not significant?
If not, how should one interpret such results?
Answer: There is not universal agreement on what exactly "mediation" means and your question highlights one of the areas of dispute.  My own view is that mediation exists when the mediator changes the relationship between the IV and the DV in a way that is important.
So, my practice is to look at the X Y relationship by itself and after controlling for Z and see if the X Y relationship changes a lot.

Interpretation of possible mediation


Sandboxed page in Chrome extension through iframe throwing error when passing messages

Question: I'm getting the following error when trying to use my popup page for a chromium extension as a pipe for communication between the background page and a page displayed within an iframe on the popup.  I needed a sandboxed environment to run Vue.js in but need to be able to get data from chrome.storage and work with other such objects so I receive packets of data and send commands to the background page whenever necessary.

Uncaught SecurityError: Sandbox access violation: Blocked a frame at "chrome-extension://kncjlbkddbibekfmmljfpibdgjfdegeb" from accessing a frame at "chrome-extension://kncjlbkddbibekfmmljfpibdgjfdegeb". The frame requesting access is sandboxed and lacks the "allow-same-origin" flag.

This is the code for the pipe popup page:

//please look at it as if block comments aren't commented out
//this is needed  due to SO not having chrome.* available.
//although line comments are real comments.

let displayFrame = document.getElementById('displayFrame');
let displayPort = displayFrame.contentWindow;
/*
let backgroundPort = chrome.extension.connect({
  name : "Extension Connection"
});
*/

// Forwarding from background to index.
/*
backgroundPort.onMessage.addListener((msg) => {
  displayPort.postMessage(msg, "*");
});
*/

// Forwarding from index to background.
window.addEventListener("message", function(msg) {
  /*
    backgroundPort.postMessage({
      data : msg.data
    });
  */
});
<!doctype html>

  <meta charset='UTF-8' />

The contents of background.js and index.html/js aren't important as I see it, they both properly pass messages to their respective sides of the above code and I've confirmed this message passing in console to be working.  The issue arises when any change is made in index.js to a Vue.js variable.  I've tried from the actual Vue object (vm in the docs) and from internally (attaching the message listener to the window at the mounted hook).   I believe the wrapped setters for each variable that allows Vue to watch for state changes is causing the issue and I was curious whether anyone knew how to get rid of the error.
I'm having no issues with the extension overall; the message passing and even the Vue variable setting / function calls work perfectly.  It's just that every time I open the popup page that error appears in the background pages console.  Is it something I should worry about, and can it be fixed?
Comment: The posted code wouldn't work since the popup.js runs before DOM has #displayFrame element but I guess it's an artifact of copypasting here. Anyway without a real [MCVE](/help/mcve) I think only someone who had exactly the same setup can help you. If I have to guess, the "Sandbox access violation" error in the background page can only mean it's a part of msg.data or you're unexpectedly loading the iframe in the background page too. In either case you should be able to debug the code and see where it comes from. Enabling "pause on exceptions" in devtools may help too.
Comment: @wOxxOm I didn't know about that devtool, will definitely see where I can get.  I think an MCVE is tough to put together for an extension, and this kind of advice is more than helpful!
Comment: Hmm tried the tool, but the error only shows up in the chome://extensions page as an error, and not thrown in the console.  May just end up having to ignore it.
Comment: BTW, to debug the popup, open it, right-click it, click inspect. It's a separate window.
Comment: Yup I know how to access the console for both the background page and popup pages.  Both aren't throwing the error in their respective consoles though, it just shows up in the chrome://extensions page as an error.  I think my problem is similar to https://stackoverflow.com/questions/16306315/chrome-app-accessing-sandboxed-iframe-from-parent-window except that Vue.js is doing something that's not allowed rather than console.log
Answer: So this problem has been solved.   The error was only occurring when setting a vue variable's value to the event.source on the index.js end window.addEventListener("message", (event) => { ... }).  I guess something with how Vue tracks the variables doesn't mesh with the variable being a window object of the sender.  However I realized the sender was the parent to the iframe all along and so I solved my issue by:

Not sending the introduction packet that saved the event.source for command sending.
And instead sending commands through window.parent.postMessage where before I was using this.vueVariable.postMessage.

I hope this helps anyone who comes across such an issue in the future, the solution was right under my nose the whole time.  There are no longer any errors in the extension and communication works both ways with setting working as well.