text
stringlengths 3
1.74M
| label
class label 2
classes | source
stringclasses 3
values |
---|---|---|
An example of short-term relative arbitrage
Robert Fernholz1
July 4, 2018
Abstract
Long-term relative arbitrage exists in markets where the excess growth rate of the market portfolio
is bounded away from zero. Here it is shown that under a time-homogeneity hypothesis this condition
will also imply the existence of relative arbitrage over arbitrarily short intervals.
Suppose we have a market of stocks X1, . . . , Xn represented by positive continuous semimartingales that
satisfy
d logXi(t) = γi(t) dt+
d∑
ν=1
ξiν(t) dWν(t),
for i = 1, . . . , n, where d ≥ n ≥ 2, (W1, . . . ,Wd) is a d-dimensional Brownian motion, and the processes
γi and ξiν are progressively measurable with respect to the underlying filtration with γi locally integrable
and ξiν locally square-integrable. The process Xi represents the total capitalization of the ith company, so
the total capitalization of the market is X(t) = X1(t) + · · ·+Xn(t) and the market weight processes µi are
defined by µi(t) = Xi(t)/X(t), for i = 1, . . . , n. The ijth covariance process σij is defined by
σij(t) ,
d∑
ν=1
ξiν(t)ξjν(t),
for i, j = 1, . . . , n.
A portfolio π is defined by its weights π1, . . . , πn, which are bounded processes that are progressively
measurable with respect to the Brownian filtration and add up to one. The portfolio value process Zπ for π
satisfies
d logZπ(t) =
n∑
i=1
πi(t) d logXi(t) + γ
∗
π(t) dt, a.s.,
where the process γ∗π defined by
γ∗π(t) ,
1
2
( n∑
i=1
πi(t)σii(t)−
n∑
i,j=1
πi(t)πj(t)σij(t)
)
is called the excess growth rate process for π. It can be shown that if πi(t) ≥ 0, for i = 1, . . . , n, then
γ∗π(t) ≥ 0, a.s. The market weights µi define the market portfolio µ, and if the market portfolio value process
Zµ is initialized so that Zµ(0) = X(0), then Zµ(t) = X(t) for all t ≥ 0, a.s. Since the market weights are all
positive, γ∗µ(t) ≥ 0, a.s. This introductory material can be found in Fernholz (2002).
Let S be the entropy function defined by
S(x) = −
n∑
i=1
xi log xi,
for x ∈ ∆n, the unit simplex in Rn. We see that 0 ≤ S(x) ≤ log n, where the minimum value occurs only at
the corners of the simplex, and the maximum value occurs only at the point where xi = 1/n for all i. For a
constant c ≥ 0, the generalized entropy function Sc is defined by
Sc(x) = S(x) + c,
1INTECH, One Palmer Square, Princeton, NJ 08542. [email protected]. The author thanks Christa Cuchiero, Ioannis
Karatzas, Constantinos Kardaras, Johannes Ruf, and Walter Schachermayer for their invaluable comments and suggestions
regarding this research.
1
ar
X
iv
:1
51
0.
02
29
2v
1
[
q-
fi
n.
M
F
]
8
O
ct
2
01
5
for x ∈ ∆n. It can be shown that Sc generates a portfolio π with weights
πi(t) =
c− logµi(t)
Sc(µ(t))
µi(t),
for i = 1, . . . , n, and the portfolio value process Zπ will satisfy
d log
(
Zπ(t)/Zµ(t)
)
= d log Sc(µ(t)) +
γ∗µ(t)
Sc(µ(t))
dt, a.s. (1)
(see Fernholz (1999), Fernholz (2002), and Fernholz and Karatzas (2005)).
Definition 1. For T > 0, there is relative arbitrage versus the market on [0, T ] if there exists a portfolio π
such that
P
[
Zπ(T )/Zµ(T ) ≥ Zπ(0)/Zµ(0)
]
= 1,
P
[
Zπ(T )/Zµ(T ) > Zπ(0)/Zµ(0)
]
> 0.
If P
[
Zπ(T )/Zµ(T ) > Zπ(0)/Zµ(0)
]
= 1, then this relative arbitrage is strong.
Proposition 1. For T > 0, suppose that for the market X1, . . . , Xn there exists a constant ε > 0 such that
γ∗µ(t) > ε, a.s.,
for all t ∈ [0, T ], and for the entropy function S
ess inf
{
S(µ(t)) : t ∈ [0, T/2]
}
≤ ess inf
{
S(µ(t)) : t ∈ [T/2, T ]
}
. (2)
Then there is relative arbitrage versus the market on [0, T ].
Proof. Let
A = ess inf
{
S(µ(t)) : t ∈ [0, T/2]
}
. (3)
Since γ∗µ(t) ≥ ε > 0 on [0, T ], a.s., not all the µi can be constantly equal to 1/n, so
0 ≤ A < log n.
Hence, we can choose δ > 0 such that A+ 2δ < log n and
P
[
inf
t∈[0,T/2]
S(µ(t)) < A+ δ
]
> 0,
so if we define the stopping time
τ1 = inf
{
t ∈ [0, T/2] : S(µ(t)) ≤ A+ δ
}
∧ T,
then
P
[
τ1 ≤ T/2
]
> 0.
We can now define a second stopping time
τ2 = inf
{
t ∈ [τ1, T ] : S(µ(t)) = A+ 2δ
}
∧ T,
and we have τ1 ≤ τ2, a.s.
Now consider the generalized entropy function
Sδ(x) , S(x) + δ,
for the same δ > 0 as we chose above, so Sδ(x) ≥ δ. It follows from (1) that
log
(
Zπ(τ2)/Zµ(τ2)
)
− log
(
Zπ(τ1)/Zµ(τ1)
)
= log Sδ(µ(τ2))− log Sδ(µ(τ1)) +
∫ τ2
τ1
γ∗µ(t)
Sδ(µ(t))
dt, a.s., (4)
for the times τ1 and τ2. Suppose we are on the set where τ1 ≤ T/2, so τ1 < τ2, a.s., and consider two cases:
2
1. If τ2 < T , then
log Sδ(µ(τ2))− log Sδ(µ(τ1)) ≥ log(A+ 3δ)− log(A+ 2δ) > 0, a.s.,
and since the integral in (4) is positive, a.s., we have
log
(
Zπ(τ2)/Zµ(τ2)
)
− log
(
Zπ(τ1)/Zµ(τ1)
)
> 0, a.s. (5)
2. If τ2 = T , then A+ δ ≤ Sδ(µ(t)) < A+ 3δ for t ∈ [τ1, T ], a.s., so
log Sδ(µ(τ2))− log Sδ(µ(τ1)) +
∫ τ2
τ1
γ∗µ(t)
Sδ(µ(t))
dt > log
A+ δ
A+ 2δ
+
εT
2(A+ 3δ)
, a.s. (6)
Again there are two cases:
(a) If A = 0, let
δ =
εT
6 log 2
, (7)
so the left-hand side of the inequality in (6) will be positive, a.s., and (4) implies that
log
(
Zπ(τ2)/Zµ(τ2)
)
− log
(
Zπ(τ1)/Zµ(τ1)
)
> 0, a.s. (8)
(b) If A > 0, then
lim
δ↓0
[
log
A+ δ
A+ 2δ
+
εT
2(A+ 3δ)
]
=
εT
2A
> 0, (9)
so for small enough δ > 0, (6) will be positive, and (8) will be valid.
Now consider the portfolio η defined by:
1. For t ∈ [0, τ1), η(t) = µ(t), the market portfolio.
2. For t ∈ [τ1, τ2), η(t) = π(t), the portfolio generated by Sδ with δ chosen according to (7) or (9), as the
case may be.
3. For t ∈ [τ2, T ], η(t) = µ(t).
If τ1 = T , then η(t) = µ(t) for all t ∈ [0, T ], so
log
(
Zη(T )/Zµ(T )
)
= log
(
Zη(0)/Zµ(0)
)
, a.s.
If τ1 6= T , then τ1 ≤ T/2 and τ1 < τ2, a.s. By the construction of η, we have
log
(
Zη(T )/Zµ(T )
)
− log
(
Zη(0)/Zµ(0)
)
= log
(
Zπ(τ2)/Zµ(τ2)
)
− log
(
Zπ(τ1)/Zµ(τ1)
)
> 0, a.s.,
with the inequality following from (5) or (8), as the case may be. Since P[τ1 6= T ] > 0,
P
[
log
(
Zη(T )/Zµ(T )
)
≥ log
(
Zη(0)/Zµ(0)
)]
= 1,
P
[
log
(
Zη(T )/Zµ(T )
)
> log
(
Zη(0)/Zµ(0)
)]
> 0,
so there is relative arbitrage versus the market on [0, T ].
Let us recall that the market is diverse over the interval [0, T ] if there exists a δ > 0 such that
µi(t) < 1− δ, a.s.,
3
for i = 1, . . . , n and all t ∈ [0, T ] (see, e.g., Fernholz (2002)).
Corollary 1. Let T > 0 and suppose that the market is not diverse over [0, T/2] and that γ∗µ(t) > ε > 0 for
t ∈ [0, T ]. Then there is relative arbitrage versus the market on [0, T ].
Proof. In this case A = 0 in (3).
Remark 1. Corollary 1 can be applied to volatility-stabilized markets, for which Banner and Fernholz (2008)
have previously shown the existence of short-term strong relative arbitrage.
Remark 2. The condition (2) can be generalized to a function A defined on [0, T ] by
A(t) = ess inf
{
S(µ(t))
}
.
If A increases over any subinterval of [0, T ], then an argument similar to that of case 1 in Proposition 1 will
establish relative arbitrage. Moreover, Johannes Ruf has pointed out that the proof of Proposition 1 can
be extended to establish relative arbitrage in the case where A is slowly (enough) decreasing on [0, T ]. By
means of a remarkable construction, Karatzas and Ruf (2015) have shown that short-term relative arbitrage
does not exist for arbitrary A.
References
Banner, A. and D. Fernholz (2008). Short-term arbitrage in volatility-stabilized markets. Annals of Fi-
nance 4, 445–454.
Fernholz, R. (1999). Portfolio generating functions. In M. Avellaneda (Ed.), Quantitative Analysis in
Financial Markets, River Edge, NJ. World Scientific.
Fernholz, R. (2002). Stochastic Portfolio Theory. New York: Springer-Verlag.
Fernholz, R. and I. Karatzas (2005). Relative arbitrage in volatility-stabilized markets. Annals of Fi-
nance 1, 149–177.
Karatzas, I. and J. Ruf (2015). Lyapunov functions as portfolio generators. Technical report, Columbia
University and University College London.
4
| 0non-cybersec
| arXiv |
Reddit, as a High School senior coming from a low-income family, should I attend a Community College first, or go straight into a 4-year University?. If you have any questions that help, please ask. What helps you, will ultimately help me.
I come from a low-income family. Only my dad works. But, my brothers and I are all very hard working students and I will be the first of my family to attend college.
I maintain an above average gpa, and have been recognized as a part of the top ten percent in my district (Fontana Unified School District of California), so my grades aren't an issue.
My main concern is that I will be put into serious debt if I attend a UC school straight out of high school. My parents support everything I do, but we've just never had the money for a college fund; I'm relying solely on scholarships and grants. Also, I am still unsure of what I want my major/career to be. I have taken a liking to Statistics and Environmental Science, but I'm still not positive. I like the money that Statistics has to offer, but am dreadfully afraid of taking Calculus as I struggled in Pre-Calculus. Is there any career with Statistics that doesn't need Calc?
Please help a student out Reddit.
EDIT: I'm getting tons if replies. I'm doing my very best to reply to everyone but it may not happen, sorry!
EDIT 2: I'm going to be guys. Thanks for SO many helpful responses, it's REALLY helping me out. I appreciate it. I have school tomorrow, and I most likely won't be able to answer again until about 2 pm PST. But I DO read every response. Night guys! | 0non-cybersec
| Reddit |
Create a foreign table pointing to a view. <p>Is it possible to create a foreign table, using Postgres Foreign Data Wrapper, that points to a view instead of a table?</p>
| 0non-cybersec
| Stackexchange |
Life-changingly easy and effective way to clean out a stainless steel coffee carafe.. I was cleaning out my coffee machine, did the whole vinegar routine, and the inside of my stainless steel carafe was still all brown. We tend to just rinse it out and refill every time and it's been a while since it'd been really scrubbed.
So, after running several rounds of water through it to rinse the vinegar out, I took the last carafe which was full of hot water, added about a tablespoon of Oxi Clean, popped the lid back on and let it sit. It foamed for a few minutes and eventually stopped. I dumped it out; the water was as brown as coffee and the inside of the pot is GLEAMING. Like new.
(This next part is probably a bad idea and you probably shouldn't do it. I'm sure it voids all kinds of warranties and stuff.) I unplugged the machine, added a little, maybe a half teaspoon, of Oxiclean in the reservoir with some hot water, and swished that around with a bottle brush. OMG THE CRUD. The thing is made of black plastic and I had no idea how filthy it was.
It seems like it would be a Very Bad Thing to run the oxi mixture through the machine itself, so I dumped it out, rinsed and dumped a few times, then ran a few batches of water through the machine normally to be sure there's no soap left.
I dipped a cloth in oxi/water solution and used that to detail the outside of the machine. It looks like new now.
I avoided Oxi Clean for ages because of those stupid ads, but I'm damn near ready to start a religion based on the stuff now.
This not an ad. I'm sure the generic version from the supermarket would do the same thing. Seriously, try it.
TL/DR; Oxi Clean. | 0non-cybersec
| Reddit |
To make it available on the App Store, accept the terms of the latest agreement in Agreements, Tax, and Banking. <p>This is a question relating to releasing software on the Apple iTunesConnect interface. This past month (March 2015). Apple's software is very finicky and new problems come up often and are short lived.</p>
<p>I have received this message when attempting to "Submit for Review" my app:</p>
<blockquote>
<p>Your app can't be made available on the App Store. To make it available on the App Store, accept the terms of the latest agreement in Agreements, Tax, and Banking.</p>
</blockquote>
<p><img src="https://i.stack.imgur.com/KfrF3.png" alt="enter image description here"></p>
<p>Clicking on that link produces this page, and none of the links there lead to something related to "[accepting] the terms of the latest agreement". Also, I am the sole user with access to this system, and I have the "legal admin" permissions.</p>
<p><img src="https://i.stack.imgur.com/NHQw3.png" alt="enter image description here"></p>
<p>How do I get past this?</p>
| 0non-cybersec
| Stackexchange |
yeah that's good. | 0non-cybersec
| Reddit |
IGN Announces 'Summer of Gaming' Event in June. | 0non-cybersec
| Reddit |
Introducing the dotDNS metaTLD. | 0non-cybersec
| Reddit |
how to show that $A_kB_k\to AB?$. <blockquote>
<p>Let in the space $M(n,\mathbb R)=$ set of all $n\times n$ real matrices endowned with $\| \cdot \|_2,~A_k\to A,~B_k\to B.$ Then how to show that $A_kB_k\to AB?$</p>
</blockquote>
| 0non-cybersec
| Stackexchange |
Gulp: run task without a destination. <p>I'm trying to make a simple task to show the file size for each file in an array of paths using the <code>gulp-size</code> package, like so:</p>
<pre><code>var gulp = require('gulp')
var size = require('gulp-size')
gulp.task('size', function() {
gulp.src(bigArrayOfFilePathsFromAnotherModule)
.pipe(size({ showFiles: true }))
})
</code></pre>
<p>When this runs, it gets part of the way through, but then the task finishes before all of the files are processed. It works just fine if I pipe them to a destination, but I'd rather not copy the files anywhere. Is there a way to pipe these files into a black hole so the task completes?</p>
<p>I've tried <code>.pipe(gulp.dest('/dev/null'))</code> but it errors out trying to <code>mkdir /dev/null</code> which already exists.</p>
<p>Is there a good way to pipe a stream to nowhere?</p>
| 0non-cybersec
| Stackexchange |
Counting Repetitions in a tree. <p>Imagine a descendants tree where all nodes are either 1, 2 or 3. Each node has two descendants, all numbers except itself. Given a row $n$ how many nodes are the same as our original (first) node?</p>
<p>Example:</p>
<p><a href="https://i.stack.imgur.com/a0BUA.gif" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/a0BUA.gif" alt=""></a></p>
<p>Since for each node different from 1 in row $i$, row $i+1$ has exactly one node equal to $1$ we can work out that $S(n+1)=2^n - S(n)$ and that $S(0)=1$ where S is the number of nodes equal to our original.</p>
| 0non-cybersec
| Stackexchange |
PsBattle: A bat looking straight outta hell. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Teenager astounds scientists by building a DNA testing machine in his bedroom - and he did it to discover why his brother is ginger. | 0non-cybersec
| Reddit |
Measure Theory Question Involving an $f: \mathbb{R}^2 \rightarrow \mathbb{R}$. <p>I'm having trouble parsing the meaning of the following question and am curious if somebody could confirm that the way I am interpreting the prompt is correct:</p>
<blockquote>
<p>Let $f(x,t)$ be a real valued function on $\mathbb{R}^2$ such that for each fixed $x$ it is continuous in $t$ and for each $t$ it is Lebesgue integrable in $x$. In addition suppose that $|f(x,t)| \le g(x)$ for $t$ in some open interval $(a,b)$ and some $g$ integrable in $x$. Prove that the function $F(t) = \int_R f(x,t)dx$ is continuous at any point $t_0 \in (a,b)$.</p>
</blockquote>
<p><strong>(i) "Let $f(x,t)$ be a real valued function on $\mathbb{R}^2$ such that for each fixed $x$ it is continuous in $t$"</strong></p>
<p>Here I take it that $f:\mathbb{R}^2 \rightarrow \mathbb{R}$ whereby if we fix $x$ and let $p = (x,y)$ that $\forall \epsilon > 0, \exists \delta > 0$ s.t. for any $q = (x,y_1)$ we have $0 < |p - q| < \delta \implies |f(p) - f(q)| < \epsilon$.</p>
<p><strong>(ii) "and for each $t$ it is Lebesgue integrable in $x$"</strong></p>
<p>Here I assume this means that if we fix $t$ and consider $E = \{(x,t) : x \in \mathbb{R} \}$ that $-\infty < \int_E f < +\infty$.</p>
<p><strong>(iii) "In addition suppose that $|f(x,t)| \le g(x)$ for $t$ in some open interval $(a,b)$ and some $g$ integrable in $x$."</strong></p>
<p>Here I assume this means that we fix $(a,b)$ and consider that $\forall t \in (a,b)$, we have that $\forall x \in \mathbb{R}$, $|f(x,t)| \le g(x)$ (implying immediately that $0 \le g$) with $\int g < + \infty$.</p>
<p><strong>(iv) Prove that the function $F(t) = \int_R f(x,t)dx$ is continuous at any point $t_0 \in (a,b)$.</strong></p>
<p>Here I assume that $R \ne \mathbb{R}$ but rather $R = \{(x,t) : x \in \mathbb{R}$ for fixed $t \in \mathbb{R} \}$. Then we aim to show that if $t_0 \in (a,b)$, then $\forall \epsilon > 0$, $\exists \delta > 0$ s.t. $\forall r \in \mathbb{R}$ we have</p>
<p>$0 < |t_0 - r| < \delta \implies |F(t_0) - F(r)| < \epsilon$</p>
<p>or equivalently if $\{t_n\}$ is a sequence of reals which converges to $t_0$, we have that</p>
<p>$$\lim_{t_n\to t_0} F(t_n) = F(t_0)\text{ or }\lim_{t_n\to t_0} \int f(x,t_n)dx = \int f(x,t_0)dx$$</p>
| 0non-cybersec
| Stackexchange |
5 year difference!. Top picture - 19 years old. Hated myself, zero self confidence, consequently almost no social life.
*** http://imgur.com/pzWZT2O ***
Bottom picture - 24 years old. Tooootally new person!
Lost 70 pounds in 2010 from December 2009 to October 2010 and have kept it off, despite some fluctuations from laziness :P
| 0non-cybersec
| Reddit |
Dog efficiently protects its flock. | 0non-cybersec
| Reddit |
Let S be an arbitrary set and let $f_n : S \to \mathbb{R}$ be a sequence of functions. <blockquote>
<p>Let S be an arbitrary set and let <span class="math-container">$f_n : S \to \mathbb{R}$</span> be a
sequence of functions. If <span class="math-container">$f_n$</span> is increasing for all x <span class="math-container">$\in$</span> S and
<span class="math-container">$f_n$</span> converges pointwise to <span class="math-container">$f$</span>, then f is increasing.</p>
</blockquote>
<p>I'm trying to prove this theorem but the hypothesis is not clear for me. I've found this: <a href="https://math.stackexchange.com/questions/1565585/prove-that-if-the-sequence-of-increasing-functions-f-n-converges-to-f-the">Prove that if the sequence of increasing functions $(f_n)$ converges to $f$, then $f$ is increasing</a>
But I think that in my case, the hypothesis is saying that <span class="math-container">$f_n \leq f_{n+1}$</span> for all x ∈ S and all n ∈ <span class="math-container">$\mathbb{N}$</span>, which is simmilar to the hypothesis of <em>Dini's Theorem</em>.</p>
<p>Can you guys give me an ideia of how to prove this?</p>
| 0non-cybersec
| Stackexchange |
How can I get the hosting url instead of functions url in firebase functions for https. <p>I have dynamically generated urls that I need to create for staging and production environments. I am doing a mix of Firebase hosting and functions. I am also using Firebase config to route urls to my Firebase functions "app". When I try to get the hosting url when I visit my site with req.get('host') inside a Firebase function I get the functions url. How can I get the Hosting url? - the url that triggered the firebase function?</p>
| 0non-cybersec
| Stackexchange |
Set up SSHFS automated mounting only when user SSH into remote server?. <p>i want to set up SSHFS such that whenever I SSH into remote server, it mounts the file transfer folder. Is it possible to set it up in such way?</p>
<hr>
<p>making script after @Alex's comment. </p>
<p>my script is very simple. </p>
<pre><code>#! /bin/bash
#login in the server
ssh -X [email protected]
#establish the automated mounting
sshfs [email protected]:/home/usr/data /usr/some/place/mountedfolder/ -ovolname=mounted-folder
</code></pre>
<p>but now, if i execute this file. first the ssh is established and then only after i exit ssh the folder is mounted with <code>sshfs</code>. </p>
<p>What am i doing wrong here?</p>
<hr>
<p>okay for now, i just did simple fix :-> switched the order of commands. first the <code>sshfs</code> and then <code>ssh</code> so that : first it mounts and second it establishes <code>ssh</code> connection. </p>
<pre><code>#! /bin/bash
#establish the automated mounting
sshfs [email protected]:/home/usr/data /usr/some/place/mountedfolder/ -ovolname=mounted-folder
#login in the server
ssh -X [email protected]
</code></pre>
<p>seems like it works for now. </p>
| 0non-cybersec
| Stackexchange |
What do a pizza delivery driver and a gynecologist have in common?. They both have to smell it but neither of them gets to eat it. :( | 0non-cybersec
| Reddit |
Discover rose color meaning. | 0non-cybersec
| Reddit |
How to remove only symbols from string in dart. <p>I want to remove all special symbols from string and have only words in string
I tried this but it gives same output only</p>
<pre><code>main() {
String s = "Hello, world! i am 'foo'";
print(s.replaceAll(new RegExp('\W+'),''));
}
</code></pre>
<p>output : <code>Hello, world! i am 'foo'</code><br>
expected : <code>Hello world i am foo</code></p>
| 0non-cybersec
| Stackexchange |
Rendering an action with :notice that depends on a URL param. <p>I have an action 'approval' that renders a view which displays some content from a Model (class). Within the view I have a link_to that calls <code>accept</code> with a URL parameter (:id). After the <code>accept</code> action completes (sets approve to true) I would like to render <code>approval</code> again with a message ("Saved!"). However, unlike a static login page, the approval action requires a param the first time it is called. The second time it is rendered, an runtime error occurs (obviously). What is the best way to call <code>approval</code> with the flash notice?</p>
<pre><code>def approval
@c = Class.find(params[:id])
end
def accept
@c = Class.find(params[:id])
@c.approve = true
@c.save
render 'approval', :notice => "Saved!"
end
</code></pre>
| 0non-cybersec
| Stackexchange |
Yes ofc he is the messiah. | 0non-cybersec
| Reddit |
Automating Biber in TeXworks. <p>I'm using <code>miktex</code> portable with the included <code>TeXworks</code> editor. I need to compile a document using:</p>
<pre><code>pdfLaTex - Biber - pdfLaTex
</code></pre>
<p>If I run the three commands individually, they work fine. However, when I create a new tool to run all <code>3</code> together, the Biber part seems to get skipped, I cannot find any information about Biber in the console output. </p>
<p>Also, I've noticed that when I run <code>pdfLaTex</code> by itself, it creates an aux and bcf file, but when I run all 3 together, those files are not created. I know <code>Biber</code> needs the bcf file to run, so I suspect this may be part of the problem, though I don't know what is causing it.</p>
<p>This is the confuguration I have for the tool that I created in <code>TeXworks</code>:</p>
<p><a href="https://i.stack.imgur.com/QVrI6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QVrI6.png" alt="enter image description here"></a></p>
<p>Running the three programs individually works, but it would be nice if all 3 could run together. Any ideas of what could be wrong here?</p>
| 0non-cybersec
| Stackexchange |
ITAP of my girlfriend at the sunset. | 0non-cybersec
| Reddit |
Using with vs declare a temporary table: performance / difference?. <p>I have created a sql function in <strong>SQLServer 2008</strong> that declared a temporary table and uses it to compute a moving average on the values inside</p>
<pre><code>declare @tempTable table
(
GeogType nvarchar(5),
GeogValue nvarchar(7),
dtAdmission date,
timeInterval int,
fromTime nvarchar(5),
toTime nvarchar(5),
EDSyndromeID tinyint,
nVisits int
)
insert @tempTable select * from aces.dbo.fEDVisitCounts(@geogType, @hospID,DATEADD(DD,-@windowDays + 1,@fromDate),
@toDate,@minAge,@maxAge,@gender,@nIntervalsPerDay, @nSyndromeID)
INSERT @table (dtAdmission,EDSyndromeID, MovingAvg)
SELECT list.dtadmission
, @nSyndromeID
, AVG(data.nVisits) as MovingAvg
from @tempTable as list
inner join @tempTable as data
ON list.dtAdmission between data.dtAdmission and DATEADD(DD,@windowDays - 1,data.dtAdmission)
where list.dtAdmission >= @fromDate
GROUP BY list.dtAdmission
</code></pre>
<p>but I also found out that you can declare the tempTable like this:</p>
<pre><code>with tempTable as
(
select * from aces.dbo.fEDVisitCounts('ALL', null,DATEADD(DD,-7,'01-09-2010'),
'04-09-2010',0,130,null,1, 0)
)
</code></pre>
<p><strong>Question: Is there a major difference in these two approaches? Is one faster than the other or more common / standard?</strong> I would think the declare is faster since you define what the columns you are looking for are.. Would it also be even faster if I were to omit the columns that were not used in the calculations of moving average?(not sure about this one since it has to get all of the rows anyways, though selecting less columns makes intuitive sense that it would be faster/less to do)</p>
<p>I also have found a <code>create temporary table @table</code> from here <a href="https://stackoverflow.com/questions/4680886/how-to-declare-internal-table-in-mysql">How to declare Internal table in MySQL?</a> but I don't want the table to persist outside of the function (I am not sure if the create temporary table does this or not.)</p>
| 0non-cybersec
| Stackexchange |
Nestlé's California Water Permit Expired 27 Years Ago. | 0non-cybersec
| Reddit |
PHP Local File Inclusion from URL; no param. <p>The PHP code has a <code>handleRoute($path)</code> function that is triggered for URLs like <code>server.com/routeme/a</code>. Handle route has the follwing: if <code>file_exists($path)</code> then <code>include $path</code>. </p>
<p>The $path argument is <code>/srv/dirs/routeme/a</code>. </p>
<p>A Google search leads to a million results where the file name is directly read from a parameter. When instead read from an URL, I can't just say <code>server.com/routeme/a/../../</code>, as nginx will reply with <code>400 Bad Request</code> instead of executing the <code>handleRoute</code> function. </p>
<p>I have been attempting to find something that PHP will interpret as a Path outside of <code>routeme/</code> while nginx does not and thus still lead to the execution of the include. </p>
<p>I was hoping <code>%2E%2E%2F</code> (encoded <code>../</code>) would do it, but nginx still interprets this as a path. </p>
<p>I have a feeling that either I'm missing some obvious method to do this, or that it is a dead end and the code not vulnerable. </p>
| 0non-cybersec
| Stackexchange |
Children's toy-store/paradise of 1957 in Russia. Pretty amazing stuff. | 0non-cybersec
| Reddit |
madlad woooosh. | 0non-cybersec
| Reddit |
How to handle only overlays while printing a latex beamer notes. <p>Using overlays and showing multiple graphs in the same slides and even text is really great but I am really wondering how can we show each piece of overlay while printing the slides or notes ? It seems some of the slide can have multiple pages in order to accurately show all the graphs and text especially when we use overlays such as <code>\only<1-3</code> and <code>\only<4-5></code>. If it is just a regular text and fills only one page then it should be fine. But often times it is more complex than that. Would anyone clarify what can we do under such circumstances ?</p>
<p><strong>EDIT: MINIMAL EXAMPLE ADDED</strong></p>
<p>What I mean here is that on the second slide I have three different tikz picture. Here I didn't include the picture on node (0,0). In my slide I am using the pictures. SO, how can I print all these three pictures on the same page ? In other cases also some of the text doesn't fit on the slides. I hope it is more understandable now. </p>
<p>A minimal working example </p>
<pre><code>%\documentclass[mathserif]{beamer}
\documentclass[arial,handout]{beamer}
\usepackage{pgf,pgfpages}
\usepackage{graphicx}
%\usepackage{units}
%\usepackage[utf8]{inputenc}
\usepackage{mathtools}
%\usepackage{amsmath}
\usepackage{animate}
\usepackage{booktabs}
\usepackage{tikz}
\usetikzlibrary{arrows,shapes}
\tikzset{
invisible/.style={opacity=0},
visible on/.style={alt=#1{}{invisible}},
alt/.code args={<#1>#2#3}{%
\alt<#1>{\pgfkeysalso{#2}}{\pgfkeysalso{#3}} % \pgfkeysalso doesn't change the path
},
}
\mode<presentation>
{
\usetheme{ift}
\setbeamertemplate{items}[square]
}
\usefonttheme[onlymath]{serif}
\setbeamerfont{frametitle}{size=\LARGE,series=\bfseries}
\definecolor{uibred}{RGB}{170, 0, 0}
\definecolor{uibblue}{RGB}{0, 84, 115}
\definecolor{uibgreen}{RGB}{119, 175, 0}
%\definecolor{uibgreen}{RGB}{50, 105, 0}
\definecolor{uiborange}{RGB}{217, 89, 0}
%% Create a new command called redub for underbraces
\newcommand\redub[2]{%
\colorlet{currentcolor}{.}%
\color{red}%
\underbrace{\color{currentcolor}#1}_{\color{red}#2}%
\color{currentcolor}%
}
%Beamer block template
\setbeamertemplate{blocks}[rounded][shadow=true]
\setbeamercolor{block title}{bg=uibblue,fg=white}
\setbeamercolor{item projected}{fg=white,bg=green}
\beamertemplatenavigationsymbolsempty
%\include{macros}
%\includeonlyframes{current}
\defbeamertemplate{enumerate item}{mycircle}
{
%\usebeamerfont*{item projected}%
%\usebeamercolor[bg]{item projected}%
\begin{pgfpicture}{0ex}{0ex}{1.5ex}{0ex}
%\pgfcircle[fill]{\pgfpoint{0pt}{.75ex}}{1.25ex}
\pgfbox[center,base]{\color{uibblue}\insertenumlabel.}
\end{pgfpicture}%
}
[action]
{\setbeamerfont{item projected}{size=\scriptsize}}
\setbeamertemplate{enumerate item}[mycircle]
\begin{document}
%\setbeamertemplate{background}
% {\includegraphics[width=\paperwidth,height=\paperheight]{slide_bg1}}
%\setbeamertemplate{footline}[ifttheme]
\mode<presentation>
\begin{frame}
\frametitle{Eulerian Salt Flux Decomposition}
\only<1-2>{\begin{itemize}
\item Subtidal Volume discharge rate $Q_f$: through a cross=section A \\
$Q_f = \langle\int u.dA \rangle$
\item Salt transport rate $F_s$ through a cross-section A \\
$F_s = \langle \int uS.dA \rangle$
\end{itemize}}
\onslide<2->Sub-tidal salt flux decomposed into three parts
\onslide<2->\begin{align*}
F & = \langle \int(u_0+u_E+U_T)(s_0+s_E+s_T)dA \rangle \\
& \approx \langle \int(u_0s_0+u_Es_E+u_Ts_T)dA \rangle \\
& = \redub{Q_fs_0}{\mathclap{\text{ River flow }}} +
\redub{F_E}{\substack{\text{Exchange}\\\text{shear dispersion}}} +
\redub{F_T}{\substack{\text{tidal osciallatory}\\\text{salt transport}}}
\end{align*}
\onslide<3->\begin{itemize}
\item $u_0$ and $s_0$ tidally and cross-sectionally averaged
\item $u_E$ and $s_E$ tidally averaged and cross-sectionally varying
\item $u_T$ and $s_T$ tidally and cross-sectionally varying
\end{itemize}
\end{frame}
\begin{frame}
\frametitle{Age of Water under dye from all Rivers}
\only<1-3>{\begin{tikzpicture}
\centering
\node [](0,0)(start){ hello2};
% \draw [step=0.5cm,thin,dotted] (-5,-4) grid(5,4);
% \node [circle]at (-4.5,0){0};
% \node [circle,radius=0.9cm,fill=red!30,] at (-4.5,0)(a){};
\draw [red,fill=red!30](-4.3,-0.2)circle(0.1cm);
\draw [red,fill=red!30](-3.3,0)circle(0.1cm);
\draw [red,fill=red!30](-2.5,-0.7)circle(0.1cm);
\draw [red,fill=red!30](-4.,-0.8)circle(0.1cm);
\draw [red,fill=red!30](-4.,-1.2)circle(0.1cm);
\draw [red,fill=red!30](4.3,1.6)circle(0.1cm);
\draw [red,fill=red!30](3.3,2.7)circle(0.1cm);
\draw [red,fill=red!30](1.6,3.5)circle(0.1cm);
\draw [red,fill=red!30](1.3,3.5)circle(0.1cm);
\node [rectangle,text width=4cm,red] at (5.5,3) (return) {$Q_2 = 169 A^{0.616}$ \linebreak Mason et. al. 1998};
\node [rectangle,text width=4cm,red,visible on =<2->] at (5,0) (return) {Smaller near the source \linebreak Increases away from the source};
\draw [red,visible on =<3->](-3.3,-1.5) circle(0.7cm);%wolf bay small age
\end{tikzpicture}}
\only<4-5>{\begin{tikzpicture}
\node [](0,0)(start){hello1};
% \draw [step=0.5,dotted](-5,-4) grid (5,4);
\node [rectangle,text width=4cm,red] at (5,0) (return) {Scale different from \linebreak 2 year inflows};
\node [rectangle, text width =4cm, red,visible on =<5->] at (5,-2) {Maximum age of 120 days};
\draw [red] (1.5,-1) ellipse(1cm and 0.6cm);
\node [rectangle, text width=4cm, red] at (5,3) {Minimum 7 day flow over 10 yr. interval};
\end{tikzpicture}}
%
\only<6-7>{\begin{tikzpicture}
\node [](0,0)(start){hello};
\node [rectangle, text width=4cm, red, visible on =<7->] at (5,3) {Mean inflows over 10 yr. interval};
\end{tikzpicture}}
\end{frame}
\end{document}
</code></pre>
| 0non-cybersec
| Stackexchange |
11-Year-Old Tennessee Girl Discovers 475-Million-Year-Old Fossil Of A Trilobite Near A Lake. | 0non-cybersec
| Reddit |
Fortran - 50 years later, still the king of numerical computation.. | 0non-cybersec
| Reddit |
Is Dual-Wielding in 5E actually worth it?. So, my friends and I started a 5E campaign about 2 months ago. I'm a fighter, now lvl 4, and I've been really excited about dual-wielding greatswords further into the game (it would be awesome). However, since we are all terrible at remembering / figuring out combat rules, I didn't realize until this weekend that, no matter what happens, you can only get one offhand attack per turn (since it's a bonus action). So my question is, are there other benefits of dual-wielding that I'm not seeing? Or is it actually as terrible as it seems to be? | 0non-cybersec
| Reddit |
More Sluggish Lagging Mouse. <p>Just added dual boot to my PC with a fresh Ubuntu 18.04 installation and found the mouse totally unusable but after rebooting it was fine. Today I briefly booted to Windows but when I went back to Ubuntu, it was sluggish again. After a reboot it was fine and the same wireless mouse on the same PC works fine with Windows 10.</p>
<p>This is an older system so no USB 3 and I tried a wired USB mouse with no change to the problem. I read everything I could find on the problem which is apparently very common so is there a once-and-for-all fix?</p>
<p>Some sources suggest removing and reinstalling half but that is not installed on this system. The keyboard is only slightly affected, missing the occasional keystroke and there are no other USB devices in use but when this starts happening, the mouse is too sluggish to even be usable.</p>
<p>Additional info: I reinstalled Ubuntu, tried different desktops and updated everything that is updatable. Still, the problem that often requires multiple hard-boots to get it going. Sometimes the mouse is sluggish on the login screen; other times it’s fine there but becomes sluggish once the desktop appears. </p>
<p>When sluggish, it takes several inches of physical mouse movement to move the cursor a small amount. On a second Ubuntu PC that has newer hardware, the symptoms are a bit different in that the mouse becomes jerky at times, clears itself after a while, then becomes jerky again. Clearly a bug. Two other 18.04 Ubuntu PC, each with different chipsets, also suffer similar issues.</p>
<p>Can anyone help?</p>
| 0non-cybersec
| Stackexchange |
24 Pull Requests - Giving Back Little Gifts of Code for Christmas. | 0non-cybersec
| Reddit |
Can global warming and the next ice age cancel out?. In the Book „the Science of discworld “ the author wrote „it would be ironic if our global warming crisis would prevent the next ice age“.
Now to the question. How realistic is this? Are we overdue in the ice age cycle and even if so, are their reliable scientific sources on this scenario? On a side note: feel free to comment on this scenario.
P.S.: please say it can cancel out so I can have faith in our future :) | 0non-cybersec
| Reddit |
Cannot compile kernel driver on yocto. Hello
Not sure this is the most suited subreddit, but I'll give it a try.
I have written a very basic driver: https://paste.ubuntu.com/p/WwnSQPDgST/
Corresponding Makefile: https://paste.ubuntu.com/p/pNYk83yqnC/
This works perfectly fine. I am able to compile this **on my laptop** use it and can see my prints in dmesg.
Yet when I now try to include that same code in my yocto image I get errors like "undefined reference tio iowrite32" and "undefined reference tio ioread32".
This is the Makefile I use for yocto: https://paste.ubuntu.com/p/G2mq5mzTc2/
I don't understand why I am unable to compile. Could somebody explain me why I am having these errors?
Some more files below.
Recipe: https://paste.ubuntu.com/p/mb77kSv6zz/
complete compilation errors: https://paste.ubuntu.com/p/KrZ9QgKrsy/
Thanks | 0non-cybersec
| Reddit |
Nun Vs. Vampire. Two nuns are driving down a road late at night when a vampire jumps onto the bonnet.The nun who is driving says to the other, "Quick! Show him your cross."So the other nun leans out of the window and shouts, "Get off our fucking car you stupid cunt." | 0non-cybersec
| Reddit |
Public DNS on domain-joined PCs. <p>I have a two-controllers AD domain, and all domain-joined PCs have their addresses as primary and secondary DNS servers.</p>
<p>I wonder if I should configure a tertiary public DNS. The reasoning is that many PCs are located in smaller remote networks and they reach both domain controllers via a central VPN tunnel. If the VPN tunnel goes down, <em>both</em> DCs would be unavailable and the remote PCs will be unable to resolve <em>any</em> addresses, preventing them for surfing the internet/checking email/etc.</p>
<p>Adding a DC in each network is out of question (they are of 5/10 PCs), and the same can be said about creating a direct VPN tunnel from the remote network to the secondary DC site (due to hardware capacity).</p>
<p>A tertiary, public DNS server would prevent this, but I wonder if it can cause problems (ie: if it is, for some reason, selected as the preferred DNS, the PC would be "disconnected" from the domain).</p>
<p>So: <em>it is ok to use a tertiary public DNS on a domain-joined PC, or it will cause problems? Anything to be aware of?</em></p>
| 0non-cybersec
| Stackexchange |
Hardy $Hp$ norm of similar function. <p>Let $f(z)=\sum_{n=0}^{\infty} \frac{c_n}{n+1}z^n$, where sequence $c_n \in S^1=\{z:|z|=1\}.$ We observe $H^p$ norm $\|f\|_{H_p}$, where $H^p$ is Hardy space, $1 \leq p < \infty$.<br>
Question: For the fix $p \geq 1$, determine $\min_{c_n \in S^1} \|f\|_{H^p}$ and $\max_{c_n \in S^1}\|f\|_{H^p}$ ?</p>
| 0non-cybersec
| Stackexchange |
China's Great Cannon. | 1cybersec
| Reddit |
Linux VM's connectivity dies when second network interface is brought up. <p>I'm in the middle of doing some testing on a mobile device, and want to test it from the network. The mobile device will only connect to networks via WiFi, and doesn't support ad-hoc mode, so I've set up an old WiFi router as an AP, which is connected via ethernet to a port on my laptop. The router operates under 192.168.0.0/24.</p>
<p>My laptop is also connected to our normal network via another ethernet port. This network operates under 10.0.2.0/24, and provides internet connectivity.</p>
<p>My laptop is running a VM which has two NICs, each bridged onto the two respective physical NICs. The 10.0.2.0 network is reachable via eth0, and the 192.168.0.0 network is reachable via eth1.</p>
<p>The problem I'm having is that all connectivity drops as soon as I run <code>ifup eth1</code>. I've tried changing routing tables and adapter metrics, but have had no luck.</p>
<p>Here's the output from <code>ifconfig -a</code>:</p>
<pre><code>eth0 Link encap:Ethernet HWaddr 08:00:27:04:7a:b7
inet addr:10.0.2.15 Bcast:10.0.2.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe04:7ab7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:18135 errors:0 dropped:0 overruns:0 frame:0
TX packets:11076 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:12226743 (12.2 MB) TX bytes:1047606 (1.0 MB)
eth1 Link encap:Ethernet HWaddr 08:00:27:96:cf:1c
inet addr:192.168.0.5 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::a00:27ff:fe96:cf1c/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1803 errors:0 dropped:0 overruns:0 frame:0
TX packets:1439 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:166923 (166.9 KB) TX bytes:118391 (118.3 KB)
</code></pre>
<p>Here's my routing table:</p>
<pre><code>Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 192.168.0.1 0.0.0.0 UG 100 0 0 eth1
0.0.0.0 10.0.2.2 0.0.0.0 UG 100 0 0 eth0
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
</code></pre>
<p>And the output from <code>ip route</code>:</p>
<pre><code>default via 192.168.0.1 dev eth1 metric 100
default via 10.0.2.2 dev eth0 metric 100
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
192.168.0.0/24 dev eth1 proto kernel scope link src 192.168.0.5
</code></pre>
<p>Ideas? I'm not a Linux guy, so I'm stumped by this.</p>
<hr>
<p>Edit:</p>
<pre><code># cat /etc/network/interfaces
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet dhcp
auto eth2
iface eth2 inet dhcp
auto ath0
iface ath0 inet dhcp
auto wlan0
iface wlan0 inet dhcp
</code></pre>
<p>Output from <code>ip route</code> after dropping the <code>eth1</code> default route:</p>
<pre><code>default via 10.0.2.2 dev eth0 metric 100
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
192.168.0.0/24 dev eth1 proto kernel scope link src 192.168.0.5
</code></pre>
| 0non-cybersec
| Stackexchange |
me🔩irl. | 0non-cybersec
| Reddit |
Shout out to everyone who preps for health reasons, I personally do it because I’m poor and it saves a lot of money. Baked rigatoni in arrabbiata sauce. $22 total not including salt and cayenne pepper.. | 0non-cybersec
| Reddit |
Completely clear all output from a Terminal window. <p>I would like to clear <strong>all</strong> output from a Terminal window (including all historical output) to get it back to a clean state as if you had just opened a new Terminal window, or a new Terminal tab.</p>
<p>I can use the <code>clear</code> command to clear just the current screenful, but then you can still scroll up to see all the historical output. I'm using the Terminal to trace program output and at the end I would just like to do <KBD>⌘</KBD> + <KBD>A</KBD> to select all the text so I can grab the output from the just last run, without having to scroll up and see where it started. I could also just open a new tab, I was just wondering if this can be done in the same window? </p>
| 0non-cybersec
| Stackexchange |
Mario Kart Switch - What I'd like to see. I love Mario Kart as much as the next guy, but we have to come to terms with the fact that the series needs a bit of an overhaul. Here are a few things I would like to see:
1. A campaign: It doesn't have to be an incredibly lengthy one, just a fun way to unlock the characters/karts. I hated MK8 mechanic of collecting coins in order to unlock characters. All they need to do is throw in a vanilla story, create an over world from which you access the tracks/cups. Since Mario Kart is now introducing different franchises, they can section the overworld according to the characters you will unlock. Say the triforce cup, there you will unlock Toon link, toon zelda and Makar, so that section of the overworld will resemble Hyrule. At the send you have one crazy race which blends sections from each franchise found in the game against whichever villain they decide to put, etc.
2. Doubledash mode: This one speaks for itself
3. Weather mechanic/day & night cycle: Well, this couldn't apply to every track because some are indoors or in odd places, but it would be fun to have a weather mechanic that would affect the way you race. It changes up the formula a bit.
4. More unique characters: Let's stop with the Metal Marios, tanooki marios, etc. Any variation of an existing character should simply be a skin.
5. Outfits: Give us the chance to change up the clothes our characters wear via unlocking them in the campaign mode.
6. New Items: Since they are introducing characters from different franchises, lets bring on items from them. ie: From Zelda, we can bring the hookshot. When used, it latches on the person in front of you and pulls you towards them while bringing them to a complete stop. From Animal Crossing, the pitfall seed, this one would be hilarious as it would leave a little X on the track and if you run over it you get stuck for a few seconds.
7. Battle mode: Make it great again.
And there it is! I know a lot of it as long shot, but who knows! | 0non-cybersec
| Reddit |
Iterations of $f(x)=\dfrac{ax+b}{cx+d}$. <p>Consider $f(x)=\dfrac{ax+b}{cx+d}$, where $c\neq0$ and $f(x)$ is not equal to a constant. Is it necessarily true that $f^{[n]}(x)=f(x)$ for some natural number $n > 1$?</p>
| 0non-cybersec
| Stackexchange |
Washing machine for cats [vid]. | 0non-cybersec
| Reddit |
Van der Wiel: "I want to stay at PSG, but the club want me to leave. Things are clear.". | 0non-cybersec
| Reddit |
Question for old school stoners. Remember the old rollers that looked like a bamboo mat made out of toothpick size pieces? I want one but can't find one anywhere. Does anybody know the name of them or names they've heard for them to maybe help me find them on the net | 0non-cybersec
| Reddit |
What do you guys think of my HG team? Any suggestions/criticism?. I'm currently training for the Elite 4. Here's what I have right now:
37 Typhlosion; Charcoal; + Attack, - Spd
-Focus Blast
-Dig
-Lava Plume
-Fire Blast
35 Octillery; Mystic Water; Ability Sniper; + Defense, - Spd
-Surf
-Psybeam
-Aurora Beam
-Waterfall
34 Tauros; Silk Scarf; Ability Anger Point; neutral nature
-Return
-Horn Attack
-Strength
-Zen Headbutt
40 Mamoswine; Ability Snow Cloak; NeverMeltIce; + Attack, - Def
-Ice Shard
-Avalanche
-Take Down
-Earthquake
40 Espeon; Amulet Coin (probably switching for TwistedSpoon when i can get it); + Sp. Attack, - Def.
-Flash
-Shadow Ball
- Psybeam
-Swift
36 Magneton; Magnet; Ability Magnet Pull; + Sp. Attack, - Sp. Def.
-Magnet Bomb
-Thunder
-Charge Beam
-Sonicboom
I put the levels in so you can see why I may not have certain moves yet. Obviously none of the movesets are really finalized. I'm least happy with Magneton, but it learns Discharge in a few levels, so that will help. What do you think? Any items, moves, other Pokemon you would recommend? | 0non-cybersec
| Reddit |
How view owner of file on Windows XP with command line tools. <p>I use</p>
<pre>
cmd# dir uuid.vbs /q /s
15.08.2011 16:52 83 HOST\user uuid.vbs
</pre>
<p>but this not work for Windows shares which mounted by:</p>
<pre>
cmd# net use t: \\192.168.1.44\distr
</pre>
<p>It take output like:</p>
<pre>
cmd# dir wget.later /q /s
15.08.2011 09:16 66 ... wget.later
</pre>
<p>Also when in Explorer check Properties ==> Security you can see list of users/groups that have some permition for this file.</p>
<p>How can I list owner or users/groups which have permition on file from command line? May be VB/JS-scrips allow this (as come starting from Win2000)?</p>
| 0non-cybersec
| Stackexchange |
edit and comment on a word document in a discernible way for another person. <p>There is a word document sent from a friend who asked me to correct grammar mistakes and vocabulary mistakes in it. I want the end result to be a word document with totally visible and easily discernible fixes, so that the other person can easily notice their mistakes without needing to open each and every comment. Are there any solutions other than choosing a different font color and styling, and other than commenting in word 2016 that could make it possible for me to do so? </p>
<p>Consider this mistake: "the bar graph gives information the amount of rainfall in millimeter all throughout the year"</p>
<p>I want to fix it like this: "the bar graph gives information <b>about</b> the amount of rainfall in millimeter<b>s</b> all throughout the year"</p>
<p>I know that using html tags I can do that here in stackoverflow, but are there any solutions for fixing a document sent from another user, and letting that user notice those fixes done by you in a very straight-forward and easily noticeable way?</p>
| 0non-cybersec
| Stackexchange |
Horned bully gets put in his place. | 0non-cybersec
| Reddit |
The domain of the function. <p>What is the domain of this function:
<span class="math-container">$$f(x) = 2x^{5/3} + 5 x^{2/3}$$</span></p>
<p>I think that it is <span class="math-container">$\mathbb R$</span>, but gnuplot plots it only as <span class="math-container">$x\ge0$</span>.</p>
<p><strong>EDIT</strong>
How to compute for negative <span class="math-container">$x$</span></p>
<p><span class="math-container">$\frac{10}{3} x^{\frac{2}{3}}+\frac{10}{3}x^{-\frac{1}{3}}>0$</span></p>
<p><span class="math-container">$\frac{10}{3} x^{\frac{2}{3}}+\frac{10}{3}x^{-\frac{1}{3}}<0$</span></p>
<p><span class="math-container">$>$</span> holds for <span class="math-container">$(-\infty;-1)$</span> and <span class="math-container">$<$</span> holds for <span class="math-container">$(-1;0)$</span></p>
<p>but I got the reverse result:</p>
<p><span class="math-container">$x^{\frac{2}{3}} < -x^{-\frac{1}{3}}$</span></p>
<p><span class="math-container">$x < -1$</span></p>
| 0non-cybersec
| Stackexchange |
Ubuntu 18.04 UI bug?. <pre><code>lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
</code></pre>
<p>I am not sure if this is an Ubuntu 18.04 bug because it also happens on my Intellij IDEA when I press <kbd>Ctrl</kbd>+<kbd>Space</kbd> for code auto complete.</p>
<p><img src="https://i.stack.imgur.com/CJS97.png" alt="Image with bug"></p>
<p>If you look at the image, the bookmark overlay description is now jumbled up with weird tab-like looking characters. These weren't there before for sure and an Ubuntu software update must have caused this. </p>
<p>How do I fix this?</p>
<p>EDIT 1: This happens in Firefox too.</p>
| 0non-cybersec
| Stackexchange |
How do I emulate a USB stick with an external CDROM drive?. <p>I am working with a Linux-based high-security network appliance (hereon: device) and do not have access to the user space so I can't log in. The only thing I can do is send it commands to upgrade through the USB port. It then reads the USB stick and starts the upgrade. I have been tasked to attempt to upgrade it without a USB stick but an external CDROM drive instead.<br><br>The USB stick must be less than 4GB and formatted with FAT32. Here is an example of a USB stick that the device recognizes:</p>
<pre><code>[root@pitfall ~]# fdisk -l /dev/sdc
Disk /dev/sdc: 15.6 GB, 15606349824 bytes
64 heads, 32 sectors/track, 14883 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x23ff8244
Device Boot Start End Blocks Id System
/dev/sdc1 2 257 262144 b W95 FAT32
</code></pre>
<p>I thought I could dd this USB partition and then manipulate the output in some way and burn it to a CD. Here is the file that resulted in that dd:</p>
<pre><code>[root@pitfall ~]# file /tmp/dd_output
/tmp/dd_output: x86 boot sector, mkdosfs boot message display, code offset 0x3c, OEM-ID " mkdosfs", sectors/cluster 8, root entries 512, Media descriptor 0xf8, sectors/FAT 256, heads 64, sectors 524288 (volumes > 32 MB) , serial number 0xa740f5a9, label: " ", FAT (16 bit)
</code></pre>
<p>I am not sure how to trick the device into thinking that the external CDROM drive is a USB stick. I imagine it will involve mkisofs in someway, but from what I can tell this command doesn't support vfat.<br><br>
Here is the dmesg output for the external CDROM drive:</p>
<pre><code>ISO 9660 Extensions: Microsoft Joliet Level 1
ISOFS: changing to secondary root
usb 2-2: USB disconnect, address 5
usb 2-2: new high speed USB device using ehci_hcd and address 7
usb 2-2: New USB device found, idVendor=1bcf, idProduct=0c31
usb 2-2: New USB device strings: Mfr=2, Product=3, SerialNumber=1
usb 2-2: Product: USB to Serial-ATA bridge
usb 2-2: Manufacturer: Sunplus Innovation Technology.
usb 2-2: SerialNumber: FFFFFFFEDF102230086505
usb 2-2: configuration #1 chosen from 1 choice
scsi7 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 7
usb-storage: waiting for device to settle before scanning
usb-storage: device scan complete
scsi 7:0:0:0: CD-ROM Slimtype DVD A DS8A5S WX13 PQ: 0 ANSI: 0
sr1: scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
sr 7:0:0:0: Attached scsi CD-ROM sr1
sr 7:0:0:0: Attached scsi generic sg2 type 5
</code></pre>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Oops.. did I make you love me?. | 0non-cybersec
| Reddit |
Traditional German Fastfood: Bockwurst im Schlafrock / Blätterwurst [3744x2808]. | 0non-cybersec
| Reddit |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
Getting this error command /usr/bin/codesign failed with exit code 1 with xcode 9.1?. <p>I am getting this error </p>
<pre><code>/Users/macbook/Library/Developer/Xcode/DerivedData/xxxxx-egjyfcyhdfcgftavbtoudbcgthja/Build/Products/Debug-iphoneos/xxxx.app: unknown error -1=ffffffffffffffff
command /usr/bin/codesign failed with exit code 1
</code></pre>
<p>with xcode 9.1/ios11.1 while building the application, earlier i was able to run my application smoothly. Any idea what could be the issue. I have already tried following steps:</p>
<p>Deleting all the Derived Data.</p>
<p>update all provisioning profile and certificates.</p>
<p>But still no luck.</p>
| 0non-cybersec
| Stackexchange |
Bootsy watching TV. | 0non-cybersec
| Reddit |
The best picture ever taken of Loki.. | 0non-cybersec
| Reddit |
Denote $f(x)=\int_x^{x+1}\cos t^2 {\rm d}t.$Prove $\lim\limits_{x \to +\infty}f(x)=0.$. <h3>Problem</h3>
<p>Denote <span class="math-container">$$f(x)=\int_x^{x+1}\cos t^2 {\rm d}t.$$</span>Prove <span class="math-container">$\lim\limits_{x \to +\infty}f(x)=0.$</span></p>
<h3>Proof</h3>
<p>Assume <span class="math-container">$x>0$</span>. Making a substitution <span class="math-container">$t=\sqrt{u}$</span>,we have <span class="math-container">${\rm d}t=\dfrac{1}{2\sqrt{u}}{\rm d}u.$</span> Therefore,
<span class="math-container">\begin{align*}
f(x)&=\int_x^{x+1}\cos t^2 {\rm d}t\\
&=\int_{x^2}^{(x+1)^2} \frac{\cos u}{2\sqrt{u}}{\rm d}u\\
&=\frac{1}{2\sqrt{\xi}}\int_{x^2}^{(x+1)^2}\cos u{\rm d}u\\
&=\frac{\sin(x+1)^2-\sin x^2}{2\sqrt{\xi}},
\end{align*}</span>
where <span class="math-container">$x^2 \leq \xi\leq (x+1)^2$</span>. Further,
<span class="math-container">$$0\leq |f(x)|\leq \frac{|\sin(x+1)^2|+|\sin x^2|}{2\sqrt{\xi}}\leq \frac{1}{\sqrt{\xi}}\leq \frac{1}{x}\to 0(x \to +\infty),$$</span>
which implies <span class="math-container">$f(x)\to 0(x \to +\infty)$</span>, according to the squeeze theorem.</p>
| 0non-cybersec
| Stackexchange |
How do we see that the shape of an equation is closed?. <p>Actually, I would like to understand :
When we have an equation , can we decide that its shape closed curve?
For instance, for the equation:
$$((x+y)^2) + 2((x^4)/4-(x^5)/5)=C$$
For which values of C makes the shape of this equation closed? </p>
| 0non-cybersec
| Stackexchange |
Ethernet interface automatically re-enables after disabling manually. <p>I am trying to manually disable the eth0 interface, which should persist until the system is either rebooted or by manually enabling it. Unfortunately by either using</p>
<pre><code>ip link set dev eth0 down
</code></pre>
<p>or</p>
<pre><code>ifconfig eth0 down
</code></pre>
<p>the interface is down for a moment, around 2 to 15 seconds and than automatically starts enabling itself, giving the following message:</p>
<pre><code>fec 2188000.ethernet eth0: Freescale FEC PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=2188000.ethernet:00, irq=-1)
[ 727.204693] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
</code></pre>
<p>When plugging the ethernet cable out of the machine, the eth0 down does persist.</p>
<p>After trying to do it with the commandline method, I also tried to dig into the ethernet driver based on this link: <a href="http://www.6by9.net/using-linux-sys-to-disable-ethernet-hardware-devices/" rel="nofollow noreferrer">http://www.6by9.net/using-linux-sys-to-disable-ethernet-hardware-devices/</a> </p>
<p>But unfortunately there appears to be no "remove" file.</p>
| 0non-cybersec
| Stackexchange |
Do new lines in the title element affect SEO?. <p>It is a common thing that if you have some login that creates the <code>title</code> element content to finish with several new lines in it. For example:</p>
<pre><code><title>
Title |
Category |
My Site Name
</title>
</code></pre>
<p>Does this has some semantic falls? Is it bad for SEO?</p>
| 0non-cybersec
| Stackexchange |
How to create horizontal dashline length of page inside description environment. <p>I want to create a horizontal dashline with the length of page margin using the <code>arydshln</code> package. I've read <a href="https://tex.stackexchange.com/questions/19902/drawing-horizontal-line-same-width-as-the-page-width">this</a> but when using <code>\hdashline[1pt/2pt]</code> I get an error. How should I implement <code>\hdashline</code> inside the description environment to get the same result. (It needs to be inside the description environement)</p>
<p>My code is:</p>
<pre><code>\documentclass{article}
\usepackage{lipsum,comment,arydshln}
\author{something}
\title{something}
\begin{document}
\maketitle
\begin{description}
\item[something] \lipsum[20]
\noindent\makebox[\linewidth]{\rule{\textwidth}{1pt}}
\begin{comment}
need a dashline here but I don't know how to implement \hdashline[1pt/2pt] here. Moreover, I need the line to cover the page from margin to margin. This doesn't achieve this
\end{comment}
\item[something] \lipsum[20]
\end{description}
\lipsum[20]
\end{document}
</code></pre>
<p>I've realized that I can use <code>\hdashrule[0.5ex][c]{\linewidth}{1pt}{2pt}</code> But this doesn't cover the page from margin to margin.</p>
| 0non-cybersec
| Stackexchange |
The American Bible Belt. | 0non-cybersec
| Reddit |
How to strip TCP headers from tcpdump (with hexadecimal output of non-printable data). <p><code>tcpdump</code> don't know how to strip TCP headers from packed data.</p>
<p><code>tcpflow</code> print's only packet data, nice, but it supports only ASCII characters, no hexadecimal output possible. </p>
<p>Did I overlooked some option? Are there any other methods?</p>
| 0non-cybersec
| Stackexchange |
T-Mobile launches Curve 9315, BlackBerry 7 still alive and kicking. | 0non-cybersec
| Reddit |
How do I open an .sd image file. <p>I do support for a dental office and they recently asked me for help accessing their old files. They have dozens of CDs full of these image files.</p>
<p>No one seems to know what program created them - it's a bunch of older completely computer illiterate people).</p>
<p>The only clues I can find when opening the files in a text editor are:
The first line says: Dentofacial Document 2.0
A bit further down it says: Dentofacial Picture Format 2.0</p>
<p>I have tried the usual suspects like opening it in Paint, photoshop, illustrator, Acrobat, gimp, zip and iso programs. Anyone have any experience or suggestions? Or can maybe tell me the manufacturer of the software so I can contact them.</p>
| 0non-cybersec
| Stackexchange |
Giannis on instangram "Just wanted to try something a little different...first boxing lesson". | 0non-cybersec
| Reddit |
How to handle the repeat until convergence condition in time complexity and summarize the time complexity?. <p><a href="https://i.stack.imgur.com/zFxVt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/zFxVt.png" alt="enter image description here" /></a></p>
<p>I am a novice in complexity calculation. I need to calculate the overall time complexity.</p>
<p>My attempt is given below:</p>
<p>Here, N = number of data points (<code>N>300</code>), C = Number of clusters (<code>2<C<30</code>)</p>
<ol>
<li><p>For line 3 to 10, time complexity, <code>TC1 = O(NC)</code></p>
</li>
<li><p>For line 11 to 12, time complexity, <code>TC2 = O(C)</code></p>
</li>
<li><p>For line 18 to 22, time complexity, <code>TC3 = O(N*N)</code></p>
</li>
<li><p>For line 24 to 26, time complexity, <code>TC4 = (how to handle the repeat until convergence- the highlighted section?) (Here, I think </code>TC4 = O(N*N)<code>)</code></p>
</li>
<li><p>For line 16 to 29, the overall time complexity, <code>TC5 = C(TC3+ TC4) = O(N*N*C)// not sure about it due to the lacking confidence in the value of TC4.</code></p>
</li>
<li><p>For line 31 to 35, time complexity, <code>TC6 = O(N*C*C)</code></p>
</li>
<li><p>For line 38 to 40, time complexity, <code>TC7 = O(NC)</code></p>
</li>
</ol>
<p>So, finally, the overall time complexity <code>TC = TC1 + TC2 + TC5 + TC6 + TC7 = O(NC) + O(C) + O(N*N*C) + O(N*C*C) + O(NC) = O(?)</code> //How can I summarize this time complexity using Big-O.</p>
<blockquote>
<p>My Questions are:</p>
<p>a) How to handle the highlighted portion when calculating the time complexity?</p>
<p>b) How to summarize the overall time complexity?</p>
</blockquote>
<p>Please help.</p>
| 0non-cybersec
| Stackexchange |
This is The Cubli made by IDSC and ETH zürich in 2013, that uses the momentum of 3 spinning wheels to manoeuvre it’s self and balance with the help of gyroscopic sensors.. | 0non-cybersec
| Reddit |
What is absolute unique visitor in classical analytics?. <p>I have been coming across this term "Absolute Unique user". I can not find this in Google (Classical) Analytics.
The closest definition I could find is <a href="http://www.webopedia.com/TERM/A/absolute_unique_visitor.html" rel="nofollow">this</a>.</p>
<p>Is this a newly added metric in Universal Analytics? If so how can I find out "Absolute Unique user" via Google Analytics?</p>
<p>How is different than "Unique Visitor"?</p>
<p>Also I found <a href="http://www.dummies.com/how-to/content/google-analytics-absolute-unique-visitors-report.html" rel="nofollow">this</a> but for the life of me, I can not find this report. Is it a paid thing?</p>
| 0non-cybersec
| Stackexchange |
Golden Tate just agreed to 5 year deal with Lions. | 0non-cybersec
| Reddit |
Lioness trying to protect her meal.... | 0non-cybersec
| Reddit |
Kotlin: Method reference not working?. <p>It seems I'm unable to use a method reference of an object in Kotlin. This feature exists in Java.</p>
<p>For example in Java if I was looping through a string to append each character to a writer:</p>
<p><code>string.forEach(writer::append);</code></p>
<p>But in Kotlin using the same syntax does not work because:</p>
<p><a href="https://i.imgur.com/RQJy9GO.png" rel="noreferrer"><img src="https://i.imgur.com/RQJy9GO.png" alt="enter image description here"></a></p>
| 0non-cybersec
| Stackexchange |
TIL that the lady in American Gothic is the farmer's daughter, not his wife. . .. | 0non-cybersec
| Reddit |
Restore my browser's middle-click behaviour. <p>Some sites do annoying things with JavaScript, like replace the default behaviour of the browser to open a new tab on middle click, with code such as:</p>
<pre><code><a href="http://stackoverflow.com"
onclick="window.location.href='http://stackoverflow.com'; return false;">
Stack Overflow</a>
</code></pre>
<p>Is there any way I can give control back to my browser so that I'm the one that decides when a new tab gets opened or not? Right now I have to resort to either right clicking on the link and selecting <em>Open link in new tab</em>, or middle clicking on my browser's <em>Back</em> button after being rudely navigated away.</p>
| 0non-cybersec
| Stackexchange |
Comparisons of two random sums. <p>I now have two random sums $S_{N_1}\equiv\sum_{i=1}^{N_1}X_i$ and $S_{N_2}\equiv\sum_{i=1}^{N_2}Y_j$ where $N_1$ is dependent on $X_i$'s and $N_2$ on $Y_j$'s. In particular, $X_i$'s and $Y_j$'s are i.i.d. exponential random variable given the corresponding states (from a continuous time Markov) are known. And, yes, $X_i$'s and $Y_j$'s are inter-arrival times from two independent Markov-modulated Poisson processes.</p>
<p>I want to know the probability that
$$
\mathbb{P}\{S_{N_1} < S_{N_2}\}
$$
What am I supposed to begin with?</p>
<p>A rough idea now I am having goes as follows. I first condition on $N_1$ and $N_2$ to get
$$
\mathbb{P}\{S_{N_1} < S_{N_2}\} = \sum_{N_1, N_2}\mathbb{P}\{S_{n_1} < S_{n_2}\}\mathbb{P}\{N_1\}\mathbb{P}\{N_2\}
$$
then, since $S_{n_1}$ and $S_{n_2}$ will be some distributions (not gamma since the rates in $X_i$'s or $Y_j$'s are distinct) given the CTMC states, I condition again on the states
$$
\mathbb{P}\{S_{N_1} < S_{N_2}\} = \sum_{N_1, N_2}\sum_{\mathcal{S}_{1},\mathcal{S}_{2}}\mathbb{P}\{S_{n_1} < S_{n_2}\}K\mathbb{P}_{N_1}\mathbb{P}_{N_2}
$$
where $K$ is some term resulting from the conditioning on the CTMC states. Up here, I have no idea how to proceed with the $\mathbb{P}\{S_{n_1} < S_{n_2}\}$ with $S_{n_1}$ and $S_{n_2}$ are sums of exponentials with distinct rates.</p>
<p>Any thoughts will be greatly appreciated</p>
| 0non-cybersec
| Stackexchange |
Need help solving a Venn Diagram. <p>I am trying to figure out how to solve this Venn diagram problem for my Discrete Mathematics class. So the problem goes like this:</p>
<p>In a school there are 420 students. 300 of them have gone to school by car, 80 of them walking, 120 on a bicycle, 46 in a car and walking, 26 in a car and a bicycle, 36 walking and a bicycle, but 22 of them have neither used a car, bicycle or walked.</p>
<p>a) How many students come to school by car, walking and cycling? b) How many students come on a bicycle and walking but not car?</p>
<p>I just can't find a way to find the missing x in the middle I need to find</p>
| 0non-cybersec
| Stackexchange |
Xubuntu 20.04 LTS Cant Change Login-Screen Resolution (Thinkpad P50). <p>I recently got a ThinkpadP50 with a fresh Xubuntu 20.04 LTS install</p>
<ul>
<li>CPU: Intel i7-6820HQ (8) @ 3.600GHz</li>
<li>GPU: NVIDIA Quadro M1000M, using nvidia-driver-440</li>
</ul>
<p>However, I'm having an issue where my lock screen resolution and theme doesn't match or sync to my desktop environment (Xfce). It does this with other distros as well. (ive tried debian and manjaro)</p>
<p><strong>Also an important note</strong>: when my computer locks from going idle, the lock screen is perfectly fine and there's no issue. It'll match whatever resolution and themes I have set. The problem only occurs when shutting down, locking, restarting, etc.</p>
| 0non-cybersec
| Stackexchange |
How to use spot instance with amazon elastic beanstalk?. <p>I have one infra that use amazon elastic beanstalk to deploy my application.
I need to scale my app adding some spot instances that EB do not support.</p>
<p>So I create a second autoscaling from a launch configuration with spot instances.
The autoscaling use the same load balancer created by beanstalk.</p>
<p>To up instances with the last version of my app, I copy the user data from the original launch configuration (created with beanstalk) to the launch configuration with spot instances (created by me).</p>
<p>This work fine, but:</p>
<ol>
<li><p>how to update spot instances that have come up from the second autoscaling when the beanstalk update instances managed by him with a new version of the app?</p>
</li>
<li><p>is there another way so easy as, and elegant, to use spot instances and enjoy the benefits of beanstalk?</p>
</li>
</ol>
<p><strong>UPDATE</strong></p>
<p>Elastic Beanstalk add support to spot instance since 2019... see:
<a href="https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html" rel="nofollow noreferrer">https://docs.aws.amazon.com/elasticbeanstalk/latest/relnotes/release-2019-11-25-spot.html</a></p>
| 0non-cybersec
| Stackexchange |
TIL that metals don't actually have any smell, and that the "smell of metal" is actually produced by our bodies.. | 0non-cybersec
| Reddit |
Alex Jones predicted the 2020 race war. | 0non-cybersec
| Reddit |
My saving grace at my internship has been apple cinnamon overnight oats. Looks gross but tastes great!. | 0non-cybersec
| Reddit |
Inequality involving CDF and PDF of Standard Normal Distribution. <blockquote>
<p>For the standard normal density function <span class="math-container">$f$</span>, show that <span class="math-container">$f'(x) + xf(x) = 0$</span>. Hence show that for <span class="math-container">$x>0$</span>, <span class="math-container">$$\frac{1}{x}-\frac{1}{x^3} < \frac{1-F(x)}{f(x)} < \frac{1}{x}-\frac{1}{x^3}+\frac{3}{x^5}.$$</span></p>
</blockquote>
<p>The first part is fine. The inequality is what's bugging me.</p>
<p><span class="math-container">$F(x)$</span> is the CDF of the standard normal distribution where <span class="math-container">$f(x)$</span> is the PDF and <span class="math-container">$F^\prime(x)=f(x)$</span>, so it's given by <span class="math-container">$$F(x) = \frac{1}{\sqrt{2\pi}}\int_{0}^{x}e^{-\frac{x^2}{2}}dx.$$</span></p>
<p>This is the integral of a Gaussian function and as far as I know it cannot be computed if there isn't an infinite limit somewhere (correct me if I'm wrong).</p>
<p>I have no idea where to start. I tried messing around with limits but to no avail. This probably has something to do with some kind of Analysis theorem, and Analysis is <strong>not</strong> my strong point.</p>
<p>Any help would be much appreciated.</p>
| 0non-cybersec
| Stackexchange |
Bypassing Hotstar Premium with DOM manipulation and some JavaScript. | 1cybersec
| Reddit |
$X$ connected in the order topology $\Rightarrow$ every $A\subset X$ that has an upper bound has a supremum. <p>I have to prove</p>
<blockquote>
<p>$X$ connected in the order topology (w.r.t. a linear order <) $\Rightarrow$ every $A\subset X$
that has an upper bound has a supremum</p>
</blockquote>
<p>My attempt:</p>
<p>Reason by contradiction: take $A\subset X$ with an upper bound but no supremum. It follows that $A$ has no maximal element, and that there are infinite increasing sequences $(x_1,x_2,...)$ in $A$, and an infinite sequence $(y_1,y_2,...)$ of upper bounds on $A$. We then consider
$$A_<=\bigcup_{a\in A}\{x\in X|x<a\}$$
$$A_>=\bigcup_{a\text{ an upper bound on $A$}}\{x\in X|a<x\}$$
These are both open in the order topology. It is not hard to verify that these sets partition $X$ and that they are also closed. This way we exhibit $X$ as the union of $2$ separated components, which is a contradiction.$\square$</p>
<p>Since I'm self studying and have no answers of the exercises I just want to verify this answer. I'm most interested in the validity of my reasoning related to the upper-bound stuff (the existence of the infinite sequences and such). Thanks.</p>
| 0non-cybersec
| Stackexchange |
determining if a tail event. <p>I am to determine if $$\{\sup X_n < \infty \}$$ is a tail event, the solutions are as follows:</p>
<p><a href="https://i.stack.imgur.com/N9Rdl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/N9Rdl.png" alt="enter image description here"></a></p>
<p>I don't understand how they got the line of equalities, specifically the last one, and why it holds for all $M$ and $n$.</p>
| 0non-cybersec
| Stackexchange |
Why would g++ compiled code write beyond stack pointer?. <p>To better understand assembly, I compiled a simple C++ program using g++ and then used gdbgui to step through the execution. I made a graphic of the state of the stack and registers at several consecutive points in the program to help myself better understand exactly what was going on. It appears that the program writes/reads at memory beyond the stack pointer several times during execution. This surprised me. I was under the impression that a program should never write beyond the stack pointer. I understand how it works, the relative addressing is based off of the base pointer, but I would've expected the program to adjust the stack pointer in some way to encompass the memory it planned on using. Is this method of writing beyond the stack a common technique for compilers?</p>
<p>C++:</p>
<pre><code>#include <iostream>
int square(int i) {
i = i * i;
return i;
}
int main() {
int i = square(2);
}
</code></pre>
<p>Compiled on Ubuntu 19.10 with:</p>
<pre><code>g++ -o square_2 square_2.cpp
</code></pre>
<p>g++ version:</p>
<pre><code>g++ -v
Using built-in specs.
COLLECT_GCC=g++
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/9/lto-wrapper
OFFLOAD_TARGET_NAMES=nvptx-none:hsa
OFFLOAD_TARGET_DEFAULT=1
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 9.2.1-9ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-9/README.Bugs --enable-languages=c,ada,c++,go,brig,d,fortran,objc,obj-c++,gm2 --prefix=/usr --with-gcc-major-version-only --program-suffix=-9 --program-prefix=x86_64-linux-gnu- --enable-shared --enable-linker-build-id --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --libdir=/usr/lib --enable-nls --enable-bootstrap --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --with-default-libstdcxx-abi=new --enable-gnu-unique-object --disable-vtable-verify --enable-plugin --enable-default-pie --with-system-zlib --with-target-system-zlib=auto --enable-multiarch --disable-werror --with-arch-32=i686 --with-abi=m64 --with-multilib-list=m32,m64,mx32 --enable-multilib --with-tune=generic --enable-offload-targets=nvptx-none,hsa --without-cuda-driver --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 9.2.1 20191008 (Ubuntu 9.2.1-9ubuntu2)
</code></pre>
<p>Relevant assembly from gdb:</p>
<pre><code>0x55555555516d push rbp
0x55555555516e mov rbp,rsp
0x555555555171 mov DWORD PTR [rbp-0x4],edi
0x555555555174 mov eax,DWORD PTR [rbp-0x4]
0x555555555177 imul eax,eax
0x55555555517a mov DWORD PTR [rbp-0x4],eax
0x55555555517d mov eax,DWORD PTR [rbp-0x4]
0x555555555180 pop rbp
0x555555555181 ret
</code></pre>
<p><a href="https://i.stack.imgur.com/TwUBf.png" rel="noreferrer">Execution Trace</a></p>
<p>I used yellow highlighting to indicate when a value was updated, and green highlighting to show which memory contents the stack pointer is currently pointing at.</p>
<p><a href="https://i.stack.imgur.com/fx61Q.png" rel="noreferrer">gdbgui screenshot</a></p>
| 0non-cybersec
| Stackexchange |
ELI5: How do you tell a computer how long a second is?. | 0non-cybersec
| Reddit |
For the past six months, I've been going to the gym without paying for a membership. [No regrets] I work an office job and the only time I'm able to work out is right at 5 AM (opening time). During my first three days (guest pass) I noticed there is no one watching the front desk because the one front desk opener is either washing down windows or cleaning.
Every day since then, I've walked in right at 5 AM to work out. The staff always waves me in with a hearty "Good Morning!". You'd think they'd realize, but I think they hate their jobs and don't care.
I am ready to pay whatever I owe, but want to see how long I can get away with it. | 0non-cybersec
| Reddit |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.